comparison lisp/server.el @ 4096:badd80e9e4fc

(server-done): Let save-buffer make the backup, so that make-backup-files remains effective.
author Richard M. Stallman <rms@gnu.org>
date Thu, 15 Jul 1993 04:01:14 +0000
parents 4a96c64c4d5e
children 56d7c4beae9f
comparison
equal deleted inserted replaced
4095:f60102c4b948 4096:badd80e9e4fc
266 Then bury it, and return a suggested buffer to select next." 266 Then bury it, and return a suggested buffer to select next."
267 (let ((buffer (current-buffer))) 267 (let ((buffer (current-buffer)))
268 (if server-buffer-clients 268 (if server-buffer-clients
269 (progn 269 (progn
270 (if (server-temp-file-p buffer) 270 (if (server-temp-file-p buffer)
271 (progn (save-buffer) 271 ;; For a temp file, save, and do make a non-numeric backup
272 (write-region (point-min) (point-max) 272 ;; (unless make-backup-files is nil).
273 (concat buffer-file-name "~")) 273 (let ((version-control nil)
274 (kill-buffer buffer)) 274 (buffer-backed-up nil))
275 (save-buffer)
276 (kill-buffer buffer))
275 (if (and (buffer-modified-p) 277 (if (and (buffer-modified-p)
276 (y-or-n-p (concat "Save file " buffer-file-name "? "))) 278 (y-or-n-p (concat "Save file " buffer-file-name "? ")))
277 (save-buffer buffer))) 279 (save-buffer buffer)))
278 (server-buffer-done buffer))))) 280 (server-buffer-done buffer)))))
279 281
281 "Switch to next server editing buffer; say \"Done\" for current buffer. 283 "Switch to next server editing buffer; say \"Done\" for current buffer.
282 If a server buffer is current, it is marked \"done\" and optionally saved. 284 If a server buffer is current, it is marked \"done\" and optionally saved.
283 When all of a client's buffers are marked as \"done\", the client is notified. 285 When all of a client's buffers are marked as \"done\", the client is notified.
284 286
285 Temporary files such as MH <draft> files are always saved and backed up, 287 Temporary files such as MH <draft> files are always saved and backed up,
286 no questions asked. The variable `server-temp-file-regexp' controls 288 no questions asked. (The variable `make-backup-files', if nil, still
289 inhibits a backup; you can set it locally in a particular buffer to
290 prevent a backup for it.) The variable `server-temp-file-regexp' controls
287 which filenames are considered temporary. 291 which filenames are considered temporary.
288 292
289 If invoked with a prefix argument, or if there is no server process running, 293 If invoked with a prefix argument, or if there is no server process running,
290 starts server process and that is all. Invoked by \\[server-edit]." 294 starts server process and that is all. Invoked by \\[server-edit]."
291 295