]> code.delx.au - gnu-emacs/blobdiff - lisp/server.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / server.el
index 01acabf1ec8a45668ce8adba55b53900e4391df8..a9907f9d3a34e6e61cfa367a3e10760a7fad9b4c 100644 (file)
@@ -14,7 +14,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -106,7 +106,7 @@ If set, the server accepts remote connections; otherwise it is local."
   :version "22.1")
 (put 'server-host 'risky-local-variable t)
 
-(defcustom server-auth-dir "~/.emacs.d/server/"
+(defcustom server-auth-dir (concat user-emacs-directory "server/")
   "Directory for server authentication files."
   :group 'server
   :type 'directory
@@ -564,7 +564,7 @@ The following commands are accepted by the server:
 
 `-auth AUTH-STRING'
   Authenticate the client using the secret authentication string
-  AUTH_STRING.
+  AUTH-STRING.
 
 `-version CLIENT-VERSION'
   Check version numbers between server and client, and signal an
@@ -763,6 +763,10 @@ The following commands are accepted by the client:
                          ;; initialization parameters for X frames at
                          ;; the moment.
                          (modify-frame-parameters frame params)
+                         (set-frame-parameter frame 'display-environment-variable 
+                                              (server-getenv-from env "DISPLAY"))
+                         (set-frame-parameter frame 'term-environment-variable 
+                                              (server-getenv-from env "TERM"))
                          (select-frame frame)
                          (server-client-set client 'frame frame)
                          (server-client-set client 'terminal (frame-terminal frame))
@@ -812,12 +816,19 @@ The following commands are accepted by the client:
                            "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES"
                            "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING"
                            "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO"
-                           "TERMINFO_DIRS" "TERMPATH")
+                           "TERMINFO_DIRS" "TERMPATH" 
+                           ;; rxvt wants these
+                           "COLORFGBG" "COLORTERM")
                        (setq frame (make-frame-on-tty tty type
                                                       ;; Ignore nowait here; we always need to clean
                                                       ;; up opened ttys when the client dies.
                                                       `((client . ,proc)
                                                         (environment . ,env)))))
+             
+                     (set-frame-parameter frame 'display-environment-variable 
+                                          (server-getenv-from env "DISPLAY"))
+                     (set-frame-parameter frame 'term-environment-variable 
+                                          (server-getenv-from env "TERM"))
                      (select-frame frame)
                      (server-client-set client 'frame frame)
                      (server-client-set client 'tty (terminal-name frame))
@@ -1183,8 +1194,7 @@ done that."
                 (select-window win)
                 (set-buffer next-buffer))
            ;; Otherwise, let's find an appropriate window.
-           (cond ((and (windowp server-window)
-                       (window-live-p server-window))
+           (cond ((window-live-p server-window)
                   (select-window server-window))
                  ((framep server-window)
                   (unless (frame-live-p server-window)