diff options
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/startup.el | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c95f4b36d29..1872f8303ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * startup.el (normal-top-level): Remove DISPLAY from | ||
| 4 | process-environment to let it be computed dynamically in callproc.c | ||
| 5 | |||
| 3 | * frame.el (frame-initialize, make-frame): | 6 | * frame.el (frame-initialize, make-frame): |
| 4 | * faces.el (tty-set-up-initial-frame-faces): | 7 | * faces.el (tty-set-up-initial-frame-faces): |
| 5 | * env.el (setenv): Don't set display-environment-variable. | 8 | * env.el (setenv): Don't set display-environment-variable. |
diff --git a/lisp/startup.el b/lisp/startup.el index 052f33fd175..a2f7a95651c 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -498,7 +498,21 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 498 | ;; unless told otherwise they should only assume a dumb terminal. | 498 | ;; unless told otherwise they should only assume a dumb terminal. |
| 499 | ;; We are careful to do it late (after term-setup-hook), although the | 499 | ;; We are careful to do it late (after term-setup-hook), although the |
| 500 | ;; new multi-tty code does not use $TERM any more there anyway. | 500 | ;; new multi-tty code does not use $TERM any more there anyway. |
| 501 | (setenv "TERM" "dumb"))) | 501 | (setenv "TERM" "dumb") |
| 502 | ;; Remove DISPLAY from the process-environment as well. This allows | ||
| 503 | ;; `callproc.c' to give it a useful adaptive default which is either | ||
| 504 | ;; the value of the `display' frame-parameter or the DISPLAY value | ||
| 505 | ;; from initial-environment. | ||
| 506 | (let ((display (frame-parameter nil 'display))) | ||
| 507 | ;; Be careful which DISPLAY to remove from process-environment: follow | ||
| 508 | ;; the logic of `callproc.c'. | ||
| 509 | (if (stringp display) (setq display (concat "DISPLAY=" display)) | ||
| 510 | (dolist (varval initial-environment) | ||
| 511 | (if (string-match "\\`DISPLAY=" varval) | ||
| 512 | (setq display varval)))) | ||
| 513 | (when display | ||
| 514 | (message "Removing %s from process-environment" display) | ||
| 515 | (delete display process-environment))))) | ||
| 502 | 516 | ||
| 503 | ;; Precompute the keyboard equivalents in the menu bar items. | 517 | ;; Precompute the keyboard equivalents in the menu bar items. |
| 504 | (defun precompute-menubar-bindings () | 518 | (defun precompute-menubar-bindings () |