emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep-command is only customizable before first run of `grep'?


From: William Xu
Subject: grep-command is only customizable before first run of `grep'?
Date: Mon, 20 Apr 2009 22:58:32 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (darwin)

Looks like customizing grep-command only takes effect before first run
of `grep'.  e.g., 

  1. emacs -Q 
  
  2. M-x grep C-g
     Now grep-command is: "grep -nH -e ".  
  
  3. (setq grep-command "hey")
  
  4. M-x grep C-g
     grep-command will be reset to: "grep -nH -e ".  What a surprise!

If I run step3 before step2, then grep-command will be set to "hey"
during that emacs session.  
  
Is this the expected behaviour? If so, maybe should be noted in its docstring? 

,----
| grep-command is a variable defined in `grep.el'.
| Its value is "grep -nH -e "
| 
| Documentation:
| The default grep command for C-c m g.
| If the grep program used supports an option to always include file names
| in its output (such as the `-H' option to GNU grep), it's a good idea to
| include it when specifying `grep-command'.
| 
| The default value of this variable is set up by `grep-compute-defaults';
| call that function before using this variable in your program.
| 
| You can customize this variable.
| 
| [back]
`----

GNU Emacs 23.0.92.1 (i386-apple-darwin9.6.0, NS apple-appkit-949.43) of
2009-04-05 on zen.local

-- 
William

http://xwl.appspot.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]