bug-gnu-emacs
[Top][All Lists]
Advanced

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

vc switches


From: Glenn Morris
Subject: vc switches
Date: Fri, 15 Mar 2002 01:09:43 +0000
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1.95 (i686-pc-linux-gnu)

This has come to light in the recent thread "VC (RCS) problem" on
gnu.emacs.help.

emacs-21.1.95 -q --no-site-file
(setq vc-rcs-register-switches "-wfoo")

Now attempt to register a file with RCS. After the user is prompted to
create the RCS subdirectory, the process fails with the error:

apply: Wrong type argument: stringp, ("-wfoo")

The docstring for vc-rcs-register-switches says it may be a string or list
of strings. Using either form produces the same error message.

This is due to the following section near the start of the
`vc-rcs-register' function:

(let ((subdir (expand-file-name "RCS" (file-name-directory file)))
          (switches (list
                      (if (stringp vc-register-switches)

The `list' should be an `append':

(let ((subdir (expand-file-name "RCS" (file-name-directory file)))
      (switches (append
              (if (stringp vc-register-switches)


Looking at the analogous functions in the CVS and SCCS backends, they seem to
have the same bug, although I haven't tested these in practice.


Also, the variables:

vc-rcs-checkin-switches, vc-rcs-checkout-switches

are defined with defvar's in vc-rcs.el, with doc-strings that state:

"These are passed to the checkin program by \\[vc-rcs-checkin]."

No they aren't - they are not used anywhere.
The functions vc-rcs-checkin, vc-rcs-checkout only use the generic variables
vc-checkin-switches, vc-checkout-switches.

The defvars should either be commented out to avoid confusion, or the
checkin/checkout functions could be trivially modified to work in the same
way as the register function, which does use both the generic and specific
forms of the variables (if the above bug is fixed).

This only applies to the RCS backend, since the other two do not define
specific checkin/out switches.



reply via email to

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