]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-rcs-diff-switches): New customization option.
authorAndré Spiegel <spiegel@gnu.org>
Thu, 1 Feb 2001 15:11:05 +0000 (15:11 +0000)
committerAndré Spiegel <spiegel@gnu.org>
Thu, 1 Feb 2001 15:11:05 +0000 (15:11 +0000)
(vc-rcs-diff): Use it via vc-diff-switches-list.

lisp/vc-rcs.el

index 92676717cde4f6fffa935090c29ba66bcc8cd370..3d4373379895f5a4006062dd463d63f8acd6f914 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 
-;; $Id: vc-rcs.el,v 1.15 2001/01/08 16:25:43 spiegel Exp $
+;; $Id: vc-rcs.el,v 1.16 2001/01/09 14:53:56 fx Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -33,7 +33,8 @@
 ;;;
 
 (eval-when-compile
-  (require 'cl))
+  (require 'cl)
+  (require 'vc))
 
 (defcustom vc-rcs-release nil
   "*The release number of your RCS installation, as a string.
@@ -77,6 +78,16 @@ These are passed to the checkout program by \\[vc-rcs-checkout]."
   :version "21.1"
   :group 'vc)
 
+(defcustom vc-rcs-diff-switches nil
+  "*A string or list of strings specifying extra switches for rcsdiff under VC."
+  :type '(choice (const :tag "None" nil)
+                (string :tag "Argument String")
+                (repeat :tag "Argument List"
+                        :value ("")
+                        string))
+  :version "21.1"
+  :group 'vc)
+
 (defcustom vc-rcs-header (or (cdr (assoc 'RCS vc-header-alist)) '("\$Id\$"))
   "*Header keywords to be inserted by `vc-insert-headers'."
   :type '(repeat string)
@@ -534,15 +545,11 @@ Needs RCS 5.6.2 or later for -M."
 (defun vc-rcs-diff (file &optional oldvers newvers)
   "Get a difference report using RCS between two versions of FILE."
   (if (not oldvers) (setq oldvers (vc-workfile-version file)))
-  ;; If we know that --brief is not supported, don't try it.
-  (let* ((diff-switches-list (if (listp diff-switches)
-                                diff-switches
-                              (list diff-switches)))
-        (options (append (list "-q"
-                               (concat "-r" oldvers)
-                               (and newvers (concat "-r" newvers)))
-                         diff-switches-list)))
-    (apply 'vc-do-command t 1 "rcsdiff" file options)))
+  (apply 'vc-do-command t 1 "rcsdiff" file
+         (append (list "-q"
+                       (concat "-r" oldvers)
+                       (and newvers (concat "-r" newvers)))
+                 (vc-diff-switches-list rcs))))
 
 \f
 ;;;