diff options
author | Glenn Morris <rgm@gnu.org> | 2015-06-09 20:34:50 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2015-06-09 20:34:50 -0700 |
commit | 683e995e53aac51eb2fea4eeaf630a51bdc714f5 (patch) | |
tree | c9bdffd3261d79a8a86ddffdea6d7892147ea73b /lisp/simple.el | |
parent | 0fad7268a8c552274c842ab24a085bd43946f2db (diff) |
; * lisp/simple: Revert presumably unintentional deletion of special-mode.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 9dfb3f25181..1eb0643ef6f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -353,6 +353,27 @@ Other major modes are defined by comparison with this one." (kill-all-local-variables) (run-mode-hooks)) +;; Special major modes to view specially formatted data rather than files. + +(defvar special-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + (define-key map "q" 'quit-window) + (define-key map " " 'scroll-up-command) + (define-key map [?\S-\ ] 'scroll-down-command) + (define-key map "\C-?" 'scroll-down-command) + (define-key map "?" 'describe-mode) + (define-key map "h" 'describe-mode) + (define-key map ">" 'end-of-buffer) + (define-key map "<" 'beginning-of-buffer) + (define-key map "g" 'revert-buffer) + map)) + +(put 'special-mode 'mode-class 'special) +(define-derived-mode special-mode nil "Special" + "Parent major mode from which special major modes should inherit." + (setq buffer-read-only t)) + ;; Making and deleting lines. (defvar self-insert-uses-region-functions nil |