From: David Penton <djp@arqux.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: A bit confused about C-h m results
Date: Wed, 9 Sep 2009 00:09:37 -0400 [thread overview]
Message-ID: <E702417A-6909-46B6-B47D-45E3E4A6C0C5@arqux.com> (raw)
In-Reply-To: <69AC6B1A9D534EEBA34531B29E7CF465@us.oracle.com>
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
>
next prev parent reply other threads:[~2009-09-09 4:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-08 19:22 A bit confused about C-h m results djp
2009-09-09 3:37 ` Drew Adams
2009-09-09 4:09 ` David Penton [this message]
[not found] ` <mailman.6286.1252483528.2239.help-gnu-emacs@gnu.org>
2009-09-11 20:57 ` John A Pershing Jr
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=E702417A-6909-46B6-B47D-45E3E4A6C0C5@arqux.com \
--to=djp@arqux.com \
--cc=drew.adams@oracle.com \
--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.