diff options
| author | Karoly Lorentey | 2005-12-26 02:14:10 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-12-26 02:14:10 +0000 |
| commit | f105f403d206f95bf534226abb99f14aa2f3052e (patch) | |
| tree | d326884972abd85997fc9e688e0fefa60a3ec977 /README.multi-tty | |
| parent | ed8dad6b616204b4dd4e853801f41da6f4c3b0a7 (diff) | |
| download | emacs-f105f403d206f95bf534226abb99f14aa2f3052e.tar.gz emacs-f105f403d206f95bf534226abb99f14aa2f3052e.zip | |
Implement automatic terminal-local environment variables via `local-environment-variables'.
* lisp/env.el (setenv, getenv): Add optional terminal parameter. Update docs.
(setenv): Handle `local-environment-variables'.
(read-envvar-name): Also allow (and complete) local
environment variables on the current terminal.
* src/callproc.c: Include frame.h and termhooks.h, for terminal parameters.
(Qenvironment): New constant.
(Vlocal_environment_variables): New variable.
(syms_of_callproc): Register and initialize them.
(child_setup): Handle Vlocal_environment_variables.
(getenv_internal): Add terminal parameter. Handle
Vlocal_environment_variables.
(Fgetenv_internal): Add terminal parameter.
* src/termhooks.h (get_terminal_param): Declare.
* src/Makefile.in (callproc.o): Update dependencies.
* mac/makefile.MPW (callproc.c.x): Update dependencies.
* lisp/termdev.el (terminal-id): Make parameter optional.
(terminal-getenv, terminal-setenv, with-terminal-environment):
Disable functions.
* lisp/mule-cmds.el (set-locale-environment): Convert `terminal-getenv' calls
to `getenv'.
* lisp/rxvt.el (rxvt-set-background-mode): Ditto.
* lisp/x-win.el (x-initialize-window-system): Ditto.
* lisp/xterm.el (terminal-init-xterm): Ditto.
* lisp/server.el (server-process-filter): Fix reference to the 'display frame
parameter.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-461
Diffstat (limited to 'README.multi-tty')
| -rw-r--r-- | README.multi-tty | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/README.multi-tty b/README.multi-tty index ebe064c2fca..de75aa6a10b 100644 --- a/README.multi-tty +++ b/README.multi-tty | |||
| @@ -401,28 +401,10 @@ is probably not very interesting for anyone else.) | |||
| 401 | THINGS TO DO | 401 | THINGS TO DO |
| 402 | ------------ | 402 | ------------ |
| 403 | 403 | ||
| 404 | ** Implement automatic forwarding of client environment variables to | 404 | ** Trouble: `setenv' doesn't actually set environment variables in the |
| 405 | forked processes, as discussed on the multi-tty list. Terminal | 405 | Emacs process. This defeats the purpose of the elaborate |
| 406 | parameters are now accessible in C code, so the biggest obstacle is | 406 | `server-with-environment' magic around the `tgetent' call in |
| 407 | gone. The `getenv_internal' and `child_setup' functions in | 407 | `init_tty'. D'oh. |
| 408 | callproc.c must be changed to support the following variable: | ||
| 409 | |||
| 410 | terminal-local-environment-variables is a variable defined in ... | ||
| 411 | |||
| 412 | Enable or disable terminal-local environment variables. | ||
| 413 | |||
| 414 | If set to t, `getenv', `setenv' and subprocess creation | ||
| 415 | functions use the environment variables of the emacsclient | ||
| 416 | process that created the selected frame, ignoring | ||
| 417 | `process-environment'. | ||
| 418 | |||
| 419 | If set to nil, Emacs uses `process-environment' and ignores | ||
| 420 | the client environment. | ||
| 421 | |||
| 422 | Otherwise, `terminal-local-environment-variables' should be a | ||
| 423 | list of variable names (represented by Lisp strings) to look | ||
| 424 | up in the client environment. The rest will come from | ||
| 425 | `process-environment'. | ||
| 426 | 408 | ||
| 427 | ** (Possibly) create hooks in struct device for creating frames on a | 409 | ** (Possibly) create hooks in struct device for creating frames on a |
| 428 | specific terminal, and eliminate the hackish terminal-related frame | 410 | specific terminal, and eliminate the hackish terminal-related frame |
| @@ -1348,5 +1330,33 @@ DIARY OF CHANGES | |||
| 1348 | 1330 | ||
| 1349 | (Disabled in patch-450.) | 1331 | (Disabled in patch-450.) |
| 1350 | 1332 | ||
| 1333 | -- Implement automatic forwarding of client environment variables to | ||
| 1334 | forked processes, as discussed on the multi-tty list. Terminal | ||
| 1335 | parameters are now accessible in C code, so the biggest obstacle is | ||
| 1336 | gone. The `getenv_internal' and `child_setup' functions in | ||
| 1337 | callproc.c must be changed to support the following variable: | ||
| 1338 | |||
| 1339 | terminal-local-environment-variables is a variable defined in ... | ||
| 1340 | |||
| 1341 | Enable or disable terminal-local environment variables. | ||
| 1342 | |||
| 1343 | If set to t, `getenv', `setenv' and subprocess creation | ||
| 1344 | functions use the environment variables of the emacsclient | ||
| 1345 | process that created the selected frame, ignoring | ||
| 1346 | `process-environment'. | ||
| 1347 | |||
| 1348 | If set to nil, Emacs uses `process-environment' and ignores | ||
| 1349 | the client environment. | ||
| 1350 | |||
| 1351 | Otherwise, `terminal-local-environment-variables' should be a | ||
| 1352 | list of variable names (represented by Lisp strings) to look | ||
| 1353 | up in the client environment. The rest will come from | ||
| 1354 | `process-environment'. | ||
| 1355 | |||
| 1356 | (Implemented in patch-461; `terminal-getenv', `terminal-setenv' and | ||
| 1357 | `with-terminal-environment' are now replaced by extensions to | ||
| 1358 | `getenv' and `setenv', and the new `local-environment-variables' | ||
| 1359 | facility. Yay!) | ||
| 1360 | |||
| 1351 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d | 1361 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d |
| 1352 | 1362 | ||