diff options
Diffstat (limited to 'lisp/vc/vc-hg.el')
-rw-r--r-- | lisp/vc/vc-hg.el | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index adb0fce8759..9faed10f383 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -124,8 +124,7 @@ :type '(choice (const :tag "None" nil) (string :tag "Argument String") (repeat :tag "Argument List" :value ("") string)) - :version "22.2" - :group 'vc-hg) + :version "22.2") (defcustom vc-hg-diff-switches t ; Hg doesn't support common args like -u "String or list of strings specifying switches for Hg diff under VC. @@ -134,8 +133,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (const :tag "None" t) (string :tag "Argument String") (repeat :tag "Argument List" :value ("") string)) - :version "23.1" - :group 'vc-hg) + :version "23.1") (defcustom vc-hg-annotate-switches '("-u" "--follow") "String or list of strings specifying switches for hg annotate under VC. @@ -145,8 +143,7 @@ switches." (const :tag "None" t) (string :tag "Argument String") (repeat :tag "Argument List" :value ("") string)) - :version "25.1" - :group 'vc-hg) + :version "25.1") (defcustom vc-hg-revert-switches nil "String or list of strings specifying switches for hg revert @@ -154,13 +151,11 @@ under VC." :type '(choice (const :tag "None" nil) (string :tag "Argument String") (repeat :tag "Argument List" :value ("") string)) - :version "27.1" - :group 'vc-hg) + :version "27.1") (defcustom vc-hg-program "hg" "Name of the Mercurial executable (excluding any arguments)." - :type 'string - :group 'vc-hg) + :type 'string) (defcustom vc-hg-root-log-format `(,(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}" @@ -183,7 +178,6 @@ REGEXP is a regular expression matching the resulting Mercurial output, and KEYWORDS is a list of `font-lock-keywords' for highlighting the Log View buffer." :type '(list string regexp (repeat sexp)) - :group 'vc-hg :version "24.5") (defcustom vc-hg-create-bookmark t @@ -311,8 +305,7 @@ If no list entry produces a useful revision, return `nil'." (const :tag "Active bookmark" builtin-active-bookmark) (string :tag "Hg template") (function :tag "Custom"))) - :version "26.1" - :group 'vc-hg) + :version "26.1") (defcustom vc-hg-use-file-version-for-mode-line-version nil "When enabled, the modeline contains revision information for the visited file. @@ -320,8 +313,7 @@ When not, the revision in the modeline is for the repository working copy. `nil' is the much faster setting for large repositories." :type 'boolean - :version "26.1" - :group 'vc-hg) + :version "26.1") (defun vc-hg--active-bookmark-internal (rev) (when (equal rev ".") @@ -413,8 +405,7 @@ specific file to query." "String or list of strings specifying switches for hg log under VC." :type '(choice (const :tag "None" nil) (string :tag "Argument String") - (repeat :tag "Argument List" :value ("") string)) - :group 'vc-hg) + (repeat :tag "Argument List" :value ("") string))) (autoload 'vc-setup-buffer "vc-dispatcher") @@ -442,7 +433,7 @@ If LIMIT is non-nil, show no more than this many entries." (let ((inhibit-read-only t)) (with-current-buffer buffer - (apply 'vc-hg-command buffer 'async files "log" + (apply #'vc-hg-command buffer 'async files "log" (nconc (when start-revision (list (format "-r%s:0" start-revision))) (when limit (list "-l" (format "%s" limit))) @@ -666,8 +657,7 @@ directly instead of always running Mercurial. We try to be safe against Mercurial data structure format changes and always fall back to running Mercurial directly." :type 'boolean - :version "26.1" - :group 'vc-hg) + :version "26.1") (defsubst vc-hg--read-u8 () "Read and advance over an unsigned byte. @@ -1177,7 +1167,7 @@ hg binary." "Create a new Mercurial repository." (vc-hg-command nil 0 nil "init")) -(defalias 'vc-hg-responsible-p 'vc-hg-root) +(defalias 'vc-hg-responsible-p #'vc-hg-root) (defun vc-hg-unregister (file) "Unregister FILE from hg." @@ -1200,7 +1190,7 @@ If toggling on, also insert its message into the buffer." (defvar vc-hg-log-edit-mode-map (let ((map (make-sparse-keymap "Hg-Log-Edit"))) - (define-key map "\C-c\C-e" 'vc-hg-log-edit-toggle-amend) + (define-key map "\C-c\C-e" #'vc-hg-log-edit-toggle-amend) map)) (define-derived-mode vc-hg-log-edit-mode log-edit-mode "Log-Edit/hg" @@ -1214,7 +1204,7 @@ REV is ignored." (lambda (value) (when (equal value "yes") (list "--amend"))))) - (apply 'vc-hg-command nil 0 files + (apply #'vc-hg-command nil 0 files (nconc (list "commit" "-m") (log-edit-extract-headers `(("Author" . "--user") ("Date" . "--date") @@ -1252,7 +1242,7 @@ REV is the revision to check out into WORKFILE." (unless (re-search-forward "^<<<<<<< " nil t) (vc-hg-command nil 0 buffer-file-name "resolve" "-m") ;; Remove the hook so that it is not called multiple times. - (remove-hook 'after-save-hook 'vc-hg-resolve-when-done t)))) + (remove-hook 'after-save-hook #'vc-hg-resolve-when-done t)))) (defun vc-hg-find-file-hook () (when (and buffer-file-name @@ -1268,7 +1258,7 @@ REV is the revision to check out into WORKFILE." ;; Hg may not recognize "conflict" as a state, but we can do better. (vc-file-setprop buffer-file-name 'vc-state 'conflict) (smerge-start-session) - (add-hook 'after-save-hook 'vc-hg-resolve-when-done nil t) + (add-hook 'after-save-hook #'vc-hg-resolve-when-done nil t) (vc-message-unresolved-conflicts buffer-file-name))) @@ -1443,7 +1433,7 @@ commands, which only operated on marked files." (apply #'vc-hg-command nil 0 nil command - (apply 'nconc + (apply #'nconc (mapcar (lambda (arg) (list "-r" arg)) marked-list))) (let* ((root (vc-hg-root default-directory)) (buffer (format "*vc-hg : %s*" (expand-file-name root))) @@ -1463,18 +1453,18 @@ commands, which only operated on marked files." (setq hg-program (car args) command (cadr args) args (cddr args))) - (apply 'vc-do-async-command buffer root hg-program command args) + (apply #'vc-do-async-command buffer root hg-program command args) (with-current-buffer buffer (vc-run-delayed (dolist (cmd post-processing) - (apply 'vc-do-command buffer nil hg-program nil cmd)) + (apply #'vc-do-command buffer nil hg-program nil cmd)) (vc-compilation-mode 'hg) (setq-local compile-command (concat hg-program " " command " " - (mapconcat 'identity args " ") + (mapconcat #'identity args " ") (mapconcat (lambda (args) (concat " && " hg-program " " - (mapconcat 'identity + (mapconcat #'identity args " "))) post-processing ""))) (setq-local compilation-directory root) @@ -1525,7 +1515,7 @@ This runs the command \"hg merge\"." ;; Disable pager. (process-environment (cons "HGPLAIN=1" process-environment)) (branch (vc-read-revision "Revision to merge: "))) - (apply 'vc-do-async-command buffer root vc-hg-program + (apply #'vc-do-async-command buffer root vc-hg-program (append '("--config" "ui.report_untrusted=0" "merge") (unless (string= branch "") (list branch)))) (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg))) @@ -1540,7 +1530,8 @@ This function differs from vc-do-command in that it invokes ;; Disable pager. (let ((process-environment (cons "HGPLAIN=1" process-environment)) (flags (append '("--config" "ui.report_untrusted=0") flags))) - (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-or-list + (apply #'vc-do-command (or buffer "*vc*") + okstatus vc-hg-program file-or-list (if (stringp vc-hg-global-switches) (cons vc-hg-global-switches flags) (append vc-hg-global-switches |