emacs-devel
[Top][All Lists]
Advanced

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

RE: `isearch-allow-scroll' - a misnomer and a bad design


From: Drew Adams
Subject: RE: `isearch-allow-scroll' - a misnomer and a bad design
Date: Sun, 11 Sep 2011 11:53:23 -0700

> `univeral-argument-minus' isn't used anymore.  The C-- is now 
> handled by `negative-argument'.

Huh?

(defvar universal-argument-map
  (let ((map (make-sparse-keymap)))
    ...
    (define-key map [?-] 'universal-argument-minus)
    ...
    (define-key map [kp-subtract] 'universal-argument-minus)
    ...))

> > Can this patch please be installed?  Or are there people 
> > who prefer that `C-u' exit Isearch?  If there are, then can
> > we please have a user option for this choice?
> 
> Here's another version of the patch, this time with
> `isearch-allow-prefix'.  Its doc string isn't all that great; 
> perhaps you can improve it.

I suggest "prefix-arg", not just "prefix", in the option name.  There are lots
of prefixes of different kinds in Emacs.

I suggest that the default value allow `C-u' pass-through, not prevent it.  It
sounded like those weighing in so far on this all agreed that this should be the
(new) behavior.

I suggest turning it around: `isearch-prefix-arg-terminates' or
`isearch-prefix-arg-terminates-search' (with default value nil, allowing
pass-through).  Easier to document, for one thing:

"Non-nil means that a prefix argument terminates search.
 Ignored (treated as nil) if `isearch-allow-scroll' is non-nil."

To me that's simpler and clearer.  (It is misleading to say that a prefix arg is
"allowed" - it is always allowed.  The question is whether it gets passed to the
command or it terminates search immediately.)

Putting it this way also leaves open the possibility that termination might
still occur if the value is nil (e.g. if the command itself chooses to exit).
IOW, nil does not definitively prevent termination. (Yes, I know, it is not the
`C-u' but the command that would terminate.  Still, it's clearer not to state
that a nil value prevents termination.)

> As for installing it, it's fine by me, but you'd have to 
> negotiate with Stefan, since we're in feature freeze.

Nothing to negotiate.  He and Yidong can decide based on what's already been
discussed.

> Before installing, there really ought to be a mention of the
> feature in the Emacs manual.

Dunno about that.  But if the new behavior is to allow `C-u' pass-through, then
this would be a user-visible change and should be mentioned in NEWS.




reply via email to

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