diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2007-04-03 01:07:16 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2007-04-03 01:07:16 +0000 |
commit | c635126ac12579adc1227ded80a3860e4cfa8dfc (patch) | |
tree | d053b29ea8e2b6a1445031216b490c81f06221d2 | |
parent | 5de62e25878ff8a365e41bc41be5e6ae0d1ff438 (diff) | |
download | emacs-c635126ac12579adc1227ded80a3860e4cfa8dfc.tar.gz |
(gud-menu-map): Simplify.
(gud-minor-mode-map): Add tool-bar like bindings to the text mode
menubar.
-rw-r--r-- | lisp/progmodes/gud.el | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 8db7c28219e..858f4bfe43b 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -147,8 +147,7 @@ Used to grey out relevant toolbar icons.") ([refresh] "Refresh" . gud-refresh) ([run] menu-item "Run" gud-run :enable (not gud-running) - :visible (and (memq gud-minor-mode '(gdbmi gdb dbx jdb)) - (not (eq gud-minor-mode 'gdba)))) + :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go :visible (and (not gud-running) (eq gud-minor-mode 'gdba))) @@ -214,7 +213,46 @@ Used to grey out relevant toolbar icons.") :name "Gud") (easy-mmode-defmap gud-minor-mode-map - `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) + (append + `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) + ;; Get tool bar like functionality from the menu bar on a text only + ;; terminal. + (unless window-system + `(([menu-bar down] + . (,(propertize "down" 'face 'font-lock-doc-face) . gud-down)) + ([menu-bar up] + . (,(propertize "up" 'face 'font-lock-doc-face) . gud-up)) + ([menu-bar finish] + . (,(propertize "finish" 'face 'font-lock-doc-face) . gud-finish)) + ([menu-bar step] + . (,(propertize "step" 'face 'font-lock-doc-face) . gud-step)) + ([menu-bar next] + . (,(propertize "next" 'face 'font-lock-doc-face) . gud-next)) + ([menu-bar until] menu-item + ,(propertize "until" 'face 'font-lock-doc-face) gud-until + :visible (memq gud-minor-mode '(gdbmi gdba gdb perldb))) + ([menu-bar cont] menu-item + ,(propertize "cont" 'face 'font-lock-doc-face) gud-cont + :visible (not (eq gud-minor-mode 'gdba))) + ([menu-bar run] menu-item + ,(propertize "run" 'face 'font-lock-doc-face) gud-run + :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) + ([menu-bar go] menu-item + ,(propertize "go" 'face 'font-lock-doc-face) gud-go + :visible (and (not gud-running) + (eq gud-minor-mode 'gdba))) + ([menu-bar stop] menu-item + ,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob + :visible (or (not (eq gud-minor-mode 'gdba)) + (and gud-running + (eq gud-minor-mode 'gdba)))) + ([menu-bar print] + . (,(propertize "print" 'face 'font-lock-doc-face) . gud-print)) + ([menu-bar tools] . undefined) + ([menu-bar buffer] . undefined) + ([menu-bar options] . undefined) + ([menu-bar edit] . undefined) + ([menu-bar file] . undefined)))) "Map used in visited files.") (let ((m (assq 'gud-minor-mode minor-mode-map-alist))) |