From: John Anthony Date: Thu, 10 Oct 2013 00:24:12 +0000 (-0400) Subject: * lisp/textmodes/text-mode.el (text-mode-map): Add a menu (tiny change) X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1310 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a066720cb7b634c479ad66b7845663bb9945cd11;p=emacs.git * lisp/textmodes/text-mode.el (text-mode-map): Add a menu (tiny change) Fixes: debbugs:15562 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 52af8847372..dcdff90d1b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-10-10 John Anthony (tiny change) + + * textmodes/text-mode.el (text-mode-map): Add a menu. (Bug#15562) + 2013-10-09 Juri Linkov * isearch.el (isearch-pre-command-hook): Use this-single-command-keys diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index d9ff04c9b2f..8ffa8202e72 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -51,6 +51,27 @@ 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 [menu-bar text] + (cons "Text" (make-sparse-keymap "Text"))) + (bindings--define-key map [menu-bar text toggle-text-mode-auto-fill] + '(menu-item "Auto Fill" toggle-text-mode-auto-fill + :button (:toggle . (memq 'turn-on-auto-fill text-mode-hook)) + :help "Toggle auto fill within text modes")) + (bindings--define-key map [menu-bar text paragraph-indent-minor-mode] + '(menu-item "Paragraph Indent" paragraph-indent-minor-mode + :button (:toggle . (bound-and-true-p paragraph-indent-minor-mode)) + :help "Toggle paragraph indent minor mode")) + (bindings--define-key map [menu-bar text sep] menu-bar-separator) + (bindings--define-key map [menu-bar text center-region] + '(menu-item "Center Region" center-region + :help "Center the marked region" + :enable (region-active-p))) + (bindings--define-key map [menu-bar text center-paragraph] + '(menu-item "Center Paragraph" center-paragraph + :help "Center the current paragraph")) + (bindings--define-key map [menu-bar text center-line] + '(menu-item "Center Line" center-line + :help "Center the current line")) map) "Keymap for `text-mode'. Many other modes, such as `mail-mode', `outline-mode' and `indented-text-mode',