* vc.el and diff-switches containing "-r"
@ 2002-03-25 22:42 Michael Ernst
2002-03-26 19:18 ` Andre Spiegel
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ernst @ 2002-03-25 22:42 UTC (permalink / raw)
vc.el unconditionally uses `diff-switches' (though it also concatenates
`vc-diff-switches'). However, some switches that are sensible in
`diff-switches' are not sensible as arguments to (say) "cvs diff". This
patch corrects the problem. (Another solution would be for
`vc-diff-switches' to override `diff-switches', if set, rather than for
both to be used.)
2002-03-25 Michael Ernst <mernst@alum.mit.edu>
* vc.el (vc-diff-internal, vc-diff-switches-list): Remove "-r"
from `diff-switches'.
*** /usr/local/share/emacs/21.2/lisp/vc.el Wed Mar 13 14:51:46 2002
--- - Mon Mar 25 16:06:25 2002
***************
*** 1815,1821 ****
(if (and file-rel1 file-rel2)
(apply 'vc-do-command "*vc-diff*" 1 "diff" nil
! (append (if (listp diff-switches)
! diff-switches
! (list diff-switches))
(if (listp vc-diff-switches)
vc-diff-switches
--- 1815,1822 ----
(if (and file-rel1 file-rel2)
(apply 'vc-do-command "*vc-diff*" 1 "diff" nil
! (append (remove "-r"
! (if (listp diff-switches)
! diff-switches
! (list diff-switches)))
(if (listp vc-diff-switches)
vc-diff-switches
***************
*** 1828,1832 ****
"Return the list of switches to use for executing diff under BACKEND."
`(append
! (if (listp diff-switches) diff-switches (list diff-switches))
(if (listp vc-diff-switches) vc-diff-switches (list vc-diff-switches))
(let ((backend-switches
--- 1829,1834 ----
"Return the list of switches to use for executing diff under BACKEND."
`(append
! (remove "-r"
! (if (listp diff-switches) diff-switches (list diff-switches)))
(if (listp vc-diff-switches) vc-diff-switches (list vc-diff-switches))
(let ((backend-switches
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: vc.el and diff-switches containing "-r"
2002-03-25 22:42 vc.el and diff-switches containing "-r" Michael Ernst
@ 2002-03-26 19:18 ` Andre Spiegel
0 siblings, 0 replies; 2+ messages in thread
From: Andre Spiegel @ 2002-03-26 19:18 UTC (permalink / raw)
Cc: bug-gnu-emacs
Michael Ernst <mernst@alum.mit.edu> writes:
> vc.el unconditionally uses `diff-switches' (though it also concatenates
> `vc-diff-switches'). However, some switches that are sensible in
> `diff-switches' are not sensible as arguments to (say) "cvs diff". This
> patch corrects the problem. (Another solution would be for
> `vc-diff-switches' to override `diff-switches', if set, rather than for
> both to be used.)
Thanks for the report. I do favour the latter approach, where
vc-diff-switches overrides diff-switches if set. Likewise, I think
vc-cvs-diff-switches should override the other two if set, rather
than be concatenated.
I don't like the idea of treating "-r" specially as in your patch --
the same problem would be bound to come up with other options and
other backends as well.
I will change the behaviour as outlined above as soon as I find time
to rework the backend-specific variable handling, as I am planning
anyway. It will be before the next Emacs release. Until then, I hope
you can do with your local modification.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-26 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-25 22:42 vc.el and diff-switches containing "-r" Michael Ernst
2002-03-26 19:18 ` Andre Spiegel
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).