From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Preventing C-h (help-command) from deactivating the mark? Date: Fri, 04 Mar 2016 10:31:01 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1457105743 12673 80.91.229.3 (4 Mar 2016 15:35:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Mar 2016 15:35:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 04 16:35:43 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1abrlV-0006wM-8U for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 16:35:41 +0100 Original-Received: from localhost ([::1]:41748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abrlU-0006Fo-C1 for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 10:35:40 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Injection-Info: barmar.motzarella.org; posting-host="78fb7125a45724f15e21604c94a7d968"; logging-data="8950"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+v20JgEDq2QrzSf/g9gzAy" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:HDluhodCXoUcoWTo9rXWF9Sixbk= Original-Xref: usenet.stanford.edu gnu.emacs.help:217152 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109445 Archived-At: In article , egarrulo 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 ***