[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preventing C-h (help-command) from deactivating the mark?
From: |
Barry Margolin |
Subject: |
Re: Preventing C-h (help-command) from deactivating the mark? |
Date: |
Fri, 04 Mar 2016 10:31:01 -0500 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <djtlcjFan1fU1@mid.individual.net>,
egarrulo <egarrulo@gmail.com> wrote:
> How to reproduce:
> - emacs -Q
> - mark some text in *scratch*
> - C-h c M-c
> - Emacs deactivates the mark and I wish to avoid this.
>
> I would have wrapped `help-command' to bind `deactivate-mark' to nil,
> but Emacs can't find where `help-command' is defined. Indeed, `help.el'
> defines it as:
>
> (fset 'help-command help-map)
>
> How can I write a wrapper around `help-command'? Thanks.
help-command isn't a function -- when you bind a key to a keymap, that
makes it a prefix key. C-h is like C-c or C-x.
Put your wrapper around describe-key-briefly, which is the command that
C-h c runs. It probably doesn't make as much sense to put it around most
of the other help commands, which display their results in a new window
instead of just a minibuffer message.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***