diff options
| author | Juri Linkov | 2008-08-25 20:32:15 +0000 |
|---|---|---|
| committer | Juri Linkov | 2008-08-25 20:32:15 +0000 |
| commit | 4603452cbc794794ce858c11d0d843f2621c99ea (patch) | |
| tree | 68c063857606d0ce9d0e626fc2a9fbfd8cabf148 /lisp/textmodes | |
| parent | a4e628d45895e14d4cc2e9115fe22bbe0ea9cca7 (diff) | |
| download | emacs-4603452cbc794794ce858c11d0d843f2621c99ea.tar.gz emacs-4603452cbc794794ce858c11d0d843f2621c99ea.zip | |
(text-mode-map): Unbind "\es" from `center-line' and "\eS" from `center-paragraph'.
(facemenu-keymap): Bind "\es" to `center-line' and "\eS" to `center-paragraph'.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/text-mode.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index 74fe2607f48..ce39fbd3579 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el | |||
| @@ -50,8 +50,6 @@ Use (derived-mode-p 'text-mode) instead.") | |||
| 50 | (defvar text-mode-map | 50 | (defvar text-mode-map |
| 51 | (let ((map (make-sparse-keymap))) | 51 | (let ((map (make-sparse-keymap))) |
| 52 | (define-key map "\e\t" 'ispell-complete-word) | 52 | (define-key map "\e\t" 'ispell-complete-word) |
| 53 | (define-key map "\es" 'center-line) | ||
| 54 | (define-key map "\eS" 'center-paragraph) | ||
| 55 | map) | 53 | map) |
| 56 | "Keymap for `text-mode'. | 54 | "Keymap for `text-mode'. |
| 57 | Many other modes, such as `mail-mode', `outline-mode' and `indented-text-mode', | 55 | 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." | |||
| 123 | (message "Auto Fill %s in Text modes" | 121 | (message "Auto Fill %s in Text modes" |
| 124 | (if enable-mode "enabled" "disabled")))) | 122 | (if enable-mode "enabled" "disabled")))) |
| 125 | 123 | ||
| 124 | |||
| 125 | (define-key facemenu-keymap "\eS" 'center-paragraph) | ||
| 126 | |||
| 126 | (defun center-paragraph () | 127 | (defun center-paragraph () |
| 127 | "Center each nonblank line in the paragraph at or after point. | 128 | "Center each nonblank line in the paragraph at or after point. |
| 128 | See `center-line' for more info." | 129 | See `center-line' for more info." |
| @@ -150,6 +151,8 @@ See `center-line' for more info." | |||
| 150 | (center-line)) | 151 | (center-line)) |
| 151 | (forward-line 1))))) | 152 | (forward-line 1))))) |
| 152 | 153 | ||
| 154 | (define-key facemenu-keymap "\es" 'center-line) | ||
| 155 | |||
| 153 | (defun center-line (&optional nlines) | 156 | (defun center-line (&optional nlines) |
| 154 | "Center the line point is on, within the width specified by `fill-column'. | 157 | "Center the line point is on, within the width specified by `fill-column'. |
| 155 | This means adjusting the indentation so that it equals | 158 | This means adjusting the indentation so that it equals |