summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gud.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2006-05-30 08:10:49 +0000
committerNick Roberts <nickrob@snap.net.nz>2006-05-30 08:10:49 +0000
commit12e7d5871366a9df9a2fdd1d555b2a38d1c29569 (patch)
tree25efd0e29f7a89ab86b13a21da9b1a15dbe2dc48 /lisp/progmodes/gud.el
parent89f0e7cc360e37fa3c044333559ff98bbb338ad0 (diff)
downloademacs-12e7d5871366a9df9a2fdd1d555b2a38d1c29569.tar.gz
(gud-stop-subjob): Make it work in all buffers.
Diffstat (limited to 'lisp/progmodes/gud.el')
-rw-r--r--lisp/progmodes/gud.el22
1 files changed, 16 insertions, 6 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index bbb9df4cb2c..c54d76f1d3e 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -130,10 +130,10 @@ Used to grey out relevant togolbar icons.")
(defun gud-stop-subjob ()
(interactive)
- (if (string-equal
- (buffer-local-value 'gud-target-name gud-comint-buffer) "emacs")
- (comint-stop-subjob)
- (comint-interrupt-subjob)))
+ (with-current-buffer gud-comint-buffer
+ (if (string-equal gud-target-name "emacs")
+ (comint-stop-subjob)
+ (comint-interrupt-subjob))))
(easy-mmode-defmap gud-menu-map
'(([help] "Info" . gud-goto-info)
@@ -645,7 +645,8 @@ required by the caller."
:inherit minibuffer-local-map)
(defun gud-query-cmdline (minor-mode &optional init)
- (let* ((hist-sym (gud-symbol 'history nil minor-mode))
+ (let* ((comint-file-name-quote-list '(32))
+ (hist-sym (gud-symbol 'history nil minor-mode))
(cmd-name (gud-val 'command-name minor-mode)))
(unless (boundp hist-sym) (set hist-sym nil))
(read-from-minibuffer
@@ -2537,7 +2538,16 @@ comint mode, which see."
;; for local variables in the debugger buffer.
(defun gud-common-init (command-line massage-args marker-filter
&optional find-file)
- (let* ((words (split-string command-line))
+ (let* (string
+ (words
+ ;; Do this to allow spaces in filenames.
+ (let (temp-words)
+ (dolist (word (split-string command-line "[ \f\t\n\r\v]")
+ (nreverse temp-words))
+ (if (string-match "\\(.*?\\)\\\\$" word)
+ (setq string (concat string (match-string 1 word) " "))
+ (push (concat string word) temp-words)
+ (setq string nil)))))
(program (car words))
(dir default-directory)
;; Extract the file name from WORDS