aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/server.el22
2 files changed, 18 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 76dfeb27f05..f02cfe5d894 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-12-23 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * server.el (server-save-buffers-kill-terminal): Check the `proc' is
4 indeed a process.
5
12007-12-23 Richard Stallman <rms@gnu.org> 62007-12-23 Richard Stallman <rms@gnu.org>
2 7
3 * simple.el (region-active-p): New function. 8 * simple.el (region-active-p): New function.
diff --git a/lisp/server.el b/lisp/server.el
index 4d21959774a..dc534adc0f9 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1260,21 +1260,25 @@ done that."
1260 1260
1261;;;###autoload 1261;;;###autoload
1262(defun server-save-buffers-kill-terminal (proc &optional arg) 1262(defun server-save-buffers-kill-terminal (proc &optional arg)
1263 ;; Called from save-buffers-kill-terminal in files.el.
1263 "Offer to save each buffer, then kill PROC. 1264 "Offer to save each buffer, then kill PROC.
1264 1265
1265With prefix arg, silently save all file-visiting buffers, then kill. 1266With prefix arg, silently save all file-visiting buffers, then kill.
1266 1267
1267If emacsclient was started with a list of filenames to edit, then 1268If emacsclient was started with a list of filenames to edit, then
1268only these files will be asked to be saved." 1269only these files will be asked to be saved."
1269 (let ((buffers (process-get proc 'buffers))) 1270 ;; save-buffers-kill-terminal occasionally calls us with proc set
1270 ;; If client is bufferless, emulate a normal Emacs session 1271 ;; to `nowait' (comes from the value of the `client' frame parameter).
1271 ;; exit and offer to save all buffers. Otherwise, offer to 1272 (when (processp proc)
1272 ;; save only the buffers belonging to the client. 1273 (let ((buffers (process-get proc 'buffers)))
1273 (save-some-buffers arg 1274 ;; If client is bufferless, emulate a normal Emacs session
1274 (if buffers 1275 ;; exit and offer to save all buffers. Otherwise, offer to
1275 (lambda () (memq (current-buffer) buffers)) 1276 ;; save only the buffers belonging to the client.
1276 t)) 1277 (save-some-buffers arg
1277 (server-delete-client proc))) 1278 (if buffers
1279 (lambda () (memq (current-buffer) buffers))
1280 t))
1281 (server-delete-client proc))))
1278 1282
1279(define-key ctl-x-map "#" 'server-edit) 1283(define-key ctl-x-map "#" 'server-edit)
1280 1284