summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>2001-02-01 15:08:49 +0000
committerAndré Spiegel <spiegel@gnu.org>2001-02-01 15:08:49 +0000
commitacc5b122f069f32773c372abef250cb3a6b10c7a (patch)
tree544d60f31e56aaa5539cb8619fbe0d096a88185d
parente870b7bad67991399582acba18416b45d40d0d26 (diff)
downloademacs-acc5b122f069f32773c372abef250cb3a6b10c7a.tar.gz
(vc-diff-switches): New user option.
(vc-version-diff): Use it. (vc-diff-switches-list): New macro.
-rw-r--r--lisp/vc.el28
1 files changed, 27 insertions, 1 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 11675a724d3..bdb8a53fc47 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -5,7 +5,7 @@
;; Author: FSF (see below for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc.el,v 1.293 2001/01/08 16:23:33 spiegel Exp $
+;; $Id: vc.el,v 1.294 2001/01/10 14:42:53 spiegel Exp $
;; This file is part of GNU Emacs.
@@ -466,6 +466,18 @@ These are passed to the checkin program by \\[vc-register]."
(defvar diff-switches "-c"
"*A string or list of strings specifying switches to be passed to diff.")
+(defcustom vc-diff-switches nil
+ "*A string or list of strings specifying switches for diff under VC.
+There is also an option vc-BACKEND-diff-switches for each BACKEND that
+VC can handle."
+ :type '(choice (const :tag "None" nil)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List"
+ :value ("")
+ string))
+ :group 'vc
+ :version "21.1")
+
;;;###autoload
(defcustom vc-checkin-hook nil
"*Normal hook (list of functions) run after a checkin is done.
@@ -1751,6 +1763,9 @@ files in or below it."
(append (if (listp diff-switches)
diff-switches
(list diff-switches))
+ (if (listp vc-diff-switches)
+ vc-diff-switches
+ (list vc-diff-switches))
(list (file-relative-name file-rel1)
(file-relative-name file-rel2))))
(cd (file-name-directory file))
@@ -1775,6 +1790,17 @@ files in or below it."
(shrink-window-if-larger-than-buffer)))
t))
+(defmacro vc-diff-switches-list (backend)
+ "Make a list of `diff-switches', `vc-diff-switches',
+and `vc-BACKEND-diff-switches'."
+ `(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
+ (eval (intern (concat "vc-" (symbol-name ',backend)
+ "-diff-switches")))))
+ (if (listp backend-switches) backend-switches (list backend-switches)))))
+
;;;###autoload
(defun vc-version-other-window (rev)
"Visit version REV of the current buffer in another window.