aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-06-09 20:34:50 -0700
committerGlenn Morris2015-06-09 20:34:50 -0700
commit683e995e53aac51eb2fea4eeaf630a51bdc714f5 (patch)
treec9bdffd3261d79a8a86ddffdea6d7892147ea73b
parent0fad7268a8c552274c842ab24a085bd43946f2db (diff)
downloademacs-683e995e53aac51eb2fea4eeaf630a51bdc714f5.tar.gz
emacs-683e995e53aac51eb2fea4eeaf630a51bdc714f5.zip
; * lisp/simple: Revert presumably unintentional deletion of special-mode.
-rw-r--r--lisp/simple.el21
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."
353 (kill-all-local-variables) 353 (kill-all-local-variables)
354 (run-mode-hooks)) 354 (run-mode-hooks))
355 355
356;; Special major modes to view specially formatted data rather than files.
357
358(defvar special-mode-map
359 (let ((map (make-sparse-keymap)))
360 (suppress-keymap map)
361 (define-key map "q" 'quit-window)
362 (define-key map " " 'scroll-up-command)
363 (define-key map [?\S-\ ] 'scroll-down-command)
364 (define-key map "\C-?" 'scroll-down-command)
365 (define-key map "?" 'describe-mode)
366 (define-key map "h" 'describe-mode)
367 (define-key map ">" 'end-of-buffer)
368 (define-key map "<" 'beginning-of-buffer)
369 (define-key map "g" 'revert-buffer)
370 map))
371
372(put 'special-mode 'mode-class 'special)
373(define-derived-mode special-mode nil "Special"
374 "Parent major mode from which special major modes should inherit."
375 (setq buffer-read-only t))
376
356;; Making and deleting lines. 377;; Making and deleting lines.
357 378
358(defvar self-insert-uses-region-functions nil 379(defvar self-insert-uses-region-functions nil