comparison lisp/emacs-lisp/lisp-mode.el @ 93534:8bdec2731742

(emacs-lisp-mode-map): Add menu entries for tracing and re-builder.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 02 Apr 2008 06:29:40 +0000
parents e430e106fa7b
children e3bcfa0ca892
comparison
equal deleted inserted replaced
93533:851deb208446 93534:8bdec2731742
271 "Keymap for commands shared by all sorts of Lisp modes.") 271 "Keymap for commands shared by all sorts of Lisp modes.")
272 272
273 (defvar emacs-lisp-mode-map 273 (defvar emacs-lisp-mode-map
274 (let ((map (make-sparse-keymap "Emacs-Lisp")) 274 (let ((map (make-sparse-keymap "Emacs-Lisp"))
275 (menu-map (make-sparse-keymap "Emacs-Lisp")) 275 (menu-map (make-sparse-keymap "Emacs-Lisp"))
276 (prof-map (make-sparse-keymap))) 276 (prof-map (make-sparse-keymap))
277 (tracing-map (make-sparse-keymap)))
277 (set-keymap-parent map lisp-mode-shared-map) 278 (set-keymap-parent map lisp-mode-shared-map)
278 (define-key map "\e\t" 'lisp-complete-symbol) 279 (define-key map "\e\t" 'lisp-complete-symbol)
279 (define-key map "\e\C-x" 'eval-defun) 280 (define-key map "\e\C-x" 'eval-defun)
280 (define-key map "\e\C-q" 'indent-pp-sexp) 281 (define-key map "\e\C-q" 'indent-pp-sexp)
281 (define-key map [menu-bar emacs-lisp] (cons "Emacs-Lisp" menu-map)) 282 (define-key map [menu-bar emacs-lisp] (cons "Emacs-Lisp" menu-map))
284 :button (:toggle . (bound-and-true-p eldoc-mode)) 285 :button (:toggle . (bound-and-true-p eldoc-mode))
285 :help "Display the documentation string for the item under cursor")) 286 :help "Display the documentation string for the item under cursor"))
286 (define-key menu-map [checkdoc] 287 (define-key menu-map [checkdoc]
287 '(menu-item "Check Documentation Strings" checkdoc 288 '(menu-item "Check Documentation Strings" checkdoc
288 :help "Check documentation strings for style requirements")) 289 :help "Check documentation strings for style requirements"))
290 (define-key menu-map [re-builder]
291 '(menu-item "Construct Regexp" re-builder
292 :help "Construct a regexp interactively"))
293 (define-key menu-map [tracing] (cons "Tracing" tracing-map))
294 (define-key tracing-map [tr-a]
295 '(menu-item "Untrace all" untrace-all
296 :help "Untraces all currently traced functions"))
297 (define-key tracing-map [tr-uf]
298 '(menu-item "Untrace function..." untrace-function
299 :help "Untraces FUNCTION and possibly activates all remaining advice"))
300 (define-key tracing-map [tr-sep] '("--"))
301 (define-key tracing-map [tr-q]
302 '(menu-item "Trace function quietly..." trace-function
303 :help "Trace the function with trace output going quietly to a buffer"))
304 (define-key tracing-map [tr-f]
305 '(menu-item "Trace function..." trace-function
306 :help "Trace the function given as a argument"))
289 (define-key menu-map [profiling] (cons "Profiling" prof-map)) 307 (define-key menu-map [profiling] (cons "Profiling" prof-map))
290 (define-key prof-map [prof-restall] 308 (define-key prof-map [prof-restall]
291 '(menu-item "Remove Instrumentation for All Functions" elp-restore-all 309 '(menu-item "Remove Instrumentation for All Functions" elp-restore-all
292 :help "Restore the original definitions of all functions being profiled")) 310 :help "Restore the original definitions of all functions being profiled"))
293 (define-key prof-map [prof-restfunc] 311 (define-key prof-map [prof-restfunc]