[Top][All Lists]

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

non self-insert-command buffers

From: Sam Steingold
Subject: non self-insert-command buffers
Date: 15 Jan 2001 20:17:10 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.96

Some Emacs modes (dired, occur, arc, many others), usually in read-only
buffers, do not bind single characters like "a", "b" &c to anything
useful (they are bound to `self-insert-command' or to `undefined',
depending on whether `make-keymap' or `make-sparse-keymap' was used).
You get beeps for any key except for some selected ones.
It would seem that some common bindings
should be in place there:
        q       quit-window
        x       kill-this-buffer
        g       revert (mode-specific re-create)
        h       describe-mode
maybe some others.
Why not add a function

(defun make-read-only-keymap (&optional name)
  (let ((map (make-sparse-keymap name)))
    (define-key "q" 'quit-window)
    (define-key "x" 'kill-this-buffer)
    (define-key "h" 'describe-mode)

and use it instead of
 `make-keymap' (like in dired.el for `dired-mode-map') and
 `make-sparse-keymap' (like in replace.el for `occur-mode-map')?


[I raised this issue with RMS several years ago]

Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Bus error -- driver executed.

reply via email to

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