mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Store client's environment in terminal parameters, not server parameters.
* lisp/loadup.el: Don't load server. * lisp/ldefs-boot.el: Update. * lib-src/emacsclient.c (main): Send environment only when a new display is created. * lisp/server.el (server-save-buffers-kill-display): Add autoload cookie. Move stuff not specific to server into `save-buffers-kill-display'. * lisp/files.el (save-buffers-kill-display): New function. (ctl-x-map): Bind it to C-x C-c. * lisp/frame.el (terminal-getenv): New function. * lisp/international/mule-cmds.el (set-locale-environment): Use it. * lisp/frame.el (with-terminal-environment): New macro. * lisp/server.el (server-getenv, server-with-client-environment): Remove. (server-getenv-from, server-with-environment): New functions. (server-process-filter): Change syntax of environment variables. Put environment into terminal parameters, not client parameters. * lisp/term/rxvt.el: Don't require server. (rxvt-set-background-mode): Use terminal-getenv, not server-getenv. * lisp/term/x-win.el (x-initialize-window-system): Ditto. * lisp/term/xterm.el (terminal-init-xterm): Ditto. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-443
This commit is contained in:
parent
e3362cebc3
commit
59e085e04d
10 changed files with 549 additions and 685 deletions
|
|
@ -4875,6 +4875,22 @@ With prefix arg, silently save all file-visiting buffers, then kill."
|
|||
(or (null confirm-kill-emacs)
|
||||
(funcall confirm-kill-emacs "Really exit Emacs? "))
|
||||
(kill-emacs)))
|
||||
|
||||
(defun save-buffers-kill-display (&optional arg)
|
||||
"Offer to save each buffer, then kill the current connection.
|
||||
If the current frame has no client, kill Emacs itself.
|
||||
|
||||
With prefix arg, silently save all file-visiting buffers, then kill.
|
||||
|
||||
If emacsclient was started with a list of filenames to edit, then
|
||||
only these files will be asked to be saved."
|
||||
(interactive "P")
|
||||
(let ((proc (frame-parameter (selected-frame) 'client))
|
||||
(frame (selected-frame)))
|
||||
(if (null proc)
|
||||
(save-buffers-kill-emacs)
|
||||
(server-save-buffers-kill-display proc arg))))
|
||||
|
||||
|
||||
;; We use /: as a prefix to "quote" a file name
|
||||
;; so that magic file name handlers will not apply to it.
|
||||
|
|
@ -4972,7 +4988,7 @@ With prefix arg, silently save all file-visiting buffers, then kill."
|
|||
(define-key ctl-x-map "i" 'insert-file)
|
||||
(define-key esc-map "~" 'not-modified)
|
||||
(define-key ctl-x-map "\C-d" 'list-directory)
|
||||
(define-key ctl-x-map "\C-c" 'server-save-buffers-kill-display)
|
||||
(define-key ctl-x-map "\C-c" 'save-buffers-kill-display)
|
||||
(define-key ctl-x-map "\C-q" 'toggle-read-only)
|
||||
|
||||
(define-key ctl-x-4-map "f" 'find-file-other-window)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue