all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: Preventing C-h (help-command) from deactivating the mark?
Date: Fri, 04 Mar 2016 10:31:01 -0500	[thread overview]
Message-ID: <barmar-CBD6D5.10310104032016@88-209-239-213.giganet.hu> (raw)
In-Reply-To: djtlcjFan1fU1@mid.individual.net

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 ***


  reply	other threads:[~2016-03-04 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 14:45 Preventing C-h (help-command) from deactivating the mark? egarrulo
2016-03-04 15:31 ` Barry Margolin [this message]
2016-03-04 15:47 ` Eli Zaretskii

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=barmar-CBD6D5.10310104032016@88-209-239-213.giganet.hu \
    --to=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@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.