[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch for locate.el when called with prefix arg
From: |
Miles Bader |
Subject: |
Re: patch for locate.el when called with prefix arg |
Date: |
Mon, 23 Apr 2007 13:33:12 +0900 |
Luc Teirlinck <address@hidden> writes:
> New patch identical to the last one, except for a trivial one-line
> docstring change in `locate-with-filter':
Why are you putting the "prefix inverts sense of locate-prompt-for-command"
logic into the main function body, and not in the (interactive ...) code?
Such toggling behavior is convenient for interactive use, but it often
doesn't make much sense for the programmatic function interface.
It would seem more understandable and useful for non-interactive users if
you just added a "prompt-for-command" argument to the locate function and
put all the grot involving locate-prompt-for-command into the interactive
code.
IOW, (1) add a "prompt-for-command" argument to locate, (2) use that arg
everywhere in the function body where "locate-prompt-for-command" used to be
used, (3) implement the arg toggles global var stuff in the (interactive ...)
code (e.g., (not (eq (not arg) (not locate-prompt-for-command)))).
[I think anytime you find yourself using a function argument called "arg"
with funny semantics intended solely for convenient keyboard use, it's a
hint that maybe you should rethink the function interface.]
-Miles
--
The secret to creativity is knowing how to hide your sources.
--Albert Einstein
- Re: patch for locate.el when called with prefix arg, (continued)
- Re: patch for locate.el when called with prefix arg, Richard Stallman, 2007/04/22
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/22
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/22
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/22
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/22
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/22
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/22
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg,
Miles Bader <=
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Miles Bader, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Miles Bader, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Miles Bader, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Richard Stallman, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Luc Teirlinck, 2007/04/23
- Re: patch for locate.el when called with prefix arg, Richard Stallman, 2007/04/23