emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/simple.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el,v
Date: Fri, 20 Jun 2008 17:10:34 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/06/20 17:10:33

Index: lisp/simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.929
retrieving revision 1.930
diff -u -b -r1.929 -r1.930
--- lisp/simple.el      3 Jun 2008 22:56:56 -0000       1.929
+++ lisp/simple.el      20 Jun 2008 17:10:33 -0000      1.930
@@ -391,6 +391,25 @@
   (unless delay-mode-hooks
     (run-hooks 'after-change-major-mode-hook)))
 
+;; 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)
+    (define-key map "\C-?" 'scroll-down)
+    (define-key map "?" '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 hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)))




reply via email to

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