summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-cvs.el
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2015-02-26 15:46:12 +0100
committerOscar Fuentes <ofv@wanadoo.es>2015-02-26 15:50:41 +0100
commitb5a0603eb41c7a350c16a1b3ec5c1b8d8c84a4eb (patch)
tree017b5464b8619fb7d79079be798ce0ed82b3e48b /lisp/vc/vc-cvs.el
parentd8e9122115b5ffcec342c841b81cb2d2b8217e4b (diff)
downloademacs-b5a0603eb41c7a350c16a1b3ec5c1b8d8c84a4eb.tar.gz
emacs-b5a0603eb41c7a350c16a1b3ec5c1b8d8c84a4eb.tar.bz2
emacs-b5a0603eb41c7a350c16a1b3ec5c1b8d8c84a4eb.zip
Use vc-switches on vc-*-annotate-command
This also removes switch "-C -C" from vc-git-annotate-command. Fixes: debbugs:17945 * vc/vc.el (vc-annotate-switches): New defcustom. * vc/vc-bzr.el (vc-bzr-annotate-switches): New defcustom. (vc-bzr-annotate-command): Use it. * vc/vc-cvs.el (vc-cvs-annotate-switches): New defcustom. (vc-cvs-annotate-command): Use it. * vc/vc-git.el (vc-git-annotate-switches): New defcustom. (vc-git-annotate-command): Use it. * vc/vc-hg.el (vc-hg-annotate-switches): New defcustom. (vc-hg-annotate-command): Use it. * vc/vc-mtn.el (vc-mtn-annotate-switches): New defcustom. (vc-mtn-annotate-command): Use it. * vc/vc-svn.el (vc-svn-annotate-switches): New defcustom. (vc-svn-annotate-command): Use it.
Diffstat (limited to 'lisp/vc/vc-cvs.el')
-rw-r--r--lisp/vc/vc-cvs.el22
1 files changed, 17 insertions, 5 deletions
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 707090a10eb..232dcc2185e 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -96,6 +96,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
:version "21.1"
:group 'vc-cvs)
+(defcustom vc-cvs-annotate-switches nil
+ "String or list of strings specifying switches for cvs annotate under VC.
+If nil, use the value of `vc-annotate-switches'. If t, use no
+switches."
+ :type '(choice (const :tag "Unspecified" nil)
+ (const :tag "None" t)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List" :value ("") string))
+ :version "25.1"
+ :group 'vc-cvs)
+
(defcustom vc-cvs-header '("\$Id\$")
"Header keywords to be inserted by `vc-insert-headers'."
:version "24.1" ; no longer consult the obsolete vc-header-alist
@@ -623,11 +634,12 @@ Remaining arguments are ignored."
(defun vc-cvs-annotate-command (file buffer &optional revision)
"Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER.
Optional arg REVISION is a revision to annotate from."
- (vc-cvs-command buffer
- (if (vc-cvs-stay-local-p file)
- 'async 0)
- file "annotate"
- (if revision (concat "-r" revision)))
+ (apply #'vc-cvs-command buffer
+ (if (vc-cvs-stay-local-p file)
+ 'async 0)
+ file "annotate"
+ (append (vc-switches 'cvs 'annotate)
+ (if revision (list (concat "-r" revision)))))
;; Strip the leading few lines.
(let ((proc (get-buffer-process buffer)))
(if proc