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`.
-;;; 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.
(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
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
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.
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.
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.
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.]+\\)"))
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")
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
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)))))))))
(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))
(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
: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.
"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" ())
-;;; 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.
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
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
The default value 32 is good for the most cases."
:type 'integer
- :group 'compare-windows
:version "22.1")
(defcustom compare-windows-recenter nil
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
: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")
(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 ()
(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))
(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))
(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)))
;;; Code:
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
(require 'pcvs-util)
;;;
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
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)
(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)))
(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)))
(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) "")))))
(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))
"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)))
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)))))
(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 ()
(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.
(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.
(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
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 ()
(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.
(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
(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)
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
;; 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 ()
;;; Code:
(require 'cl-lib)
+(require 'ediff-util)
;; Start compiler pacifier
(defvar ediff-metajob-name)
(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
(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)
(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
(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.")
'(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]
(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)
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))
(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]
'(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]
: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]
))
;;;###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
(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)
(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
(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
'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.
(declare-function diff-latest-backup-file "diff" (fn))
;;;###autoload
-(defalias 'ediff 'ediff-files)
+(defalias 'ediff #'ediff-files)
;;;###autoload
(defun ediff-current-file ()
(ediff-buffers-internal buffer-A buffer-B nil startup-hooks job-name))
;;;###autoload
-(defalias 'ebuffers 'ediff-buffers)
+(defalias 'ebuffers #'ediff-buffers)
;;;###autoload
(ediff-buffers-internal buffer-A buffer-B buffer-C startup-hooks job-name))
;;;###autoload
-(defalias 'ebuffers3 'ediff-buffers3)
+(defalias 'ebuffers3 #'ediff-buffers3)
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))
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
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)
"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
(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:"
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)
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))
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
))
;;;###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
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:"
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
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)
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
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:"
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
))
;; 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.
"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.")
(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."
(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."
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
(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.
(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)
(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)
-;;; 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.
(defcustom cvs-cvsrc-file (convert-standard-filename "~/.cvsrc")
"Path to your cvsrc file."
- :group 'pcl-cvs
:type '(file))
(defvar cvs-shared-start 4
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
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
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
"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")))
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)))
(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)))
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
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")
'(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))))
`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
(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)
-;;; 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.
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)
(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))))
\f
-;;; 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.
;;;;
(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)
"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.
(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))
(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
;;; Code:
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
(require 'ewoc) ;Ewoc was once cookie
(require 'pcvs-defs)
(require 'pcvs-util)
(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
(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
(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.")
;;; 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"
(defcustom vc-bzr-program "bzr"
"Name of the bzr command (excluding any arguments)."
- :group 'vc-bzr
:type 'string)
(defcustom vc-bzr-diff-switches nil
: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.
(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
: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
`("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)
,@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))
;; 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)
(memq
?x
(mapcar
- 'identity
+ #'identity
(file-attribute-modes
(file-attributes file))))))
(if (eq (char-after (match-beginning 7))
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)
(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))))
(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
;; 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)
;; 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.")
(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"))
(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)
;; 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
;; 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,
(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)
(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)
(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)
(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
(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
(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)
(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.
(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.
(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.
(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.
(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.
See also variable `vc-cvs-sticky-date-format-string'."
:type '(choice boolean function)
- :version "22.1"
- :group 'vc-cvs)
+ :version "22.1")
;;;
;;; Internal variables
(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))
(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))))
(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
(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"
(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
;; 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)
(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))
"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
(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))))))))))))
-;;; 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.
'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
;; 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
;; 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
;; 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.
;; 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)
(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]
(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
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)
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)
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 ()
"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.
(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))
(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)))
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))))))))))))
(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."
(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)))
(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.")
((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)
(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.
;; 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))))
;; 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
(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))))
(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))
-;;; 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.
;;; Code:
(require 'cl-lib)
+(require 'vc-dispatcher)
(eval-when-compile
(require 'subr-x) ; for string-trim-right
(require 'vc)
(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
(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" "--"))
(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"
(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"))
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'.
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)))
(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."
(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
;; 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")
(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"))
(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.
(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 "--"))))
,@(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)
,@(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.
(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)))
: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.
(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.
(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
: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}')}"
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
(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.
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 ".")
"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")
(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)))
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.
"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."
(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"
(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")
(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
;; 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)))
(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)))
(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)
;; 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)))
;; 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
(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)
;; (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)
(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.
(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.
(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)
'(("\\`[^:/#]*[:/#]" . "")) ;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."
(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"))
_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))))))
(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
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.
(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.
(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
(repeat :tag "User-specified"
(choice string
function)))
- :version "21.1"
- :group 'vc-rcs)
+ :version "21.1")
\f
;;; Properties of the backend
"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)
"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)))))
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.
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))
(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)
(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.
(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
(repeat :tag "User-specified"
(choice string
function)))
- :version "21.1"
- :group 'vc-sccs)
+ :version "21.1")
\f
;;;
"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)))
(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."
(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))
(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"
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)
(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))))
"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.
(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"
"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")
(fake-command
(format "diff%s %s"
(if fake-flags
- (concat " " (mapconcat 'identity fake-flags " "))
+ (concat " " (mapconcat #'identity fake-flags " "))
"")
(vc-delistify files)))
(status 0)
(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
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.
: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
'("%s.src/%s,v"))
(repeat :tag "User-specified"
(choice string
- function)))
- :group 'vc-src)
+ function))))
\f
;;; Properties of the backend
(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'."
"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)
"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.
(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)))
;; 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
(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.
(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.
(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.
(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
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*")
(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 ""))
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")
(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"))
(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
"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))))
(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 ()
;; 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
(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.