X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c1473b4cfeb477ced05d457868c5e1eb97a58eb0..73b0cd50031a714347109169ceb8bacae338612a:/lisp/textmodes/text-mode.el diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index 74fe2607f4..3f6ad1faf8 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -1,10 +1,10 @@ ;;; text-mode.el --- text mode, and its idiosyncratic commands -;; Copyright (C) 1985, 1992, 1994, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1992, 1994, 2001-2011 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp +;; Package: emacs ;; This file is part of GNU Emacs. @@ -32,7 +32,7 @@ "Normal hook run when entering Text mode and many related modes." :type 'hook :options '(turn-on-auto-fill turn-on-flyspell) - :group 'data) + :group 'wp) (defvar text-mode-variant nil "Non-nil if this buffer's major mode is a variant of Text mode. @@ -50,8 +50,6 @@ Use (derived-mode-p 'text-mode) instead.") (defvar text-mode-map (let ((map (make-sparse-keymap))) (define-key map "\e\t" 'ispell-complete-word) - (define-key map "\es" 'center-line) - (define-key map "\eS" 'center-paragraph) map) "Keymap for `text-mode'. Many other modes, such as `mail-mode', `outline-mode' and `indented-text-mode', @@ -123,6 +121,9 @@ both existing buffers and buffers that you subsequently create." (message "Auto Fill %s in Text modes" (if enable-mode "enabled" "disabled")))) + +(define-key facemenu-keymap "\eS" 'center-paragraph) + (defun center-paragraph () "Center each nonblank line in the paragraph at or after point. See `center-line' for more info." @@ -150,6 +151,8 @@ See `center-line' for more info." (center-line)) (forward-line 1))))) +(define-key facemenu-keymap "\es" 'center-line) + (defun center-line (&optional nlines) "Center the line point is on, within the width specified by `fill-column'. This means adjusting the indentation so that it equals @@ -178,5 +181,4 @@ The argument NLINES says how many lines to center." (setq nlines (1+ nlines)) (forward-line -1))))) -;; arch-tag: a07ccaad-da13-4d7b-9c61-cd04f5926aab ;;; text-mode.el ends here