Function: cvs-prefix-set
cvs-prefix-set is a byte-compiled function defined in pcvs-util.el.gz.
Signature
(cvs-prefix-set SYM ARG)
Documentation
Set the cvs-prefix contained in SYM.
If ARG is between 0 and 9, it selects the corresponding default.
If ARG is negative (or C-u (universal-argument) which corresponds to negative 0),
it queries the user and sets the -ARGth default.
If ARG is greater than 9 (or C-u (universal-argument) C-u (universal-argument)),
the (ARG mod 10)'th prefix is made persistent.
If ARG is nil toggle the PREFIX's value between its 0th default and nil
and reset the persistence.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/pcvs-util.el.gz
(defun cvs-prefix-set (sym arg)
;; we could distinguish between numeric and non-numeric prefix args instead of
;; relying on that magic `4'.
"Set the cvs-prefix contained in SYM.
If ARG is between 0 and 9, it selects the corresponding default.
If ARG is negative (or \\[universal-argument] which corresponds to negative 0),
it queries the user and sets the -ARGth default.
If ARG is greater than 9 (or \\[universal-argument] \\[universal-argument]),
the (ARG mod 10)'th prefix is made persistent.
If ARG is nil toggle the PREFIX's value between its 0th default and nil
and reset the persistence."
(let* ((prefix (symbol-value (cvs-prefix-sym sym)))
(numarg (if (integerp arg) arg 0))
;; (defs (cvs-flags-defaults prefix))
)
;; set persistence if requested
(when (> (prefix-numeric-value arg) 9)
(setf (cvs-flags-persist prefix) t)
(setq numarg (mod numarg 10)))
;; set the value
(set sym
(cond
((null arg)
(setf (cvs-flags-persist prefix) nil)
(unless (symbol-value sym) (nth 0 (cvs-flags-defaults prefix))))
((or (consp arg) (< numarg 0))
(setf (nth (- numarg) (cvs-flags-defaults prefix))
(cvs-query-read (nth (- numarg) (cvs-flags-defaults prefix))
(format "%s: " (cvs-flags-desc prefix))
(cvs-flags-qtypedesc prefix)
(cvs-flags-hist-sym prefix))))
(t (nth numarg (cvs-flags-defaults prefix)))))
(force-mode-line-update)))