emacs-devel
[Top][All Lists]
Advanced

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

Re: `gud-common-init'


From: Nick Roberts
Subject: Re: `gud-common-init'
Date: Fri, 17 Dec 2004 12:27:08 +1300

 > While it´s generally not encouraged I think it´d be good not to mess up when
 > the needs comes up...

Well the price paid is lisp code that is harder to understand.


 >                   ...  In PCL-CVS I wrote cvs-string->strings (and
 > a corresponding cvs-strings->string) to handle that.

Its funny you should say that since in the previous thread (gud.el changes) I
thought you were the one who wasn't keen on the change. AFAIK the last message
in that thread was mine (Sun, 6 Jul 2003 03:37:34 +0100):


RMS> But if shell quoting is the wrong format for this use,
RMS> then comint-arguments is not right for it.  In that case,
RMS> this statement is probably right:

You>     I think we need something similar to cvs-string->strings in subr.el
You>     (and a corresponding strings->string).

Me> As Richard is agreeable to this and since you wrote pcvs-util.el, can I
Me> suggest that you make this change.

Me> Please note, however that I had to change cvs-string->strings slightly
Me> because split-string has been re-defined and can now output null strings:

Me> --- pcvs-util.el.~1.19.~        2003-05-10 11:27:06.000000000 +0100
Me> +++ pcvs-util.el        2003-06-28 17:43:22.000000000 +0100
Me> @@ -223,8 +223,8 @@
Me>  The SEPARATOR regexp defaults to \"\\s-+\"."
Me>    (let ((sep (or separator "\\s-+"))
Me>         (i (string-match "[\"]" string)))
Me> -    (if (null i) (split-string string sep)     ; no quoting:  easy
Me> -      (append (unless (eq i 0) (split-string (substring string 0 i) sep))
Me> +    (if (null i) (split-string string sep t)   ; no quoting:  easy
Me> +      (append (unless (eq i 0) (split-string (substring string 0 i) sep t))
Me>               (let ((rfs (read-from-string string i)))
Me>                 (cons (car rfs)
Me>                       (cvs-string->strings (substring string (cdr rfs))

Me> Then only one line need be changed in gud.el:

Me> --- gud.el.~1.3.~       2003-06-19 01:54:57.000000000 +0100
Me> +++ gud.el      2003-06-28 17:17:02.000000000 +0100
Me> @@ -2297,7 +2297,7 @@
Me>  ;; for local variables in the debugger buffer.
Me>  (defun gud-common-init (command-line massage-args marker-filter
Me>                                      &optional find-file)
Me> -  (let* ((words (split-string command-line))
Me> +  (let* ((words (cvs-string->strings command-line))
Me>          (program (car words))
Me>          (dir default-directory)
Me>          ;; Extract the file name from WORDS

Me> though cvs-string->strings will no doubt have another name when it's moved 
to
Me> subr.el


Nick




reply via email to

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