Mercurial > emacs
changeset 94206:10db3330138c
* progmodes/asm-mode.el (asm-mode-map):
* progmodes/hideif.el (hide-ifdef-mode-menu): Add :help.
* progmodes/m4-mode.el (m4-mode-map): Add menu.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 21 Apr 2008 05:02:06 +0000 |
parents | e60145f49fea |
children | 2aa6d908ffad |
files | lisp/ChangeLog lisp/progmodes/asm-mode.el lisp/progmodes/hideif.el lisp/progmodes/m4-mode.el |
diffstat | 4 files changed, 49 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Apr 21 02:02:01 2008 +0000 +++ b/lisp/ChangeLog Mon Apr 21 05:02:06 2008 +0000 @@ -1,3 +1,10 @@ +2008-04-21 Dan Nicolaescu <dann@ics.uci.edu> + + * progmodes/asm-mode.el (asm-mode-map): + * progmodes/hideif.el (hide-ifdef-mode-menu): Add :help. + + * progmodes/m4-mode.el (m4-mode-map): Add menu. + 2008-04-21 Kenichi Handa <handa@m17n.org> * select.el (xselect-convert-to-string): Send a C_STRING only if
--- a/lisp/progmodes/asm-mode.el Mon Apr 21 02:02:01 2008 +0000 +++ b/lisp/progmodes/asm-mode.el Mon Apr 21 05:02:06 2008 +0000 @@ -81,12 +81,15 @@ (define-key map "\C-m" 'newline-and-indent) (define-key map [menu-bar] (make-sparse-keymap)) (define-key map [menu-bar asm-mode] (cons "Asm" map)) + (define-key map [comment-region] + '(menu-item "Comment Region" comment-region + :help "Comment or uncomment each line in the region")) + (define-key map [newline-and-indent] + '(menu-item "Insert Newline and Indent" newline-and-indent + :help "Insert a newline, then indent according to major mode")) (define-key map [asm-colon] - '("Insert Colon" . asm-colon)) - (define-key map [comment-region] - '("Comment Region" . comment-region)) - (define-key map [newline-and-indent] - '("Insert Newline and Indent" . newline-and-indent)) + '(menu-item "Insert Colon" asm-colon + :help "Insert a colon; if it follows a label, delete the label's indentation")) map) "Keymap for Asm mode.")
--- a/lisp/progmodes/hideif.el Mon Apr 21 02:02:01 2008 +0000 +++ b/lisp/progmodes/hideif.el Mon Apr 21 05:02:06 2008 +0000 @@ -168,18 +168,28 @@ (easy-menu-define hide-ifdef-mode-menu hide-ifdef-mode-map "Menu for `hide-ifdef-mode'." '("Hide-Ifdef" - ["Hide some ifdefs" hide-ifdefs t] - ["Show all ifdefs" show-ifdefs t] - ["Hide ifdef block" hide-ifdef-block t] - ["Show ifdef block" show-ifdef-block t] - ["Define a variable" hide-ifdef-define t] - ["Define an alist" hide-ifdef-set-define-alist t] - ["Use an alist" hide-ifdef-use-define-alist t] - ["Undefine a variable" hide-ifdef-undef t] + ["Hide some ifdefs" hide-ifdefs + :help "Hide the contents of some #ifdefs"] + ["Show all ifdefs" show-ifdefs + :help "Cancel the effects of `hide-ifdef': show the contents of all #ifdefs"] + ["Hide ifdef block" hide-ifdef-block + :help "Hide the ifdef block (true or false part) enclosing or before the cursor"] + ["Show ifdef block" show-ifdef-block + :help "Show the ifdef block (true or false part) enclosing or before the cursor"] + ["Define a variable..." hide-ifdef-define + :help "Define a VAR so that #ifdef VAR would be included"] + ["Undefine a variable..." hide-ifdef-undef + :help "Undefine a VAR so that #ifdef VAR would not be included"] + ["Define an alist..." hide-ifdef-set-define-alist + :help "Set the association for NAME to `hide-ifdef-env'"] + ["Use an alist..." hide-ifdef-use-define-alist + :help "Set `hide-ifdef-env' to the define list specified by NAME"] ["Toggle read only" hide-ifdef-toggle-read-only - :style toggle :selected hide-ifdef-read-only] + :style toggle :selected hide-ifdef-read-only + :help "Buffer should be read-only while hiding text"] ["Toggle shadowing" hide-ifdef-toggle-shadowing - :style toggle :selected hide-ifdef-shadow])) + :style toggle :selected hide-ifdef-shadow + :help "Text should be shadowed instead of hidden"])) (defvar hide-ifdef-hiding nil "Non-nil when text may be hidden.") @@ -257,8 +267,8 @@ ;; else end hide-ifdef-mode (kill-local-variable 'line-move-ignore-invisible) (remove-from-invisibility-spec '(hide-ifdef . t)) - (if hide-ifdef-hiding - (show-ifdefs)))) + (when hide-ifdef-hiding + (show-ifdefs)))) (defun hif-show-all ()
--- a/lisp/progmodes/m4-mode.el Mon Apr 21 02:02:01 2008 +0000 +++ b/lisp/progmodes/m4-mode.el Mon Apr 21 05:02:06 2008 +0000 @@ -103,10 +103,21 @@ (modify-syntax-entry ?\" "w" m4-mode-syntax-table) (defvar m4-mode-map - (let ((map (make-sparse-keymap))) + (let ((map (make-sparse-keymap)) + (menu-map (make-sparse-keymap))) (define-key map "\C-c\C-b" 'm4-m4-buffer) (define-key map "\C-c\C-r" 'm4-m4-region) (define-key map "\C-c\C-c" 'comment-region) + (define-key map [menu-bar m4-mode] (cons "M4" menu-map)) + (define-key menu-map [m4c] + '(menu-item "Comment Region" comment-region + :help "Comment Region")) + (define-key menu-map [m4b] + '(menu-item "M4 Buffer" m4-m4-buffer + :help "Send contents of the current buffer to m4")) + (define-key menu-map [m4r] + '(menu-item "M4 Region" m4-m4-region + :help "Send contents of the current region to m4")) map)) (defvar m4-mode-abbrev-table nil