# HG changeset patch # User Dan Nicolaescu # Date 1204420230 0 # Node ID 9fc81417e8c49c229e41a4a48f8e4cad786ba5b5 # Parent f2e4e3550683ddf68ef08cff99473772a81e35f6 (compilation-menu-map): Add menu entries for useful options. diff -r f2e4e3550683 -r 9fc81417e8c4 lisp/ChangeLog --- a/lisp/ChangeLog Sat Mar 01 23:51:46 2008 +0000 +++ b/lisp/ChangeLog Sun Mar 02 01:10:30 2008 +0000 @@ -1,3 +1,8 @@ +2008-03-02 Dan Nicolaescu + + * progmodes/compile.el (compilation-menu-map): Add menu entries + for useful options. + 2008-03-01 Dan Nicolaescu Glenn Morris diff -r f2e4e3550683 -r 9fc81417e8c4 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Sat Mar 01 23:51:46 2008 +0000 +++ b/lisp/progmodes/compile.el Sun Mar 02 01:10:30 2008 +0000 @@ -1288,9 +1288,40 @@ (enlarge-window (- height (window-height)))))))) (defvar compilation-menu-map - (let ((map (make-sparse-keymap "Errors"))) + (let ((map (make-sparse-keymap "Errors")) + (opt-map (make-sparse-keymap "Skip"))) (define-key map [stop-subjob] '("Stop Compilation" . kill-compilation)) + (define-key map [compilation-mode-separator3] + '("----" . nil)) + (define-key map [compilation-next-error-follow-minor-mode] + '(menu-item + "Auto Error Display" next-error-follow-minor-mode + :help "Display the error under cursor when moving the cursor" + :button (:toggle . next-error-follow-minor-mode))) + (define-key map [compilation-skip] + (cons "Skip Less Important Messages" opt-map)) + (define-key opt-map [compilation-skip-none] + '(menu-item "Don't Skip Any Messages" + (lambda () + (interactive) + (customize-set-variable 'compilation-skip-threshold 0)) + :help "Do not skip any type of messages" + :button (:radio . (eq compilation-skip-threshold 0)))) + (define-key opt-map [compilation-skip-info] + '(menu-item "Skip Info" + (lambda () + (interactive) + (customize-set-variable 'compilation-skip-threshold 1)) + :help "Skip anything less than warning" + :button (:radio . (eq compilation-skip-threshold 1)))) + (define-key opt-map [compilation-skip-warning-and-info] + '(menu-item "Skip Warnings and Info" + (lambda () + (interactive) + (customize-set-variable 'compilation-skip-threshold 2)) + :help "Skip over Warnings and Info, stop for errors" + :button (:radio . (eq compilation-skip-threshold 2)))) (define-key map [compilation-mode-separator2] '("----" . nil)) (define-key map [compilation-first-error]