comparison lisp/special-mode.el @ 5487:dc37764a105b

Import special-mode from GNU Emacs. -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2011-04-30 Didier Verna <didier@xemacs.org> * special-mode.el: New file. * special-mode.el (special-mode-map): New variable. * special-mode.el (special-mode): New function. * dumped-lisp.el (preloaded-file-list): Add special-mode.
author Didier Verna <didier@lrde.epita.fr>
date Sat, 30 Apr 2011 17:29:47 +0200
parents
children
comparison
equal deleted inserted replaced
5486:58e320bde005 5487:dc37764a105b
1 ;;; special-mode.el --- Special major mode to view specially formatted data
2
3 ;; Copyright (C) 2011 Didier Verna <didier@xemacs.org>
4
5 ;; Maintainer: Didier Verna <didier@xemacs.org>
6 ;; Keywords: dumped
7
8 ;; This file is part of XEmacs.
9
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by the
12 ;; Free Software Foundation, either version 3 of the License, or (at your
13 ;; option) any later version.
14
15 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
16 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 ;; for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
22
23 ;;; Commentary:
24
25 ;; This file is dumped with XEmacs.
26
27
28 ;;; Code:
29
30 ;; This code is imported from GNU Emacs 23.3.1 -- dvl
31
32 (defvar special-mode-map
33 (let ((map (make-sparse-keymap)))
34 (suppress-keymap map)
35 (define-key map "q" 'quit-window)
36 (define-key map " " 'scroll-up)
37 (define-key map "\C-?" 'scroll-down)
38 (define-key map "?" 'describe-mode)
39 (define-key map ">" 'end-of-buffer)
40 (define-key map "<" 'beginning-of-buffer)
41 (define-key map "g" 'revert-buffer)
42 map))
43
44 (put 'special-mode 'mode-class 'special)
45 (define-derived-mode special-mode nil "Special"
46 "Parent major mode from which special major modes should inherit."
47 (setq buffer-read-only t))
48
49
50 ;;; special-mode.el ends here