[Top][All Lists]

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

Re: binding c-h in isearch

From: Juri Linkov
Subject: Re: binding c-h in isearch
Date: Fri, 18 Apr 2008 02:14:05 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

> There's the following code in isearch.el:
>     ;; Turned off because I find I expect to get the global definition--rms.
>     ;; ;; Instead bind C-h to special help command for isearch-mode.
>     ;; (define-key map "\C-h" 'isearch-mode-help)
> So it seems that Richard found it inconvenient.  Could someone try and
> work out some clever way to reconcile the two functionalities?

I think a good binding for C-h in isearch-mode would be the following:

    (define-key isearch-mode-map "\C-h" help-map)

I gives what Richard wants since it uses the global definition of C-h,
and still it is intuitive to use just like its global definition when
a minor mode is active:

C-h m describes the isearch mode among other minor modes,

C-h b displays all isearch keybindings at the beginning of a list of all
      global keybindings (since it lists keys of minor modes first),

C-h k describes a key of isearch-mode that is natural to expect
      when C-h k is typed when isearch mode is active, so `C-h k C-w'
      will display:

  C-w runs the command isearch-yank-word-or-char, which is an
  interactive compiled Lisp function in `isearch.el'.


  Pull next character or word from buffer into search string.

Juri Linkov

reply via email to

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