summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-02-26 16:51:15 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-02-26 16:51:15 -0500
commit99340ad17a826c61895b3e1ed6928b36fbfeac60 (patch)
treec8dd33d2840c4c5072ba3016a782b48d7d4d40ae
parent2987376bc358b069ee27f4b0757491f1a8157bf2 (diff)
downloademacs-99340ad17a826c61895b3e1ed6928b36fbfeac60.tar.gz
lisp/vc/*.el: Use lexical-bindings in all the files
Also remove some redundant `:group` arguments. * lisp/vc/vc.el (vc-ignore): Autoload. * lisp/vc/pcvs-util.el (cvs-every, cvs-union, cvs-map): Delete functions. * lisp/vc/cvs-status.el: Require `cl-lib` at runtime. (cvs-tree-tags-insert): Use `cl-mapcar` and `cl-every` instead. * lisp/vc/pcvs.el: Require `cl-lib` at runtime. (cvs-do-removal): Use `cl-every` instead. * lisp/vc/ediff-init.el: Require `ediff-util` (for `ediff-cleanup-mess` and `ediff-default-suspend-function`). * lisp/vc/pcvs-info.el (cvs-fileinfo<): Remove unused vars `subtypea` and `subtypeb`. * lisp/vc/vc-git.el: * lisp/vc/vc-bzr.el: Require `vc-dispatcher` at runtime for `vc-do-async-command`.
-rw-r--r--lisp/vc/add-log.el83
-rw-r--r--lisp/vc/compare-w.el26
-rw-r--r--lisp/vc/cvs-status.el16
-rw-r--r--lisp/vc/diff-mode.el12
-rw-r--r--lisp/vc/diff.el12
-rw-r--r--lisp/vc/ediff-diff.el2
-rw-r--r--lisp/vc/ediff-help.el2
-rw-r--r--lisp/vc/ediff-init.el8
-rw-r--r--lisp/vc/ediff-merg.el2
-rw-r--r--lisp/vc/ediff-mult.el49
-rw-r--r--lisp/vc/ediff-util.el148
-rw-r--r--lisp/vc/ediff-wind.el6
-rw-r--r--lisp/vc/ediff.el52
-rw-r--r--lisp/vc/emerge.el69
-rw-r--r--lisp/vc/pcvs-defs.el19
-rw-r--r--lisp/vc/pcvs-info.el6
-rw-r--r--lisp/vc/pcvs-parse.el2
-rw-r--r--lisp/vc/pcvs-util.el30
-rw-r--r--lisp/vc/pcvs.el14
-rw-r--r--lisp/vc/vc-annotate.el24
-rw-r--r--lisp/vc/vc-bzr.el73
-rw-r--r--lisp/vc/vc-cvs.el49
-rw-r--r--lisp/vc/vc-dav.el22
-rw-r--r--lisp/vc/vc-dir.el124
-rw-r--r--lisp/vc/vc-dispatcher.el12
-rw-r--r--lisp/vc/vc-filewise.el2
-rw-r--r--lisp/vc/vc-git.el63
-rw-r--r--lisp/vc/vc-hg.el55
-rw-r--r--lisp/vc/vc-hooks.el72
-rw-r--r--lisp/vc/vc-mtn.el20
-rw-r--r--lisp/vc/vc-rcs.el28
-rw-r--r--lisp/vc/vc-sccs.el36
-rw-r--r--lisp/vc/vc-src.el21
-rw-r--r--lisp/vc/vc-svn.el78
-rw-r--r--lisp/vc/vc.el1
35 files changed, 549 insertions, 689 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index 19765e0da34..fafd7f9c467 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -1,4 +1,4 @@
-;;; add-log.el --- change log maintenance commands for Emacs
+;;; add-log.el --- change log maintenance commands for Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1985-1986, 1988, 1993-1994, 1997-1998, 2000-2021 Free
;; Software Foundation, Inc.
@@ -49,15 +49,13 @@
(defcustom change-log-default-name nil
"Name of a change log file for \\[add-change-log-entry]."
:type '(choice (const :tag "default" nil)
- string)
- :group 'change-log)
+ string))
;;;###autoload
-(put 'change-log-default-name 'safe-local-variable 'string-or-null-p)
+(put 'change-log-default-name 'safe-local-variable #'string-or-null-p)
(defcustom change-log-mode-hook nil
"Normal hook run by `change-log-mode'."
- :type 'hook
- :group 'change-log)
+ :type 'hook)
;; Many modes set this variable, so avoid warnings.
;;;###autoload
@@ -66,16 +64,14 @@
It is called by `add-log-current-defun' with no argument, and
should return the function's name as a string, or nil if point is
outside a function."
- :type '(choice (const nil) function)
- :group 'change-log)
+ :type '(choice (const nil) function))
;;;###autoload
(defcustom add-log-full-name nil
"Full name of user, for inclusion in ChangeLog daily headers.
This defaults to the value returned by the function `user-full-name'."
:type '(choice (const :tag "Default" nil)
- string)
- :group 'change-log)
+ string))
;;;###autoload
(defcustom add-log-mailing-address nil
@@ -86,8 +82,7 @@ will be recognized as referring to the same user; when creating a new
ChangeLog entry, one element will be chosen at random."
:type '(choice (const :tag "Default" nil)
(string :tag "String")
- (repeat :tag "List of Strings" string))
- :group 'change-log)
+ (repeat :tag "List of Strings" string)))
(defcustom add-log-time-format 'add-log-iso8601-time-string
"Function that defines the time format.
@@ -98,8 +93,7 @@ and `current-time-string' are two valid values."
add-log-iso8601-time-string)
(const :tag "Old format, as returned by `current-time-string'"
current-time-string)
- (function :tag "Other"))
- :group 'change-log)
+ (function :tag "Other")))
(defcustom add-log-keep-changes-together nil
"If non-nil, normally keep day's log entries for one file together.
@@ -130,14 +124,12 @@ and in the former:
The NEW-ENTRY arg to `add-change-log-entry' can override the effect of
this variable."
:version "20.3"
- :type 'boolean
- :group 'change-log)
+ :type 'boolean)
(defcustom add-log-always-start-new-record nil
"If non-nil, `add-change-log-entry' will always start a new record."
:version "22.1"
- :type 'boolean
- :group 'change-log)
+ :type 'boolean)
(defvar add-log-buffer-file-name-function 'buffer-file-name
"If non-nil, function to call to identify the full filename of a buffer.
@@ -149,15 +141,13 @@ use `buffer-file-name'.")
This function is called with one argument, the value of variable
`buffer-file-name' in that buffer. If this is nil, the default is to
use the file's name relative to the directory of the change log file."
- :type '(choice (const nil) function)
- :group 'change-log)
+ :type '(choice (const nil) function))
(defcustom change-log-version-info-enabled nil
"If non-nil, enable recording version numbers with the changes."
:version "21.1"
- :type 'boolean
- :group 'change-log)
+ :type 'boolean)
(defcustom change-log-version-number-regexp-list
(let ((re "\\([0-9]+\\.[0-9.]+\\)"))
@@ -170,64 +160,54 @@ use the file's name relative to the directory of the change log file."
The version number must be in group 1.
Note: The search is conducted only within 10%, at the beginning of the file."
:version "21.1"
- :type '(repeat regexp)
- :group 'change-log)
+ :type '(repeat regexp))
(defcustom change-log-directory-files '(".bzr" ".git" ".hg" ".svn")
"List of files that cause `find-change-log' to stop in containing directory.
This applies if no pre-existing ChangeLog is found. If nil, then in such
a case simply use the directory containing the changed file."
:version "26.1"
- :type '(repeat file)
- :group 'change-log)
+ :type '(repeat file))
(defface change-log-date
'((t (:inherit font-lock-string-face)))
"Face used to highlight dates in date lines."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(defface change-log-name
'((t (:inherit font-lock-constant-face)))
"Face for highlighting author names."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(defface change-log-email
'((t (:inherit font-lock-variable-name-face)))
"Face for highlighting author email addresses."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(defface change-log-file
'((t (:inherit font-lock-function-name-face)))
"Face for highlighting file names."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(defface change-log-list
'((t (:inherit font-lock-keyword-face)))
"Face for highlighting parenthesized lists of functions or variables."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(defface change-log-conditionals
'((t (:inherit font-lock-variable-name-face)))
"Face for highlighting conditionals of the form `[...]'."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(defface change-log-function
'((t (:inherit font-lock-variable-name-face)))
"Face for highlighting items of the form `<....>'."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(defface change-log-acknowledgment
'((t (:inherit font-lock-comment-face)))
"Face for highlighting acknowledgments."
- :version "21.1"
- :group 'change-log)
+ :version "21.1")
(define-obsolete-face-alias 'change-log-acknowledgement
'change-log-acknowledgment "24.3")
@@ -519,7 +499,7 @@ try to visit the file for the change under `point' instead."
change-log-find-tail)
(setq change-log-find-tail
(condition-case nil
- (apply 'change-log-goto-source-1
+ (apply #'change-log-goto-source-1
(append change-log-find-head change-log-find-tail))
(error
(format-message
@@ -556,7 +536,7 @@ try to visit the file for the change under `point' instead."
file (find-file-noselect file)))
(condition-case nil
(setq change-log-find-tail
- (apply 'change-log-goto-source-1 change-log-find-head))
+ (apply #'change-log-goto-source-1 change-log-find-head))
(error
(format-message "Cannot find matches for tag `%s' in file `%s'"
tag file)))))))))
@@ -569,7 +549,7 @@ Compatibility function for \\[next-error] invocations."
(count (abs argp)) ; how many cycles
(down (< argp 0)) ; are we going down? (is argp negative?)
(up (not down))
- (search-function (if up 're-search-forward 're-search-backward)))
+ (search-function (if up #'re-search-forward #'re-search-backward)))
;; set the starting position
(goto-char (cond (reset (point-min))
@@ -591,10 +571,10 @@ Compatibility function for \\[next-error] invocations."
(defvar change-log-mode-map
(let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap)))
- (define-key map [?\C-c ?\C-p] 'add-log-edit-prev-comment)
- (define-key map [?\C-c ?\C-n] 'add-log-edit-next-comment)
- (define-key map [?\C-c ?\C-f] 'change-log-find-file)
- (define-key map [?\C-c ?\C-c] 'change-log-goto-source)
+ (define-key map [?\C-c ?\C-p] #'add-log-edit-prev-comment)
+ (define-key map [?\C-c ?\C-n] #'add-log-edit-next-comment)
+ (define-key map [?\C-c ?\C-f] #'change-log-find-file)
+ (define-key map [?\C-c ?\C-c] #'change-log-goto-source)
(define-key map [menu-bar changelog] (cons "ChangeLog" menu-map))
(define-key menu-map [gs]
'(menu-item "Go To Source" change-log-goto-source
@@ -814,7 +794,7 @@ means to put log entries in a suitably named buffer."
:type 'boolean
:version "27.1")
-(put 'add-log-dont-create-changelog-file 'safe-local-variable 'booleanp)
+(put 'add-log-dont-create-changelog-file 'safe-local-variable #'booleanp)
(defun add-log--pseudo-changelog-buffer-name (changelog-file-name)
"Compute a suitable name for a non-file visiting ChangeLog buffer.
@@ -1220,8 +1200,7 @@ file were isearch was started."
"Heuristic regexp used by `add-log-current-defun' for unknown major modes.
The regexp's first submatch is placed in the ChangeLog entry, in
parentheses."
- :type 'regexp
- :group 'change-log)
+ :type 'regexp)
(declare-function c-cpp-define-name "cc-cmds" ())
(declare-function c-defun-name "cc-cmds" ())
diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el
index 932dcd78920..4c1d9eaad55 100644
--- a/lisp/vc/compare-w.el
+++ b/lisp/vc/compare-w.el
@@ -1,4 +1,4 @@
-;;; compare-w.el --- compare text between windows for Emacs
+;;; compare-w.el --- compare text between windows for Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1986, 1989, 1993, 1997, 2001-2021 Free Software
;; Foundation, Inc.
@@ -52,19 +52,16 @@ any text before that point.
If the function returns the same value for both windows, then the
whitespace is considered to match, and is skipped."
:version "24.4" ; added \240
- :type '(choice regexp function)
- :group 'compare-windows)
+ :type '(choice regexp function))
(defcustom compare-ignore-whitespace nil
"Non-nil means command `compare-windows' ignores whitespace."
:type 'boolean
- :group 'compare-windows
:version "22.1")
(defcustom compare-ignore-case nil
"Non-nil means command `compare-windows' ignores case differences."
- :type 'boolean
- :group 'compare-windows)
+ :type 'boolean)
(defcustom compare-windows-sync 'compare-windows-sync-default-function
"Function or regexp that is used to synchronize points in two
@@ -92,7 +89,6 @@ If the value of this variable is nil (option \"No sync\"), then
no synchronization is performed, and the function `ding' is called
to beep or flash the screen when points are mismatched."
:type '(choice function regexp (const :tag "No sync" nil))
- :group 'compare-windows
:version "22.1")
(defcustom compare-windows-sync-string-size 32
@@ -104,7 +100,6 @@ difference regions more coarse-grained.
The default value 32 is good for the most cases."
:type 'integer
- :group 'compare-windows
:version "22.1")
(defcustom compare-windows-recenter nil
@@ -115,7 +110,6 @@ matching points side-by-side.
The value `(-1 0)' is useful if windows are split vertically,
and the value `((4) (4))' for horizontally split windows."
:type '(list sexp sexp)
- :group 'compare-windows
:version "22.1")
(defcustom compare-windows-highlight t
@@ -127,19 +121,16 @@ out all highlighting later with the command `compare-windows-dehighlight'."
:type '(choice (const :tag "No highlighting" nil)
(const :tag "Persistent highlighting" persistent)
(other :tag "Highlight until next command" t))
- :group 'compare-windows
:version "22.1")
(defface compare-windows-removed
'((t :inherit diff-removed))
"Face for highlighting `compare-windows' differing regions in the other window."
- :group 'compare-windows
:version "25.1")
(defface compare-windows-added
'((t :inherit diff-added))
"Face for highlighting `compare-windows' differing regions in current window."
- :group 'compare-windows
:version "25.1")
(define-obsolete-face-alias 'compare-windows 'compare-windows-added "25.1")
@@ -159,7 +150,6 @@ out all highlighting later with the command `compare-windows-dehighlight'."
(function-item :tag "Next window"
compare-windows-get-next-window)
(function :tag "Your function"))
- :group 'compare-windows
:version "25.1")
(defun compare-windows-get-recent-window ()
@@ -389,7 +379,7 @@ on third call it again advances points to the next difference and so on."
(setq p1 (1+ p1)))))
(when p12s
;; use closest matching points (i.e. points with minimal sum)
- (setq p12 (cdr (assq (apply 'min (mapcar 'car p12s)) p12s)))
+ (setq p12 (cdr (assq (apply #'min (mapcar #'car p12s)) p12s)))
(goto-char (car p12))
(compare-windows-highlight op1 (car p12) (current-buffer) w1
op2 (cadr p12) b2 w2))
@@ -416,7 +406,7 @@ on third call it again advances points to the next difference and so on."
(overlay-put compare-windows-overlay2 'window w2)
(if (not (eq compare-windows-highlight 'persistent))
;; Remove highlighting before next command is executed
- (add-hook 'pre-command-hook 'compare-windows-dehighlight)
+ (add-hook 'pre-command-hook #'compare-windows-dehighlight)
(when compare-windows-overlay1
(push (copy-overlay compare-windows-overlay1) compare-windows-overlays1)
(delete-overlay compare-windows-overlay1))
@@ -427,9 +417,9 @@ on third call it again advances points to the next difference and so on."
(defun compare-windows-dehighlight ()
"Remove highlighting created by function `compare-windows-highlight'."
(interactive)
- (remove-hook 'pre-command-hook 'compare-windows-dehighlight)
- (mapc 'delete-overlay compare-windows-overlays1)
- (mapc 'delete-overlay compare-windows-overlays2)
+ (remove-hook 'pre-command-hook #'compare-windows-dehighlight)
+ (mapc #'delete-overlay compare-windows-overlays1)
+ (mapc #'delete-overlay compare-windows-overlays2)
(and compare-windows-overlay1 (delete-overlay compare-windows-overlay1))
(and compare-windows-overlay2 (delete-overlay compare-windows-overlay2)))
diff --git a/lisp/vc/cvs-status.el b/lisp/vc/cvs-status.el
index 26fb6206c80..63b886362ba 100644
--- a/lisp/vc/cvs-status.el
+++ b/lisp/vc/cvs-status.el
@@ -28,7 +28,7 @@
;;; Code:
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
(require 'pcvs-util)
;;;
@@ -169,7 +169,7 @@
name
type)
-(defsubst cvs-status-vl-to-str (vl) (mapconcat 'number-to-string vl "."))
+(defsubst cvs-status-vl-to-str (vl) (mapconcat #'number-to-string vl "."))
(defun cvs-tag->string (tag)
(if (stringp tag) tag
@@ -283,7 +283,7 @@ BEWARE: because of stability issues, this is not a symmetric operation."
tree1 (list (cons (cvs-tag-make (butlast vl2)) tree2)))))))))
(defun cvs-tag-make-tag (tag)
- (let ((vl (mapcar 'string-to-number (split-string (nth 2 tag) "\\."))))
+ (let ((vl (mapcar #'string-to-number (split-string (nth 2 tag) "\\."))))
(cvs-tag-make vl (nth 0 tag) (intern (nth 1 tag)))))
(defun cvs-tags->tree (tags)
@@ -450,10 +450,10 @@ Optional prefix ARG chooses between two representations."
(tags nil)
(cvs-tree-nomerge (if arg (not cvs-tree-nomerge) cvs-tree-nomerge)))
(while (listp (setq tags (cvs-status-get-tags)))
- (let ((tags (mapcar 'cvs-tag-make-tag tags))
+ (let ((tags (mapcar #'cvs-tag-make-tag tags))
;;(pt (save-excursion (forward-line -1) (point)))
)
- (setq tags (sort tags 'cvs-tag-lessp))
+ (setq tags (sort tags #'cvs-tag-lessp))
(let* ((first (car tags))
(prev (if (cvs-tag-p first)
(list (car (cvs-tag->vlist first))) nil)))
@@ -472,7 +472,7 @@ Optional prefix ARG chooses between two representations."
(nprev (if (and cvs-tree-nomerge next
(equal vlist (cvs-tag->vlist next)))
prev vlist)))
- (cvs-map (lambda (v _p) v) nprev prev)))
+ (cl-mapcar (lambda (v _p) v) nprev prev)))
(after (save-excursion
(newline)
(cvs-tree-tags-insert (cdr tags) nprev)))
@@ -484,7 +484,7 @@ Optional prefix ARG chooses between two representations."
(as after (cdr as)))
((and (null as) (null vs) (null ps))
(let ((revname (cvs-status-vl-to-str vlist)))
- (if (cvs-every 'identity (cvs-map 'equal prev vlist))
+ (if (cl-every #'identity (cl-mapcar #'equal prev vlist))
(insert (make-string (+ 4 (length revname)) ? )
(or (cvs-tag->name tag) ""))
(insert " " revname ": " (or (cvs-tag->name tag) "")))))
@@ -500,7 +500,7 @@ Optional prefix ARG chooses between two representations."
(if next-eq (cons nil cvs-tree-char-space)
(cons t cvs-tree-char-eob))
(cons nil (if (and (eq (cvs-tag->type tag) 'branch)
- (cvs-every 'null as))
+ (cl-every #'null as))
cvs-tree-char-space
cvs-tree-char-hbar))))))
(insert (cdr na+char))
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 7a474201811..8bbab467af3 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -739,7 +739,7 @@ start and end positions."
"Restrict the view to the current hunk.
If the prefix ARG is given, restrict the view to the current file instead."
(interactive "P")
- (apply 'narrow-to-region
+ (apply #'narrow-to-region
(if arg (diff-bounds-of-file) (diff-bounds-of-hunk)))
(setq-local diff-narrowed-to (if arg 'file 'hunk)))
@@ -770,7 +770,7 @@ If the prefix ARG is given, restrict the view to the current file instead."
file-bounds
hunk-bounds))
(inhibit-read-only t))
- (apply 'kill-region bounds)
+ (apply #'kill-region bounds)
(goto-char (car bounds))
(ignore-errors (diff-beginning-of-hunk t)))))
@@ -828,7 +828,7 @@ data such as \"Index: ...\" and such."
(error "No hunks")
(diff-beginning-of-hunk t)
(let ((inhibit-read-only t))
- (apply 'kill-region (diff-bounds-of-file)))
+ (apply #'kill-region (diff-bounds-of-file)))
(ignore-errors (diff-beginning-of-hunk t))))
(defun diff-kill-junk ()
@@ -1810,7 +1810,7 @@ Whitespace differences are ignored."
(if (> (- (car forw) orig) (- orig (car back))) back forw)
(or back forw))))
-(define-obsolete-function-alias 'diff-xor 'xor "27.1")
+(define-obsolete-function-alias 'diff-xor #'xor "27.1")
(defun diff-find-source-location (&optional other-file reverse noprompt)
"Find current diff location within the source file.
@@ -1984,7 +1984,7 @@ With a prefix argument, try to REVERSE the hunk."
(diff-hunk-kill)
(diff-hunk-next)))))
-(defalias 'diff-mouse-goto-source 'diff-goto-source)
+(defalias 'diff-mouse-goto-source #'diff-goto-source)
(defun diff-goto-source (&optional other-file event)
"Jump to the corresponding source line.
@@ -2080,7 +2080,7 @@ For use in `add-log-current-defun-function'."
(write-region (concat lead (car new)) nil file2 nil 'nomessage)
(with-temp-buffer
(let ((status
- (apply 'call-process
+ (apply #'call-process
`(,diff-command nil t nil
,@opts ,file1 ,file2))))
(pcase status
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index 7c4931b4b89..7bb1151602c 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -45,14 +45,12 @@ This variable is also used in the `vc-diff' command (and related
commands) if the backend-specific diff switch variable isn't
set (`vc-git-diff-switches' for git, for instance), and
`vc-diff-switches' isn't set."
- :type '(choice string (repeat string))
- :group 'diff)
+ :type '(choice string (repeat string)))
;;;###autoload
(defcustom diff-command (purecopy "diff")
"The command to use to run diff."
- :type 'string
- :group 'diff)
+ :type 'string)
;; prompt if prefix arg present
(defun diff-switches ()
@@ -60,7 +58,7 @@ set (`vc-git-diff-switches' for git, for instance), and
(read-string "Diff switches: "
(if (stringp diff-switches)
diff-switches
- (mapconcat 'identity diff-switches " ")))))
+ (mapconcat #'identity diff-switches " ")))))
(defun diff-sentinel (code &optional old-temp-file new-temp-file)
"Code run when the diff process exits.
@@ -165,7 +163,7 @@ returns the buffer used."
(let* ((old-alt (diff-file-local-copy old))
(new-alt (diff-file-local-copy new))
(command
- (mapconcat 'identity
+ (mapconcat #'identity
`(,diff-command
;; Use explicitly specified switches
,@switches
@@ -200,7 +198,7 @@ returns the buffer used."
(if (and (not no-async) (fboundp 'make-process))
(let ((proc (start-process "Diff" buf shell-file-name
shell-command-switch command)))
- (set-process-filter proc 'diff-process-filter)
+ (set-process-filter proc #'diff-process-filter)
(set-process-sentinel
proc (lambda (proc _msg)
(with-current-buffer (process-buffer proc)
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index fde9d4338f3..b93dfc814c0 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -87,7 +87,7 @@ options after the default ones.
This variable is not for customizing the look of the differences produced by
the command \\[ediff-show-diff-output]. Use the variable
`ediff-custom-diff-options' for that."
- :set 'ediff-set-diff-options
+ :set #'ediff-set-diff-options
:type 'string)
(ediff-defvar-local ediff-ignore-case nil
diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el
index 84bf063aedf..a5bb953b6d4 100644
--- a/lisp/vc/ediff-help.el
+++ b/lisp/vc/ediff-help.el
@@ -156,7 +156,7 @@ the value of this variable and the variables `ediff-help-message-*' in
;; the keymap that defines clicks over the quick help regions
(defvar ediff-help-region-map (make-sparse-keymap))
-(define-key ediff-help-region-map [mouse-2] 'ediff-help-for-quick-help)
+(define-key ediff-help-region-map [mouse-2] #'ediff-help-for-quick-help)
;; runs in the control buffer
(defun ediff-set-help-overlays ()
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 3f33e6aae2e..17c4202d647 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -25,6 +25,7 @@
;;; Code:
(require 'cl-lib)
+(require 'ediff-util)
;; Start compiler pacifier
(defvar ediff-metajob-name)
@@ -1181,8 +1182,8 @@ this variable represents.")
(put ediff-fine-diff-face-Ancestor 'ediff-help-echo
"A `refinement' of the current difference region")
-(add-hook 'ediff-quit-hook 'ediff-cleanup-mess)
-(add-hook 'ediff-suspend-hook 'ediff-default-suspend-function)
+(add-hook 'ediff-quit-hook #'ediff-cleanup-mess)
+(add-hook 'ediff-suspend-hook #'ediff-default-suspend-function)
;;; Overlays
@@ -1312,7 +1313,8 @@ This default should work without changes."
(defun ediff-paint-background-regions-in-one-buffer (buf-type unhighlight)
(let ((diff-vector
(eval (ediff-get-symbol-from-alist
- buf-type ediff-difference-vector-alist)))
+ buf-type ediff-difference-vector-alist)
+ t))
overl diff-num)
(mapcar (lambda (rec)
(setq overl (ediff-get-diff-overlay-from-diff-record rec)
diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el
index 826cad9cc1b..ad4ef473f84 100644
--- a/lisp/vc/ediff-merg.el
+++ b/lisp/vc/ediff-merg.el
@@ -194,7 +194,7 @@ Buffer B."
(defun ediff-set-merge-mode ()
(normal-mode t)
- (remove-hook 'write-file-functions 'ediff-set-merge-mode t))
+ (remove-hook 'write-file-functions #'ediff-set-merge-mode t))
;; Go over all diffs starting with DIFF-NUM and copy regions into buffer C
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el
index d32c18be8fd..49b2890a160 100644
--- a/lisp/vc/ediff-mult.el
+++ b/lisp/vc/ediff-mult.el
@@ -147,15 +147,15 @@ Useful commands (type ? to hide them and free up screen):
(defvar ediff-dir-diffs-buffer-map
(let ((map (make-sparse-keymap)))
(suppress-keymap map)
- (define-key map "q" 'ediff-bury-dir-diffs-buffer)
- (define-key map " " 'next-line)
- (define-key map "n" 'next-line)
- (define-key map "\C-?" 'previous-line)
- (define-key map "p" 'previous-line)
- (define-key map "C" 'ediff-dir-diff-copy-file)
- (define-key map [mouse-2] 'ediff-dir-diff-copy-file)
- (define-key map [delete] 'previous-line)
- (define-key map [backspace] 'previous-line)
+ (define-key map "q" #'ediff-bury-dir-diffs-buffer)
+ (define-key map " " #'next-line)
+ (define-key map "n" #'next-line)
+ (define-key map "\C-?" #'previous-line)
+ (define-key map "p" #'previous-line)
+ (define-key map "C" #'ediff-dir-diff-copy-file)
+ (define-key map [mouse-2] #'ediff-dir-diff-copy-file)
+ (define-key map [delete] #'previous-line)
+ (define-key map [backspace] #'previous-line)
map)
"The keymap to be installed in the buffer showing differences between
directories.")
@@ -413,12 +413,11 @@ Toggled by ediff-toggle-verbose-help-meta-buffer" )
'(menu-item "Show Manual" ediff-documentation
:help "Display Ediff's manual"))
- (or (ediff-one-filegroup-metajob)
- (progn
- (define-key ediff-meta-buffer-map "=" nil)
- (define-key ediff-meta-buffer-map "==" 'ediff-meta-mark-equal-files)
- (define-key ediff-meta-buffer-map "=m" 'ediff-meta-mark-equal-files)
- (define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files)))
+ (unless (ediff-one-filegroup-metajob)
+ (define-key ediff-meta-buffer-map "=" nil)
+ (define-key ediff-meta-buffer-map "==" #'ediff-meta-mark-equal-files)
+ (define-key ediff-meta-buffer-map "=m" #'ediff-meta-mark-equal-files)
+ (define-key ediff-meta-buffer-map "=h" #'ediff-meta-mark-equal-files))
(define-key menu-map [ediff-next-meta-item]
@@ -430,7 +429,7 @@ Toggled by ediff-toggle-verbose-help-meta-buffer" )
(if ediff-no-emacs-help-in-control-buffer
- (define-key ediff-meta-buffer-map "\C-h" 'ediff-previous-meta-item))
+ (define-key ediff-meta-buffer-map "\C-h" #'ediff-previous-meta-item))
(define-key ediff-meta-buffer-map [mouse-2] ediff-meta-action-function)
(use-local-map ediff-meta-buffer-map)
@@ -633,7 +632,7 @@ behavior."
difflist (delete "." difflist)
;; copying is needed because sort sorts via side effects
difflist (sort (ediff-copy-list (delete ".." difflist))
- 'string-lessp))
+ #'string-lessp))
(setq difflist (mapcar (lambda (elt) (cons elt 1)) difflist))
@@ -837,14 +836,14 @@ behavior."
(ediff-draw-dir-diffs ediff-dir-difference-list))
(define-key
ediff-meta-buffer-map "h" 'ediff-mark-for-hiding-at-pos)
- (define-key ediff-meta-buffer-map "x" 'ediff-hide-marked-sessions)
+ (define-key ediff-meta-buffer-map "x" #'ediff-hide-marked-sessions)
(define-key
- ediff-meta-buffer-map "m" 'ediff-mark-for-operation-at-pos)
+ ediff-meta-buffer-map "m" #'ediff-mark-for-operation-at-pos)
(define-key ediff-meta-buffer-map "u" nil)
(define-key
- ediff-meta-buffer-map "um" 'ediff-unmark-all-for-operation)
+ ediff-meta-buffer-map "um" #'ediff-unmark-all-for-operation)
(define-key
- ediff-meta-buffer-map "uh" 'ediff-unmark-all-for-hiding)
+ ediff-meta-buffer-map "uh" #'ediff-unmark-all-for-hiding)
(define-key ediff-meta-buffer-map
[menu-bar ediff-meta-mode ediff-hide-marked-sessions]
@@ -877,7 +876,7 @@ behavior."
'(menu-item "Collect diffs" ediff-collect-custom-diffs
:help "Collect custom diffs of marked sessions in buffer `*Ediff Multifile Diffs*'"))
(define-key
- ediff-meta-buffer-map "P" 'ediff-collect-custom-diffs))
+ ediff-meta-buffer-map "P" #'ediff-collect-custom-diffs))
((ediff-patch-metajob jobname)
(define-key ediff-meta-buffer-map
[menu-bar ediff-meta-mode ediff-meta-show-patch]
@@ -885,8 +884,8 @@ behavior."
:help "Show the multi-file patch associated with this group session"))
(define-key
ediff-meta-buffer-map "P" 'ediff-meta-show-patch)))
- (define-key ediff-meta-buffer-map "^" 'ediff-up-meta-hierarchy)
- (define-key ediff-meta-buffer-map "D" 'ediff-show-dir-diffs)
+ (define-key ediff-meta-buffer-map "^" #'ediff-up-meta-hierarchy)
+ (define-key ediff-meta-buffer-map "D" #'ediff-show-dir-diffs)
(define-key ediff-meta-buffer-map
[menu-bar ediff-meta-mode ediff-up-meta-hierarchy]
@@ -2128,7 +2127,7 @@ all marked sessions must be active."
))
;;;###autoload
-(defalias 'eregistry 'ediff-show-registry)
+(defalias 'eregistry #'ediff-show-registry)
;; If meta-buf doesn't exist, it is created. In that case, id doesn't have a
;; parent meta-buf
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index 9909dcd5424..fc6dcf68a43 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -123,106 +123,106 @@ to invocation.")
(setq ediff-mode-map (make-sparse-keymap))
(suppress-keymap ediff-mode-map)
- (define-key ediff-mode-map [mouse-2] 'ediff-help-for-quick-help)
- (define-key ediff-mode-map "\C-m" 'ediff-help-for-quick-help)
+ (define-key ediff-mode-map [mouse-2] #'ediff-help-for-quick-help)
+ (define-key ediff-mode-map "\C-m" #'ediff-help-for-quick-help)
- (define-key ediff-mode-map "p" 'ediff-previous-difference)
- (define-key ediff-mode-map "\C-?" 'ediff-previous-difference)
- (define-key ediff-mode-map [delete] 'ediff-previous-difference)
+ (define-key ediff-mode-map "p" #'ediff-previous-difference)
+ (define-key ediff-mode-map "\C-?" #'ediff-previous-difference)
+ (define-key ediff-mode-map [delete] #'ediff-previous-difference)
(define-key ediff-mode-map "\C-h" (if ediff-no-emacs-help-in-control-buffer
- 'ediff-previous-difference nil))
- (define-key ediff-mode-map [backspace] 'ediff-previous-difference)
- (define-key ediff-mode-map [?\S-\ ] 'ediff-previous-difference)
- (define-key ediff-mode-map "n" 'ediff-next-difference)
- (define-key ediff-mode-map " " 'ediff-next-difference)
- (define-key ediff-mode-map "j" 'ediff-jump-to-difference)
+ #'ediff-previous-difference nil))
+ (define-key ediff-mode-map [backspace] #'ediff-previous-difference)
+ (define-key ediff-mode-map [?\S-\ ] #'ediff-previous-difference)
+ (define-key ediff-mode-map "n" #'ediff-next-difference)
+ (define-key ediff-mode-map " " #'ediff-next-difference)
+ (define-key ediff-mode-map "j" #'ediff-jump-to-difference)
(define-key ediff-mode-map "g" nil)
- (define-key ediff-mode-map "ga" 'ediff-jump-to-difference-at-point)
- (define-key ediff-mode-map "gb" 'ediff-jump-to-difference-at-point)
- (define-key ediff-mode-map "q" 'ediff-quit)
- (define-key ediff-mode-map "D" 'ediff-show-diff-output)
- (define-key ediff-mode-map "z" 'ediff-suspend)
- (define-key ediff-mode-map "\C-l" 'ediff-recenter)
- (define-key ediff-mode-map "|" 'ediff-toggle-split)
- (define-key ediff-mode-map "h" 'ediff-toggle-hilit)
+ (define-key ediff-mode-map "ga" #'ediff-jump-to-difference-at-point)
+ (define-key ediff-mode-map "gb" #'ediff-jump-to-difference-at-point)
+ (define-key ediff-mode-map "q" #'ediff-quit)
+ (define-key ediff-mode-map "D" #'ediff-show-diff-output)
+ (define-key ediff-mode-map "z" #'ediff-suspend)
+ (define-key ediff-mode-map "\C-l" #'ediff-recenter)
+ (define-key ediff-mode-map "|" #'ediff-toggle-split)
+ (define-key ediff-mode-map "h" #'ediff-toggle-hilit)
(or ediff-word-mode
- (define-key ediff-mode-map "@" 'ediff-toggle-autorefine))
+ (define-key ediff-mode-map "@" #'ediff-toggle-autorefine))
(if ediff-narrow-job
- (define-key ediff-mode-map "%" 'ediff-toggle-narrow-region))
- (define-key ediff-mode-map "~" 'ediff-swap-buffers)
- (define-key ediff-mode-map "v" 'ediff-scroll-vertically)
- (define-key ediff-mode-map "\C-v" 'ediff-scroll-vertically)
- (define-key ediff-mode-map "^" 'ediff-scroll-vertically)
- (define-key ediff-mode-map "\M-v" 'ediff-scroll-vertically)
- (define-key ediff-mode-map "V" 'ediff-scroll-vertically)
- (define-key ediff-mode-map "<" 'ediff-scroll-horizontally)
- (define-key ediff-mode-map ">" 'ediff-scroll-horizontally)
- (define-key ediff-mode-map "i" 'ediff-status-info)
- (define-key ediff-mode-map "E" 'ediff-documentation)
- (define-key ediff-mode-map "?" 'ediff-toggle-help)
- (define-key ediff-mode-map "!" 'ediff-update-diffs)
- (define-key ediff-mode-map "M" 'ediff-show-current-session-meta-buffer)
- (define-key ediff-mode-map "R" 'ediff-show-registry)
+ (define-key ediff-mode-map "%" #'ediff-toggle-narrow-region))
+ (define-key ediff-mode-map "~" #'ediff-swap-buffers)
+ (define-key ediff-mode-map "v" #'ediff-scroll-vertically)
+ (define-key ediff-mode-map "\C-v" #'ediff-scroll-vertically)
+ (define-key ediff-mode-map "^" #'ediff-scroll-vertically)
+ (define-key ediff-mode-map "\M-v" #'ediff-scroll-vertically)
+ (define-key ediff-mode-map "V" #'ediff-scroll-vertically)
+ (define-key ediff-mode-map "<" #'ediff-scroll-horizontally)
+ (define-key ediff-mode-map ">" #'ediff-scroll-horizontally)
+ (define-key ediff-mode-map "i" #'ediff-status-info)
+ (define-key ediff-mode-map "E" #'ediff-documentation)
+ (define-key ediff-mode-map "?" #'ediff-toggle-help)
+ (define-key ediff-mode-map "!" #'ediff-update-diffs)
+ (define-key ediff-mode-map "M" #'ediff-show-current-session-meta-buffer)
+ (define-key ediff-mode-map "R" #'ediff-show-registry)
(or ediff-word-mode
- (define-key ediff-mode-map "*" 'ediff-make-or-kill-fine-diffs))
+ (define-key ediff-mode-map "*" #'ediff-make-or-kill-fine-diffs))
(define-key ediff-mode-map "a" nil)
(define-key ediff-mode-map "b" nil)
(define-key ediff-mode-map "r" nil)
(cond (ediff-merge-job
;; Will barf if no ancestor
- (define-key ediff-mode-map "/" 'ediff-toggle-show-ancestor)
+ (define-key ediff-mode-map "/" #'ediff-toggle-show-ancestor)
;; In merging, we allow only A->C and B->C copying.
- (define-key ediff-mode-map "a" 'ediff-copy-A-to-C)
- (define-key ediff-mode-map "b" 'ediff-copy-B-to-C)
- (define-key ediff-mode-map "r" 'ediff-restore-diff-in-merge-buffer)
- (define-key ediff-mode-map "s" 'ediff-shrink-window-C)
- (define-key ediff-mode-map "+" 'ediff-combine-diffs)
+ (define-key ediff-mode-map "a" #'ediff-copy-A-to-C)
+ (define-key ediff-mode-map "b" #'ediff-copy-B-to-C)
+ (define-key ediff-mode-map "r" #'ediff-restore-diff-in-merge-buffer)
+ (define-key ediff-mode-map "s" #'ediff-shrink-window-C)
+ (define-key ediff-mode-map "+" #'ediff-combine-diffs)
(define-key ediff-mode-map "$" nil)
- (define-key ediff-mode-map "$$" 'ediff-toggle-show-clashes-only)
- (define-key ediff-mode-map "$*" 'ediff-toggle-skip-changed-regions)
- (define-key ediff-mode-map "&" 'ediff-re-merge))
+ (define-key ediff-mode-map "$$" #'ediff-toggle-show-clashes-only)
+ (define-key ediff-mode-map "$*" #'ediff-toggle-skip-changed-regions)
+ (define-key ediff-mode-map "&" #'ediff-re-merge))
(ediff-3way-comparison-job
- (define-key ediff-mode-map "ab" 'ediff-copy-A-to-B)
- (define-key ediff-mode-map "ba" 'ediff-copy-B-to-A)
- (define-key ediff-mode-map "ac" 'ediff-copy-A-to-C)
- (define-key ediff-mode-map "bc" 'ediff-copy-B-to-C)
+ (define-key ediff-mode-map "ab" #'ediff-copy-A-to-B)
+ (define-key ediff-mode-map "ba" #'ediff-copy-B-to-A)
+ (define-key ediff-mode-map "ac" #'ediff-copy-A-to-C)
+ (define-key ediff-mode-map "bc" #'ediff-copy-B-to-C)
(define-key ediff-mode-map "c" nil)
- (define-key ediff-mode-map "ca" 'ediff-copy-C-to-A)
- (define-key ediff-mode-map "cb" 'ediff-copy-C-to-B)
- (define-key ediff-mode-map "ra" 'ediff-restore-diff)
- (define-key ediff-mode-map "rb" 'ediff-restore-diff)
- (define-key ediff-mode-map "rc" 'ediff-restore-diff)
- (define-key ediff-mode-map "C" 'ediff-toggle-read-only))
+ (define-key ediff-mode-map "ca" #'ediff-copy-C-to-A)
+ (define-key ediff-mode-map "cb" #'ediff-copy-C-to-B)
+ (define-key ediff-mode-map "ra" #'ediff-restore-diff)
+ (define-key ediff-mode-map "rb" #'ediff-restore-diff)
+ (define-key ediff-mode-map "rc" #'ediff-restore-diff)
+ (define-key ediff-mode-map "C" #'ediff-toggle-read-only))
(t ; 2-way comparison
- (define-key ediff-mode-map "a" 'ediff-copy-A-to-B)
- (define-key ediff-mode-map "b" 'ediff-copy-B-to-A)
- (define-key ediff-mode-map "ra" 'ediff-restore-diff)
- (define-key ediff-mode-map "rb" 'ediff-restore-diff))
+ (define-key ediff-mode-map "a" #'ediff-copy-A-to-B)
+ (define-key ediff-mode-map "b" #'ediff-copy-B-to-A)
+ (define-key ediff-mode-map "ra" #'ediff-restore-diff)
+ (define-key ediff-mode-map "rb" #'ediff-restore-diff))
) ; cond
- (define-key ediff-mode-map "G" 'ediff-submit-report)
+ (define-key ediff-mode-map "G" #'ediff-submit-report)
(define-key ediff-mode-map "#" nil)
- (define-key ediff-mode-map "#h" 'ediff-toggle-regexp-match)
- (define-key ediff-mode-map "#f" 'ediff-toggle-regexp-match)
- (define-key ediff-mode-map "#c" 'ediff-toggle-ignore-case)
+ (define-key ediff-mode-map "#h" #'ediff-toggle-regexp-match)
+ (define-key ediff-mode-map "#f" #'ediff-toggle-regexp-match)
+ (define-key ediff-mode-map "#c" #'ediff-toggle-ignore-case)
(or ediff-word-mode
- (define-key ediff-mode-map "##" 'ediff-toggle-skip-similar))
+ (define-key ediff-mode-map "##" #'ediff-toggle-skip-similar))
(define-key ediff-mode-map "o" nil)
- (define-key ediff-mode-map "A" 'ediff-toggle-read-only)
- (define-key ediff-mode-map "B" 'ediff-toggle-read-only)
+ (define-key ediff-mode-map "A" #'ediff-toggle-read-only)
+ (define-key ediff-mode-map "B" #'ediff-toggle-read-only)
(define-key ediff-mode-map "w" nil)
- (define-key ediff-mode-map "wa" 'ediff-save-buffer)
- (define-key ediff-mode-map "wb" 'ediff-save-buffer)
- (define-key ediff-mode-map "wd" 'ediff-save-buffer)
- (define-key ediff-mode-map "=" 'ediff-inferior-compare-regions)
+ (define-key ediff-mode-map "wa" #'ediff-save-buffer)
+ (define-key ediff-mode-map "wb" #'ediff-save-buffer)
+ (define-key ediff-mode-map "wd" #'ediff-save-buffer)
+ (define-key ediff-mode-map "=" #'ediff-inferior-compare-regions)
(if (and (fboundp 'ediff-show-patch-diagnostics) (ediff-patch-job))
- (define-key ediff-mode-map "P" 'ediff-show-patch-diagnostics))
+ (define-key ediff-mode-map "P" #'ediff-show-patch-diagnostics))
(if ediff-3way-job
(progn
- (define-key ediff-mode-map "wc" 'ediff-save-buffer)
- (define-key ediff-mode-map "gc" 'ediff-jump-to-difference-at-point)
+ (define-key ediff-mode-map "wc" #'ediff-save-buffer)
+ (define-key ediff-mode-map "gc" #'ediff-jump-to-difference-at-point)
))
- (define-key ediff-mode-map "m" 'ediff-toggle-wide-display)
+ (define-key ediff-mode-map "m" #'ediff-toggle-wide-display)
;; Allow ediff-mode-map to be referenced indirectly
(fset 'ediff-mode-map ediff-mode-map)
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 47ef37a19ee..fc6ea944ae1 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -1043,8 +1043,8 @@ create a new splittable frame if none is found."
(with-current-buffer ctl-buffer
(let* ((frame-A (window-frame ediff-window-A))
(frame-A-parameters (frame-parameters frame-A))
- (frame-A-top (eval (cdr (assoc 'top frame-A-parameters))))
- (frame-A-left (eval (cdr (assoc 'left frame-A-parameters))))
+ (frame-A-top (eval (cdr (assoc 'top frame-A-parameters)) t))
+ (frame-A-left (eval (cdr (assoc 'left frame-A-parameters)) t))
(frame-A-width (frame-width frame-A))
(ctl-frame ediff-control-frame)
horizontal-adjustment upward-adjustment
@@ -1105,7 +1105,7 @@ It assumes that it is called from within the control buffer."
(cw (frame-char-width frame-A))
(wd (- (/ (display-pixel-width) cw) 5)))
(setq ediff-wide-display-orig-parameters
- (list (cons 'left (max 0 (eval (cdr (assoc 'left frame-A-params)))))
+ (list (cons 'left (max 0 (eval (cdr (assoc 'left frame-A-params)) t)))
(cons 'width (cdr (assoc 'width frame-A-params))))
ediff-wide-display-frame frame-A)
(modify-frame-parameters
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index ed375738b47..3536cbf7381 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -264,7 +264,7 @@ arguments after setting up the Ediff buffers."
'ediff-files3))
;;;###autoload
-(defalias 'ediff3 'ediff-files3)
+(defalias 'ediff3 #'ediff-files3)
(defvar-local ediff--magic-file-name nil
"Name of file where buffer's content was saved.
@@ -359,7 +359,7 @@ has been saved (if not in `buffer-file-name')."
(declare-function diff-latest-backup-file "diff" (fn))
;;;###autoload
-(defalias 'ediff 'ediff-files)
+(defalias 'ediff #'ediff-files)
;;;###autoload
(defun ediff-current-file ()
@@ -442,7 +442,7 @@ symbol describing the Ediff job type; it defaults to
(ediff-buffers-internal buffer-A buffer-B nil startup-hooks job-name))
;;;###autoload
-(defalias 'ebuffers 'ediff-buffers)
+(defalias 'ebuffers #'ediff-buffers)
;;;###autoload
@@ -479,7 +479,7 @@ symbol describing the Ediff job type; it defaults to
(ediff-buffers-internal buffer-A buffer-B buffer-C startup-hooks job-name))
;;;###autoload
-(defalias 'ebuffers3 'ediff-buffers3)
+(defalias 'ebuffers3 #'ediff-buffers3)
@@ -556,7 +556,7 @@ the same name in both. The third argument, REGEXP, is nil or a regular
expression; only file names that match the regexp are considered."
(interactive
(let ((dir-A (ediff-get-default-directory-name))
- (default-regexp (eval ediff-default-filtering-regexp))
+ (default-regexp (eval ediff-default-filtering-regexp t))
f)
(list (setq f (read-directory-name
"Directory A to compare: " dir-A nil 'must-match))
@@ -570,14 +570,14 @@ expression; only file names that match the regexp are considered."
default-regexp)
nil
'ediff-filtering-regexp-history
- (eval ediff-default-filtering-regexp))
+ (eval ediff-default-filtering-regexp t))
)))
(ediff-directories-internal
dir1 dir2 nil regexp #'ediff-files 'ediff-directories
))
;;;###autoload
-(defalias 'edirs 'ediff-directories)
+(defalias 'edirs #'ediff-directories)
;;;###autoload
@@ -587,7 +587,7 @@ The second argument, REGEXP, is a regular expression that filters the file
names. Only the files that are under revision control are taken into account."
(interactive
(let ((dir-A (ediff-get-default-directory-name))
- (default-regexp (eval ediff-default-filtering-regexp))
+ (default-regexp (eval ediff-default-filtering-regexp t))
)
(list (read-directory-name
"Directory to compare with revision:" dir-A nil 'must-match)
@@ -596,14 +596,14 @@ names. Only the files that are under revision control are taken into account."
"Filter filenames through regular expression" default-regexp)
nil
'ediff-filtering-regexp-history
- (eval ediff-default-filtering-regexp))
+ (eval ediff-default-filtering-regexp t))
)))
(ediff-directory-revisions-internal
- dir1 regexp 'ediff-revision 'ediff-directory-revisions
+ dir1 regexp #'ediff-revision 'ediff-directory-revisions
))
;;;###autoload
-(defalias 'edir-revisions 'ediff-directory-revisions)
+(defalias 'edir-revisions #'ediff-directory-revisions)
;;;###autoload
@@ -614,7 +614,7 @@ regular expression; only file names that match the regexp are considered."
(interactive
(let ((dir-A (ediff-get-default-directory-name))
- (default-regexp (eval ediff-default-filtering-regexp))
+ (default-regexp (eval ediff-default-filtering-regexp t))
f)
(list (setq f (read-directory-name "Directory A to compare:" dir-A nil))
(setq f (read-directory-name "Directory B to compare:"
@@ -632,14 +632,14 @@ regular expression; only file names that match the regexp are considered."
default-regexp)
nil
'ediff-filtering-regexp-history
- (eval ediff-default-filtering-regexp))
+ (eval ediff-default-filtering-regexp t))
)))
(ediff-directories-internal
dir1 dir2 dir3 regexp #'ediff-files3 'ediff-directories3
))
;;;###autoload
-(defalias 'edirs3 'ediff-directories3)
+(defalias 'edirs3 #'ediff-directories3)
;;;###autoload
(defun ediff-merge-directories (dir1 dir2 regexp &optional merge-autostore-dir)
@@ -649,7 +649,7 @@ expression; only file names that match the regexp are considered.
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
(interactive
(let ((dir-A (ediff-get-default-directory-name))
- (default-regexp (eval ediff-default-filtering-regexp))
+ (default-regexp (eval ediff-default-filtering-regexp t))
f)
(list (setq f (read-directory-name "Directory A to merge:"
dir-A nil 'must-match))
@@ -663,7 +663,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
default-regexp)
nil
'ediff-filtering-regexp-history
- (eval ediff-default-filtering-regexp))
+ (eval ediff-default-filtering-regexp t))
)))
(ediff-directories-internal
dir1 dir2 nil regexp #'ediff-merge-files 'ediff-merge-directories
@@ -671,7 +671,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
))
;;;###autoload
-(defalias 'edirs-merge 'ediff-merge-directories)
+(defalias 'edirs-merge #'ediff-merge-directories)
;;;###autoload
(defun ediff-merge-directories-with-ancestor (dir1 dir2 ancestor-dir regexp
@@ -685,7 +685,7 @@ only file names that match the regexp are considered.
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
(interactive
(let ((dir-A (ediff-get-default-directory-name))
- (default-regexp (eval ediff-default-filtering-regexp))
+ (default-regexp (eval ediff-default-filtering-regexp t))
f)
(list (setq f (read-directory-name "Directory A to merge:" dir-A nil))
(setq f (read-directory-name "Directory B to merge:"
@@ -703,7 +703,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
default-regexp)
nil
'ediff-filtering-regexp-history
- (eval ediff-default-filtering-regexp))
+ (eval ediff-default-filtering-regexp t))
)))
(ediff-directories-internal
dir1 dir2 ancestor-dir regexp
@@ -720,7 +720,7 @@ names. Only the files that are under revision control are taken into account.
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
(interactive
(let ((dir-A (ediff-get-default-directory-name))
- (default-regexp (eval ediff-default-filtering-regexp))
+ (default-regexp (eval ediff-default-filtering-regexp t))
)
(list (read-directory-name
"Directory to merge with revisions:" dir-A nil 'must-match)
@@ -729,15 +729,15 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
default-regexp)
nil
'ediff-filtering-regexp-history
- (eval ediff-default-filtering-regexp))
+ (eval ediff-default-filtering-regexp t))
)))
(ediff-directory-revisions-internal
- dir1 regexp 'ediff-merge-revisions 'ediff-merge-directory-revisions
+ dir1 regexp #'ediff-merge-revisions 'ediff-merge-directory-revisions
nil merge-autostore-dir
))
;;;###autoload
-(defalias 'edir-merge-revisions 'ediff-merge-directory-revisions)
+(defalias 'edir-merge-revisions #'ediff-merge-directory-revisions)
;;;###autoload
(defun ediff-merge-directory-revisions-with-ancestor (dir1 regexp
@@ -749,7 +749,7 @@ names. Only the files that are under revision control are taken into account.
MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
(interactive
(let ((dir-A (ediff-get-default-directory-name))
- (default-regexp (eval ediff-default-filtering-regexp))
+ (default-regexp (eval ediff-default-filtering-regexp t))
)
(list (read-directory-name
"Directory to merge with revisions and ancestors:"
@@ -759,10 +759,10 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
default-regexp)
nil
'ediff-filtering-regexp-history
- (eval ediff-default-filtering-regexp))
+ (eval ediff-default-filtering-regexp t))
)))
(ediff-directory-revisions-internal
- dir1 regexp 'ediff-merge-revisions-with-ancestor
+ dir1 regexp #'ediff-merge-revisions-with-ancestor
'ediff-merge-directory-revisions-with-ancestor
nil merge-autostore-dir
))
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index d2d419ac786..8f7affeea4e 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -79,90 +79,75 @@ but can be invoked directly in `fast' mode."
;; way they number lines of a file.
(defcustom emerge-diff-program "diff"
"Name of the program which compares two files."
- :type 'string
- :group 'emerge)
+ :type 'string)
(defcustom emerge-diff3-program "diff3"
"Name of the program which compares three files.
Its arguments are the ancestor file and the two variant files."
- :type 'string
- :group 'emerge)
+ :type 'string)
(defcustom emerge-diff-options ""
"Options to pass to `emerge-diff-program' and `emerge-diff3-program'."
- :type 'string
- :group 'emerge)
+ :type 'string)
(defcustom emerge-match-diff-line
(let ((x "\\([0-9]+\\)\\(\\|,\\([0-9]+\\)\\)"))
(concat "^" x "\\([acd]\\)" x "$"))
"Pattern to match lines produced by diff that describe differences.
This is as opposed to lines from the source files."
- :type 'regexp
- :group 'emerge)
+ :type 'regexp)
(defcustom emerge-diff-ok-lines-regexp
"^\\([0-9,]+[acd][0-9,]+$\\|[<>] \\|---\\)"
"Regexp that matches normal output lines from `emerge-diff-program'.
Lines that do not match are assumed to be error messages."
- :type 'regexp
- :group 'emerge)
+ :type 'regexp)
(defcustom emerge-diff3-ok-lines-regexp
"^\\([1-3]:\\|====\\| \\)"
"Regexp that matches normal output lines from `emerge-diff3-program'.
Lines that do not match are assumed to be error messages."
- :type 'regexp
- :group 'emerge)
+ :type 'regexp)
(defcustom emerge-rcs-ci-program "ci"
"Name of the program that checks in RCS revisions."
- :type 'string
- :group 'emerge)
+ :type 'string)
(defcustom emerge-rcs-co-program "co"
"Name of the program that checks out RCS revisions."
- :type 'string
- :group 'emerge)
+ :type 'string)
(defcustom emerge-process-local-variables nil
"Non-nil if Emerge should process local-variables lists in merge buffers.
\(You can explicitly request processing the local-variables
by executing `(hack-local-variables)'.)"
- :type 'boolean
- :group 'emerge)
+ :type 'boolean)
(defcustom emerge-execute-line-deletions nil
"If non-nil: `emerge-execute-line' makes no output if an input was deleted.
It concludes that an input version has been deleted when an ancestor entry
is present, only one A or B entry is present, and an output entry is present.
If nil: In such circumstances, the A or B file that is present will be
copied to the designated output file."
- :type 'boolean
- :group 'emerge)
+ :type 'boolean)
(defcustom emerge-before-flag "vvvvvvvvvvvvvvvvvvvv\n"
"Flag placed above the highlighted block of code. Must end with newline.
Must be set before Emerge is loaded, or emerge-new-flags must be run
after setting."
- :type 'string
- :group 'emerge)
+ :type 'string)
(defcustom emerge-after-flag "^^^^^^^^^^^^^^^^^^^^\n"
"Flag placed below the highlighted block of code. Must end with newline.
Must be set before Emerge is loaded, or emerge-new-flags must be run
after setting."
- :type 'string
- :group 'emerge)
+ :type 'string)
;; Hook variables
(defcustom emerge-startup-hook nil
"Hook to run in the merge buffer after the merge has been set up."
- :type 'hook
- :group 'emerge)
+ :type 'hook)
(defcustom emerge-select-hook nil
"Hook to run after a difference has been selected.
The variable `n' holds the (internal) number of the difference."
- :type 'hook
- :group 'emerge)
+ :type 'hook)
(defcustom emerge-unselect-hook nil
"Hook to run after a difference has been unselected.
The variable `n' holds the (internal) number of the difference."
- :type 'hook
- :group 'emerge)
+ :type 'hook)
;; Variables to control the default directories of the arguments to
;; Emerge commands.
@@ -171,8 +156,7 @@ The variable `n' holds the (internal) number of the difference."
"If nil, default dir for filenames in emerge is `default-directory'.
If non-nil, filenames complete in the directory of the last argument of the
same type to an `emerge-files...' command."
- :type 'boolean
- :group 'emerge)
+ :type 'boolean)
(defvar emerge-last-dir-A nil
"Last directory for the first file of an `emerge-files...' command.")
@@ -235,15 +219,13 @@ depend on the flags."
(defcustom emerge-min-visible-lines 3
"Number of lines that we want to show above and below the flags when we are
displaying a difference."
- :type 'integer
- :group 'emerge)
+ :type 'integer)
(defcustom emerge-temp-file-prefix
(expand-file-name "emerge" temporary-file-directory)
"Prefix to put on Emerge temporary file names.
Do not start with `~/' or `~USERNAME/'."
- :type 'string
- :group 'emerge)
+ :type 'string)
(make-obsolete-variable 'emerge-temp-file-prefix
"customize `temporary-file-directory' instead."
@@ -251,8 +233,7 @@ Do not start with `~/' or `~USERNAME/'."
(defcustom emerge-temp-file-mode 384 ; u=rw only
"Mode for Emerge temporary files."
- :type 'integer
- :group 'emerge)
+ :type 'integer)
(make-obsolete-variable 'emerge-temp-file-mode
"it has no effect, temporary files are always private."
@@ -268,8 +249,7 @@ The template is inserted as a string, with the following interpolations:
Don't forget to end the template with a newline.
Note that this variable can be made local to a particular merge buffer by
giving a prefix argument to `emerge-set-combine-versions-template'."
- :type 'string
- :group 'emerge)
+ :type 'string)
;; Build keymaps
@@ -294,8 +274,7 @@ Makes Emerge commands directly available.")
(defcustom emerge-command-prefix "\C-c\C-c"
"Command prefix for Emerge commands in `edit' mode.
Must be set before Emerge is loaded."
- :type 'string
- :group 'emerge)
+ :type 'string)
;; This function sets up the fixed keymaps. It is executed when the first
;; Emerge is done to allow the user maximum time to set up the global keymap.
@@ -1245,8 +1224,7 @@ Otherwise, the A or B file present is copied to the output file."
(defcustom emerge-merge-directories-filename-regexp "[^.]"
"Regexp describing files to be processed by `emerge-merge-directories'."
- :type 'regexp
- :group 'emerge)
+ :type 'regexp)
;;;###autoload
(defun emerge-merge-directories (a-dir b-dir ancestor-dir output-dir)
@@ -3070,8 +3048,7 @@ See also `auto-save-file-name-p'."
(defcustom emerge-metachars nil
"No longer used. Emerge now uses `shell-quote-argument'."
- :type '(choice (const nil) regexp)
- :group 'emerge)
+ :type '(choice (const nil) regexp))
(make-obsolete-variable 'emerge-metachars nil "26.1")
(provide 'emerge)
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el
index 2ee3da70274..54ef06960f9 100644
--- a/lisp/vc/pcvs-defs.el
+++ b/lisp/vc/pcvs-defs.el
@@ -1,4 +1,4 @@
-;;; pcvs-defs.el --- variable definitions for PCL-CVS
+;;; pcvs-defs.el --- variable definitions for PCL-CVS -*- lexical-binding: t; -*-
;; Copyright (C) 1991-2021 Free Software Foundation, Inc.
@@ -71,7 +71,6 @@ versions, such as the one in SunOS-4.")
(defcustom cvs-cvsrc-file (convert-standard-filename "~/.cvsrc")
"Path to your cvsrc file."
- :group 'pcl-cvs
:type '(file))
(defvar cvs-shared-start 4
@@ -96,24 +95,20 @@ If t, they will be removed from the *cvs* buffer after every command.
If `delayed', they will be removed from the *cvs* buffer before every command.
If `status', they will only be removed after a `cvs-mode-status' command.
Else, they will never be automatically removed from the *cvs* buffer."
- :group 'pcl-cvs
:type '(choice (const nil) (const status) (const delayed) (const t)))
(defcustom cvs-auto-remove-directories 'handled
"If `all', directory entries will never be shown.
If `handled', only non-handled directories will be shown.
If `empty', only non-empty directories will be shown."
- :group 'pcl-cvs
:type '(choice (const :tag "No" nil) (const all) (const handled) (const empty)))
(defcustom cvs-auto-revert t
"Non-nil if changed files should automatically be reverted."
- :group 'pcl-cvs
:type '(boolean))
(defcustom cvs-sort-ignore-file t
"Non-nil if `cvs-mode-ignore' should sort the .cvsignore automatically."
- :group 'pcl-cvs
:type '(boolean))
(defcustom cvs-force-dir-tag t
@@ -121,7 +116,6 @@ If `empty', only non-empty directories will be shown."
Tagging should generally be applied a directory at a time, but sometimes it is
useful to be able to tag a single file. The normal way to do that is to use
`cvs-mode-force-command' so as to temporarily override the restrictions."
- :group 'pcl-cvs
:type '(boolean))
(defcustom cvs-default-ignore-marks nil
@@ -130,7 +124,6 @@ Normally they run on the files that are marked (with `cvs-mode-mark'),
or the file under the cursor if no files are marked. If this variable
is set to a non-nil value they will by default run on the file on the
current line. See also `cvs-invert-ignore-marks'."
- :group 'pcl-cvs
:type '(boolean))
(defcustom cvs-invert-ignore-marks
@@ -143,7 +136,6 @@ current line. See also `cvs-invert-ignore-marks'."
"List of cvs commands that invert the default ignore-mark behavior.
Commands in this set will use the opposite default from the one set
in `cvs-default-ignore-marks'."
- :group 'pcl-cvs
:type '(set (const "diff")
(const "tag")
(const "ignore")))
@@ -154,7 +146,6 @@ Non-nil means that PCL-CVS will ask confirmation before removing files
except for files whose content can readily be recovered from the repository.
A value of `list' means that the list of files to be deleted will be
displayed when asking for confirmation."
- :group 'pcl-cvs
:type '(choice (const list)
(const t)
(const nil)))
@@ -162,7 +153,6 @@ displayed when asking for confirmation."
(defcustom cvs-add-default-message nil
"Default message to use when adding files.
If set to nil, `cvs-mode-add' will always prompt for a message."
- :group 'pcl-cvs
:type '(choice (const :tag "Prompt" nil)
(string)))
@@ -171,7 +161,6 @@ If set to nil, `cvs-mode-add' will always prompt for a message."
If non-nil, `cvs-mode-find-file' will place the cursor at the beginning of
the modified area. If the file is not locally modified, this will obviously
have no effect."
- :group 'pcl-cvs
:type '(boolean))
(defcustom cvs-buffer-name-alist
@@ -193,7 +182,6 @@ POSTPROC is a function that should be executed when the command terminates
The CMD used for `cvs-mode-commit' is \"message\". For that special
case, POSTPROC is called just after MODE with special arguments."
- :group 'pcl-cvs
:type '(repeat
(list (choice (const "diff")
(const "status")
@@ -236,7 +224,6 @@ Output from cvs is placed here for asynchronous commands.")
'(cvs-ediff-diff . cvs-ediff-merge)
'(cvs-emerge-diff . cvs-emerge-merge))
"Pair of functions to be used for resp. diff'ing and merg'ing interactively."
- :group 'pcl-cvs
:type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge))
(const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge))))
@@ -255,7 +242,6 @@ Alternatives are:
`samedir': reuse any cvs buffer displaying the same directory
`subdir': or reuse any cvs buffer displaying any sub- or super- directory
`always': reuse any cvs buffer."
- :group 'pcl-cvs
:type '(choice (const always) (const subdir) (const samedir) (const current)))
(defvar cvs-temp-buffer nil
@@ -424,8 +410,7 @@ This variable is buffer local and only used in the *cvs* buffer.")
(defcustom cvs-minor-mode-prefix "\C-xc"
"Prefix key for the `cvs-mode' bindings in `cvs-minor-mode'."
- :type 'string
- :group 'pcl-cvs)
+ :type 'string)
(easy-mmode-defmap cvs-minor-mode-map
`((,cvs-minor-mode-prefix . cvs-mode-map)
diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el
index e1197176af2..21fe98dacab 100644
--- a/lisp/vc/pcvs-info.el
+++ b/lisp/vc/pcvs-info.el
@@ -1,4 +1,4 @@
-;;; pcvs-info.el --- internal representation of a fileinfo entry
+;;; pcvs-info.el --- internal representation of a fileinfo entry -*- lexical-binding: t; -*-
;; Copyright (C) 1991-2021 Free Software Foundation, Inc.
@@ -384,8 +384,8 @@ For use by the ewoc package."
The ordering defined by this function is such that directories are
sorted alphabetically, and inside every directory the DIRCHANGE
fileinfo will appear first, followed by all files (alphabetically)."
- (let ((subtypea (cvs-fileinfo->subtype a))
- (subtypeb (cvs-fileinfo->subtype b)))
+ (let ( ;; (subtypea (cvs-fileinfo->subtype a))
+ ) ;; (subtypeb (cvs-fileinfo->subtype b))
(cond
;; Sort according to directories.
((string< (cvs-fileinfo->dir a) (cvs-fileinfo->dir b)) t)
diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el
index a95ea0d99da..d0b2e898b07 100644
--- a/lisp/vc/pcvs-parse.el
+++ b/lisp/vc/pcvs-parse.el
@@ -186,7 +186,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
(let ((type (if (consp type) (car type) type))
(subtype (if (consp type) (cdr type))))
(when dir (setq cvs-current-dir dir))
- (apply 'cvs-create-fileinfo type
+ (apply #'cvs-create-fileinfo type
(concat cvs-current-subdir (or dir cvs-current-dir))
file (cvs-parse-msg) :subtype subtype keys))))
diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el
index 57da7bf730e..75d9fe9bee1 100644
--- a/lisp/vc/pcvs-util.el
+++ b/lisp/vc/pcvs-util.el
@@ -1,4 +1,4 @@
-;;; pcvs-util.el --- utility functions for PCL-CVS
+;;; pcvs-util.el --- utility functions for PCL-CVS -*- lexical-binding: t; -*-
;; Copyright (C) 1991-2021 Free Software Foundation, Inc.
@@ -33,27 +33,9 @@
;;;;
(defsubst cvs-car (x) (if (consp x) (car x) x))
-(defalias 'cvs-cdr 'cdr-safe)
+(defalias 'cvs-cdr #'cdr-safe)
(defsubst cvs-append (&rest xs)
- (apply 'append (mapcar (lambda (x) (if (listp x) x (list x))) xs)))
-
-(defsubst cvs-every (-cvs-every-f -cvs-every-l)
- (while (consp -cvs-every-l)
- (unless (funcall -cvs-every-f (pop -cvs-every-l))
- (setq -cvs-every-l t)))
- (not -cvs-every-l))
-
-(defun cvs-union (xs ys)
- (let ((zs ys))
- (dolist (x xs zs)
- (unless (member x ys) (push x zs)))))
-
-(defun cvs-map (-cvs-map-f &rest -cvs-map-ls)
- (let ((accum ()))
- (while (not (cvs-every 'null -cvs-map-ls))
- (push (apply -cvs-map-f (mapcar 'car -cvs-map-ls)) accum)
- (setq -cvs-map-ls (mapcar 'cdr -cvs-map-ls)))
- (nreverse accum)))
+ (apply #'append (mapcar (lambda (x) (if (listp x) x (list x))) xs)))
(defun cvs-first (l &optional n)
(if (null n) (car l)
@@ -146,7 +128,7 @@ If NOREUSE is non-nil, always return a new buffer."
"Insert a list of STRINGS into the current buffer.
Uses columns to keep the listing readable but compact."
(when (consp strings)
- (let* ((length (apply 'max (mapcar 'length strings)))
+ (let* ((length (apply #'max (mapcar #'length strings)))
(wwidth (1- (window-width)))
(columns (min
;; At least 2 columns; at least 2 spaces between columns.
@@ -174,7 +156,7 @@ arguments. If ARGS is not a list, no argument will be passed."
(condition-case nil
(with-temp-buffer
(if args
- (apply 'call-process
+ (apply #'call-process
file nil t nil (when (listp args) args))
(insert-file-contents file))
(goto-char (point-min))
@@ -182,7 +164,7 @@ arguments. If ARGS is not a list, no argument will be passed."
(if oneline (line-end-position) (point-max))))
(file-error nil)))
-(define-obsolete-function-alias 'cvs-string-prefix-p 'string-prefix-p "24.3")
+(define-obsolete-function-alias 'cvs-string-prefix-p #'string-prefix-p "24.3")
;;;;
;;;; file names
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 1a42c67cb1c..6e039cc6256 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -115,7 +115,7 @@
;;; Code:
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
(require 'ewoc) ;Ewoc was once cookie
(require 'pcvs-defs)
(require 'pcvs-util)
@@ -513,7 +513,7 @@ If non-nil, NEW means to create a new buffer no matter what."
(let* ((dir+files+rest
(if (or (null fis) (not single-dir))
;; not single-dir mode: just process the whole thing
- (list "" (mapcar 'cvs-fileinfo->full-name fis) nil)
+ (list "" (mapcar #'cvs-fileinfo->full-name fis) nil)
;; single-dir mode: extract the same-dir-elements
(let ((dir (cvs-fileinfo->dir (car fis))))
;; output the concerned dir so the parser can translate paths
@@ -2135,11 +2135,11 @@ Returns a list of FIS that should be `cvs remove'd."
(eq (cvs-fileinfo->type fi) 'UNKNOWN))
(cvs-mode-marked filter cmd))))
(silent (or (not cvs-confirm-removals)
- (cvs-every (lambda (fi)
- (or (not (file-exists-p
- (cvs-fileinfo->full-name fi)))
- (cvs-applicable-p fi 'safe-rm)))
- files)))
+ (cl-every (lambda (fi)
+ (or (not (file-exists-p
+ (cvs-fileinfo->full-name fi)))
+ (cvs-applicable-p fi 'safe-rm)))
+ files)))
(tmpbuf (cvs-temp-buffer)))
(when (and (not silent) (equal cvs-confirm-removals 'list))
(with-current-buffer tmpbuf
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index b0435ab53ee..07b2800c2dc 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -164,18 +164,18 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'."
(defvar vc-annotate-mode-map
(let ((m (make-sparse-keymap)))
- (define-key m "a" 'vc-annotate-revision-previous-to-line)
- (define-key m "d" 'vc-annotate-show-diff-revision-at-line)
- (define-key m "=" 'vc-annotate-show-diff-revision-at-line)
- (define-key m "D" 'vc-annotate-show-changeset-diff-revision-at-line)
- (define-key m "f" 'vc-annotate-find-revision-at-line)
- (define-key m "j" 'vc-annotate-revision-at-line)
- (define-key m "l" 'vc-annotate-show-log-revision-at-line)
- (define-key m "n" 'vc-annotate-next-revision)
- (define-key m "p" 'vc-annotate-prev-revision)
- (define-key m "w" 'vc-annotate-working-revision)
- (define-key m "v" 'vc-annotate-toggle-annotation-visibility)
- (define-key m "\C-m" 'vc-annotate-goto-line)
+ (define-key m "a" #'vc-annotate-revision-previous-to-line)
+ (define-key m "d" #'vc-annotate-show-diff-revision-at-line)
+ (define-key m "=" #'vc-annotate-show-diff-revision-at-line)
+ (define-key m "D" #'vc-annotate-show-changeset-diff-revision-at-line)
+ (define-key m "f" #'vc-annotate-find-revision-at-line)
+ (define-key m "j" #'vc-annotate-revision-at-line)
+ (define-key m "l" #'vc-annotate-show-log-revision-at-line)
+ (define-key m "n" #'vc-annotate-next-revision)
+ (define-key m "p" #'vc-annotate-prev-revision)
+ (define-key m "w" #'vc-annotate-working-revision)
+ (define-key m "v" #'vc-annotate-toggle-annotation-visibility)
+ (define-key m "\C-m" #'vc-annotate-goto-line)
m)
"Local keymap used for VC-Annotate mode.")
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index d1385ea7784..de5a90dc602 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -45,9 +45,9 @@
;;; Code:
+(require 'vc-dispatcher)
(eval-when-compile
(require 'cl-lib)
- (require 'vc-dispatcher)
(require 'vc-dir)) ; vc-dir-at-event
(declare-function vc-deduce-fileset "vc"
@@ -66,7 +66,6 @@
(defcustom vc-bzr-program "bzr"
"Name of the bzr command (excluding any arguments)."
- :group 'vc-bzr
:type 'string)
(defcustom vc-bzr-diff-switches nil
@@ -75,8 +74,7 @@ If nil, use the value of `vc-diff-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))
- :group 'vc-bzr)
+ (repeat :tag "Argument List" :value ("") string)))
(defcustom vc-bzr-annotate-switches nil
"String or list of strings specifying switches for bzr annotate under VC.
@@ -85,15 +83,13 @@ If nil, use the value of `vc-annotate-switches'. If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "25.1"
- :group 'vc-bzr)
+ :version "25.1")
(defcustom vc-bzr-log-switches nil
"String or list of strings specifying switches for bzr log under VC."
:type '(choice (const :tag "None" nil)
(string :tag "Argument String")
- (repeat :tag "Argument List" :value ("") string))
- :group 'vc-bzr)
+ (repeat :tag "Argument List" :value ("") string)))
(defcustom vc-bzr-status-switches
(ignore-errors
@@ -108,7 +104,6 @@ The option \"--no-classify\" should be present if your bzr supports it."
:type '(choice (const :tag "None" nil)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :group 'vc-bzr
:version "24.1")
;; since v0.9, bzr supports removing the progress indicators
@@ -122,7 +117,7 @@ prepends `vc-bzr-status-switches' to ARGS."
`("BZR_PROGRESS_BAR=none" ; Suppress progress output (bzr >=0.9)
"LC_MESSAGES=C" ; Force English output
,@process-environment)))
- (apply 'vc-do-command (or buffer "*vc*") okstatus vc-bzr-program
+ (apply #'vc-do-command (or buffer "*vc*") okstatus vc-bzr-program
file-or-list bzr-command
(if (and (string-equal "status" bzr-command)
vc-bzr-status-switches)
@@ -144,7 +139,7 @@ Use the current Bzr root directory as the ROOT argument to
,@process-environment))
(root (vc-bzr-root default-directory))
(buffer (format "*vc-bzr : %s*" (expand-file-name root))))
- (apply 'vc-do-async-command buffer root
+ (apply #'vc-do-async-command buffer root
vc-bzr-program bzr-command args)
buffer))
@@ -267,7 +262,8 @@ in the repository root directory of FILE."
;; If there is no parent, this must be a new repo.
;; If file is in dirstate, can only be added (b#8025).
((or (not (match-beginning 4))
- (eq (char-after (match-beginning 4)) ?a)) 'added)
+ (eq (char-after (match-beginning 4)) ?a))
+ 'added)
((or (and (eql (string-to-number (match-string 3))
(file-attribute-size (file-attributes file)))
(equal (match-string 5)
@@ -280,7 +276,7 @@ in the repository root directory of FILE."
(memq
?x
(mapcar
- 'identity
+ #'identity
(file-attribute-modes
(file-attributes file))))))
(if (eq (char-after (match-beginning 7))
@@ -374,13 +370,13 @@ If PROMPT is non-nil, prompt for the Bzr command to run."
command (cadr args)
args (cddr args)))
(require 'vc-dispatcher)
- (let ((buf (apply 'vc-bzr-async-command command args)))
+ (let ((buf (apply #'vc-bzr-async-command command args)))
(with-current-buffer buf
(vc-run-delayed
(vc-compilation-mode 'bzr)
(setq-local compile-command
(concat vc-bzr-program " " command " "
- (if args (mapconcat 'identity args " ") "")))))
+ (if args (mapconcat #'identity args " ") "")))))
(vc-set-async-update buf))))
(defun vc-bzr-pull (prompt)
@@ -424,7 +420,7 @@ default if it is available."
(vc-bzr-program (car cmd))
(command (cadr cmd))
(args (cddr cmd)))
- (let ((buf (apply 'vc-bzr-async-command command args)))
+ (let ((buf (apply #'vc-bzr-async-command command args)))
(with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
(vc-set-async-update buf))))
@@ -512,7 +508,7 @@ in the branch repository (or whose status not be determined)."
(unless (re-search-forward "^<<<<<<< " nil t)
(vc-bzr-command "resolve" nil 0 buffer-file-name)
;; Remove the hook so that it is not called multiple times.
- (remove-hook 'after-save-hook 'vc-bzr-resolve-when-done t))))
+ (remove-hook 'after-save-hook #'vc-bzr-resolve-when-done t))))
(defun vc-bzr-find-file-hook ()
(when (and buffer-file-name
@@ -529,7 +525,7 @@ in the branch repository (or whose status not be determined)."
;; but the one in `bzr pull' isn't, so it would be good to provide an
;; elisp function to remerge from the .BASE/OTHER/THIS files.
(smerge-start-session)
- (add-hook 'after-save-hook 'vc-bzr-resolve-when-done nil t)
+ (add-hook 'after-save-hook #'vc-bzr-resolve-when-done nil t)
(vc-message-unresolved-conflicts buffer-file-name)))
(defun vc-bzr-version-dirstate (dir)
@@ -643,7 +639,7 @@ Returns nil if unable to find this information."
;; Could run `bzr status' in the directory and see if it succeeds, but
;; that's relatively expensive.
-(defalias 'vc-bzr-responsible-p 'vc-bzr-root
+(defalias 'vc-bzr-responsible-p #'vc-bzr-root
"Return non-nil if FILE is (potentially) controlled by bzr.
The criterion is that there is a `.bzr' directory in the same
or a superior directory.")
@@ -664,7 +660,7 @@ or a superior directory.")
(defun vc-bzr-checkin (files comment &optional _rev)
"Check FILES in to bzr with log message COMMENT."
- (apply 'vc-bzr-command "commit" nil 0 files
+ (apply #'vc-bzr-command "commit" nil 0 files
(cons "-m" (log-edit-extract-headers
`(("Author" . ,(vc-bzr--sanitize-header "--author"))
("Date" . ,(vc-bzr--sanitize-header "--commit-time"))
@@ -699,7 +695,7 @@ or a superior directory.")
(defvar log-view-expanded-log-entry-function)
(define-derived-mode vc-bzr-log-view-mode log-view-mode "Bzr-Log-View"
- (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack.
+ (remove-hook 'log-view-mode-hook #'vc-bzr-log-view-mode) ;Deactivate the hack.
(require 'add-log)
(setq-local log-view-per-file-logs nil)
(setq-local log-view-file-re regexp-unmatchable)
@@ -745,7 +741,7 @@ If LIMIT is non-nil, show no more than this many entries."
;; the log display may not what the user wants - but I see no other
;; way of getting the above regexps working.
(with-current-buffer buffer
- (apply 'vc-bzr-command "log" buffer 'async files
+ (apply #'vc-bzr-command "log" buffer 'async files
(append
(if shortlog '("--line") '("--long"))
;; The extra complications here when start-revision and limit
@@ -761,7 +757,8 @@ If LIMIT is non-nil, show no more than this many entries."
;; This means we don't have to use --no-aliases.
;; Is -c any different to -r in this case?
"-r%s"
- "-r..%s") start-revision)))
+ "-r..%s")
+ start-revision)))
(if (eq vc-log-view-type 'with-diff) (list "-p"))
(when limit (list "-l" (format "%s" limit)))
;; There is no sensible way to combine --limit and --forward,
@@ -782,7 +779,7 @@ If LIMIT is non-nil, show no more than this many entries."
(defun vc-bzr-expanded-log-entry (revision)
(with-temp-buffer
- (apply 'vc-bzr-command "log" t nil nil
+ (apply #'vc-bzr-command "log" t nil nil
(append
(list "--long" (format "-r%s" revision))
(if (stringp vc-bzr-log-switches)
@@ -795,11 +792,11 @@ If LIMIT is non-nil, show no more than this many entries."
(buffer-substring (match-end 0) (point-max)))))
(defun vc-bzr-log-incoming (buffer remote-location)
- (apply 'vc-bzr-command "missing" buffer 'async nil
+ (apply #'vc-bzr-command "missing" buffer 'async nil
(list "--theirs-only" (unless (string= remote-location "") remote-location))))
(defun vc-bzr-log-outgoing (buffer remote-location)
- (apply 'vc-bzr-command "missing" buffer 'async nil
+ (apply #'vc-bzr-command "missing" buffer 'async nil
(list "--mine-only" (unless (string= remote-location "") remote-location))))
(defun vc-bzr-show-log-entry (revision)
@@ -830,7 +827,7 @@ If LIMIT is non-nil, show no more than this many entries."
(append
;; Only add --diff-options if there are any diff switches.
(unless (zerop (length switches))
- (list "--diff-options" (mapconcat 'identity switches " ")))
+ (list "--diff-options" (mapconcat #'identity switches " ")))
;; This `when' is just an optimization because bzr-1.2 is *much*
;; faster when the revision argument is not given.
(when (or rev1 rev2)
@@ -995,7 +992,7 @@ stream. Standard error output is discarded."
(defun vc-bzr-dir-status-files (dir files update-function)
"Return a list of conses (file . state) for DIR."
- (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
+ (apply #'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
(vc-run-delayed
(vc-bzr-after-dir-status update-function
;; "bzr status" results are relative to
@@ -1010,15 +1007,15 @@ stream. Standard error output is discarded."
(defvar vc-bzr-shelve-map
(let ((map (make-sparse-keymap)))
;; Turn off vc-dir marking
- (define-key map [mouse-2] 'ignore)
-
- (define-key map [down-mouse-3] 'vc-bzr-shelve-menu)
- (define-key map "\C-k" 'vc-bzr-shelve-delete-at-point)
- (define-key map "=" 'vc-bzr-shelve-show-at-point)
- (define-key map "\C-m" 'vc-bzr-shelve-show-at-point)
- (define-key map "A" 'vc-bzr-shelve-apply-and-keep-at-point)
- (define-key map "P" 'vc-bzr-shelve-apply-at-point)
- (define-key map "S" 'vc-bzr-shelve-snapshot)
+ (define-key map [mouse-2] #'ignore)
+
+ (define-key map [down-mouse-3] #'vc-bzr-shelve-menu)
+ (define-key map "\C-k" #'vc-bzr-shelve-delete-at-point)
+ (define-key map "=" #'vc-bzr-shelve-show-at-point)
+ (define-key map "\C-m" #'vc-bzr-shelve-show-at-point)
+ (define-key map "A" #'vc-bzr-shelve-apply-and-keep-at-point)
+ (define-key map "P" #'vc-bzr-shelve-apply-at-point)
+ (define-key map "S" #'vc-bzr-shelve-snapshot)
map))
(defvar vc-bzr-shelve-menu-map
@@ -1211,7 +1208,7 @@ stream. Standard error output is discarded."
(let ((vc-bzr-revisions '())
(default-directory (file-name-directory (car files))))
(with-temp-buffer
- (apply 'vc-bzr-command "log" t 0 files
+ (apply #'vc-bzr-command "log" t 0 files
(append '("--line")
(if (stringp vc-bzr-log-switches)
(list vc-bzr-log-switches)
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 0adb5328bc2..ef607133e86 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -76,8 +76,7 @@
(repeat :tag "Argument List"
:value ("")
string))
- :version "22.1"
- :group 'vc-cvs)
+ :version "22.1")
(defcustom vc-cvs-register-switches nil
"Switches for registering a file into CVS.
@@ -88,8 +87,7 @@ If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "21.1"
- :group 'vc-cvs)
+ :version "21.1")
(defcustom vc-cvs-diff-switches nil
"String or list of strings specifying switches for CVS diff under VC.
@@ -98,8 +96,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "21.1"
- :group 'vc-cvs)
+ :version "21.1")
(defcustom vc-cvs-annotate-switches nil
"String or list of strings specifying switches for cvs annotate under VC.
@@ -109,22 +106,19 @@ switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "25.1"
- :group 'vc-cvs)
+ :version "25.1")
(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
- :type '(repeat string)
- :group 'vc-cvs)
+ :type '(repeat string))
(defcustom vc-cvs-use-edit t
"Non-nil means to use `cvs edit' to \"check out\" a file.
This is only meaningful if you don't use the implicit checkout model
\(i.e. if you have $CVSREAD set)."
:type 'boolean
- :version "21.1"
- :group 'vc-cvs)
+ :version "21.1")
(defcustom vc-cvs-stay-local 'only-file
"Non-nil means use local operations when possible for remote repositories.
@@ -151,16 +145,14 @@ except for hosts matched by these regular expressions."
(regexp :format " stay local,\n%t: %v"
:tag "if it matches")
(repeat :format "%v%i\n" :inline t (regexp :tag "or"))))
- :version "23.1"
- :group 'vc-cvs)
+ :version "23.1")
(defcustom vc-cvs-sticky-date-format-string "%c"
"Format string for mode-line display of sticky date.
Format is according to `format-time-string'. Only used if
`vc-cvs-sticky-tag-display' is t."
:type '(string)
- :version "22.1"
- :group 'vc-cvs)
+ :version "22.1")
(defcustom vc-cvs-sticky-tag-display t
"Specify the mode-line display of sticky tags.
@@ -198,8 +190,7 @@ displayed. Date and time is displayed for sticky dates.
See also variable `vc-cvs-sticky-date-format-string'."
:type '(choice boolean function)
- :version "22.1"
- :group 'vc-cvs)
+ :version "22.1")
;;;
;;; Internal variables
@@ -310,7 +301,7 @@ to the CVS command."
(vc-cvs-could-register file)
(push (directory-file-name (file-name-directory file)) dirs)))
(if dirs (vc-cvs-register dirs)))
- (apply 'vc-cvs-command nil 0 files
+ (apply #'vc-cvs-command nil 0 files
"add"
(and comment (string-match "[^\t\n ]" comment)
(concat "-m" comment))
@@ -346,12 +337,12 @@ its parents."
(error "%s is not a valid symbolic tag name" rev)
;; If the input revision is a valid symbolic tag name, we create it
;; as a branch, commit and switch to it.
- (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev))
- (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev))
+ (apply #'vc-cvs-command nil 0 files "tag" "-b" (list rev))
+ (apply #'vc-cvs-command nil 0 files "update" "-r" (list rev))
(mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev))
files)))
(let ((status (apply
- 'vc-cvs-command nil 1 files
+ #'vc-cvs-command nil 1 files
"ci" (if rev (concat "-r" rev))
(concat "-m" (car (log-edit-extract-headers nil comment)))
(vc-switches 'CVS 'checkin))))
@@ -378,7 +369,7 @@ its parents."
(vc-file-setprop
(car files) 'vc-working-revision
(vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2))
- (mapc 'vc-file-clearprops files))
+ (mapc #'vc-file-clearprops files))
;; Anyway, forget the checkout model of the file, because we might have
;; guessed wrong when we found the file. After commit, we can
;; tell it from the permissions of the file (see
@@ -391,7 +382,7 @@ its parents."
(vc-cvs-command nil 0 files "update" "-A"))))
(defun vc-cvs-find-revision (file rev buffer)
- (apply 'vc-cvs-command
+ (apply #'vc-cvs-command
buffer 0 file
"-Q" ; suppress diagnostic output
"update"
@@ -416,7 +407,7 @@ REV is the revision to check out."
(if (equal file buffer-file-name) (read-only-mode -1))))
;; Check out a particular revision (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil)
- (apply 'vc-cvs-command nil 0 file
+ (apply #'vc-cvs-command nil 0 file
"-w"
"update"
(when rev
@@ -600,7 +591,7 @@ Remaining arguments are ignored."
;; This used to append diff-switches and vc-diff-switches,
;; which was consistent with the vc-diff-switches doc at that
;; time, but not with the actual behavior of any other VC diff.
- (apply 'vc-do-command (or buffer "*vc-diff*") 1 "diff" nil
+ (apply #'vc-do-command (or buffer "*vc-diff*") 1 "diff" nil
;; Not a CVS diff, does not use vc-cvs-diff-switches.
(append (vc-switches nil 'diff)
(list (file-relative-name file-oldvers)
@@ -608,7 +599,7 @@ Remaining arguments are ignored."
(setq status 0))
(push file invoke-cvs-diff-list)))))
(when invoke-cvs-diff-list
- (setq status (apply 'vc-cvs-command (or buffer "*vc-diff*")
+ (setq status (apply #'vc-cvs-command (or buffer "*vc-diff*")
(if async 'async 1)
invoke-cvs-diff-list "diff"
(and oldvers (concat "-r" oldvers))
@@ -787,7 +778,7 @@ If UPDATE is non-nil, then update (resynch) any affected buffers."
"A wrapper around `vc-do-command' for use in vc-cvs.el.
The difference to vc-do-command is that this function always invokes `cvs',
and that it passes `vc-cvs-global-switches' to it before FLAGS."
- (apply 'vc-do-command (or buffer "*vc*") okstatus "cvs" files
+ (apply #'vc-do-command (or buffer "*vc*") okstatus "cvs" files
(if (stringp vc-cvs-global-switches)
(cons vc-cvs-global-switches flags)
(append vc-cvs-global-switches
@@ -816,7 +807,7 @@ individually should stay local."
(setq default nil stay-local (cdr stay-local)))
(when (consp stay-local)
(setq stay-local
- (mapconcat 'identity stay-local "\\|")))
+ (mapconcat #'identity stay-local "\\|")))
(if (if (string-match stay-local hostname)
default (not default))
'yes 'no))))))))))))
diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el
index 88f46eff059..5fd8d8e5036 100644
--- a/lisp/vc/vc-dav.el
+++ b/lisp/vc/vc-dav.el
@@ -1,4 +1,4 @@
-;;; vc-dav.el --- vc.el support for WebDAV
+;;; vc-dav.el --- vc.el support for WebDAV -*- lexical-binding: t; -*-
;; Copyright (C) 2001, 2004-2021 Free Software Foundation, Inc.
@@ -64,7 +64,7 @@ For a list of possible values, see `vc-state'."
'edited
(cdr (car locks)))))))
-(defun vc-dav-checkout-model (url)
+(defun vc-dav-checkout-model (_url)
"Indicate whether URL needs to be \"checked out\" before it can be edited.
See `vc-checkout-model' for a list of possible values."
;; The only thing we can support with webdav is 'locking
@@ -72,21 +72,21 @@ See `vc-checkout-model' for a list of possible values."
;; This should figure out the version # of the file somehow. What is
;; the most appropriate property in WebDAV to look at for this?
-(defun vc-dav-workfile-version (url)
+(defun vc-dav-workfile-version (_url)
"Return the current workfile version of URL."
"Unknown")
-(defun vc-dav-register (url &optional _comment)
+(defun vc-dav-register (_url &optional _comment)
"Register URL in the DAV backend."
;; Do we need to do anything here? FIXME?
)
-(defun vc-dav-checkin (url comment &optional _rev)
+(defun vc-dav-checkin (_url _comment &optional _rev)
"Commit changes in URL to WebDAV. COMMENT is used as a check-in comment."
;; This should PUT the resource and release any locks that we hold.
)
-(defun vc-dav-checkout (url &optional rev destfile)
+(defun vc-dav-checkout (_url &optional _rev _destfile)
"Check out revision REV of URL into the working area.
If EDITABLE is non-nil URL should be writable by the user and if
@@ -101,7 +101,7 @@ write the contents to.
;; This should LOCK the resource.
)
-(defun vc-dav-revert (url &optional contents-done)
+(defun vc-dav-revert (_url &optional _contents-done)
"Revert URL back to the current workfile version.
If optional arg CONTENTS-DONE is non-nil, then the contents of FILE
@@ -112,11 +112,11 @@ only needs to update the status of URL within the backend.
;; Should UNLOCK the file.
)
-(defun vc-dav-print-log (url)
+(defun vc-dav-print-log (_url)
"Insert the revision log of URL into the *vc* buffer."
)
-(defun vc-dav-diff (url &optional rev1 rev2 buffer async)
+(defun vc-dav-diff (_url &optional _rev1 _rev2 _buffer _async)
"Insert the diff for URL into the *vc-diff* buffer.
If REV1 and REV2 are non-nil report differences from REV1 to REV2.
If REV1 is nil, use the current workfile version as the older version.
@@ -135,11 +135,11 @@ It should return a status of either 0 (no differences found), or
;; This should use url-dav-get-properties with a depth of `1' to get
;; all the properties.
-(defun vc-dav-dir-state (url)
+(defun vc-dav-dir-state (_url)
"find the version control state of all files in DIR in a fast way."
)
-(defun vc-dav-responsible-p (url)
+(defun vc-dav-responsible-p (_url)
"Return non-nil if DAV considers itself `responsible' for URL."
;; Check for DAV support on the web server.
t)
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 46fbf448616..eb8cf8192c1 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -302,67 +302,67 @@ See `run-hooks'."
(defvar vc-dir-mode-map
(let ((map (make-sparse-keymap)))
;; VC commands
- (define-key map "v" 'vc-next-action) ;; C-x v v
- (define-key map "=" 'vc-diff) ;; C-x v =
- (define-key map "D" 'vc-root-diff) ;; C-x v D
- (define-key map "i" 'vc-register) ;; C-x v i
- (define-key map "+" 'vc-update) ;; C-x v +
+ (define-key map "v" #'vc-next-action) ;; C-x v v
+ (define-key map "=" #'vc-diff) ;; C-x v =
+ (define-key map "D" #'vc-root-diff) ;; C-x v D
+ (define-key map "i" #'vc-register) ;; C-x v i
+ (define-key map "+" #'vc-update) ;; C-x v +
;; I'd prefer some kind of symmetry with vc-update:
- (define-key map "P" 'vc-push) ;; C-x v P
- (define-key map "l" 'vc-print-log) ;; C-x v l
- (define-key map "L" 'vc-print-root-log) ;; C-x v L
- (define-key map "I" 'vc-log-incoming) ;; C-x v I
- (define-key map "O" 'vc-log-outgoing) ;; C-x v O
+ (define-key map "P" #'vc-push) ;; C-x v P
+ (define-key map "l" #'vc-print-log) ;; C-x v l
+ (define-key map "L" #'vc-print-root-log) ;; C-x v L
+ (define-key map "I" #'vc-log-incoming) ;; C-x v I
+ (define-key map "O" #'vc-log-outgoing) ;; C-x v O
;; More confusing than helpful, probably
- ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark.
- ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer
+ ;;(define-key map "R" #'vc-revert) ;; u is taken by vc-dir-unmark.
+ ;;(define-key map "A" #'vc-annotate) ;; g is taken by revert-buffer
;; bound by `special-mode'.
;; Marking.
- (define-key map "m" 'vc-dir-mark)
- (define-key map "d" 'vc-dir-clean-files)
- (define-key map "M" 'vc-dir-mark-all-files)
- (define-key map "u" 'vc-dir-unmark)
- (define-key map "U" 'vc-dir-unmark-all-files)
- (define-key map "\C-?" 'vc-dir-unmark-file-up)
- (define-key map "\M-\C-?" 'vc-dir-unmark-all-files)
+ (define-key map "m" #'vc-dir-mark)
+ (define-key map "d" #'vc-dir-clean-files)
+ (define-key map "M" #'vc-dir-mark-all-files)
+ (define-key map "u" #'vc-dir-unmark)
+ (define-key map "U" #'vc-dir-unmark-all-files)
+ (define-key map "\C-?" #'vc-dir-unmark-file-up)
+ (define-key map "\M-\C-?" #'vc-dir-unmark-all-files)
;; Movement.
- (define-key map "n" 'vc-dir-next-line)
- (define-key map " " 'vc-dir-next-line)
- (define-key map "\t" 'vc-dir-next-directory)
- (define-key map "p" 'vc-dir-previous-line)
- (define-key map [?\S-\ ] 'vc-dir-previous-line)
- (define-key map [backtab] 'vc-dir-previous-directory)
+ (define-key map "n" #'vc-dir-next-line)
+ (define-key map " " #'vc-dir-next-line)
+ (define-key map "\t" #'vc-dir-next-directory)
+ (define-key map "p" #'vc-dir-previous-line)
+ (define-key map [?\S-\ ] #'vc-dir-previous-line)
+ (define-key map [backtab] #'vc-dir-previous-directory)
;;; Rebind paragraph-movement commands.
- (define-key map "\M-}" 'vc-dir-next-directory)
- (define-key map "\M-{" 'vc-dir-previous-directory)
- (define-key map [C-down] 'vc-dir-next-directory)
- (define-key map [C-up] 'vc-dir-previous-directory)
+ (define-key map "\M-}" #'vc-dir-next-directory)
+ (define-key map "\M-{" #'vc-dir-previous-directory)
+ (define-key map [C-down] #'vc-dir-next-directory)
+ (define-key map [C-up] #'vc-dir-previous-directory)
;; The remainder.
- (define-key map "f" 'vc-dir-find-file)
- (define-key map "e" 'vc-dir-find-file) ; dired-mode compatibility
- (define-key map "\C-m" 'vc-dir-find-file)
- (define-key map "o" 'vc-dir-find-file-other-window)
- (define-key map "\C-o" 'vc-dir-display-file)
- (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process)
- (define-key map [down-mouse-3] 'vc-dir-menu)
+ (define-key map "f" #'vc-dir-find-file)
+ (define-key map "e" #'vc-dir-find-file) ; dired-mode compatibility
+ (define-key map "\C-m" #'vc-dir-find-file)
+ (define-key map "o" #'vc-dir-find-file-other-window)
+ (define-key map "\C-o" #'vc-dir-display-file)
+ (define-key map "\C-c\C-c" #'vc-dir-kill-dir-status-process)
+ (define-key map [down-mouse-3] #'vc-dir-menu)
(define-key map [follow-link] 'mouse-face)
- (define-key map "x" 'vc-dir-hide-up-to-date)
- (define-key map [?\C-k] 'vc-dir-kill-line)
- (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired?
- (define-key map "Q" 'vc-dir-query-replace-regexp)
- (define-key map (kbd "M-s a C-s") 'vc-dir-isearch)
- (define-key map (kbd "M-s a M-C-s") 'vc-dir-isearch-regexp)
- (define-key map "G" 'vc-dir-ignore)
+ (define-key map "x" #'vc-dir-hide-up-to-date)
+ (define-key map [?\C-k] #'vc-dir-kill-line)
+ (define-key map "S" #'vc-dir-search) ;; FIXME: Maybe use A like dired?
+ (define-key map "Q" #'vc-dir-query-replace-regexp)
+ (define-key map (kbd "M-s a C-s") #'vc-dir-isearch)
+ (define-key map (kbd "M-s a M-C-s") #'vc-dir-isearch-regexp)
+ (define-key map "G" #'vc-dir-ignore)
(let ((branch-map (make-sparse-keymap)))
(define-key map "B" branch-map)
- (define-key branch-map "c" 'vc-create-tag)
- (define-key branch-map "l" 'vc-print-branch-log)
- (define-key branch-map "s" 'vc-retrieve-tag))
+ (define-key branch-map "c" #'vc-create-tag)
+ (define-key branch-map "l" #'vc-print-branch-log)
+ (define-key branch-map "s" #'vc-retrieve-tag))
(let ((mark-map (make-sparse-keymap)))
(define-key map "*" mark-map)
- (define-key mark-map "r" 'vc-dir-mark-registered-files))
+ (define-key mark-map "r" #'vc-dir-mark-registered-files))
;; Hook up the menu.
(define-key map [menu-bar vc-dir-mode]
@@ -506,7 +506,7 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
(t
(unless noinsert
(ewoc-enter-before vc-ewoc node
- (apply 'vc-dir-create-fileinfo entry)))
+ (apply #'vc-dir-create-fileinfo entry)))
(setq entries (cdr entries))
(setq entry (car entries))))))
(t
@@ -522,7 +522,7 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
vc-ewoc node (vc-dir-create-fileinfo rd nil nil nil entrydir))))
;; Now insert the node itself.
(ewoc-enter-before vc-ewoc node
- (apply 'vc-dir-create-fileinfo entry)))
+ (apply #'vc-dir-create-fileinfo entry)))
(setq entries (cdr entries) entry (car entries))))))
;; We're past the last node, all remaining entries go to the end.
(unless (or node noinsert)
@@ -538,10 +538,10 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
vc-ewoc (vc-dir-create-fileinfo rd nil nil nil entrydir))))
;; Now insert the node itself.
(ewoc-enter-last vc-ewoc
- (apply 'vc-dir-create-fileinfo entry))))))
+ (apply #'vc-dir-create-fileinfo entry))))))
(when to-remove
(let ((inhibit-read-only t))
- (apply 'ewoc-delete vc-ewoc (nreverse to-remove)))))))
+ (apply #'ewoc-delete vc-ewoc (nreverse to-remove)))))))
(defun vc-dir-busy ()
(and (buffer-live-p vc-dir-process-buffer)
@@ -882,7 +882,7 @@ system; see `vc-dir-delete-file'."
The files will also be marked as deleted in the version control
system."
(interactive)
- (mapc 'vc-delete-file (or (vc-dir-marked-files)
+ (mapc #'vc-delete-file (or (vc-dir-marked-files)
(list (vc-dir-current-file)))))
(defun vc-dir-find-file ()
@@ -912,13 +912,13 @@ system."
"Search for a string through all marked buffers using Isearch."
(interactive)
(multi-isearch-files
- (mapcar 'car (vc-dir-marked-only-files-and-states))))
+ (mapcar #'car (vc-dir-marked-only-files-and-states))))
(defun vc-dir-isearch-regexp ()
"Search for a regexp through all marked buffers using Isearch."
(interactive)
(multi-isearch-files-regexp
- (mapcar 'car (vc-dir-marked-only-files-and-states))))
+ (mapcar #'car (vc-dir-marked-only-files-and-states))))
(defun vc-dir-search (regexp)
"Search through all marked files for a match for REGEXP.
@@ -943,13 +943,13 @@ with the command \\[tags-loop-continue]."
(query-replace-read-args
"Query replace regexp in marked files" t t)))
(list (nth 0 common) (nth 1 common) (nth 2 common))))
- (dolist (file (mapcar 'car (vc-dir-marked-only-files-and-states)))
+ (dolist (file (mapcar #'car (vc-dir-marked-only-files-and-states)))
(let ((buffer (get-file-buffer file)))
(if (and buffer (with-current-buffer buffer
buffer-read-only))
(error "File `%s' is visited read-only" file))))
(fileloop-initialize-replace
- from to (mapcar 'car (vc-dir-marked-only-files-and-states))
+ from to (mapcar #'car (vc-dir-marked-only-files-and-states))
(if (equal from (downcase from)) nil 'default)
delimited)
(fileloop-continue))
@@ -1161,7 +1161,7 @@ the *vc-dir* buffer.
(add-to-list 'vc-dir-buffers (current-buffer))
;; Make sure that if the directory buffer is killed, the update
;; process running in the background is also killed.
- (add-hook 'kill-buffer-query-functions 'vc-dir-kill-query nil t)
+ (add-hook 'kill-buffer-query-functions #'vc-dir-kill-query nil t)
(hack-dir-local-variables-non-file-buffer)
(vc-dir-refresh)))
@@ -1276,7 +1276,7 @@ Throw an error if another update process is in progress."
vc-ewoc 'vc-dir-fileinfo->needs-update)))
(if remaining
(vc-dir-refresh-files
- (mapcar 'vc-dir-fileinfo->name remaining))
+ (mapcar #'vc-dir-fileinfo->name remaining))
(setq mode-line-process nil)
(run-hooks 'vc-dir-refresh-hook))))))))))))
@@ -1330,7 +1330,7 @@ state of item at point, if any."
(ewoc-delete vc-ewoc crt))
(setq crt prev)))))
-(defalias 'vc-dir-hide-up-to-date 'vc-dir-hide-state)
+(defalias 'vc-dir-hide-up-to-date #'vc-dir-hide-state)
(defun vc-dir-kill-line ()
"Remove the current line from display."
@@ -1366,7 +1366,7 @@ state of item at point, if any."
(unless (vc-compatible-state (cdr crt) state)
(error "When applying VC operations to multiple files, the files are required\nto be in similar VC states.\n%s in state %s clashes with %s in state %s"
(car crt) (cdr crt) (caar only-files-list) state)))
- (setq only-files-list (mapcar 'car only-files-list))
+ (setq only-files-list (mapcar #'car only-files-list))
(when (and state (not (eq state 'unregistered)))
(setq model (vc-checkout-model vc-dir-backend only-files-list))))
(list vc-dir-backend files only-files-list state model)))
@@ -1437,13 +1437,13 @@ These are the commands available for use in the file status buffer:
(defvar vc-dir-status-mouse-map
(let ((map (make-sparse-keymap)))
- (define-key map [mouse-2] 'vc-dir-toggle-mark)
+ (define-key map [mouse-2] #'vc-dir-toggle-mark)
map)
"Local keymap for toggling mark.")
(defvar vc-dir-filename-mouse-map
(let ((map (make-sparse-keymap)))
- (define-key map [mouse-2] 'vc-dir-find-file-other-window)
+ (define-key map [mouse-2] #'vc-dir-find-file-other-window)
map)
"Local keymap for visiting a file.")
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 2573964c42c..2b477dff0a3 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -242,7 +242,7 @@ CODE should be a function of no arguments."
((or (null proc) (eq (process-status proc) 'exit))
;; Make sure we've read the process's output before going further.
(when proc (accept-process-output proc))
- (if (functionp code) (funcall code) (eval code)))
+ (if (functionp code) (funcall code) (eval code t)))
;; If a process is running, add CODE to the sentinel
((eq (process-status proc) 'run)
(vc-set-mode-line-busy-indicator)
@@ -267,7 +267,7 @@ and is passed 3 arguments: the COMMAND, the FILES and the FLAGS.")
(defun vc-delistify (filelist)
"Smash a FILELIST into a file list string suitable for info messages."
;; FIXME what about file names with spaces?
- (if (not filelist) "." (mapconcat 'identity filelist " ")))
+ (if (not filelist) "." (mapconcat #'identity filelist " ")))
(defcustom vc-tor nil
"If non-nil, communicate with the repository site via Tor.
@@ -331,7 +331,7 @@ case, and the process object in the asynchronous case."
;; Run asynchronously.
(let ((proc
(let ((process-connection-type nil))
- (apply 'start-file-process command (current-buffer)
+ (apply #'start-file-process command (current-buffer)
command squeezed))))
(when vc-command-messages
(let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
@@ -339,7 +339,7 @@ case, and the process object in the asynchronous case."
;; Get rid of the default message insertion, in case we don't
;; set a sentinel explicitly.
(set-process-sentinel proc #'ignore)
- (set-process-filter proc 'vc-process-filter)
+ (set-process-filter proc #'vc-process-filter)
(setq status proc)
(when vc-command-messages
(vc-run-delayed
@@ -351,7 +351,7 @@ case, and the process object in the asynchronous case."
(let ((inhibit-message (eq (selected-window) (active-minibuffer-window))))
(message "Running in foreground: %s" full-command)))
(let ((buffer-undo-list t))
- (setq status (apply 'process-file command nil t nil squeezed)))
+ (setq status (apply #'process-file command nil t nil squeezed)))
(when (and (not (eq t okstatus))
(or (not (integerp status))
(and okstatus (< okstatus status))))
@@ -394,7 +394,7 @@ Display the buffer in some window, but don't select it."
(insert "\"...\n")
;; Run in the original working directory.
(let ((default-directory dir))
- (apply 'vc-do-command t 'async command nil args)))
+ (apply #'vc-do-command t 'async command nil args)))
(setq window (display-buffer buffer))
(if window
(set-window-start window new-window-start))
diff --git a/lisp/vc/vc-filewise.el b/lisp/vc/vc-filewise.el
index ee73aa6f938..e1b042a7424 100644
--- a/lisp/vc/vc-filewise.el
+++ b/lisp/vc/vc-filewise.el
@@ -1,4 +1,4 @@
-;;; vc-filewise.el --- common functions for file-oriented back ends.
+;;; vc-filewise.el --- common functions for file-oriented back ends. -*- lexical-binding: t; -*-
;; Copyright (C) 1992-1996, 1998-2021 Free Software Foundation, Inc.
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 25ae26d746a..465ed8735c2 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -106,6 +106,7 @@
;;; Code:
(require 'cl-lib)
+(require 'vc-dispatcher)
(eval-when-compile
(require 'subr-x) ; for string-trim-right
(require 'vc)
@@ -658,29 +659,29 @@ or an empty string if none."
(defvar vc-git-stash-shared-map
(let ((map (make-sparse-keymap)))
- (define-key map "S" 'vc-git-stash-snapshot)
- (define-key map "C" 'vc-git-stash)
+ (define-key map "S" #'vc-git-stash-snapshot)
+ (define-key map "C" #'vc-git-stash)
map))
(defvar vc-git-stash-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map vc-git-stash-shared-map)
;; Turn off vc-dir marking
- (define-key map [mouse-2] 'ignore)
-
- (define-key map [down-mouse-3] 'vc-git-stash-menu)
- (define-key map "\C-k" 'vc-git-stash-delete-at-point)
- (define-key map "=" 'vc-git-stash-show-at-point)
- (define-key map "\C-m" 'vc-git-stash-show-at-point)
- (define-key map "A" 'vc-git-stash-apply-at-point)
- (define-key map "P" 'vc-git-stash-pop-at-point)
+ (define-key map [mouse-2] #'ignore)
+
+ (define-key map [down-mouse-3] #'vc-git-stash-menu)
+ (define-key map "\C-k" #'vc-git-stash-delete-at-point)
+ (define-key map "=" #'vc-git-stash-show-at-point)
+ (define-key map "\C-m" #'vc-git-stash-show-at-point)
+ (define-key map "A" #'vc-git-stash-apply-at-point)
+ (define-key map "P" #'vc-git-stash-pop-at-point)
map))
(defvar vc-git-stash-button-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map vc-git-stash-shared-map)
- (define-key map [mouse-2] 'push-button)
- (define-key map "\C-m" 'push-button)
+ (define-key map [mouse-2] #'push-button)
+ (define-key map "\C-m" #'push-button)
map))
(defconst vc-git-stash-shared-help
@@ -871,7 +872,7 @@ The car of the list is the current branch."
(when dlist
(vc-git-command nil 0 dlist "add"))))
-(defalias 'vc-git-responsible-p 'vc-git-root)
+(defalias 'vc-git-responsible-p #'vc-git-root)
(defun vc-git-unregister (file)
(vc-git-command nil 0 file "rm" "-f" "--cached" "--"))
@@ -905,9 +906,9 @@ If toggling on, also insert its message into the buffer."
(defvar vc-git-log-edit-mode-map
(let ((map (make-sparse-keymap "Git-Log-Edit")))
- (define-key map "\C-c\C-s" 'vc-git-log-edit-toggle-signoff)
- (define-key map "\C-c\C-n" 'vc-git-log-edit-toggle-no-verify)
- (define-key map "\C-c\C-e" 'vc-git-log-edit-toggle-amend)
+ (define-key map "\C-c\C-s" #'vc-git-log-edit-toggle-signoff)
+ (define-key map "\C-c\C-n" #'vc-git-log-edit-toggle-no-verify)
+ (define-key map "\C-c\C-e" #'vc-git-log-edit-toggle-amend)
map))
(define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git"
@@ -941,7 +942,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
(lambda (value) (when (equal value "yes") (list argument)))))
;; When operating on the whole tree, better pass "-a" than ".", since "."
;; fails when we're committing a merge.
- (apply 'vc-git-command nil 0 (if only files)
+ (apply #'vc-git-command nil 0 (if only files)
(nconc (if msg-file (list "commit" "-F"
(file-local-name msg-file))
(list "commit" "-m"))
@@ -1024,13 +1025,13 @@ If PROMPT is non-nil, prompt for the Git command to run."
args (cddr args)))
(setq args (nconc args extra-args))
(require 'vc-dispatcher)
- (apply 'vc-do-async-command buffer root git-program command args)
+ (apply #'vc-do-async-command buffer root git-program command args)
(with-current-buffer buffer
(vc-run-delayed
(vc-compilation-mode 'git)
(setq-local compile-command
(concat git-program " " command " "
- (mapconcat 'identity args " ")))
+ (mapconcat #'identity args " ")))
(setq-local compilation-directory root)
;; Either set `compilation-buffer-name-function' locally to nil
;; or use `compilation-arguments' to set `name-function'.
@@ -1068,7 +1069,7 @@ This prompts for a branch to merge from."
branches
(cons "FETCH_HEAD" branches))
nil t)))
- (apply 'vc-do-async-command buffer root vc-git-program "merge"
+ (apply #'vc-do-async-command buffer root vc-git-program "merge"
(list merge-source))
(with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
(vc-set-async-update buffer)))
@@ -1115,7 +1116,7 @@ This prompts for a branch to merge from."
(vc-git-command nil 0 nil "reset"))
(vc-resynch-buffer buffer-file-name t t)
;; Remove the hook so that it is not called multiple times.
- (remove-hook 'after-save-hook 'vc-git-resolve-when-done t))))
+ (remove-hook 'after-save-hook #'vc-git-resolve-when-done t))))
(defun vc-git-find-file-hook ()
"Activate `smerge-mode' if there is a conflict."
@@ -1126,7 +1127,7 @@ This prompts for a branch to merge from."
(re-search-forward "^<<<<<<< " nil 'noerror)))
(smerge-start-session)
(when vc-git-resolve-conflicts
- (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local))
+ (add-hook 'after-save-hook #'vc-git-resolve-when-done nil 'local))
(vc-message-unresolved-conflicts buffer-file-name)))
;;; HISTORY FUNCTIONS
@@ -1154,7 +1155,7 @@ If LIMIT is a revision string, use it as an end-revision."
;; read-only.
(let ((inhibit-read-only t))
(with-current-buffer buffer
- (apply 'vc-git-command buffer
+ (apply #'vc-git-command buffer
'async files
(append
'("log" "--no-color")
@@ -1224,11 +1225,11 @@ log entries."
(read-shell-command
"Search log with command: "
(format "%s %s" vc-git-program
- (mapconcat 'identity args " "))
+ (mapconcat #'identity args " "))
'vc-git-history)
" " t))))
(vc-setup-buffer buffer)
- (apply 'vc-git-command buffer 'async nil args)))
+ (apply #'vc-git-command buffer 'async nil args)))
(defun vc-git-mergebase (rev1 &optional rev2)
(unless rev2 (setq rev2 "HEAD"))
@@ -1299,7 +1300,7 @@ or BRANCH^ (where \"^\" can be repeated)."
(defun vc-git-expanded-log-entry (revision)
(with-temp-buffer
- (apply 'vc-git-command t nil nil (list "log" revision "-1" "--"))
+ (apply #'vc-git-command t nil nil (list "log" revision "-1" "--"))
(goto-char (point-min))
(unless (eobp)
;; Indent the expanded log entry.
@@ -1415,7 +1416,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
(vc-git-command (or buffer "*vc-diff*") 1 files
"difftool" "--exit-code" "--no-prompt" "-x"
(concat "diff "
- (mapconcat 'identity
+ (mapconcat #'identity
(vc-switches nil 'diff) " "))
rev1 rev2 "--"))))
@@ -1776,7 +1777,7 @@ The difference to vc-do-command is that this function always invokes
,@(when revert-buffer-in-progress-p
'("GIT_OPTIONAL_LOCKS=0")))
process-environment)))
- (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program
+ (apply #'vc-do-command (or buffer "*vc*") okstatus vc-git-program
;; https://debbugs.gnu.org/16897
(unless (and (not (cdr-safe file-or-list))
(let ((file (or (car-safe file-or-list)
@@ -1810,10 +1811,10 @@ The difference to vc-do-command is that this function always invokes
,@(when revert-buffer-in-progress-p
'("GIT_OPTIONAL_LOCKS=0")))
process-environment)))
- (apply 'process-file vc-git-program nil buffer nil "--no-pager" command args)))
+ (apply #'process-file vc-git-program nil buffer nil "--no-pager" command args)))
(defun vc-git--out-ok (command &rest args)
- (zerop (apply 'vc-git--call '(t nil) command args)))
+ (zerop (apply #'vc-git--call '(t nil) command args)))
(defun vc-git--run-command-string (file &rest args)
"Run a git command on FILE and return its output as string.
@@ -1821,7 +1822,7 @@ FILE can be nil."
(let* ((ok t)
(str (with-output-to-string
(with-current-buffer standard-output
- (unless (apply 'vc-git--out-ok
+ (unless (apply #'vc-git--out-ok
(if file
(append args (list (file-relative-name
file)))
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index adb0fce8759..9faed10f383 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -124,8 +124,7 @@
:type '(choice (const :tag "None" nil)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "22.2"
- :group 'vc-hg)
+ :version "22.2")
(defcustom vc-hg-diff-switches t ; Hg doesn't support common args like -u
"String or list of strings specifying switches for Hg diff under VC.
@@ -134,8 +133,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "23.1"
- :group 'vc-hg)
+ :version "23.1")
(defcustom vc-hg-annotate-switches '("-u" "--follow")
"String or list of strings specifying switches for hg annotate under VC.
@@ -145,8 +143,7 @@ switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "25.1"
- :group 'vc-hg)
+ :version "25.1")
(defcustom vc-hg-revert-switches nil
"String or list of strings specifying switches for hg revert
@@ -154,13 +151,11 @@ under VC."
:type '(choice (const :tag "None" nil)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "27.1"
- :group 'vc-hg)
+ :version "27.1")
(defcustom vc-hg-program "hg"
"Name of the Mercurial executable (excluding any arguments)."
- :type 'string
- :group 'vc-hg)
+ :type 'string)
(defcustom vc-hg-root-log-format
`(,(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
@@ -183,7 +178,6 @@ REGEXP is a regular expression matching the resulting Mercurial
output, and KEYWORDS is a list of `font-lock-keywords' for
highlighting the Log View buffer."
:type '(list string regexp (repeat sexp))
- :group 'vc-hg
:version "24.5")
(defcustom vc-hg-create-bookmark t
@@ -311,8 +305,7 @@ If no list entry produces a useful revision, return `nil'."
(const :tag "Active bookmark" builtin-active-bookmark)
(string :tag "Hg template")
(function :tag "Custom")))
- :version "26.1"
- :group 'vc-hg)
+ :version "26.1")
(defcustom vc-hg-use-file-version-for-mode-line-version nil
"When enabled, the modeline contains revision information for the visited file.
@@ -320,8 +313,7 @@ When not, the revision in the modeline is for the repository
working copy. `nil' is the much faster setting for
large repositories."
:type 'boolean
- :version "26.1"
- :group 'vc-hg)
+ :version "26.1")
(defun vc-hg--active-bookmark-internal (rev)
(when (equal rev ".")
@@ -413,8 +405,7 @@ specific file to query."
"String or list of strings specifying switches for hg log under VC."
:type '(choice (const :tag "None" nil)
(string :tag "Argument String")
- (repeat :tag "Argument List" :value ("") string))
- :group 'vc-hg)
+ (repeat :tag "Argument List" :value ("") string)))
(autoload 'vc-setup-buffer "vc-dispatcher")
@@ -442,7 +433,7 @@ If LIMIT is non-nil, show no more than this many entries."
(let ((inhibit-read-only t))
(with-current-buffer
buffer
- (apply 'vc-hg-command buffer 'async files "log"
+ (apply #'vc-hg-command buffer 'async files "log"
(nconc
(when start-revision (list (format "-r%s:0" start-revision)))
(when limit (list "-l" (format "%s" limit)))
@@ -666,8 +657,7 @@ directly instead of always running Mercurial. We try to be safe
against Mercurial data structure format changes and always fall
back to running Mercurial directly."
:type 'boolean
- :version "26.1"
- :group 'vc-hg)
+ :version "26.1")
(defsubst vc-hg--read-u8 ()
"Read and advance over an unsigned byte.
@@ -1177,7 +1167,7 @@ hg binary."
"Create a new Mercurial repository."
(vc-hg-command nil 0 nil "init"))
-(defalias 'vc-hg-responsible-p 'vc-hg-root)
+(defalias 'vc-hg-responsible-p #'vc-hg-root)
(defun vc-hg-unregister (file)
"Unregister FILE from hg."
@@ -1200,7 +1190,7 @@ If toggling on, also insert its message into the buffer."
(defvar vc-hg-log-edit-mode-map
(let ((map (make-sparse-keymap "Hg-Log-Edit")))
- (define-key map "\C-c\C-e" 'vc-hg-log-edit-toggle-amend)
+ (define-key map "\C-c\C-e" #'vc-hg-log-edit-toggle-amend)
map))
(define-derived-mode vc-hg-log-edit-mode log-edit-mode "Log-Edit/hg"
@@ -1214,7 +1204,7 @@ REV is ignored."
(lambda (value)
(when (equal value "yes")
(list "--amend")))))
- (apply 'vc-hg-command nil 0 files
+ (apply #'vc-hg-command nil 0 files
(nconc (list "commit" "-m")
(log-edit-extract-headers `(("Author" . "--user")
("Date" . "--date")
@@ -1252,7 +1242,7 @@ REV is the revision to check out into WORKFILE."
(unless (re-search-forward "^<<<<<<< " nil t)
(vc-hg-command nil 0 buffer-file-name "resolve" "-m")
;; Remove the hook so that it is not called multiple times.
- (remove-hook 'after-save-hook 'vc-hg-resolve-when-done t))))
+ (remove-hook 'after-save-hook #'vc-hg-resolve-when-done t))))
(defun vc-hg-find-file-hook ()
(when (and buffer-file-name
@@ -1268,7 +1258,7 @@ REV is the revision to check out into WORKFILE."
;; Hg may not recognize "conflict" as a state, but we can do better.
(vc-file-setprop buffer-file-name 'vc-state 'conflict)
(smerge-start-session)
- (add-hook 'after-save-hook 'vc-hg-resolve-when-done nil t)
+ (add-hook 'after-save-hook #'vc-hg-resolve-when-done nil t)
(vc-message-unresolved-conflicts buffer-file-name)))
@@ -1443,7 +1433,7 @@ commands, which only operated on marked files."
(apply #'vc-hg-command
nil 0 nil
command
- (apply 'nconc
+ (apply #'nconc
(mapcar (lambda (arg) (list "-r" arg)) marked-list)))
(let* ((root (vc-hg-root default-directory))
(buffer (format "*vc-hg : %s*" (expand-file-name root)))
@@ -1463,18 +1453,18 @@ commands, which only operated on marked files."
(setq hg-program (car args)
command (cadr args)
args (cddr args)))
- (apply 'vc-do-async-command buffer root hg-program command args)
+ (apply #'vc-do-async-command buffer root hg-program command args)
(with-current-buffer buffer
(vc-run-delayed
(dolist (cmd post-processing)
- (apply 'vc-do-command buffer nil hg-program nil cmd))
+ (apply #'vc-do-command buffer nil hg-program nil cmd))
(vc-compilation-mode 'hg)
(setq-local compile-command
(concat hg-program " " command " "
- (mapconcat 'identity args " ")
+ (mapconcat #'identity args " ")
(mapconcat (lambda (args)
(concat " && " hg-program " "
- (mapconcat 'identity
+ (mapconcat #'identity
args " ")))
post-processing "")))
(setq-local compilation-directory root)
@@ -1525,7 +1515,7 @@ This runs the command \"hg merge\"."
;; Disable pager.
(process-environment (cons "HGPLAIN=1" process-environment))
(branch (vc-read-revision "Revision to merge: ")))
- (apply 'vc-do-async-command buffer root vc-hg-program
+ (apply #'vc-do-async-command buffer root vc-hg-program
(append '("--config" "ui.report_untrusted=0" "merge")
(unless (string= branch "") (list branch))))
(with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg)))
@@ -1540,7 +1530,8 @@ This function differs from vc-do-command in that it invokes
;; Disable pager.
(let ((process-environment (cons "HGPLAIN=1" process-environment))
(flags (append '("--config" "ui.report_untrusted=0") flags)))
- (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-or-list
+ (apply #'vc-do-command (or buffer "*vc*")
+ okstatus vc-hg-program file-or-list
(if (stringp vc-hg-global-switches)
(cons vc-hg-global-switches flags)
(append vc-hg-global-switches
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index f910f9d5496..4b3c829a2c6 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -50,50 +50,42 @@
(defface vc-up-to-date-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file is up to date."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
(defface vc-needs-update-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file needs update."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
(defface vc-locked-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file locked."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
(defface vc-locally-added-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file is locally added."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
(defface vc-conflict-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file contains merge conflicts."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
(defface vc-removed-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file was removed from the VC system."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
(defface vc-missing-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file is missing from the file system."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
(defface vc-edited-state
'((default :inherit vc-state-base))
"Face for VC modeline state when the file is edited."
- :version "25.1"
- :group 'vc-faces)
+ :version "25.1")
;; Customization Variables (the rest is in vc.el)
@@ -871,31 +863,31 @@ In the latter case, VC mode is deactivated for this buffer."
;; (autoload 'vc-prefix-map "vc" nil nil 'keymap)
(defvar vc-prefix-map
(let ((map (make-sparse-keymap)))
- (define-key map "a" 'vc-update-change-log)
- (define-key map "b" 'vc-switch-backend)
- (define-key map "d" 'vc-dir)
- (define-key map "g" 'vc-annotate)
- (define-key map "G" 'vc-ignore)
- (define-key map "h" 'vc-region-history)
- (define-key map "i" 'vc-register)
- (define-key map "l" 'vc-print-log)
- (define-key map "L" 'vc-print-root-log)
- (define-key map "I" 'vc-log-incoming)
- (define-key map "O" 'vc-log-outgoing)
- (define-key map "ML" 'vc-log-mergebase)
- (define-key map "MD" 'vc-diff-mergebase)
- (define-key map "m" 'vc-merge)
- (define-key map "r" 'vc-retrieve-tag)
- (define-key map "s" 'vc-create-tag)
- (define-key map "u" 'vc-revert)
- (define-key map "v" 'vc-next-action)
- (define-key map "+" 'vc-update)
+ (define-key map "a" #'vc-update-change-log)
+ (define-key map "b" #'vc-switch-backend)
+ (define-key map "d" #'vc-dir)
+ (define-key map "g" #'vc-annotate)
+ (define-key map "G" #'vc-ignore)
+ (define-key map "h" #'vc-region-history)
+ (define-key map "i" #'vc-register)
+ (define-key map "l" #'vc-print-log)
+ (define-key map "L" #'vc-print-root-log)
+ (define-key map "I" #'vc-log-incoming)
+ (define-key map "O" #'vc-log-outgoing)
+ (define-key map "ML" #'vc-log-mergebase)
+ (define-key map "MD" #'vc-diff-mergebase)
+ (define-key map "m" #'vc-merge)
+ (define-key map "r" #'vc-retrieve-tag)
+ (define-key map "s" #'vc-create-tag)
+ (define-key map "u" #'vc-revert)
+ (define-key map "v" #'vc-next-action)
+ (define-key map "+" #'vc-update)
;; I'd prefer some kind of symmetry with vc-update:
- (define-key map "P" 'vc-push)
- (define-key map "=" 'vc-diff)
- (define-key map "D" 'vc-root-diff)
- (define-key map "~" 'vc-revision-other-window)
- (define-key map "x" 'vc-delete-file)
+ (define-key map "P" #'vc-push)
+ (define-key map "=" #'vc-diff)
+ (define-key map "D" #'vc-root-diff)
+ (define-key map "~" #'vc-revision-other-window)
+ (define-key map "x" #'vc-delete-file)
map))
(fset 'vc-prefix-map vc-prefix-map)
(define-key ctl-x-map "v" 'vc-prefix-map)
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index 3b610a1e4fe..ea69893071a 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -46,8 +46,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "23.1"
- :group 'vc-mtn)
+ :version "23.1")
(defcustom vc-mtn-annotate-switches nil
"String or list of strings specifying switches for mtn annotate under VC.
@@ -57,13 +56,11 @@ switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "25.1"
- :group 'vc-mtn)
+ :version "25.1")
(defcustom vc-mtn-program "mtn"
"Name of the monotone executable."
- :type 'string
- :group 'vc-mtn)
+ :type 'string)
;; Clear up the cache to force vc-call to check again and discover
;; new functions when we reload this file.
@@ -115,7 +112,7 @@ switches."
(let ((process-environment
;; Avoid localization of messages so we can parse the output.
(cons "LC_MESSAGES=C" process-environment)))
- (apply 'vc-do-command (or buffer "*vc*") okstatus vc-mtn-program
+ (apply #'vc-do-command (or buffer "*vc*") okstatus vc-mtn-program
files flags)))
(defun vc-mtn-state (file)
@@ -176,8 +173,7 @@ switches."
'(("\\`[^:/#]*[:/#]" . "")) ;Drop the host part.
"Rewrite rules to shorten Mtn's revision names on the mode-line."
:type '(repeat (cons regexp string))
- :version "22.2"
- :group 'vc-mtn)
+ :version "22.2")
(defun vc-mtn-mode-line-string (file)
"Return a string for `vc-mode-line' to put in the mode line for FILE."
@@ -203,7 +199,7 @@ switches."
(declare-function log-edit-extract-headers "log-edit" (headers string))
(defun vc-mtn-checkin (files comment &optional _rev)
- (apply 'vc-mtn-command nil 0 files
+ (apply #'vc-mtn-command nil 0 files
(nconc (list "commit" "-m")
(log-edit-extract-headers '(("Author" . "--author")
("Date" . "--date"))
@@ -227,7 +223,7 @@ switches."
_SHORTLOG is ignored.
If START-REVISION is non-nil, it is the newest revision to show.
If LIMIT is non-nil, show no more than this many entries."
- (apply 'vc-mtn-command buffer 0 files "log"
+ (apply #'vc-mtn-command buffer 0 files "log"
(append
(when start-revision (list "--from" (format "%s" start-revision)))
(when limit (list "--last" (format "%s" limit))))))
@@ -258,7 +254,7 @@ If LIMIT is non-nil, show no more than this many entries."
(defun vc-mtn-diff (files &optional rev1 rev2 buffer _async)
"Get a difference report using monotone between two revisions of FILES."
- (apply 'vc-mtn-command (or buffer "*vc-diff*")
+ (apply #'vc-mtn-command (or buffer "*vc-diff*")
1 ; bug#21969
files "diff"
(append
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 8d64ee5cc57..6ffc1a8a2ff 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -58,8 +58,7 @@
If nil, VC itself computes this value when it is first needed."
:type '(choice (const :tag "Auto" nil)
(string :tag "Specified")
- (const :tag "Unknown" unknown))
- :group 'vc-rcs)
+ (const :tag "Unknown" unknown)))
(defcustom vc-rcs-register-switches nil
"Switches for registering a file in RCS.
@@ -70,8 +69,7 @@ If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "21.1"
- :group 'vc-rcs)
+ :version "21.1")
(defcustom vc-rcs-diff-switches nil
"String or list of strings specifying switches for RCS diff under VC.
@@ -80,21 +78,18 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "21.1"
- :group 'vc-rcs)
+ :version "21.1")
(defcustom vc-rcs-header '("$Id\ $")
"Header keywords to be inserted by `vc-insert-headers'."
:type '(repeat string)
- :version "24.1" ; no longer consult the obsolete vc-header-alist
- :group 'vc-rcs)
+ :version "24.1") ; no longer consult the obsolete vc-header-alist
(defcustom vc-rcsdiff-knows-brief nil
"Indicates whether rcsdiff understands the --brief option.
The value is either `yes', `no', or nil. If it is nil, VC tries
to use --brief and sets this variable to remember whether it worked."
- :type '(choice (const :tag "Work out" nil) (const yes) (const no))
- :group 'vc-rcs)
+ :type '(choice (const :tag "Work out" nil) (const yes) (const no)))
;; This needs to be autoloaded because vc-rcs-registered uses it (via
;; vc-default-registered), and vc-hooks needs to be able to check
@@ -109,8 +104,7 @@ For a description of possible values, see `vc-check-master-templates'."
(repeat :tag "User-specified"
(choice string
function)))
- :version "21.1"
- :group 'vc-rcs)
+ :version "21.1")
;;; Properties of the backend
@@ -379,7 +373,7 @@ whether to remove it."
"Retrieve a copy of a saved version of FILE. If FILE is a directory,
attempt the checkout for all registered files beneath it."
(if (file-directory-p file)
- (mapc 'vc-rcs-checkout (vc-expand-dirs (list file) 'RCS))
+ (mapc #'vc-rcs-checkout (vc-expand-dirs (list file) 'RCS))
(let ((file-buffer (get-file-buffer file))
switches)
(message "Checking out %s..." file)
@@ -445,7 +439,7 @@ attempt the checkout for all registered files beneath it."
"Revert FILE to the version it was based on. If FILE is a directory,
revert all registered files beneath it."
(if (file-directory-p file)
- (mapc 'vc-rcs-revert (vc-expand-dirs (list file) 'RCS))
+ (mapc #'vc-rcs-revert (vc-expand-dirs (list file) 'RCS))
(vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f"
(concat (if (eq (vc-state file) 'edited) "-u" "-r")
(vc-working-revision file)))))
@@ -488,7 +482,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
If FILE is a directory, steal the lock on all registered files beneath it.
Needs RCS 5.6.2 or later for -M."
(if (file-directory-p file)
- (mapc 'vc-rcs-steal-lock (vc-expand-dirs (list file) 'RCS))
+ (mapc #'vc-rcs-steal-lock (vc-expand-dirs (list file) 'RCS))
(vc-do-command "*vc*" 0 "rcs" (vc-master-name file) "-M" (concat "-u" rev))
;; Do a real checkout after stealing the lock, so that we see
;; expanded headers.
@@ -539,7 +533,7 @@ Remaining arguments are ignored.
If FILE is a directory the operation is applied to all registered
files beneath it."
(vc-do-command (or buffer "*vc*") 0 "rlog"
- (mapcar 'vc-master-name (vc-expand-dirs files 'RCS)))
+ (mapcar #'vc-master-name (vc-expand-dirs files 'RCS)))
(with-current-buffer (or buffer "*vc*")
(vc-rcs-print-log-cleanup))
(when limit 'limit-unsupported))
@@ -1344,7 +1338,7 @@ The `:insn' key is a keyword to distinguish it as a vc-rcs.el extension."
(push `(,(to-eol)
,(k-semi 'date
(lambda ()
- (let ((ls (mapcar 'string-to-number
+ (let ((ls (mapcar #'string-to-number
(split-string
(buffer-substring-no-properties
b e)
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index 3d3f4048052..92cce5f13a8 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -55,8 +55,7 @@ If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "21.1"
- :group 'vc-sccs)
+ :version "21.1")
(defcustom vc-sccs-diff-switches nil
"String or list of strings specifying switches for SCCS diff under VC.
@@ -65,14 +64,12 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "21.1"
- :group 'vc-sccs)
+ :version "21.1")
(defcustom vc-sccs-header '("%W%")
"Header keywords to be inserted by `vc-insert-headers'."
:type '(repeat string)
- :version "24.1" ; no longer consult the obsolete vc-header-alist
- :group 'vc-sccs)
+ :version "24.1") ; no longer consult the obsolete vc-header-alist
;; This needs to be autoloaded because vc-sccs-registered uses it (via
;; vc-default-registered), and vc-hooks needs to be able to check
@@ -87,8 +84,7 @@ For a description of possible values, see `vc-check-master-templates'."
(repeat :tag "User-specified"
(choice string
function)))
- :version "21.1"
- :group 'vc-sccs)
+ :version "21.1")
;;;
@@ -163,7 +159,7 @@ For a description of possible values, see `vc-check-master-templates'."
"Write the SCCS version of input file FILE to output file OUTFILE.
Optional string REV is a revision."
(with-temp-buffer
- (apply 'vc-sccs-do-command t 0 "get" (vc-master-name file)
+ (apply #'vc-sccs-do-command t 0 "get" (vc-master-name file)
(append '("-s" "-p" "-k") ; -k: no keyword expansion
(if rev (list (concat "-r" rev)))))
(write-region nil nil outfile nil 'silent)))
@@ -185,7 +181,7 @@ Optional string REV is a revision."
(defun vc-sccs-do-command (buffer okstatus command file-or-list &rest flags)
;; (let ((load-path (append vc-sccs-path load-path)))
;; (apply 'vc-do-command buffer okstatus command file-or-list flags))
- (apply 'vc-do-command (or buffer "*vc*") okstatus "sccs" file-or-list command flags))
+ (apply #'vc-do-command (or buffer "*vc*") okstatus "sccs" file-or-list command flags))
(defun vc-sccs-create-repo ()
"Create a new SCCS repository."
@@ -207,7 +203,7 @@ to the SCCS command."
(let ((vc-master-name
(or project-file
(format (car vc-sccs-master-templates) dirname basename))))
- (apply 'vc-sccs-do-command nil 0 "admin" vc-master-name
+ (apply #'vc-sccs-do-command nil 0 "admin" vc-master-name
"-fb"
(concat "-i" (file-relative-name file))
(and comment (concat "-y" comment))
@@ -225,14 +221,14 @@ to the SCCS command."
(defun vc-sccs-checkin (files comment &optional rev)
"SCCS-specific version of `vc-backend-checkin'."
(dolist (file (vc-expand-dirs files 'SCCS))
- (apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file)
+ (apply #'vc-sccs-do-command nil 0 "delta" (vc-master-name file)
(if rev (concat "-r" rev))
(concat "-y" comment)
(vc-switches 'SCCS 'checkin))
(vc-sccs-do-command nil 0 "get" (vc-master-name file))))
(defun vc-sccs-find-revision (file rev buffer)
- (apply 'vc-sccs-do-command
+ (apply #'vc-sccs-do-command
buffer 0 "get" (vc-master-name file)
"-s" ;; suppress diagnostic output
"-p"
@@ -247,7 +243,7 @@ If FILE is a directory, all version-controlled files beneath are checked out.
EDITABLE non-nil means that the file should be writable and
locked. REV is the revision to check out."
(if (file-directory-p file)
- (mapc 'vc-sccs-checkout (vc-expand-dirs (list file) 'SCCS))
+ (mapc #'vc-sccs-checkout (vc-expand-dirs (list file) 'SCCS))
(let ((file-buffer (get-file-buffer file))
switches)
(message "Checking out %s..." file)
@@ -267,7 +263,7 @@ locked. REV is the revision to check out."
(and rev (or (string= rev "")
(not (stringp rev)))
(setq rev nil))
- (apply 'vc-sccs-do-command nil 0 "get" (vc-master-name file)
+ (apply #'vc-sccs-do-command nil 0 "get" (vc-master-name file)
"-e"
(and rev (concat "-r" (vc-sccs-lookup-triple file rev)))
switches))))
@@ -277,7 +273,7 @@ locked. REV is the revision to check out."
"Revert FILE to the version it was based on. If FILE is a directory,
revert all subfiles."
(if (file-directory-p file)
- (mapc 'vc-sccs-revert (vc-expand-dirs (list file) 'SCCS))
+ (mapc #'vc-sccs-revert (vc-expand-dirs (list file) 'SCCS))
(vc-sccs-do-command nil 0 "unget" (vc-master-name file))
(vc-sccs-do-command nil 0 "get" (vc-master-name file))
;; Checking out explicit revisions is not supported under SCCS, yet.
@@ -288,7 +284,7 @@ revert all subfiles."
(defun vc-sccs-steal-lock (file &optional rev)
"Steal the lock on the current workfile for FILE and revision REV."
(if (file-directory-p file)
- (mapc 'vc-sccs-steal-lock (vc-expand-dirs (list file) 'SCCS))
+ (mapc #'vc-sccs-steal-lock (vc-expand-dirs (list file) 'SCCS))
(vc-sccs-do-command nil 0 "unget"
(vc-master-name file) "-n" (if rev (concat "-r" rev)))
(vc-sccs-do-command nil 0 "get"
@@ -309,7 +305,7 @@ revert all subfiles."
"Print commit log associated with FILES into specified BUFFER.
Remaining arguments are ignored."
(setq files (vc-expand-dirs files 'SCCS))
- (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-master-name files))
+ (vc-sccs-do-command buffer 0 "prs" (mapcar #'vc-master-name files))
(when limit 'limit-unsupported))
(autoload 'vc-setup-buffer "vc-dispatcher")
@@ -338,7 +334,7 @@ Remaining arguments are ignored."
(fake-command
(format "diff%s %s"
(if fake-flags
- (concat " " (mapconcat 'identity fake-flags " "))
+ (concat " " (mapconcat #'identity fake-flags " "))
"")
(vc-delistify files)))
(status 0)
@@ -362,7 +358,7 @@ Remaining arguments are ignored."
(cons "LC_MESSAGES=C" process-environment))
(w32-quote-process-args t)
(this-status
- (apply 'process-file "diff" nil t nil
+ (apply #'process-file "diff" nil t nil
(append (vc-switches 'SCCS 'diff)
(list (file-local-name oldfile)
(or newfile
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 201d69d79a1..faba5bce2b7 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -97,13 +97,11 @@
If nil, VC itself computes this value when it is first needed."
:type '(choice (const :tag "Auto" nil)
(string :tag "Specified")
- (const :tag "Unknown" unknown))
- :group 'vc-src)
+ (const :tag "Unknown" unknown)))
(defcustom vc-src-program "src"
"Name of the SRC executable (excluding any arguments)."
- :type 'string
- :group 'vc-src)
+ :type 'string)
(defcustom vc-src-diff-switches nil
"String or list of strings specifying switches for SRC diff under VC.
@@ -111,8 +109,7 @@ If nil, use the value of `vc-diff-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))
- :group 'vc-src)
+ (repeat :tag "Argument List" :value ("") string)))
;; This needs to be autoloaded because vc-src-registered uses it (via
;; vc-default-registered), and vc-hooks needs to be able to check
@@ -126,8 +123,7 @@ For a description of possible values, see `vc-check-master-templates'."
'("%s.src/%s,v"))
(repeat :tag "User-specified"
(choice string
- function)))
- :group 'vc-src)
+ function))))
;;; Properties of the backend
@@ -221,7 +217,7 @@ This function differs from vc-do-command in that it invokes `vc-src-program'."
(setq file-list (list "--" file-or-list)))
(file-or-list
(setq file-list (cons "--" file-or-list))))
- (apply 'vc-do-command (or buffer "*vc*") 0 vc-src-program file-list flags)))
+ (apply #'vc-do-command (or buffer "*vc*") 0 vc-src-program file-list flags)))
(defun vc-src-working-revision (file)
"SRC-specific version of `vc-working-revision'."
@@ -275,7 +271,7 @@ REV is the revision to check out into WORKFILE."
"Revert FILE to the version it was based on. If FILE is a directory,
revert all registered files beneath it."
(if (file-directory-p file)
- (mapc 'vc-src-revert (vc-expand-dirs (list file) 'SRC))
+ (mapc #'vc-src-revert (vc-expand-dirs (list file) 'SRC))
(vc-src-command nil file "co")))
(defun vc-src-modify-change-comment (files rev comment)
@@ -290,8 +286,7 @@ directory the operation is applied to all registered files beneath it."
"String or list of strings specifying switches for src log under VC."
:type '(choice (const :tag "None" nil)
(string :tag "Argument String")
- (repeat :tag "Argument List" :value ("") string))
- :group 'vc-src)
+ (repeat :tag "Argument List" :value ("") string)))
(defun vc-src-print-log (files buffer &optional shortlog _start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
@@ -307,7 +302,7 @@ If LIMIT is non-nil, show no more than this many entries."
(let ((inhibit-read-only t))
(with-current-buffer
buffer
- (apply 'vc-src-command buffer files (if shortlog "list" "log")
+ (apply #'vc-src-command buffer files (if shortlog "list" "log")
(nconc
;;(when start-revision (list (format "%s-1" start-revision)))
(when limit (list "-l" (format "%s" limit)))
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 22becc91cd1..c30920dd157 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -47,8 +47,7 @@
;; FIXME there is also svnadmin.
(defcustom vc-svn-program "svn"
"Name of the SVN executable."
- :type 'string
- :group 'vc-svn)
+ :type 'string)
;; Might be nice if svn defaulted to non-interactive if stdin not tty.
;; https://svn.haxx.se/dev/archive-2008-05/0762.shtml
@@ -64,8 +63,7 @@ hanging while prompting for authorization."
(repeat :tag "Argument List"
:value ("")
string))
- :version "24.4"
- :group 'vc-svn)
+ :version "24.4")
(defcustom vc-svn-register-switches nil
"Switches for registering a file into SVN.
@@ -76,8 +74,7 @@ If t, use no switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "22.1"
- :group 'vc-svn)
+ :version "22.1")
(defcustom vc-svn-diff-switches
t ;`svn' doesn't support common args like -c or -b.
@@ -92,8 +89,7 @@ If you want to force an empty list of arguments, use t."
(repeat :tag "Argument List"
:value ("")
string))
- :version "22.1"
- :group 'vc-svn)
+ :version "22.1")
(defcustom vc-svn-annotate-switches nil
"String or list of strings specifying switches for svn annotate under VC.
@@ -103,14 +99,12 @@ switches."
(const :tag "None" t)
(string :tag "Argument String")
(repeat :tag "Argument List" :value ("") string))
- :version "25.1"
- :group 'vc-svn)
+ :version "25.1")
(defcustom vc-svn-header '("$Id\ $")
"Header keywords to be inserted by `vc-insert-headers'."
:version "24.1" ; no longer consult the obsolete vc-header-alist
- :type '(repeat string)
- :group 'vc-svn)
+ :type '(repeat string))
;; We want to autoload it for use by the autoloaded version of
;; vc-svn-registered, but we want the value to be compiled at startup, not
@@ -305,19 +299,19 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
The COMMENT argument is ignored This does an add but not a commit.
Passes either `vc-svn-register-switches' or `vc-register-switches'
to the SVN command."
- (apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register)))
+ (apply #'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register)))
(defun vc-svn-root (file)
(vc-find-root file vc-svn-admin-directory))
-(defalias 'vc-svn-responsible-p 'vc-svn-root)
+(defalias 'vc-svn-responsible-p #'vc-svn-root)
(declare-function log-edit-extract-headers "log-edit" (headers string))
(defun vc-svn-checkin (files comment &optional _extra-args-ignored)
"SVN-specific version of `vc-backend-checkin'."
(let ((status (apply
- 'vc-svn-command nil 1 files "ci"
+ #'vc-svn-command nil 1 files "ci"
(nconc (cons "-m" (log-edit-extract-headers nil comment))
(vc-switches 'SVN 'checkin)))))
(set-buffer "*vc*")
@@ -345,7 +339,7 @@ to the SVN command."
(defun vc-svn-find-revision (file rev buffer)
"SVN-specific retrieval of a specified version into a buffer."
(let (process-file-side-effects)
- (apply 'vc-svn-command
+ (apply #'vc-svn-command
buffer 0 file
"cat"
(and rev (not (string= rev ""))
@@ -391,7 +385,7 @@ DIRECTORY or absolute."
nil
;; Check out a particular version (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil)
- (apply 'vc-svn-command nil 0 file
+ (apply #'vc-svn-command nil 0 file
"update"
(cond
((null rev) "-rBASE")
@@ -563,27 +557,27 @@ If LIMIT is non-nil, show no more than this many entries."
(goto-char (point-min))
(if files
(dolist (file files)
- (insert "Working file: " file "\n")
- (apply
- 'vc-svn-command
- buffer
- 'async
- (list file)
- "log"
- (append
- (list
- (if start-revision
- (format "-r%s:1" start-revision)
- ;; By default Subversion only shows the log up to the
- ;; working revision, whereas we also want the log of the
- ;; subsequent commits. At least that's what the
- ;; vc-cvs.el code does.
- "-rHEAD:0"))
- (if (eq vc-log-view-type 'with-diff)
- (list "--diff"))
- (when limit (list "--limit" (format "%s" limit))))))
+ (insert "Working file: " file "\n")
+ (apply
+ #'vc-svn-command
+ buffer
+ 'async
+ (list file)
+ "log"
+ (append
+ (list
+ (if start-revision
+ (format "-r%s:1" start-revision)
+ ;; By default Subversion only shows the log up to the
+ ;; working revision, whereas we also want the log of the
+ ;; subsequent commits. At least that's what the
+ ;; vc-cvs.el code does.
+ "-rHEAD:0"))
+ (if (eq vc-log-view-type 'with-diff)
+ (list "--diff"))
+ (when limit (list "--limit" (format "%s" limit))))))
;; Dump log for the entire directory.
- (apply 'vc-svn-command buffer 0 nil "log"
+ (apply #'vc-svn-command buffer 0 nil "log"
(append
(list
(if start-revision (format "-r%s" start-revision) "-rHEAD:0"))
@@ -611,8 +605,8 @@ If LIMIT is non-nil, show no more than this many entries."
(if vc-svn-diff-switches
(vc-switches 'SVN 'diff)
(list (concat "--diff-cmd=" diff-command) "-x"
- (mapconcat 'identity (vc-switches nil 'diff) " ")))))
- (apply 'vc-svn-command buffer
+ (mapconcat #'identity (vc-switches nil 'diff) " ")))))
+ (apply #'vc-svn-command buffer
(if async 'async 0)
files "diff"
(append
@@ -671,7 +665,7 @@ NAME is assumed to be a URL."
"A wrapper around `vc-do-command' for use in vc-svn.el.
The difference to vc-do-command is that this function always invokes `svn',
and that it passes `vc-svn-global-switches' to it before FLAGS."
- (apply 'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list
+ (apply #'vc-do-command (or buffer "*vc*") okstatus vc-svn-program file-or-list
(if (stringp vc-svn-global-switches)
(cons vc-svn-global-switches flags)
(append vc-svn-global-switches flags))))
@@ -683,7 +677,7 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
(unless (re-search-forward "^<<<<<<< " nil t)
(vc-svn-command nil 0 buffer-file-name "resolved")
;; Remove the hook so that it is not called multiple times.
- (remove-hook 'after-save-hook 'vc-svn-resolve-when-done t))))
+ (remove-hook 'after-save-hook #'vc-svn-resolve-when-done t))))
;; Inspired by vc-arch-find-file-hook.
(defun vc-svn-find-file-hook ()
@@ -696,7 +690,7 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
;; There are conflict markers.
(progn
(smerge-start-session)
- (add-hook 'after-save-hook 'vc-svn-resolve-when-done nil t))
+ (add-hook 'after-save-hook #'vc-svn-resolve-when-done nil t))
;; There are no conflict markers. This is problematic: maybe it means
;; the conflict has been resolved and we should immediately call "svn
;; resolved", or it means that the file's type does not allow Svn to
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 00976a07d42..b926c3819dd 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1425,6 +1425,7 @@ first backend that could register the file is used."
(let ((vc-handled-backends (list backend)))
(call-interactively 'vc-register)))
+;;;###autoload
(defun vc-ignore (file &optional directory remove)
"Ignore FILE under the VCS of DIRECTORY.