changeset 83334:6afa124501e6

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
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 06 Jul 2005 00:42:58 +0000
parents 40c0ee282254
children 60208d3a0bb1
files lisp/international/mule-cmds.el lisp/server.el
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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)