mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-21 13:10:37 -08:00
(server-getenv-from): Remove. Use getenv-internal instead.
(server-create-tty-frame): Don't set unused `tty' property. Set `display' instead of display-environment-variable. (server-create-window-system-frame): No display-environment-variable.
This commit is contained in:
parent
a44d9b8b4c
commit
e159b86943
2 changed files with 15 additions and 25 deletions
|
|
@ -1,9 +1,16 @@
|
||||||
|
2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* server.el (server-getenv-from): Remove. Use getenv-internal instead.
|
||||||
|
(server-create-tty-frame): Don't set unused `tty' property.
|
||||||
|
Set `display' instead of display-environment-variable.
|
||||||
|
(server-create-window-system-frame): No display-environment-variable.
|
||||||
|
|
||||||
2007-09-21 Michael Albinus <michael.albinus@gmx.de>
|
2007-09-21 Michael Albinus <michael.albinus@gmx.de>
|
||||||
|
|
||||||
* rfn-eshadow.el (rfn-eshadow-setup-minibuffer-hook)
|
* rfn-eshadow.el (rfn-eshadow-setup-minibuffer-hook)
|
||||||
(rfn-eshadow-update-overlay-hook): New defvars.
|
(rfn-eshadow-update-overlay-hook): New defvars.
|
||||||
(rfn-eshadow-setup-minibuffer, rfn-eshadow-update-overlay): Run
|
(rfn-eshadow-setup-minibuffer, rfn-eshadow-update-overlay):
|
||||||
the hooks.
|
Run the hooks.
|
||||||
|
|
||||||
* net/tramp.el (tramp-rfn-eshadow-overlay): New defvar.
|
* net/tramp.el (tramp-rfn-eshadow-overlay): New defvar.
|
||||||
(tramp-rfn-eshadow-setup-minibuffer)
|
(tramp-rfn-eshadow-setup-minibuffer)
|
||||||
|
|
|
||||||
|
|
@ -213,22 +213,6 @@ Initialized by `server-start'.")
|
||||||
New clients have no properties."
|
New clients have no properties."
|
||||||
(add-to-list 'server-clients proc))
|
(add-to-list 'server-clients proc))
|
||||||
|
|
||||||
(defun server-getenv-from (env variable)
|
|
||||||
"Get the value of VARIABLE in ENV.
|
|
||||||
VARIABLE should be a string. Value is nil if VARIABLE is
|
|
||||||
undefined in ENV. Otherwise, value is a string.
|
|
||||||
|
|
||||||
ENV should be in the same format as `process-environment'."
|
|
||||||
(let (entry result)
|
|
||||||
(while (and env (null result))
|
|
||||||
(setq entry (car env)
|
|
||||||
env (cdr env))
|
|
||||||
(if (and (> (length entry) (length variable))
|
|
||||||
(eq ?= (aref entry (length variable)))
|
|
||||||
(equal variable (substring entry 0 (length variable))))
|
|
||||||
(setq result (substring entry (+ (length variable) 1)))))
|
|
||||||
result))
|
|
||||||
|
|
||||||
(defmacro server-with-environment (env vars &rest body)
|
(defmacro server-with-environment (env vars &rest body)
|
||||||
"Evaluate BODY with environment variables VARS set to those in ENV.
|
"Evaluate BODY with environment variables VARS set to those in ENV.
|
||||||
The environment variables are then restored to their previous values.
|
The environment variables are then restored to their previous values.
|
||||||
|
|
@ -240,7 +224,7 @@ ENV should be in the same format as `process-environment'."
|
||||||
(value (make-symbol "value")))
|
(value (make-symbol "value")))
|
||||||
`(let ((process-environment process-environment))
|
`(let ((process-environment process-environment))
|
||||||
(dolist (,var ,vars)
|
(dolist (,var ,vars)
|
||||||
(let ((,value (server-getenv-from ,env ,var)))
|
(let ((,value (getenv-internal ,var ,env)))
|
||||||
(push (if (null ,value)
|
(push (if (null ,value)
|
||||||
,var
|
,var
|
||||||
(concat ,var "=" ,value))
|
(concat ,var "=" ,value))
|
||||||
|
|
@ -585,11 +569,12 @@ Server mode runs a process that accepts commands from the
|
||||||
`((client . ,proc)
|
`((client . ,proc)
|
||||||
(environment . ,(process-get proc 'env)))))))
|
(environment . ,(process-get proc 'env)))))))
|
||||||
|
|
||||||
(set-frame-parameter frame 'display-environment-variable
|
;; ttys don't use the `display' parameter, but callproc.c does to set
|
||||||
(server-getenv-from (process-get proc 'env) "DISPLAY"))
|
;; the DISPLAY environment on subprocesses.
|
||||||
|
(set-frame-parameter frame 'display
|
||||||
|
(getenv-internal "DISPLAY" (process-get proc 'env)))
|
||||||
(select-frame frame)
|
(select-frame frame)
|
||||||
(process-put proc 'frame frame)
|
(process-put proc 'frame frame)
|
||||||
(process-put proc 'tty (terminal-name frame))
|
|
||||||
(process-put proc 'terminal (frame-terminal frame))
|
(process-put proc 'terminal (frame-terminal frame))
|
||||||
|
|
||||||
;; Display *scratch* by default.
|
;; Display *scratch* by default.
|
||||||
|
|
@ -601,7 +586,7 @@ Server mode runs a process that accepts commands from the
|
||||||
frame))
|
frame))
|
||||||
|
|
||||||
(defun server-create-window-system-frame (display nowait proc)
|
(defun server-create-window-system-frame (display nowait proc)
|
||||||
(if (not (fboundp 'x-create-frame))
|
(if (not (fboundp 'make-frame-on-display))
|
||||||
(progn
|
(progn
|
||||||
;; This emacs does not support X.
|
;; This emacs does not support X.
|
||||||
(server-log "Window system unsupported" proc)
|
(server-log "Window system unsupported" proc)
|
||||||
|
|
@ -626,8 +611,6 @@ Server mode runs a process that accepts commands from the
|
||||||
;; initialization parameters for X frames at
|
;; initialization parameters for X frames at
|
||||||
;; the moment.
|
;; the moment.
|
||||||
(modify-frame-parameters frame params)
|
(modify-frame-parameters frame params)
|
||||||
(set-frame-parameter frame 'display-environment-variable
|
|
||||||
(server-getenv-from (process-get proc 'env) "DISPLAY"))
|
|
||||||
(select-frame frame)
|
(select-frame frame)
|
||||||
(process-put proc 'frame frame)
|
(process-put proc 'frame frame)
|
||||||
(process-put proc 'terminal (frame-terminal frame))
|
(process-put proc 'terminal (frame-terminal frame))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue