Mercurial > emacs
comparison lisp/progmodes/gud.el @ 76904:ecc6f5a2f4cb
(gud-menu-map): Simplify.
(gud-minor-mode-map): Add tool-bar like bindings to the text mode
menubar.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Tue, 03 Apr 2007 01:07:16 +0000 |
parents | cca5c886cdea |
children | 8199e6703268 |
comparison
equal
deleted
inserted
replaced
76903:46d9bec9200e | 76904:ecc6f5a2f4cb |
---|---|
145 '(gdbmi gdba dbx sdb xdb pdb)) | 145 '(gdbmi gdba dbx sdb xdb pdb)) |
146 :button (:toggle . gud-tooltip-mode)) | 146 :button (:toggle . gud-tooltip-mode)) |
147 ([refresh] "Refresh" . gud-refresh) | 147 ([refresh] "Refresh" . gud-refresh) |
148 ([run] menu-item "Run" gud-run | 148 ([run] menu-item "Run" gud-run |
149 :enable (not gud-running) | 149 :enable (not gud-running) |
150 :visible (and (memq gud-minor-mode '(gdbmi gdb dbx jdb)) | 150 :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) |
151 (not (eq gud-minor-mode 'gdba)))) | |
152 ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go | 151 ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go |
153 :visible (and (not gud-running) | 152 :visible (and (not gud-running) |
154 (eq gud-minor-mode 'gdba))) | 153 (eq gud-minor-mode 'gdba))) |
155 ([stop] menu-item "Stop" gud-stop-subjob | 154 ([stop] menu-item "Stop" gud-stop-subjob |
156 :visible (or (not (eq gud-minor-mode 'gdba)) | 155 :visible (or (not (eq gud-minor-mode 'gdba)) |
212 :visible (not (eq gud-minor-mode 'gdba)))) | 211 :visible (not (eq gud-minor-mode 'gdba)))) |
213 "Menu for `gud-mode'." | 212 "Menu for `gud-mode'." |
214 :name "Gud") | 213 :name "Gud") |
215 | 214 |
216 (easy-mmode-defmap gud-minor-mode-map | 215 (easy-mmode-defmap gud-minor-mode-map |
217 `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) | 216 (append |
217 `(([menu-bar debug] . ("Gud" . ,gud-menu-map))) | |
218 ;; Get tool bar like functionality from the menu bar on a text only | |
219 ;; terminal. | |
220 (unless window-system | |
221 `(([menu-bar down] | |
222 . (,(propertize "down" 'face 'font-lock-doc-face) . gud-down)) | |
223 ([menu-bar up] | |
224 . (,(propertize "up" 'face 'font-lock-doc-face) . gud-up)) | |
225 ([menu-bar finish] | |
226 . (,(propertize "finish" 'face 'font-lock-doc-face) . gud-finish)) | |
227 ([menu-bar step] | |
228 . (,(propertize "step" 'face 'font-lock-doc-face) . gud-step)) | |
229 ([menu-bar next] | |
230 . (,(propertize "next" 'face 'font-lock-doc-face) . gud-next)) | |
231 ([menu-bar until] menu-item | |
232 ,(propertize "until" 'face 'font-lock-doc-face) gud-until | |
233 :visible (memq gud-minor-mode '(gdbmi gdba gdb perldb))) | |
234 ([menu-bar cont] menu-item | |
235 ,(propertize "cont" 'face 'font-lock-doc-face) gud-cont | |
236 :visible (not (eq gud-minor-mode 'gdba))) | |
237 ([menu-bar run] menu-item | |
238 ,(propertize "run" 'face 'font-lock-doc-face) gud-run | |
239 :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) | |
240 ([menu-bar go] menu-item | |
241 ,(propertize "go" 'face 'font-lock-doc-face) gud-go | |
242 :visible (and (not gud-running) | |
243 (eq gud-minor-mode 'gdba))) | |
244 ([menu-bar stop] menu-item | |
245 ,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob | |
246 :visible (or (not (eq gud-minor-mode 'gdba)) | |
247 (and gud-running | |
248 (eq gud-minor-mode 'gdba)))) | |
249 ([menu-bar print] | |
250 . (,(propertize "print" 'face 'font-lock-doc-face) . gud-print)) | |
251 ([menu-bar tools] . undefined) | |
252 ([menu-bar buffer] . undefined) | |
253 ([menu-bar options] . undefined) | |
254 ([menu-bar edit] . undefined) | |
255 ([menu-bar file] . undefined)))) | |
218 "Map used in visited files.") | 256 "Map used in visited files.") |
219 | 257 |
220 (let ((m (assq 'gud-minor-mode minor-mode-map-alist))) | 258 (let ((m (assq 'gud-minor-mode minor-mode-map-alist))) |
221 (if m (setcdr m gud-minor-mode-map) | 259 (if m (setcdr m gud-minor-mode-map) |
222 (push (cons 'gud-minor-mode gud-minor-mode-map) minor-mode-map-alist))) | 260 (push (cons 'gud-minor-mode gud-minor-mode-map) minor-mode-map-alist))) |