]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-menu-map): Add menu entries
authorDan Nicolaescu <dann@ics.uci.edu>
Sun, 2 Mar 2008 01:10:30 +0000 (01:10 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Sun, 2 Mar 2008 01:10:30 +0000 (01:10 +0000)
for useful options.

lisp/ChangeLog
lisp/progmodes/compile.el

index f77ca94316126e2cc34e25f0c287ed827a06b252..be67b888ada805e0d6a55012f5691e22f2e08733 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-02  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * progmodes/compile.el (compilation-menu-map): Add menu entries
+       for useful options.
+
 2008-03-01  Dan Nicolaescu  <dann@ics.uci.edu>
            Glenn Morris  <rgm@gnu.org>
 
index b75180e2c519ac3af6ee0b15bf504b9e8d92e12f..cc170e4b2776d0d9903400d1ae7083f4519013fd 100644 (file)
@@ -1288,9 +1288,40 @@ Returns the compilation buffer created."
             (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]