# HG changeset patch # User Karoly Lorentey # Date 1120610578 0 # Node ID 6afa124501e69a80b15856b75849eebb6300034e # Parent 40c0ee2822547842a733f485de5b7dc5c1c959a2 Small enhancements. * lisp/international/mule-cmds.el (set-locale-environment): Use server-getenv, not getenv. * lisp/server.el (server-handle-delete-frame): Add note on possible race condition. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-374 diff -r 40c0ee282254 -r 6afa124501e6 lisp/international/mule-cmds.el --- a/lisp/international/mule-cmds.el Wed Jul 06 00:41:41 2005 +0000 +++ b/lisp/international/mule-cmds.el Wed Jul 06 00:42:58 2005 +0000 @@ -2402,7 +2402,7 @@ (let ((vars '("LC_ALL" "LC_CTYPE" "LANG"))) (while (and vars (= 0 (length locale))) ; nil or empty string - (setq locale (getenv (pop vars)))))) + (setq locale (server-getenv (pop vars)))))) (unless (or locale (not (fboundp 'mac-get-preference))) (setq locale (mac-get-preference "AppleLocale")) @@ -2512,7 +2512,7 @@ ;; Mac OS X's Terminal.app by default uses utf-8 regardless of ;; the locale. (when (and (null window-system) - (equal (getenv "TERM_PROGRAM") "Apple_Terminal")) + (equal (server-getenv "TERM_PROGRAM") "Apple_Terminal")) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8))) @@ -2530,7 +2530,7 @@ (setq ps-paper-type 'a4))) (let ((vars '("LC_ALL" "LC_PAPER" "LANG"))) (while (and vars (= 0 (length locale))) - (setq locale (getenv (pop vars))))) + (setq locale (server-getenv (pop vars))))) (when locale ;; As of glibc 2.2.5, these are the only US Letter locales, ;; and the rest are A4. diff -r 40c0ee282254 -r 6afa124501e6 lisp/server.el --- a/lisp/server.el Wed Jul 06 00:41:41 2005 +0000 +++ b/lisp/server.el Wed Jul 06 00:42:58 2005 +0000 @@ -326,6 +326,10 @@ (frame-list)) frame-num)))) (server-log (format "server-handle-delete-frame, frame %s" frame) proc) + ;; XXX Deleting the process causes emacsclient to exit + ;; immediately, which might happen before Emacs closes the + ;; display. I think we need a `delete-frame-after-functions' + ;; hook here. (server-delete-client proc 'noframe)))) ; Let delete-frame delete the frame later. (defun server-handle-suspend-tty (display)