Mercurial > emacs
comparison lisp/server.el @ 91302:56a72e2bd635
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-306
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 29 Dec 2007 02:39:17 +0000 |
parents | 2fcaae6177a5 cd847b2ba99f |
children | 606f2d163a64 |
comparison
equal
deleted
inserted
replaced
91301:7774e5860c70 | 91302:56a72e2bd635 |
---|---|
1258 (when server-raise-frame | 1258 (when server-raise-frame |
1259 (select-frame-set-input-focus (window-frame (selected-window)))))) | 1259 (select-frame-set-input-focus (window-frame (selected-window)))))) |
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 |
1265 With prefix arg, silently save all file-visiting buffers, then kill. | 1266 With prefix arg, silently save all file-visiting buffers, then kill. |
1266 | 1267 |
1267 If emacsclient was started with a list of filenames to edit, then | 1268 If emacsclient was started with a list of filenames to edit, then |
1268 only these files will be asked to be saved." | 1269 only 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 |
1281 (defun server-unload-function () | 1285 (defun server-unload-function () |
1282 "Unload the server library." | 1286 "Unload the server library." |