1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00

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
This commit is contained in:
Karoly Lorentey 2005-07-06 00:42:58 +00:00
parent 4400e7648c
commit 626ea340bc
2 changed files with 7 additions and 3 deletions

View File

@ -2402,7 +2402,7 @@ See also `locale-charset-language-names', `locale-language-names',
(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 @@ See also `locale-charset-language-names', `locale-language-names',
;; 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 @@ See also `locale-charset-language-names', `locale-language-names',
(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.

View File

@ -326,6 +326,10 @@ message."
(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)