Skip to main content
1 of 3
Drew
  • 79.1k
  • 10
  • 123
  • 257
  1. The first answer is that its purpose is to act as a prefix key to the keys that follow it; that is, to serve as a keymap for a certain number of key bindings. Those bindings are also shown in describe-key. Seriously; this is the purpose: to group those keys and their commands. Now what that grouping might be about is another question (see next).

  2. Beyond #1, yes. A prefix key is bound to a keymap, and that can have its own doc string. It is up to the creator of the keymap to provide a reasonable and useful doc string.

    To see the doc for a keymap, use C-h M-k (describe-keymap), from help-fns+.el.

    Here is what you see for bookmark-map, for example (manuals here is a link to the doc in the Emacs manuals):

     bookmark-map
     ------------
    
     For more information check the manuals.
    
     Keymap containing bindings to bookmark functions.
     It is not bound to any key by default: to bind it
     so that you have a bookmark prefix, just use `global-set-key' and bind a
     key of your choice to `bookmark-map'.  All interactive bookmark
     functions have a binding in this keymap.
    
     key             binding
     ---             -------
    
     d               bookmark-delete
     e               edit-bookmarks
     f               bookmark-insert-location
     g               bookmark-jump
     i               bookmark-insert
     j               bookmark-jump
     l               bookmark-load
     m               bookmark-set
     o               bookmark-jump-other-window
     r               bookmark-rename
     s               bookmark-save
     w               bookmark-write
     x               bookmark-set
    

    But some keymaps have a more rudimentary doc string. The keymap ctl-x-map, for instance, is general-purpose, so there is not much that can be said (beyond #1 above). This is what you get with C-h M-k ctl-x-map:

     ctl-x-map
     ---------
    
     For more information check the manuals.
    
     Default keymap for C-x commands.
     The normal global definition of the character C-x indirects to this keymap.
    
     key             binding
     ---             -------
    
     C-@             pop-global-mark
     C-b             list-buffers
     ...
    
Drew
  • 79.1k
  • 10
  • 123
  • 257