emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comint / gdb file name completion with spaces in its path


From: Nick Roberts
Subject: Re: comint / gdb file name completion with spaces in its path
Date: Mon, 29 May 2006 17:21:16 +1200

 > A shell with completion would automatically quote the filename if  
 > that is necessary. Maybe this can be done as well when interactively  
 > prompting for the gdb arguments?
 > The tokenizer you mention would have to be able to deal with quoted  
 > arguments.

Here's a full patch.  Does it break things on Windows though?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** gud.el      24 May 2006 09:24:48 +1200      1.108
--- gud.el      29 May 2006 17:18:43 +1200      
*************** required by the caller."
*** 645,651 ****
    :inherit minibuffer-local-map)
  
  (defun gud-query-cmdline (minor-mode &optional init)
!   (let* ((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
--- 645,652 ----
    :inherit minibuffer-local-map)
  
  (defun gud-query-cmdline (minor-mode &optional init)
!   (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
*************** comint mode, which see."
*** 2537,2543 ****
  ;; 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))
         (program (car words))
         (dir default-directory)
         ;; Extract the file name from WORDS
--- 2538,2552 ----
  ;; for local variables in the debugger buffer.
  (defun gud-common-init (command-line massage-args marker-filter
                                     &optional find-file)
!   (let* (string
!        (words
!         ;; Do this to allow spaces in filenames.
!         (let (temp-words)
!           (dolist (word (split-string command-line) (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]