all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: "Pascal J. Bourguignon" <pjb@informatimago.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: complete list of keybindings
Date: Wed, 12 Aug 2009 01:47:36 +0200	[thread overview]
Message-ID: <e01d8a50908111647q4f8b7440oe1e07d2b87637a2@mail.gmail.com> (raw)
In-Reply-To: <87ws5a2b4w.fsf@galatea.local>

Does this really catch longer key bindings? And chars above 127?


> (defmacro rloop (clauses &rest body)
>  (if (null clauses)
>      `(progn ,@body)
>      `(loop ,@(car clauses) do (rloop ,(cdr clauses) ,@body))))
>
> (defun all-bindings ()
>  (interactive)
>  (message "all-bindings: wait a few seconds please...")
>  (let ((data
>         (with-output-to-string
>             (let ((bindings '()))
>               (rloop ((for C in '("" "C-"))       ; Control
>                       (for M in '("" "M-"))       ; Meta
>                       (for A in '("" "A-"))       ; Alt
>                       (for S in '("" "S-"))       ; Shift
>                       (for H in '("" "H-"))       ; Hyper
>                       (for s in '("" "s-"))       ; super
>                       (for x from 32 to 127))
>                      (let* ((k (format "%s%s%s%s%s%s%c" C M A S H s x))
>                             (key (ignore-errors (read-kbd-macro k))))
>                        (when key
>                          (push
>                           (list k
>                                 (format "%-12s  %-12s  %S\n" k key
>                                         (or
>                                          ;; (string-key-binding key)
>                                          ;; What is this string-key-binding?
>                                          (key-binding key))))
>                           bindings))))
>               (dolist (item
>                         (sort bindings
>                               (lambda (a b)
>                                 (or (< (length (first a))
>                                        (length (first b)))
>                                     (and (= (length (first a))
>                                             (length (first b)))
>                                          (string< (first a)
>                                                   (first b)))))))
>                 (princ (second item)))))))
>    (switch-to-buffer (format "Keybindings in %s" (buffer-name)))
>    (erase-buffer)
>    (insert data)
>    (goto-char (point-min))
>    (values)))
>
>
> --
> __Pascal Bourguignon__
>

  reply	other threads:[~2009-08-11 23:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4425.1250031270.2239.help-gnu-emacs@gnu.org>
2009-08-11 23:17 ` complete list of keybindings Pascal J. Bourguignon
2009-08-11 23:47   ` Lennart Borgman [this message]
     [not found]   ` <mailman.4430.1250034465.2239.help-gnu-emacs@gnu.org>
2009-08-12  2:12     ` Pascal J. Bourguignon
2009-08-12  5:30 ` Teemu Likonen
2009-08-13 22:29   ` Brendan Miller
2009-08-11 22:54 Brendan Miller
2009-08-11 23:08 ` Lennart Borgman
2009-08-11 23:11 ` Drew Adams

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=e01d8a50908111647q4f8b7440oe1e07d2b87637a2@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=pjb@informatimago.com \
    /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.