[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comint.el: EMACS environment variable
From: |
Chong Yidong |
Subject: |
Re: comint.el: EMACS environment variable |
Date: |
Tue, 07 Nov 2006 13:30:23 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.90 (gnu/linux) |
Markus Triska <address@hidden> writes:
> Miles Bader writes:
>
>> Why would they care what it's value is though? I suspect it's just as
>> common to simply check for the variable's existance, not its value.
>
> Yes, that's also common (at least those programs aren't broken by the
> change). Other programs checking for "t": tcsh, Maude, zsh. For easy
> optional backwards compatibility, what do you think about making the
> new behaviour depend on a variable like "emacs-environment-variable"
> with possible values 'path (use path; default) and t (old behaviour)?
This patch implements this (modulo the requisite documentation
changes).
*** emacs/lisp/comint.el.~1.348.~ 2006-09-28 16:31:39.000000000 -0400
--- emacs/lisp/comint.el 2006-11-07 13:26:49.000000000 -0500
***************
*** 363,368 ****
--- 363,376 ----
This is a good thing to set in mode hooks.")
+ ;;;###autoload
+ (defvar comint-subshell-envvar 'path
+ "Default value of the EMACS environment variable in subshells.
+ Any existing value for the EMACS environment variable overrides this.
+ A value of `path' means the absolute file name of the Emacs executable.
+ Otherwise, this should be a string that specifies the value of the
+ environment variable.")
+
(defvar comint-input-filter
(function (lambda (str) (not (string-match "\\`\\s *\\'" str))))
"Predicate for filtering additions to input history.
***************
*** 769,775 ****
(list "TERM=emacs"
(format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width))))
(unless (getenv "EMACS")
! (list (concat "EMACS=" invocation-directory invocation-name)))
process-environment))
(default-directory
(if (file-accessible-directory-p default-directory)
--- 777,789 ----
(list "TERM=emacs"
(format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width))))
(unless (getenv "EMACS")
! (list (concat "EMACS="
! (cond ((eq comint-subshell-envvar 'path)
! (concat invocation-directory
! invocation-name))
! ((stringp comint-subshell-envvar)
! comint-subshell-envvar)
! (t (error "Invalid subshell envvar"))))))
process-environment))
(default-directory
(if (file-accessible-directory-p default-directory)
*** emacs/lisp/progmodes/compile.el.~1.409.~ 2006-09-24 17:59:32.000000000
-0400
--- emacs/lisp/progmodes/compile.el 2006-11-07 13:26:54.000000000 -0500
***************
*** 1069,1075 ****
;; Set the EMACS variable, but
;; don't override users' setting of $EMACS.
(unless (getenv "EMACS")
! (list (concat "EMACS=" invocation-directory invocation-name)))
(copy-sequence process-environment))))
(set (make-local-variable 'compilation-arguments)
(list command mode name-function highlight-regexp))
--- 1069,1081 ----
;; Set the EMACS variable, but
;; don't override users' setting of $EMACS.
(unless (getenv "EMACS")
! (list (concat "EMACS="
! (cond ((eq comint-subshell-envvar 'path)
! (concat invocation-directory
! invocation-name))
! ((stringp comint-subshell-envvar)
! comint-subshell-envvar)
! (t (error "Invalid subshell envvar"))))))
(copy-sequence process-environment))))
(set (make-local-variable 'compilation-arguments)
(list command mode name-function highlight-regexp))
- Re: comint.el: EMACS environment variable, (continued)
- Re: comint.el: EMACS environment variable, Kim F. Storm, 2006/11/11
- Re: comint.el: EMACS environment variable, Stefan Monnier, 2006/11/13
- Re: comint.el: EMACS environment variable, Richard Stallman, 2006/11/17
- Re: comint.el: EMACS environment variable, Kim F. Storm, 2006/11/17
- Re: comint.el: EMACS environment variable, Kim F. Storm, 2006/11/17
- Re: comint.el: EMACS environment variable, Chong Yidong, 2006/11/17
- Re: comint.el: EMACS environment variable, Chong Yidong, 2006/11/18
- Re: comint.el: EMACS environment variable,
Chong Yidong <=
- Re: comint.el: EMACS environment variable, Markus Triska, 2006/11/08
- Re: comint.el: EMACS environment variable, Richard Stallman, 2006/11/08
Re: comint.el: EMACS environment variable, Jae-hyeon Park, 2006/11/18
- Re: comint.el: EMACS environment variable, Richard Stallman, 2006/11/18
- Re: comint.el: EMACS environment variable, Stefan Monnier, 2006/11/19
- Re: comint.el: EMACS environment variable, Richard Stallman, 2006/11/20
- Re: comint.el: EMACS environment variable, Stefan Monnier, 2006/11/20
- Re: comint.el: EMACS environment variable, Richard Stallman, 2006/11/21
- Re: comint.el: EMACS environment variable, Stefan Monnier, 2006/11/21
- Re: comint.el: EMACS environment variable, Richard Stallman, 2006/11/22