Commit 626ea340 authored by Karoly Lorentey's avatar Karoly Lorentey
Browse files

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
parent 4400e764
......@@ -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.
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment