comparison lisp/modes/text-mode.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ;; General Public License for more details. 17 ;; General Public License for more details.
18 18
19 ;; You should have received a copy of the GNU General Public License 19 ;; You should have received a copy of the GNU General Public License
20 ;; along with XEmacs; see the file COPYING. If not, write to the Free 20 ;; along with XEmacs; see the file COPYING. If not, write to the Free
21 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 21 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 ;; 02111-1307, USA.
22 23
23 ;;; Synched up with: FSF 19.30. 24 ;;; Synched up with: FSF 19.34.
24 25
25 ;;; Commentary: 26 ;;; Commentary:
26 27
27 ;; This package provides the fundamental text mode documented in the 28 ;; This package provides the fundamental text mode documented in the
28 ;; Emacs user's manual. 29 ;; Emacs user's manual.
49 inherit all the commands defined in this map.") 50 inherit all the commands defined in this map.")
50 51
51 (if text-mode-map 52 (if text-mode-map
52 () 53 ()
53 (setq text-mode-map (make-sparse-keymap)) 54 (setq text-mode-map (make-sparse-keymap))
55 ;; XEmacs change
54 (set-keymap-name text-mode-map 'text-mode-map) 56 (set-keymap-name text-mode-map 'text-mode-map)
57 (define-key text-mode-map "\e\t" 'ispell-complete-word)
55 (define-key text-mode-map "\t" 'tab-to-tab-stop) 58 (define-key text-mode-map "\t" 'tab-to-tab-stop)
56 (define-key text-mode-map "\es" 'center-line) 59 (define-key text-mode-map "\es" 'center-line)
57 (define-key text-mode-map "\eS" 'center-paragraph)) 60 (define-key text-mode-map "\eS" 'center-paragraph))
58 61
59 62
63 ; (make-local-variable 'delete-auto-save-files) 66 ; (make-local-variable 'delete-auto-save-files)
64 ; (setq delete-auto-save-files t)) 67 ; (setq delete-auto-save-files t))
65 68
66 (defun text-mode () 69 (defun text-mode ()
67 "Major mode for editing text intended for humans to read. 70 "Major mode for editing text intended for humans to read.
68 Special commands:\\{text-mode-map} 71 Special commands:
72 \\{text-mode-map}
69 Turning on Text mode calls the value of the variable `text-mode-hook', 73 Turning on Text mode calls the value of the variable `text-mode-hook',
70 if that value is non-nil." 74 if that value is non-nil."
71 (interactive) 75 (interactive)
72 (kill-all-local-variables) 76 (kill-all-local-variables)
73 (use-local-map text-mode-map) 77 (use-local-map text-mode-map)
83 87
84 (if indented-text-mode-map 88 (if indented-text-mode-map
85 () 89 ()
86 ;; Make different definition for TAB before the one in text-mode-map, but 90 ;; Make different definition for TAB before the one in text-mode-map, but
87 ;; share the rest. 91 ;; share the rest.
92 ;; XEmacs change
88 (setq indented-text-mode-map (make-sparse-keymap)) 93 (setq indented-text-mode-map (make-sparse-keymap))
89 (set-keymap-name indented-text-mode-map 'indented-text-mode-map) 94 (set-keymap-name indented-text-mode-map 'indented-text-mode-map)
90 (set-keymap-parents indented-text-mode-map (list text-mode-map)) 95 (set-keymap-parents indented-text-mode-map (list text-mode-map))
91 (define-key indented-text-mode-map "\t" 'indent-relative)) 96 (define-key indented-text-mode-map "\t" 'indent-relative))
92 97