From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: grep-program and grep-command
Date: Thu, 25 Jan 2007 17:23:39 +0100 [thread overview]
Message-ID: <45B8D98B.8020504@gmail.com> (raw)
The grep-command is a defcustom, but grep-program is a defvar.
grep-command is computed by Emacs if its value is nil.
This seems a bit akward to me. It tells the user to customize
grep-command if things does not work by default. Would it not be better
if they instead set grep-program and let Emacs compute grep-command?
But since we want them to use customize we then should make grep-program
into a defcustom. I suggest that grep-program is defined something like
this (unfinished, and I I have renamed it to grep-program1 just for
testing):
(defcustom grep-program1
;; Currently zgrep has trouble. It runs egrep instead of grep,
;; and it doesn't pass along long options right.
"grep"
;; (if (equal (condition-case nil ; in case "zgrep" isn't in exec-path
;; (call-process "zgrep" nil nil nil
;; "foo" null-device)
;; (error nil))
;; 1)
;; "zgrep"
;; "grep")
"The default grep program for `grep-command' and `grep-find-command'.
This variable's value takes effect when `grep-compute-defaults' is called."
:type 'file
:set (lambda(sym val)
(unless (string= grep-command
(car (get 'grep-command 'customized-value)))
(setq grep-command nil))
;; Add similar checks above for other computed values that
;; depends on this variable ...
(set-default sym val))
:group 'grep)
next reply other threads:[~2007-01-25 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 16:23 Lennart Borgman (gmail) [this message]
2007-01-26 3:09 ` grep-program and grep-command Richard Stallman
2007-01-26 8:37 ` Lennart Borgman (gmail)
2007-01-27 0:46 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45B8D98B.8020504@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.