comparison lisp/progmodes/gud.el @ 71092:d0758b1b38eb

(gud-stop-subjob): Make it work in all buffers.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 30 May 2006 08:10:49 +0000
parents 8740ce7e1367
children 1cfc1ccfdfc2
comparison
equal deleted inserted replaced
71091:3407291ee367 71092:d0758b1b38eb
128 (and (memq gud-minor-mode '(gdbmi gdba)) 128 (and (memq gud-minor-mode '(gdbmi gdba))
129 (> (car (window-fringes)) 0))))) 129 (> (car (window-fringes)) 0)))))
130 130
131 (defun gud-stop-subjob () 131 (defun gud-stop-subjob ()
132 (interactive) 132 (interactive)
133 (if (string-equal 133 (with-current-buffer gud-comint-buffer
134 (buffer-local-value 'gud-target-name gud-comint-buffer) "emacs") 134 (if (string-equal gud-target-name "emacs")
135 (comint-stop-subjob) 135 (comint-stop-subjob)
136 (comint-interrupt-subjob))) 136 (comint-interrupt-subjob))))
137 137
138 (easy-mmode-defmap gud-menu-map 138 (easy-mmode-defmap gud-menu-map
139 '(([help] "Info" . gud-goto-info) 139 '(([help] "Info" . gud-goto-info)
140 ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode 140 ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode
141 :enable (and (not emacs-basic-display) 141 :enable (and (not emacs-basic-display)
643 '(("\C-i" . comint-dynamic-complete-filename)) 643 '(("\C-i" . comint-dynamic-complete-filename))
644 "Keymap for minibuffer prompting of gud startup command." 644 "Keymap for minibuffer prompting of gud startup command."
645 :inherit minibuffer-local-map) 645 :inherit minibuffer-local-map)
646 646
647 (defun gud-query-cmdline (minor-mode &optional init) 647 (defun gud-query-cmdline (minor-mode &optional init)
648 (let* ((hist-sym (gud-symbol 'history nil minor-mode)) 648 (let* ((comint-file-name-quote-list '(32))
649 (hist-sym (gud-symbol 'history nil minor-mode))
649 (cmd-name (gud-val 'command-name minor-mode))) 650 (cmd-name (gud-val 'command-name minor-mode)))
650 (unless (boundp hist-sym) (set hist-sym nil)) 651 (unless (boundp hist-sym) (set hist-sym nil))
651 (read-from-minibuffer 652 (read-from-minibuffer
652 (format "Run %s (like this): " minor-mode) 653 (format "Run %s (like this): " minor-mode)
653 (or (car-safe (symbol-value hist-sym)) 654 (or (car-safe (symbol-value hist-sym))
2535 ;; which starts with the program to debug. 2536 ;; which starts with the program to debug.
2536 ;; The other three args specify the values to use 2537 ;; The other three args specify the values to use
2537 ;; for local variables in the debugger buffer. 2538 ;; for local variables in the debugger buffer.
2538 (defun gud-common-init (command-line massage-args marker-filter 2539 (defun gud-common-init (command-line massage-args marker-filter
2539 &optional find-file) 2540 &optional find-file)
2540 (let* ((words (split-string command-line)) 2541 (let* (string
2542 (words
2543 ;; Do this to allow spaces in filenames.
2544 (let (temp-words)
2545 (dolist (word (split-string command-line "[ \f\t\n\r\v]")
2546 (nreverse temp-words))
2547 (if (string-match "\\(.*?\\)\\\\$" word)
2548 (setq string (concat string (match-string 1 word) " "))
2549 (push (concat string word) temp-words)
2550 (setq string nil)))))
2541 (program (car words)) 2551 (program (car words))
2542 (dir default-directory) 2552 (dir default-directory)
2543 ;; Extract the file name from WORDS 2553 ;; Extract the file name from WORDS
2544 ;; and put t in its place. 2554 ;; and put t in its place.
2545 ;; Later on we will put the modified file name arg back there. 2555 ;; Later on we will put the modified file name arg back there.