Commit graph

86 commits

Author SHA1 Message Date
Karoly Lorentey
5990851d42 Fix semantics of let-binding `process-environment'.
* lisp/env.el: Require cl for byte compilation. (For `block' and `return'.)
  (read-envvar-name): Update for rename.  Include `process-environment'
  as well.
  (setenv): Update for rename also handle `process-environment'.  Update doc.
  (getenv): Update doc.
  (environment): New function.
  (let-environment): New macro.

* lisp/font-lock.el (lisp-font-lock-keywords-2): Add `let-environment'.

* src/callproc.c (Vglobal_environment): New variable, taking over the
  previous role of `Vprocess_environment', which is now something else.
  (add_env): New function.
  (child_setup): Use it.
  (child_setup, getenv_internal): Rename Vprocess_environment to
  Vglobal_environment.  Handle the new Vprocess_environment.
  (Fgetenv_internal, egetenv): Update doc.
  (set_process_environment): Rename to `set_global_environment'.  Rename
  Vprocess_environment to Vglobal_environment.
  (syms_of_callproc): Rename process-environment to global-environment,
  add new process-environment, update docs.

* src/emacs.c (main): Call set_global_environment instead of
  set_process_environment.

* fileio.c (Fread_file_name): Update comment.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-465
2005-12-29 01:28:33 +00:00
Karoly Lorentey
f105f403d2 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
2005-12-26 02:14:10 +00:00
Thien-Thi Nguyen
0d30b33766 Update years in copyright notice; nfc. 2005-08-06 22:13:43 +00:00
Lute Kamstra
086add1519 Update FSF's address. 2005-07-04 23:32:44 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Richard M. Stallman
cccc806de7 (substitute-env-vars): Fix typo. 2003-05-28 11:16:22 +00:00
Juanma Barranquero
b71038b25c (setenv): Don't quote nil and t in docstrings. 2003-05-06 17:54:41 +00:00
Kenichi Handa
1ebb05c430 (setenv): Fix previous change. 2003-02-25 06:19:36 +00:00
Dave Love
1a90eae68d (read-envvar-name): Decode names.
(substitute-env-vars): Use eval-when-compile and char class.
(setenv): Doc fix.  Encode the data (after checking that's
possible).
(getenv): Encode the name and decode the result.
2003-02-24 22:51:41 +00:00
Juanma Barranquero
71296446d3 Trailing whitespace deleted. 2003-02-04 11:26:42 +00:00
Gerd Moellmann
1fd520b6b3 (substitute-env-vars): Don't quote argument to `rx';
it's a macro.
2001-10-29 09:10:48 +00:00
Richard M. Stallman
0209a386fb (substitute-env-vars): Quote the arg to rx. 2001-10-24 22:49:12 +00:00
Gerd Moellmann
a4a216c5c9 (substitute-env-vars): New function.
(setenv): Add parameter SUBSTITUTE-ENV-VARS.  If set, substitute
environment variables in VALUE.  Return VALUE.
2001-10-05 09:23:32 +00:00
Gerd Moellmann
2a5becfb51 (setenv): Interactively, if VARIABLE has a current value,
add that to the front of the history, as the doc string says.
2001-09-04 15:49:51 +00:00
Pavel Janík
5553563924 Some fixes to follow coding conventions in files maintained by FSF. 2001-07-15 16:15:35 +00:00
Gerd Moellmann
b1e11b4f9f (getenv): New function, interactively callable.
(setenv, getenv): Remove autoload cookies.
2000-05-15 14:50:12 +00:00
Richard M. Stallman
80370c1cec (setenv): Simplify reading of args by passing old value as the default. 1998-03-17 08:14:28 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Richard M. Stallman
7fd817093f (setenv): Call set-time-zone-rule when setting TZ. 1995-09-10 04:36:12 +00:00
Richard M. Stallman
8b74000909 (read-envvar-name): Special meaning for MUSTMATCH
neither t nor nil.
(setenv): Use that new case, when clearing a var.
1994-10-05 06:29:50 +00:00
Richard M. Stallman
99ac138a9c (setenv-history): New history list.
(setenv): Use setenv-history.
Place the variable's current value at front of setenv-history
while reading the new value.

(setenv): Provide history, completion for envvar.
(read-envvar-name-history): New variable.
(read-envvar-name): New function.
1994-10-02 04:03:32 +00:00
Richard M. Stallman
dffc4996aa Update copyright notice. 1994-06-22 04:40:17 +00:00
Richard M. Stallman
cbfe666bc7 (setenv): Rewrite. Provide a way to unset interactively. 1994-06-22 04:39:27 +00:00
Richard M. Stallman
a3cda2735d (setenv): Do something even if process-environment is nil. 1994-06-22 04:07:38 +00:00
Richard M. Stallman
7e68de5600 (setenv): Treat case as significant. 1993-06-11 21:33:27 +00:00
Richard M. Stallman
b3b8e91578 (setenv): Renamed back from putenv. 1993-03-28 22:27:23 +00:00
Noah Friedman
1bbda2d6e0 renamed to env.el; changed setenv to putenv. 1993-03-28 07:13:09 +00:00
Eric S. Raymond
d9ecc911ff Added or corrected Commentary headers 1993-03-22 16:53:22 +00:00
Richard M. Stallman
aa673ecc67 (setenv): Make it autoload. 1992-09-26 21:34:39 +00:00
Richard M. Stallman
b6a5978e16 Doc fix. 1992-09-26 21:15:01 +00:00
Eric S. Raymond
971571b96c entered into RCS 1992-09-21 12:33:27 +00:00
Eric S. Raymond
d7b4d18fd4 *** empty log message *** 1992-07-17 20:24:00 +00:00
Eric S. Raymond
e516799970 *** empty log message *** 1992-07-16 21:47:34 +00:00
Eric S. Raymond
c88ab9ce4a *** empty log message *** 1992-05-30 21:11:25 +00:00
Jim Blandy
49116ac071 *** empty log message *** 1992-03-16 20:39:07 +00:00
Jim Blandy
6449c8985c Initial revision 1992-01-14 04:41:51 +00:00