From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Penton Newsgroups: gmane.emacs.help Subject: Re: A bit confused about C-h m results Date: Wed, 9 Sep 2009 00:09:37 -0400 Message-ID: References: <3d78d984-0c33-4834-9e6c-fd1832f93873@y21g2000yqn.googlegroups.com> <69AC6B1A9D534EEBA34531B29E7CF465@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1252483562 8708 80.91.229.12 (9 Sep 2009 08:06:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Sep 2009 08:06:02 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 09 10:05:54 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MlIBd-0001Qt-Ej for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Sep 2009 10:05:53 +0200 Original-Received: from localhost ([127.0.0.1]:36520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlIBc-0000TZ-Sj for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Sep 2009 04:05:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlEV7-0005cR-PO for help-gnu-emacs@gnu.org; Wed, 09 Sep 2009 00:09:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlEV3-0005Wx-PN for help-gnu-emacs@gnu.org; Wed, 09 Sep 2009 00:09:45 -0400 Original-Received: from [199.232.76.173] (port=60487 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlEV3-0005WT-Ii for help-gnu-emacs@gnu.org; Wed, 09 Sep 2009 00:09:41 -0400 Original-Received: from smtp1.cogeco.ca ([216.221.81.28]:13958 helo=fipsb01.cogeco.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlEV3-0008Kx-3y for help-gnu-emacs@gnu.org; Wed, 09 Sep 2009 00:09:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgBAMPGpkoYlgrR/2dsb2JhbAAI3gmEGAU X-IronPort-AV: E=Sophos;i="4.44,356,1249272000"; d="scan'208";a="41795540" Original-Received: from d24-150-10-209.home.cgocable.net (HELO [192.168.0.80]) ([24.150.10.209]) by fipsb01.cogeco.net with ESMTP; 09 Sep 2009 00:09:39 -0400 In-Reply-To: <69AC6B1A9D534EEBA34531B29E7CF465@us.oracle.com> X-Mailer: Apple Mail (2.936) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Wed, 09 Sep 2009 04:05:27 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67982 Archived-At: Thanks much for a very good answer. You hit upon the source of my confusion exactly. The commands you mention (down-list, beginning-of-defun) are lisp-y sounding, so I assumed they only pertained to lisp-mode. Moreover, some of the functions appear to be defined in lisp.el, although they are apparently useful in broader contexts. But being defined in lisp.el added to my confusion. Also, I am a newbie at using this group so I don't know if I should reply-all or just reply to the group. Kindly correct me if I am wrong by doing reply-all. Thanks again for the good answer. On 8-Sep-09, at 11:37 PM, Drew Adams wrote: >> If I type C-h m emacs lists a very few keystokes/commands from lisp- >> mode. However, the list is clearly far short of the actual key >> bindings provided by lisp-mode. > > AFAIK, only those few bindings are "provided" by Lisp mode. But that > doesn't > mean they are the only bindings available when you are in Lisp mode. > > (Note, BTW, that Emacs-Lisp mode binds a few more keys.) > >> If I type C-h b I get a whole swack of key bindings, > > You see the bindings that are available to you in Lisp mode. > >> many of which pertain only to lisp > > Which, for instance? > > In emacs -Q, for Emacs 23.1, C-h b shows these bindings for the > major mode (Lisp > mode): > > DEL backward-delete-char-untabify > C-c C-z run-lisp > C-M-q indent-sexp > C-M-x lisp-eval-defun > >> and which, I suspect, are provided in lisp-mode. >> These are just listed under "global bindings." > > Which of those global bindings were you thinking are provided by > Lisp mode and > pertain only to Lisp? If you are thinking of things such as `C-M-d' > (`down-list'), then the answer is that such commands are generally > useful, > beyond Lisp. > > Similarly, a command such as `beginning-of-defun' (`C-M-a'), is > useful in > multiple languages, in spite of its Lisp-sounding name. It in fact > changes its > behavior, depending on the current mode (current language). > > See the Elisp manual, node List Motion. > > If keys are listed by `C-h b' as global bindings, then they are in > the keymap > `global-map'. It's unlikely that the major mode (Lisp mode) added or > changed > `global-map' bindings. > >> How would I get a listing of the bindings provided by lisp-mode >> alone? > > What you saw at the beginning of `C-h b' under the heading of major- > mode > bindings, was just such a list. It is the same list you saw at the > top of what > `C-h m' displays. > > Otherwise, you can do this: > > C-h v lisp-mode-map > > Or for a human-readable listing, download library help-fns+.el, load > it, and > then do this; > > C-h M-k lisp-mode-map > > But the list of keys is still the same. ;-) > > http://www.emacswiki.org/emacs/help-fns%2b.el > > I mention `C-h M-k' because it works for any keymap (that is bound > to a > variable) - it's not always the case that `C-h m' and `C-h b' give > you the info > you need. If you want the keys bound in a minibuffer map, for > instance, you > cannot use `C-h [mb]' to get that info. But you can use `C-h M-k > minibuffer-local-must-match-map' etc. > > HTH >