all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'djp'" <djp@arqux.com>, <help-gnu-emacs@gnu.org>
Subject: RE: A bit confused about C-h m results
Date: Tue, 8 Sep 2009 20:37:50 -0700	[thread overview]
Message-ID: <69AC6B1A9D534EEBA34531B29E7CF465@us.oracle.com> (raw)
In-Reply-To: <3d78d984-0c33-4834-9e6c-fd1832f93873@y21g2000yqn.googlegroups.com>

> 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





  reply	other threads:[~2009-09-09  3:37 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 [this message]
2009-09-09  4:09   ` David Penton
     [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=69AC6B1A9D534EEBA34531B29E7CF465@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=djp@arqux.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.