[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

standard r/o keybindings

From: Sam Steingold
Subject: standard r/o keybindings
Date: Tue, 01 Feb 2011 12:55:11 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

M-x rgrep quit-window RET *.el RET emacs/lisp RET
will show ~60 places were quit-window is bound to "q".



(defvar read-only-buffer-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map "g" 'revert-buffer)
    (define-key map "q" 'quit-window)
    (define-key map "z" 'kill-this-buffer)
    (define-key map " " 'scroll-down)
    (define-key map "DEL" 'scroll-up)

to, say, simple.el
and (set-keymap-parent ... read-only-buffer-mode-map)
to all the r/o mode map definitions.

- uniform user experience in all r/o buffers
- ease of development (less code to write)

- some modes _might_ have to modify their own bindings
  (very few and they can override the standard binding anyway)

note that we already have a good candidate for
read-only-buffer-mode-map: view-mode-map.

Sam Steingold (http://sds.podval.org/) on CentOS release 5.3 (Final)
http://dhimmi.com http://truepeace.org http://camera.org http://iris.org.il
http://jihadwatch.org http://openvotingconsortium.org
XML is like violence. If it doesn't solve the problem, use more.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]