summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-07-15 04:01:14 +0000
committerRichard M. Stallman <rms@gnu.org>1993-07-15 04:01:14 +0000
commit0b4a949b3bbd213635fbe4905c396aa81b04bd96 (patch)
tree80185c957af50839c744e0c1b925ecde1c24e34b /lisp/server.el
parent7616f21b744365249cbb05baccea1517c25a66b3 (diff)
downloademacs-0b4a949b3bbd213635fbe4905c396aa81b04bd96.tar.gz
(server-done): Let save-buffer make the backup,
so that make-backup-files remains effective.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 1084aee4093..6cc087c19bf 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -268,10 +268,12 @@ Then bury it, and return a suggested buffer to select next."
(if server-buffer-clients
(progn
(if (server-temp-file-p buffer)
- (progn (save-buffer)
- (write-region (point-min) (point-max)
- (concat buffer-file-name "~"))
- (kill-buffer buffer))
+ ;; For a temp file, save, and do make a non-numeric backup
+ ;; (unless make-backup-files is nil).
+ (let ((version-control nil)
+ (buffer-backed-up nil))
+ (save-buffer)
+ (kill-buffer buffer))
(if (and (buffer-modified-p)
(y-or-n-p (concat "Save file " buffer-file-name "? ")))
(save-buffer buffer)))
@@ -283,7 +285,9 @@ If a server buffer is current, it is marked \"done\" and optionally saved.
When all of a client's buffers are marked as \"done\", the client is notified.
Temporary files such as MH <draft> files are always saved and backed up,
-no questions asked. The variable `server-temp-file-regexp' controls
+no questions asked. (The variable `make-backup-files', if nil, still
+inhibits a backup; you can set it locally in a particular buffer to
+prevent a backup for it.) The variable `server-temp-file-regexp' controls
which filenames are considered temporary.
If invoked with a prefix argument, or if there is no server process running,