all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* standard r/o keybindings
@ 2011-02-01 17:55 Sam Steingold
  2011-02-01 18:51 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Steingold @ 2011-02-01 17:55 UTC (permalink / raw)
  To: emacs-devel

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

Proposal:

add

(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)
    .......
    map))

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

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

contra:
- 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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: standard r/o keybindings
  2011-02-01 17:55 standard r/o keybindings Sam Steingold
@ 2011-02-01 18:51 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2011-02-01 18:51 UTC (permalink / raw)
  To: emacs-devel

Sam Steingold <sds@gnu.org> writes:

> M-x rgrep quit-window RET *.el RET emacs/lisp RET
> will show ~60 places were quit-window is bound to "q".
>
> Proposal:
>
> add
>
> (defvar read-only-buffer-mode-map
>
> note that we already have a good candidate for
> read-only-buffer-mode-map: view-mode-map.

Such modes should probably inherit from special-mode.  Maybe some do,
and their keymaps have not been revised.  Cleanups welcome.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-01 18:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 17:55 standard r/o keybindings Sam Steingold
2011-02-01 18:51 ` Chong Yidong

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.