diff options
author | Glenn Morris <rgm@gnu.org> | 2013-01-19 18:40:49 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-01-19 18:40:49 -0800 |
commit | a576cc76c8267928c601da79f370f98fa1834e8e (patch) | |
tree | 7779e99f9b866e0a49d14a5eb6feb53f0411494a /lisp | |
parent | 15df6fa4f12fdb2faf798b88c544b31de83591b2 (diff) | |
download | emacs-a576cc76c8267928c601da79f370f98fa1834e8e.tar.gz emacs-a576cc76c8267928c601da79f370f98fa1834e8e.tar.bz2 emacs-a576cc76c8267928c601da79f370f98fa1834e8e.zip |
* lisp-mode.el (emacs-lisp-mode-map): Add native profiler menu entries.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 02c79ef1920..d439c661401 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-01-20 Glenn Morris <rgm@gnu.org> + * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): + Add native profiler menu entries. + * profiler.el (profiler-running-p): New function. (profiler-cpu-profile): Use profiler-running-p. (profiler-report-mode-map): Add some more menu entries. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 9c2bd1a29bd..3d13dc451b2 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -335,6 +335,22 @@ font-lock keywords will not be case sensitive." (bindings--define-key prof-map [prof-func] '(menu-item "Instrument Function..." elp-instrument-function :help "Instrument a function for profiling")) + ;; Maybe this should be in a separate submenu from the ELP stuff? + (bindings--define-key prof-map [sep-natprof] menu-bar-separator) + (bindings--define-key prof-map [prof-natprof-stop] + '(menu-item "Stop Native Profiler" profiler-stop + :help "Stop recording profiling information" + :enable (and (featurep 'profiler) + (profiler-running-p)))) + (bindings--define-key prof-map [prof-natprof-report] + '(menu-item "Show Profiler Report" profiler-report + :help "Show the current profiler report" + :enable (and (featurep 'profiler) + (profiler-running-p)))) + (bindings--define-key prof-map [prof-natprof-start] + '(menu-item "Start Native Profiler..." profiler-start + :help "Start recording profiling information")) + (bindings--define-key menu-map [lint] (cons "Linting" lint-map)) (bindings--define-key lint-map [lint-di] '(menu-item "Lint Directory..." elint-directory |