+ ["Show Message %_Log" show-message-log]
+ "----"
+ ["%_Goto Line..." goto-line]
+ ["%_What Line" what-line]
+ ("%_Bookmarks"
+ :filter bookmark-menu-filter)
+ "----"
+ ["%_Jump to Previous Mark" (set-mark-command t)
+ :active (mark t)]
+ )
+
+ ("C%_mds"
+ ["Repeat %_Last Complex Command..." repeat-complex-command]
+ ["E%_valuate Lisp Expression..." eval-expression]
+ ["Execute %_Named Command..." execute-extended-command]
+ "----"
+ ["Start %_Macro Recording" start-kbd-macro
+ :included (not defining-kbd-macro)]
+ ["End %_Macro Recording" end-kbd-macro
+ :included defining-kbd-macro]
+ ["E%_xecute Last Macro" call-last-kbd-macro
+ :active last-kbd-macro]
+ ("%_Other Macro"
+ ["%_Append to Last Macro" (start-kbd-macro t)
+ :active (and (not defining-kbd-macro) last-kbd-macro)]
+ ["%_Query User During Macro" kbd-macro-query
+ :active defining-kbd-macro]
+ ["Enter %_Recursive Edit During Macro" (kbd-macro-query t)
+ :active defining-kbd-macro]
+ "---"
+ ["E%_xecute Last Macro on Region Lines"
+ :active (and last-kbd-macro (region-exists-p))]
+ "---"
+ ["%_Name Last Macro..." name-last-kbd-macro
+ :active last-kbd-macro]
+ ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key
+ :active (and last-kbd-macro
+ (fboundp 'assign-last-kbd-macro-to-key))]
+ "---"
+ ["%_Edit Macro..." edit-kbd-macro]
+ ["Edit %_Last Macro" edit-last-kbd-macro
+ :active last-kbd-macro]
+ "---"
+ ["%_Insert Named Macro into Buffer..." insert-kbd-macro]
+ ["Read Macro from Re%_gion" read-kbd-macro
+ :active (region-exists-p)]
+ )
+ "----"
+ ("%_Abbrev"
+ ["D%_ynamic Abbrev Expand" dabbrev-expand]
+ ["Dynamic Abbrev %_Complete" dabbrev-completion]
+ ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)]
+ "----"
+ "----"
+ ["%_Define Global Abbrev for " add-global-abbrev
+ :suffix (abbrev-string-to-be-defined nil)
+ :active abbrev-mode]
+ ["Define %_Mode-Specific Abbrev for " add-mode-abbrev
+ :suffix (abbrev-string-to-be-defined nil)
+ :active abbrev-mode]
+ ["Define Global Ex%_pansion for " inverse-add-global-abbrev
+ :suffix (inverse-abbrev-string-to-be-defined 1)
+ :active abbrev-mode]
+ ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev
+ :suffix (inverse-abbrev-string-to-be-defined 1)
+ :active abbrev-mode]
+ "---"
+ ["E%_xpand Abbrev" expand-abbrev]
+ ["Expand Abbrevs in Re%_gion" expand-region-abbrevs
+ :active (region-exists-p)]
+ ["%_Unexpand Last Abbrev" unexpand-abbrev
+ :active (and (stringp last-abbrev-text)
+ (> last-abbrev-location 0))]
+ "---"
+ ["%_Kill All Abbrevs" kill-all-abbrevs]
+ ["%_Insert All Abbrevs into Buffer" insert-abbrevs]
+ ["%_List Abbrevs" list-abbrevs]
+ "---"
+ ["%_Edit Abbrevs" edit-abbrevs]
+ ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine
+ :active (eq major-mode 'edit-abbrevs-mode)]
+ "---"
+ ["%_Save Abbrevs As..." write-abbrev-file]
+ ["L%_oad Abbrevs..." read-abbrev-file]
+ )
+ ("%_Register"
+ ["%_Copy to Register..." copy-to-register :active (region-exists-p)]
+ ["%_Paste Register..." insert-register]
+ "---"
+ ["%_Save Point to Register" point-to-register]
+ ["%_Jump to Register" register-to-point]
+ )
+ ("R%_ectangles"
+ ["%_Kill Rectangle" kill-rectangle]
+ ["%_Yank Rectangle" yank-rectangle]
+ ["Rectangle %_to Register" copy-rectangle-to-register]
+ ["Rectangle %_from Register" insert-register]
+ ["%_Clear Rectangle" clear-rectangle]
+ ["%_Open Rectangle" open-rectangle]
+ ["%_Prefix Rectangle..." string-rectangle]
+ ["Rectangle %_Mousing"
+ (customize-set-variable 'mouse-track-rectangle-p
+ (not mouse-track-rectangle-p))
+ :style toggle :selected mouse-track-rectangle-p]
+ )
+ ("%_Sort"
+ ["%_Lines" sort-lines :active (region-exists-p)]
+ ["%_Paragraphs" sort-paragraphs :active (region-exists-p)]
+ ["P%_ages" sort-pages :active (region-exists-p)]
+ ["%_Columns" sort-columns :active (region-exists-p)]
+ ["%_Regexp..." sort-regexp-fields :active (region-exists-p)]
+ )
+ ("%_Center"
+ ["%_Line" center-line]
+ ["%_Paragraph" center-paragraph]
+ ["%_Region" center-region :active (region-exists-p)]
+ )
+ ("%_Indent"
+ ["%_As Previous Line" indent-relative]
+ ["%_To Column..." indent-to-column]
+ "---"
+ ["%_Region" indent-region :active (region-exists-p)]
+ ["%_Balanced Expression" indent-sexp]
+ ["%_C Expression" indent-c-exp]
+ )
+ ("S%_pell-Check"
+ ["%_Buffer" ispell-buffer
+ :active (fboundp 'ispell-buffer)]
+ "---"
+ ["%_Word" ispell-word]
+ ["%_Complete Word" ispell-complete-word]
+ ["%_Region" ispell-region]
+ )
+ )
+
+ ("%_Tools"
+ ("%_Internet"
+ ["Read Mail %_1 (VM)..." vm
+ :active (fboundp 'vm)]
+ ["Read Mail %_2 (MH)..." (mh-rmail t)
+ :active (fboundp 'mh-rmail)]
+ ["Send %_Mail..." compose-mail
+ :active (fboundp 'compose-mail)]
+ ["Usenet %_News" gnus
+ :active (fboundp 'gnus)]
+ ["Browse the %_Web" w3
+ :active (fboundp 'w3)])
+ "---"
+ ("%_Grep"
+ :filter
+ (lambda (menu)
+ (if (or (not (boundp 'grep-history)) (null grep-history))
+ menu
+ (let ((items
+ (submenu-generate-accelerator-spec
+ (mapcar #'(lambda (string)
+ (vector string
+ (list 'grep string)))
+ (menu-truncate-list grep-history 10)))))
+ (append menu '("---") items))))
+ ["%_Grep..." grep :active (fboundp 'grep)]
+ ["%_Kill Grep" kill-compilation
+ :active (and (fboundp 'kill-compilation)
+ (fboundp 'compilation-find-buffer)
+ (let ((buffer (condition-case nil
+ (compilation-find-buffer)
+ (error nil))))
+ (and buffer (get-buffer-process buffer))))]
+ "---"
+ ["Grep %_All Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *")
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_C and C Header Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.[chCH]"
+ ; i wanted to also use *.cc and *.hh.
+ ; see long comment below under Perl.
+ )
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep C Hea%_der Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.[hH]"
+ ; i wanted to also use *.hh.
+ ; see long comment below under Perl.
+ )
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_E-Lisp Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.el")
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_Perl Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.pl"
+ ; i wanted to use this:
+ ; " *.pl *.pm *.am"
+ ; but grep complains if it can't
+ ; match anything in a glob, and
+ ; that screws other things up.
+ ; perhaps we need to first scan
+ ; each separate glob in the directory
+ ; to see if there are any files in
+ ; that glob, and if not, omit it.
+ )
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_HTML Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.*htm*")
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ "---"
+ ["%_Next Match" next-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["Pre%_vious Match" previous-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["%_First Match" first-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["G%_oto Match" compile-goto-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ "---"
+ ["%_Set Grep Command..."
+ (progn
+ (require 'compile)
+ (customize-set-variable
+ 'grep-command
+ (read-shell-command "Default Grep Command: " grep-command)))
+ :active (fboundp 'grep)
+ ]
+ )
+ ("%_Compile"
+ :filter
+ (lambda (menu)
+ (if (or (not (boundp 'compile-history)) (null compile-history))
+ menu
+ (let ((items
+ (submenu-generate-accelerator-spec
+ (mapcar #'(lambda (string)
+ (vector string
+ (list 'compile string)))
+ (menu-truncate-list compile-history 10)))))
+ (append menu '("---") items))))
+ ["%_Compile..." compile :active (fboundp 'compile)]
+ ["%_Repeat Compilation" recompile :active (fboundp 'recompile)]
+ ["%_Kill Compilation" kill-compilation
+ :active (and (fboundp 'kill-compilation)
+ (fboundp 'compilation-find-buffer)
+ (let ((buffer (condition-case nil
+ (compilation-find-buffer)
+ (error nil))))
+ (and buffer (get-buffer-process buffer))))]
+ "---"
+ ["%_Next Error" next-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["Pre%_vious Error" previous-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["%_First Error" first-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["G%_oto Error" compile-goto-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ )
+ ("%_Debug"
+ ["%_GDB..." gdb
+ :active (fboundp 'gdb)]
+ ["%_DBX..." dbx
+ :active (fboundp 'dbx)])
+ ("%_Shell"
+ ["%_Shell" shell
+ :active (fboundp 'shell)]
+ ["S%_hell Command..." shell-command
+ :active (fboundp 'shell-command)]
+ ["Shell Command on %_Region..." shell-command-on-region
+ :active (and (fboundp 'shell-command-on-region) (region-exists-p))])
+
+ ("%_Tags"
+ ["%_Find Tag..." find-tag]
+ ["Find %_Other Window..." find-tag-other-window]
+ ["%_Next Tag..." (find-tag nil)]
+ ["N%_ext Other Window..." (find-tag-other-window nil)]
+ ["Next %_File" next-file]
+ "-----"
+ ["Tags %_Search..." tags-search]
+ ["Tags %_Replace..." tags-query-replace]
+ ["%_Continue Search/Replace" tags-loop-continue]
+ "-----"
+ ["%_Pop stack" pop-tag-mark]
+ ["%_Apropos..." tags-apropos]
+ "-----"
+ ["%_Set Tags Table File..." visit-tags-table]
+ )
+