;; 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,
: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
`-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
;; 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))
"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))
(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)