[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
coding guidelines? (was Re: Key bindings proposal)
From: |
Stephen J. Turnbull |
Subject: |
coding guidelines? (was Re: Key bindings proposal) |
Date: |
Fri, 30 Jul 2010 18:32:35 +0900 |
Joe Brenner writes:
> > I would welcome patches that try to make intentions more clear
> > (e.g. eliminate the massive hardcoding of the "C-c" prefix all over the
> Rather than hardcoding "C-c", what are we supposed to do?
Create a separate map and bind it to a single prefix key sequence.
Usually the prefix sequence should also be configurable. From
footnote.el:
;;;###autoload
(defvar footnote-prefix [(control ?c) ?!]
"*When not using message mode, the prefix to bind in `mode-specific-map'")
;;;###autoload
(defvar footnote-mode-map nil
"Keymap used for footnote minor mode.")
;; Set up our keys
;;;###autoload
(unless footnote-mode-map
(setq footnote-mode-map (make-sparse-keymap))
(define-key footnote-mode-map "a" 'Footnote-add-footnote)
(define-key footnote-mode-map "b" 'Footnote-back-to-message)
(define-key footnote-mode-map "c" 'Footnote-cycle-style)
(define-key footnote-mode-map "d" 'Footnote-delete-footnote)
(define-key footnote-mode-map "g" 'Footnote-goto-footnote)
(define-key footnote-mode-map "r" 'Footnote-renumber-footnotes)
(define-key footnote-mode-map "s" 'Footnote-set-style))
;;;###autoload
(define-key global-map footnote-prefix footnote-mode-map)
That's not quite verbatim; there's some additional weirdness about
footnote-minor-mode-map that I don't really understand.
>
> Are these guidelines documented anywhere?
>
> (The elisp manual is full of examples where "C-c" is hardcoded.)
>
- Re: Key bindings proposal, (continued)
Re: Key bindings proposal, Uday S Reddy, 2010/07/29
- Re: Key bindings proposal, Andreas Röhler, 2010/07/29
- Re: Key bindings proposal, Mathias Dahl, 2010/07/31
- Re: Key bindings proposal, Uday S Reddy, 2010/07/31
- Re: Key bindings proposal, Alan Mackenzie, 2010/07/31
- RE: Key bindings proposal, Drew Adams, 2010/07/31
coding guidelines? (was Re: Key bindings proposal), Joe Brenner, 2010/07/29
Re: Key bindings proposal [Was: Emacs learning curve], Noah Lavine, 2010/07/28