diff options
| author | Nick Roberts | 2005-11-16 00:55:52 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-11-16 00:55:52 +0000 |
| commit | 0b4b288e4a4a166aab3b473cca1f248664e64add (patch) | |
| tree | 7fa330ce77909cc1414d02e83e9df02c8d41bd72 | |
| parent | 2fe3d6ec19e8de196464acabcf87c074e805c62e (diff) | |
| download | emacs-0b4b288e4a4a166aab3b473cca1f248664e64add.tar.gz emacs-0b4b288e4a4a166aab3b473cca1f248664e64add.zip | |
(gud-stop-subjob): New function.
(gud-menu-map, gud-tool-bar-map): Use it.
| -rw-r--r-- | lisp/progmodes/gud.el | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 993013786cc..1c5eb90b7ae 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -127,6 +127,13 @@ Used to grey out relevant togolbar icons.") | |||
| 127 | (and (memq gud-minor-mode '(gdbmi gdba)) | 127 | (and (memq gud-minor-mode '(gdbmi gdba)) |
| 128 | (> (car (window-fringes)) 0))))) | 128 | (> (car (window-fringes)) 0))))) |
| 129 | 129 | ||
| 130 | (defun gud-stop-subjob () | ||
| 131 | (interactive) | ||
| 132 | (if (string-equal | ||
| 133 | (buffer-local-value 'gud-target-name gud-comint-buffer) "emacs") | ||
| 134 | (comint-stop-subjob) | ||
| 135 | (comint-interrupt-subjob))) | ||
| 136 | |||
| 130 | (easy-mmode-defmap gud-menu-map | 137 | (easy-mmode-defmap gud-menu-map |
| 131 | '(([help] "Info" . gud-goto-info) | 138 | '(([help] "Info" . gud-goto-info) |
| 132 | ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode | 139 | ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode |
| @@ -142,7 +149,7 @@ Used to grey out relevant togolbar icons.") | |||
| 142 | ([go] menu-item "Run/Continue" gud-go | 149 | ([go] menu-item "Run/Continue" gud-go |
| 143 | :visible (and (not gud-running) | 150 | :visible (and (not gud-running) |
| 144 | (eq gud-minor-mode 'gdba))) | 151 | (eq gud-minor-mode 'gdba))) |
| 145 | ([stop] menu-item "Stop" comint-stop-subjob | 152 | ([stop] menu-item "Stop" gud-stop-subjob |
| 146 | :visible (or (not (eq gud-minor-mode 'gdba)) | 153 | :visible (or (not (eq gud-minor-mode 'gdba)) |
| 147 | (and gud-running | 154 | (and gud-running |
| 148 | (eq gud-minor-mode 'gdba)))) | 155 | (eq gud-minor-mode 'gdba)))) |
| @@ -168,37 +175,34 @@ Used to grey out relevant togolbar icons.") | |||
| 168 | (memq gud-minor-mode | 175 | (memq gud-minor-mode |
| 169 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) | 176 | '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) |
| 170 | ([pp] menu-item "Print the emacs s-expression" gud-pp | 177 | ([pp] menu-item "Print the emacs s-expression" gud-pp |
| 171 | :enable (and (not gud-running) | 178 | :enable (and (not gud-running) |
| 172 | gdb-active-process) | 179 | gdb-active-process) |
| 173 | :visible (and (string-equal | 180 | :visible (and (string-equal |
| 174 | (buffer-local-value | 181 | (buffer-local-value |
| 175 | 'gud-target-name gud-comint-buffer) "emacs") | 182 | 'gud-target-name gud-comint-buffer) "emacs") |
| 176 | (eq gud-minor-mode 'gdba))) | 183 | (eq gud-minor-mode 'gdba))) |
| 177 | ([print*] menu-item "Print Dereference" gud-pstar | 184 | ([print*] menu-item "Print Dereference" gud-pstar |
| 178 | :enable (and (not gud-running) | 185 | :enable (and (not gud-running) |
| 179 | (memq gud-minor-mode '(gdbmi gdba gdb)))) | 186 | (memq gud-minor-mode '(gdbmi gdba gdb)))) |
| 180 | ([print] menu-item "Print Expression" gud-print | 187 | ([print] menu-item "Print Expression" gud-print |
| 181 | :enable (not gud-running)) | 188 | :enable (not gud-running)) |
| 182 | ([watch] menu-item "Watch Expression" gud-watch | 189 | ([watch] menu-item "Watch Expression" gud-watch |
| 183 | :enable (and (not gud-running) | 190 | :enable (and (not gud-running) |
| 184 | (memq gud-minor-mode '(gdbmi gdba)))) | 191 | (memq gud-minor-mode |
| 185 | ([finish] menu-item "Finish Function" gud-finish | 192 | '(gdbmi gdba gdb xdb jdb pdb bashdb)))) |
| 186 | :enable (and (not gud-running) | ||
| 187 | (memq gud-minor-mode | ||
| 188 | '(gdbmi gdba gdb xdb jdb pdb bashdb)))) | ||
| 189 | ([stepi] menu-item "Step Instruction" gud-stepi | 193 | ([stepi] menu-item "Step Instruction" gud-stepi |
| 190 | :enable (and (not gud-running) | 194 | :enable (and (not gud-running) |
| 191 | (memq gud-minor-mode '(gdbmi gdba gdb dbx)))) | 195 | (memq gud-minor-mode '(gdbmi gdba gdb dbx)))) |
| 192 | ([nexti] menu-item "Next Instruction" gud-nexti | 196 | ([nexti] menu-item "Next Instruction" gud-nexti |
| 193 | :enable (and (not gud-running) | 197 | :enable (and (not gud-running) |
| 194 | (memq gud-minor-mode '(gdbmi gdba gdb dbx)))) | 198 | (memq gud-minor-mode '(gdbmi gdba gdb dbx)))) |
| 195 | ([step] menu-item "Step Line" gud-step | 199 | ([step] menu-item "Step Line" gud-step |
| 196 | :enable (not gud-running)) | 200 | :enable (not gud-running)) |
| 197 | ([next] menu-item "Next Line" gud-next | 201 | ([next] menu-item "Next Line" gud-next |
| 198 | :enable (not gud-running)) | 202 | :enable (not gud-running)) |
| 199 | ([cont] menu-item "Continue" gud-cont | 203 | ([cont] menu-item "Continue" gud-cont |
| 200 | :enable (not gud-running) | 204 | :enable (not gud-running) |
| 201 | :visible (not (eq gud-minor-mode 'gdba)))) | 205 | :visible (not (eq gud-minor-mode 'gdba)))) |
| 202 | "Menu for `gud-mode'." | 206 | "Menu for `gud-mode'." |
| 203 | :name "Gud") | 207 | :name "Gud") |
| 204 | 208 | ||
| @@ -226,7 +230,7 @@ Used to grey out relevant togolbar icons.") | |||
| 226 | (gud-watch . "gud/watch") | 230 | (gud-watch . "gud/watch") |
| 227 | (gud-run . "gud/run") | 231 | (gud-run . "gud/run") |
| 228 | (gud-go . "gud/go") | 232 | (gud-go . "gud/go") |
| 229 | (comint-stop-subjob . "gud/stop") | 233 | (gud-stop-subjob . "gud/stop") |
| 230 | ;; gud-s, gud-si etc. instead of gud-step, | 234 | ;; gud-s, gud-si etc. instead of gud-step, |
| 231 | ;; gud-stepi, to avoid file-name clashes on DOS | 235 | ;; gud-stepi, to avoid file-name clashes on DOS |
| 232 | ;; 8+3 filesystems. | 236 | ;; 8+3 filesystems. |