[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 7c8254f6db: Function-quote many more functions
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 7c8254f6db: Function-quote many more functions |
Date: |
Mon, 28 Mar 2022 14:58:16 -0400 (EDT) |
branch: elpa/git-commit
commit 7c8254f6db66d6dfbe9ff9732f2c54ad65e9bd49
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Function-quote many more functions
---
lisp/git-commit.el | 56 +++++++++++------------
lisp/git-rebase.el | 76 +++++++++++++++---------------
lisp/magit-apply.el | 26 +++++------
lisp/magit-autorevert.el | 2 +-
lisp/magit-base.el | 24 +++++-----
lisp/magit-bisect.el | 4 +-
lisp/magit-blame.el | 70 ++++++++++++++--------------
lisp/magit-bookmark.el | 2 +-
lisp/magit-branch.el | 16 +++----
lisp/magit-clone.el | 4 +-
lisp/magit-commit.el | 18 ++++----
lisp/magit-diff.el | 117 ++++++++++++++++++++++++++---------------------
lisp/magit-ediff.el | 18 ++++----
lisp/magit-extras.el | 12 ++---
lisp/magit-fetch.el | 2 +-
lisp/magit-files.el | 14 +++---
lisp/magit-git.el | 26 +++++------
lisp/magit-log.el | 72 ++++++++++++++---------------
lisp/magit-margin.el | 4 +-
lisp/magit-mode.el | 28 ++++++------
lisp/magit-notes.el | 10 ++--
lisp/magit-obsolete.el | 8 ++--
lisp/magit-patch.el | 10 ++--
lisp/magit-process.el | 4 +-
lisp/magit-pull.el | 8 ++--
lisp/magit-push.el | 10 ++--
lisp/magit-reflog.el | 8 ++--
lisp/magit-refs.el | 18 ++++----
lisp/magit-remote.el | 10 ++--
lisp/magit-repos.el | 20 ++++----
lisp/magit-section.el | 62 ++++++++++++-------------
lisp/magit-sequence.el | 20 ++++----
lisp/magit-stash.el | 6 +--
lisp/magit-status.el | 12 ++---
lisp/magit-submodule.el | 12 ++---
lisp/magit-subtree.el | 4 +-
lisp/magit-tag.el | 2 +-
lisp/magit-wip.el | 10 ++--
lisp/magit-worktree.el | 2 +-
lisp/magit.el | 4 +-
40 files changed, 424 insertions(+), 407 deletions(-)
diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index fa5782d535..2ca03fddf2 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -175,12 +175,12 @@ full loading."
:initialize (lambda (symbol exp)
(custom-initialize-default symbol exp)
(when global-git-commit-mode
- (add-hook 'find-file-hook 'git-commit-setup-check-buffer)))
+ (add-hook 'find-file-hook #'git-commit-setup-check-buffer)))
(if global-git-commit-mode
- (add-hook 'find-file-hook 'git-commit-setup-check-buffer)
- (remove-hook 'find-file-hook 'git-commit-setup-check-buffer)))
+ (add-hook 'find-file-hook #'git-commit-setup-check-buffer)
+ (remove-hook 'find-file-hook #'git-commit-setup-check-buffer)))
-(defcustom git-commit-major-mode 'text-mode
+(defcustom git-commit-major-mode #'text-mode
"Major mode used to edit Git commit messages.
The major mode configured here is turned on by the minor mode
`git-commit-mode'."
@@ -210,7 +210,7 @@ The major mode configured here is turned on by the minor
mode
"Hook run at the end of `git-commit-setup'."
:group 'git-commit
:type 'hook
- :get (and (featurep 'magit-base) 'magit-hook-custom-get)
+ :get (and (featurep 'magit-base) #'magit-hook-custom-get)
:options '(git-commit-save-message
git-commit-setup-changelog-support
magit-generate-changelog
@@ -240,7 +240,7 @@ This hook is only run if `magit' is available.
Also see `magit-post-commit-hook'."
:group 'git-commit
:type 'hook
- :get (and (featurep 'magit-base) 'magit-hook-custom-get))
+ :get (and (featurep 'magit-base) #'magit-hook-custom-get))
(defcustom git-commit-finish-query-functions
'(git-commit-check-style-conventions)
@@ -402,20 +402,20 @@ This is only used if Magit is available."
(defvar git-commit-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "M-p") 'git-commit-prev-message)
- (define-key map (kbd "M-n") 'git-commit-next-message)
- (define-key map (kbd "C-c M-p") 'git-commit-search-message-backward)
- (define-key map (kbd "C-c M-n") 'git-commit-search-message-forward)
- (define-key map (kbd "C-c C-i") 'git-commit-insert-pseudo-header)
- (define-key map (kbd "C-c C-a") 'git-commit-ack)
- (define-key map (kbd "C-c M-i") 'git-commit-suggested)
- (define-key map (kbd "C-c C-m") 'git-commit-modified)
- (define-key map (kbd "C-c C-o") 'git-commit-cc)
- (define-key map (kbd "C-c C-p") 'git-commit-reported)
- (define-key map (kbd "C-c C-r") 'git-commit-review)
- (define-key map (kbd "C-c C-s") 'git-commit-signoff)
- (define-key map (kbd "C-c C-t") 'git-commit-test)
- (define-key map (kbd "C-c M-s") 'git-commit-save-message)
+ (define-key map (kbd "M-p") #'git-commit-prev-message)
+ (define-key map (kbd "M-n") #'git-commit-next-message)
+ (define-key map (kbd "C-c M-p") #'git-commit-search-message-backward)
+ (define-key map (kbd "C-c M-n") #'git-commit-search-message-forward)
+ (define-key map (kbd "C-c C-i") #'git-commit-insert-pseudo-header)
+ (define-key map (kbd "C-c C-a") #'git-commit-ack)
+ (define-key map (kbd "C-c M-i") #'git-commit-suggested)
+ (define-key map (kbd "C-c C-m") #'git-commit-modified)
+ (define-key map (kbd "C-c C-o") #'git-commit-cc)
+ (define-key map (kbd "C-c C-p") #'git-commit-reported)
+ (define-key map (kbd "C-c C-r") #'git-commit-review)
+ (define-key map (kbd "C-c C-s") #'git-commit-signoff)
+ (define-key map (kbd "C-c C-t") #'git-commit-test)
+ (define-key map (kbd "C-c M-s") #'git-commit-save-message)
map)
"Key map used by `git-commit-mode'.")
@@ -467,7 +467,7 @@ This is only used if Magit is available."
(string-match-p git-commit-filename-regexp buffer-file-name)
(git-commit-setup-font-lock)))
-(add-hook 'after-change-major-mode-hook 'git-commit-setup-font-lock-in-buffer)
+(add-hook 'after-change-major-mode-hook #'git-commit-setup-font-lock-in-buffer)
(defun git-commit-setup-check-buffer ()
(and buffer-file-name
@@ -551,11 +551,11 @@ to recover older messages")
;; Maybe already enabled when using `shell-command' or an Emacs shell.
(with-editor-mode 1))
(add-hook 'with-editor-finish-query-functions
- 'git-commit-finish-query-functions nil t)
+ #'git-commit-finish-query-functions nil t)
(add-hook 'with-editor-pre-finish-hook
- 'git-commit-save-message nil t)
+ #'git-commit-save-message nil t)
(add-hook 'with-editor-pre-cancel-hook
- 'git-commit-save-message nil t)
+ #'git-commit-save-message nil t)
(when (and (fboundp 'magit-rev-parse)
(not (memq last-command
'(magit-sequencer-continue
@@ -565,13 +565,13 @@ to recover older messages")
magit-rebase-continue
magit-rebase-skip))))
(add-hook 'with-editor-post-finish-hook
- (apply-partially 'git-commit-run-post-finish-hook
+ (apply-partially #'git-commit-run-post-finish-hook
(magit-rev-parse "HEAD"))
nil t)
(when (fboundp 'magit-wip-maybe-add-commit-hook)
(magit-wip-maybe-add-commit-hook)))
(setq with-editor-cancel-message
- 'git-commit-cancel-message)
+ #'git-commit-cancel-message)
(git-commit-mode 1)
(git-commit-setup-font-lock)
(git-commit-prepare-message-ring)
@@ -643,7 +643,7 @@ finally check current non-comment text."
(require 'flyspell)
(turn-on-flyspell)
(setq flyspell-generic-check-word-predicate
- 'git-commit-flyspell-verify)
+ #'git-commit-flyspell-verify)
(let ((end)
(comment-start-regex (format "^\\(%s\\|$\\)" comment-start)))
(save-excursion
@@ -887,7 +887,7 @@ Save current message first."
prompt
(sort (delete-dups
(magit-git-lines "log" "-n9999" "--format=%aN <%ae>"))
- 'string<)
+ #'string<)
nil nil nil 'git-commit-read-ident-history)))
(save-match-data
(if (string-match "\\`\\([^<]+\\) *<\\([^>]+\\)>\\'" str)
diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el
index 886156b04d..f3fcd6df74 100644
--- a/lisp/git-rebase.el
+++ b/lisp/git-rebase.el
@@ -149,35 +149,35 @@
(defvar git-rebase-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map special-mode-map)
- (define-key map (kbd "C-m") 'git-rebase-show-commit)
- (define-key map (kbd "p") 'git-rebase-backward-line)
- (define-key map (kbd "n") 'forward-line)
- (define-key map (kbd "M-p") 'git-rebase-move-line-up)
- (define-key map (kbd "M-n") 'git-rebase-move-line-down)
- (define-key map (kbd "c") 'git-rebase-pick)
- (define-key map (kbd "k") 'git-rebase-kill-line)
- (define-key map (kbd "C-k") 'git-rebase-kill-line)
- (define-key map (kbd "b") 'git-rebase-break)
- (define-key map (kbd "e") 'git-rebase-edit)
- (define-key map (kbd "l") 'git-rebase-label)
- (define-key map (kbd "MM") 'git-rebase-merge)
- (define-key map (kbd "Mt") 'git-rebase-merge-toggle-editmsg)
- (define-key map (kbd "m") 'git-rebase-edit)
- (define-key map (kbd "f") 'git-rebase-fixup)
- (define-key map (kbd "q") 'undefined)
- (define-key map (kbd "r") 'git-rebase-reword)
- (define-key map (kbd "w") 'git-rebase-reword)
- (define-key map (kbd "s") 'git-rebase-squash)
- (define-key map (kbd "t") 'git-rebase-reset)
- (define-key map (kbd "x") 'git-rebase-exec)
- (define-key map (kbd "y") 'git-rebase-insert)
- (define-key map (kbd "z") 'git-rebase-noop)
- (define-key map (kbd "SPC") 'git-rebase-show-or-scroll-up)
- (define-key map (kbd "DEL") 'git-rebase-show-or-scroll-down)
- (define-key map (kbd "C-x C-t") 'git-rebase-move-line-up)
- (define-key map [M-up] 'git-rebase-move-line-up)
- (define-key map [M-down] 'git-rebase-move-line-down)
- (define-key map [remap undo] 'git-rebase-undo)
+ (define-key map (kbd "C-m") #'git-rebase-show-commit)
+ (define-key map (kbd "p") #'git-rebase-backward-line)
+ (define-key map (kbd "n") #'forward-line)
+ (define-key map (kbd "M-p") #'git-rebase-move-line-up)
+ (define-key map (kbd "M-n") #'git-rebase-move-line-down)
+ (define-key map (kbd "c") #'git-rebase-pick)
+ (define-key map (kbd "k") #'git-rebase-kill-line)
+ (define-key map (kbd "C-k") #'git-rebase-kill-line)
+ (define-key map (kbd "b") #'git-rebase-break)
+ (define-key map (kbd "e") #'git-rebase-edit)
+ (define-key map (kbd "l") #'git-rebase-label)
+ (define-key map (kbd "MM") #'git-rebase-merge)
+ (define-key map (kbd "Mt") #'git-rebase-merge-toggle-editmsg)
+ (define-key map (kbd "m") #'git-rebase-edit)
+ (define-key map (kbd "f") #'git-rebase-fixup)
+ (define-key map (kbd "q") #'undefined)
+ (define-key map (kbd "r") #'git-rebase-reword)
+ (define-key map (kbd "w") #'git-rebase-reword)
+ (define-key map (kbd "s") #'git-rebase-squash)
+ (define-key map (kbd "t") #'git-rebase-reset)
+ (define-key map (kbd "x") #'git-rebase-exec)
+ (define-key map (kbd "y") #'git-rebase-insert)
+ (define-key map (kbd "z") #'git-rebase-noop)
+ (define-key map (kbd "SPC") #'git-rebase-show-or-scroll-up)
+ (define-key map (kbd "DEL") #'git-rebase-show-or-scroll-down)
+ (define-key map (kbd "C-x C-t") #'git-rebase-move-line-up)
+ (define-key map [M-up] #'git-rebase-move-line-up)
+ (define-key map [M-down] #'git-rebase-move-line-down)
+ (define-key map [remap undo] #'git-rebase-undo)
map)
"Keymap for Git-Rebase mode.")
@@ -705,11 +705,11 @@ running 'man git-rebase' at the command line) for
details."
(with-editor-mode 1))
(when git-rebase-confirm-cancel
(add-hook 'with-editor-cancel-query-functions
- 'git-rebase-cancel-confirm nil t))
- (setq-local redisplay-highlight-region-function 'git-rebase-highlight-region)
- (setq-local redisplay-unhighlight-region-function
'git-rebase-unhighlight-region)
- (add-hook 'with-editor-pre-cancel-hook 'git-rebase-autostash-save nil t)
- (add-hook 'with-editor-post-cancel-hook 'git-rebase-autostash-apply nil t)
+ #'git-rebase-cancel-confirm nil t))
+ (setq-local redisplay-highlight-region-function
#'git-rebase-highlight-region)
+ (setq-local redisplay-unhighlight-region-function
#'git-rebase-unhighlight-region)
+ (add-hook 'with-editor-pre-cancel-hook #'git-rebase-autostash-save nil t)
+ (add-hook 'with-editor-post-cancel-hook #'git-rebase-autostash-apply nil t)
(setq imenu-prev-index-position-function
#'magit-imenu--rebase-prev-index-position-function)
(setq imenu-extract-index-name-function
@@ -807,21 +807,21 @@ By default, this is the same except for the \"pick\"
command."
", "))
t t nil 2))))))))
-(add-hook 'git-rebase-mode-hook 'git-rebase-mode-show-keybindings t)
+(add-hook 'git-rebase-mode-hook #'git-rebase-mode-show-keybindings t)
(defun git-rebase-mode-disable-before-save-hook ()
(set (make-local-variable 'before-save-hook) nil))
-(add-hook 'git-rebase-mode-hook 'git-rebase-mode-disable-before-save-hook)
+(add-hook 'git-rebase-mode-hook #'git-rebase-mode-disable-before-save-hook)
;;;###autoload
(defconst git-rebase-filename-regexp "/git-rebase-todo\\'")
;;;###autoload
(add-to-list 'auto-mode-alist
- (cons git-rebase-filename-regexp 'git-rebase-mode))
+ (cons git-rebase-filename-regexp #'git-rebase-mode))
(add-to-list 'with-editor-server-window-alist
- (cons git-rebase-filename-regexp 'switch-to-buffer))
+ (cons git-rebase-filename-regexp #'switch-to-buffer))
(with-eval-after-load 'recentf
(add-to-list 'recentf-exclude git-rebase-filename-regexp))
diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index 2ca43e0aef..66a6333fd5 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -136,12 +136,12 @@ so causes the change to be applied to the index as well."
(`(,(or `unstaged `staged) ,_)
(user-error "Change is already in the working tree"))
(`(untracked ,(or `file `files))
- (call-interactively 'magit-am))
+ (call-interactively #'magit-am))
(`(,_ region) (magit-apply-region it args))
(`(,_ hunk) (magit-apply-hunk it args))
(`(,_ hunks) (magit-apply-hunks it args))
(`(rebase-sequence file)
- (call-interactively 'magit-patch-apply))
+ (call-interactively #'magit-patch-apply))
(`(,_ file) (magit-apply-diff it args))
(`(,_ files) (magit-apply-diffs it args)))))
@@ -307,7 +307,7 @@ at point, stage the file but not its content."
(`(staged ,_ ,_) (user-error "Already staged"))
(`(committed ,_ ,_) (user-error "Cannot stage committed changes"))
(`(undefined ,_ ,_) (user-error "Cannot stage this change")))
- (call-interactively 'magit-stage-file)))
+ (call-interactively #'magit-stage-file)))
;;;###autoload
(defun magit-stage-file (file)
@@ -492,7 +492,7 @@ of a side, then keep that side without prompting."
(let ((file (magit-section-parent-value section)))
(pcase (cddr (car (magit-file-status file)))
(`(?U ?U) (magit-smerge-keep-current))
- (_ (magit-discard-apply section 'magit-apply-hunk)))))
+ (_ (magit-discard-apply section #'magit-apply-hunk)))))
(defun magit-discard-apply (section apply)
(if (eq (magit-diff-type section) 'unstaged)
@@ -511,7 +511,7 @@ of a side, then keep that side without prompting."
(magit-confirm 'discard (format "Discard %s hunks from %s"
(length sections)
(magit-section-parent-value (car sections))))
- (magit-discard-apply-n sections 'magit-apply-hunks))
+ (magit-discard-apply-n sections #'magit-apply-hunks))
(defun magit-discard-apply-n (sections apply)
(let ((section (car sections)))
@@ -658,7 +658,7 @@ of a side, then keep that side without prompting."
(cond ((= (length sections) 1)
(magit-discard-apply (car sections) 'magit-apply-diff))
(sections
- (magit-discard-apply-n sections 'magit-apply-diffs)))
+ (magit-discard-apply-n sections #'magit-apply-diffs)))
(when binaries
(let ((modified (magit-unstaged-files t)))
(setq binaries (--separate (member it modified) binaries)))
@@ -690,18 +690,18 @@ so causes the change to be applied to the index as well."
(defun magit-reverse-region (section args)
(magit-confirm 'reverse "Reverse region")
- (magit-reverse-apply section 'magit-apply-region args))
+ (magit-reverse-apply section #'magit-apply-region args))
(defun magit-reverse-hunk (section args)
(magit-confirm 'reverse "Reverse hunk")
- (magit-reverse-apply section 'magit-apply-hunk args))
+ (magit-reverse-apply section #'magit-apply-hunk args))
(defun magit-reverse-hunks (sections args)
(magit-confirm 'reverse
(format "Reverse %s hunks from %s"
(length sections)
(magit-section-parent-value (car sections))))
- (magit-reverse-apply sections 'magit-apply-hunks args))
+ (magit-reverse-apply sections #'magit-apply-hunks args))
(defun magit-reverse-file (section args)
(magit-reverse-files (list section) args))
@@ -719,9 +719,9 @@ so causes the change to be applied to the index as well."
sections))))
(magit-confirm-files 'reverse (--map (oref it value) sections))
(cond ((= (length sections) 1)
- (magit-reverse-apply (car sections) 'magit-apply-diff args))
+ (magit-reverse-apply (car sections) #'magit-apply-diff args))
(sections
- (magit-reverse-apply sections 'magit-apply-diffs args)))
+ (magit-reverse-apply sections #'magit-apply-diffs args)))
(when binaries
(user-error "Cannot reverse binary files"))))
@@ -787,8 +787,8 @@ a separate commit. A typical workflow would be:
(condition-case nil
(smerge-match-conflict)
(error
- (if (eq fn 'smerge-keep-current)
- (when (eq this-command 'magit-discard)
+ (if (eq fn #'smerge-keep-current)
+ (when (eq this-command #'magit-discard)
(re-search-forward smerge-begin-re nil t)
(setq fn
(magit-read-char-case "Keep side: " t
diff --git a/lisp/magit-autorevert.el b/lisp/magit-autorevert.el
index cb7891e59a..39b1c02fe8 100644
--- a/lisp/magit-autorevert.el
+++ b/lisp/magit-autorevert.el
@@ -261,7 +261,7 @@ defaults to nil) for any BUFFER."
(auto-revert-set-timer))))
(advice-add 'auto-revert-buffers :around
- 'auto-revert-buffers--buffer-list-filter)
+ #'auto-revert-buffers--buffer-list-filter)
;;; _
(provide 'magit-autorevert)
diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index 3ec5afd461..e14bfe546c 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -61,7 +61,7 @@
;;; Options
-(defcustom magit-completing-read-function 'magit-builtin-completing-read
+(defcustom magit-completing-read-function #'magit-builtin-completing-read
"Function to be called when requesting input from the user.
If you have enabled `ivy-mode' or `helm-mode', then you don't
@@ -579,7 +579,7 @@ acts similarly to `completing-read', except for the
following:
(unless (or (bound-and-true-p helm-mode)
(bound-and-true-p ivy-mode))
(setq choices (magit--completion-table choices)))
- (cl-letf (((symbol-function 'completion-pcm--all-completions)))
+ (cl-letf (((symbol-function #'completion-pcm--all-completions)))
(when (< emacs-major-version 26)
(fset 'completion-pcm--all-completions
'magit-completion-pcm--all-completions))
@@ -613,7 +613,7 @@ into a list."
(helm-crm-default-separator nil)
(ivy-sort-matches-functions-alist nil)
(input
- (cl-letf (((symbol-function 'completion-pcm--all-completions)))
+ (cl-letf (((symbol-function #'completion-pcm--all-completions)))
(when (< emacs-major-version 26)
(fset 'completion-pcm--all-completions
'magit-completion-pcm--all-completions))
@@ -643,8 +643,8 @@ third-party completion frameworks."
;; that string. Use a variable to pass along the raw user
;; input string. aa5f098ab
(input nil)
- (split-string (symbol-function 'split-string))
- ((symbol-function 'split-string)
+ (split-string (symbol-function #'split-string))
+ ((symbol-function #'split-string)
(lambda (string &optional separators omit-nulls trim)
(when (and no-split
(equal separators crm-separator)
@@ -653,10 +653,10 @@ third-party completion frameworks."
(funcall split-string string separators omit-nulls trim)))
;; In Emacs 25 this function has a bug, so we use a copy of the
;; version from Emacs 26. bef9c7aa3
- ((symbol-function 'completion-pcm--all-completions)
+ ((symbol-function #'completion-pcm--all-completions)
(if (< emacs-major-version 26)
'magit-completion-pcm--all-completions
- (symbol-function 'completion-pcm--all-completions)))
+ (symbol-function #'completion-pcm--all-completions)))
;; Prevent `BUILT-IN' completion from messing up our existing
;; order of the completion candidates. aa5f098ab
(table (magit--completion-table table))
@@ -720,8 +720,8 @@ back to built-in `completing-read' for now." :error)
(defvar magit-minibuffer-local-ns-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
- (define-key map "\s" 'magit-whitespace-disallowed)
- (define-key map "\t" 'magit-whitespace-disallowed)
+ (define-key map "\s" #'magit-whitespace-disallowed)
+ (define-key map "\t" #'magit-whitespace-disallowed)
map))
(defun magit-whitespace-disallowed ()
@@ -1173,11 +1173,11 @@ or (last of all) the value of EXP."
;;;###autoload
(advice-add 'Info-follow-nearest-node :around
- 'Info-follow-nearest-node--magit-gitman)
+ #'Info-follow-nearest-node--magit-gitman)
;; When making changes here, then also adjust the copy in docs/Makefile.
;;;###autoload
-(advice-add 'org-man-export :around 'org-man-export--magit-gitman)
+(advice-add 'org-man-export :around #'org-man-export--magit-gitman)
;;;###autoload
(defun org-man-export--magit-gitman (fn link description format)
(if (and (eq format 'texinfo)
@@ -1218,7 +1218,7 @@ See <https://github.com/raxod502/straight.el/issues/520>."
(if (fboundp 'with-connection-local-variables)
(defalias 'magit--with-connection-local-variables
- 'with-connection-local-variables)
+ #'with-connection-local-variables)
(defmacro magit--with-connection-local-variables (&rest body)
"Abridged `with-connection-local-variables' for pre Emacs 27 compatibility.
Bind shell file name and switch for remote execution.
diff --git a/lisp/magit-bisect.el b/lisp/magit-bisect.el
index 0ddfd39acf..64ccc612cc 100644
--- a/lisp/magit-bisect.el
+++ b/lisp/magit-bisect.el
@@ -268,7 +268,7 @@ bisect run'."
(when (magit-bisect-in-progress-p)
(magit-insert-section (bisect-view)
(magit-insert-heading "Bisect Rest:")
- (magit-git-wash (apply-partially 'magit-log-wash-log 'bisect-vis)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'bisect-vis)
"bisect" "visualize" "git" "log"
"--format=%h%x00%D%x00%s" "--decorate=full"
(and magit-bisect-show-graph "--graph")))))
@@ -295,7 +295,7 @@ bisect run'."
'magit-section-secondary-heading))
(magit-insert-heading)
(magit-wash-sequence
- (apply-partially 'magit-log-wash-rev 'bisect-log
+ (apply-partially #'magit-log-wash-rev 'bisect-log
(magit-abbrev-length)))
(insert ?\n)))))
(when (re-search-forward
diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el
index 1e543c88ec..1832e60c6b 100644
--- a/lisp/magit-blame.el
+++ b/lisp/magit-blame.el
@@ -166,7 +166,7 @@ and then turned on again when turning off the latter."
:package-version '(magit . "2.13.0")
:group 'magit-blame
:type 'hook
- :get 'magit-hook-custom-get
+ :get #'magit-hook-custom-get
:options '(magit-blame-maybe-update-revision-buffer
magit-blame-maybe-show-message))
@@ -285,21 +285,21 @@ in `magit-blame-read-only-mode-map' instead.")
(defvar magit-blame-read-only-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "C-m") 'magit-show-commit)
- (define-key map (kbd "p") 'magit-blame-previous-chunk)
- (define-key map (kbd "P") 'magit-blame-previous-chunk-same-commit)
- (define-key map (kbd "n") 'magit-blame-next-chunk)
- (define-key map (kbd "N") 'magit-blame-next-chunk-same-commit)
- (define-key map (kbd "b") 'magit-blame-addition)
- (define-key map (kbd "r") 'magit-blame-removal)
- (define-key map (kbd "f") 'magit-blame-reverse)
- (define-key map (kbd "B") 'magit-blame)
- (define-key map (kbd "c") 'magit-blame-cycle-style)
- (define-key map (kbd "q") 'magit-blame-quit)
- (define-key map (kbd "M-w") 'magit-blame-copy-hash)
- (define-key map (kbd "SPC") 'magit-diff-show-or-scroll-up)
- (define-key map (kbd "S-SPC") 'magit-diff-show-or-scroll-down)
- (define-key map (kbd "DEL") 'magit-diff-show-or-scroll-down)
+ (define-key map (kbd "C-m") #'magit-show-commit)
+ (define-key map (kbd "p") #'magit-blame-previous-chunk)
+ (define-key map (kbd "P") #'magit-blame-previous-chunk-same-commit)
+ (define-key map (kbd "n") #'magit-blame-next-chunk)
+ (define-key map (kbd "N") #'magit-blame-next-chunk-same-commit)
+ (define-key map (kbd "b") #'magit-blame-addition)
+ (define-key map (kbd "r") #'magit-blame-removal)
+ (define-key map (kbd "f") #'magit-blame-reverse)
+ (define-key map (kbd "B") #'magit-blame)
+ (define-key map (kbd "c") #'magit-blame-cycle-style)
+ (define-key map (kbd "q") #'magit-blame-quit)
+ (define-key map (kbd "M-w") #'magit-blame-copy-hash)
+ (define-key map (kbd "SPC") #'magit-diff-show-or-scroll-up)
+ (define-key map (kbd "S-SPC") #'magit-diff-show-or-scroll-down)
+ (define-key map (kbd "DEL") #'magit-diff-show-or-scroll-down)
map)
"Keymap for `magit-blame-read-only-mode'.")
@@ -332,11 +332,11 @@ in `magit-blame-read-only-mode-map' instead.")
(user-error
(concat "Don't call `magit-blame-mode' directly; "
"instead use `magit-blame'")))
- (add-hook 'after-save-hook 'magit-blame--refresh t t)
- (add-hook 'post-command-hook 'magit-blame-goto-chunk-hook t t)
- (add-hook 'before-revert-hook 'magit-blame--remove-overlays t t)
- (add-hook 'after-revert-hook 'magit-blame--refresh t t)
- (add-hook 'read-only-mode-hook 'magit-blame-toggle-read-only t t)
+ (add-hook 'after-save-hook #'magit-blame--refresh t t)
+ (add-hook 'post-command-hook #'magit-blame-goto-chunk-hook t t)
+ (add-hook 'before-revert-hook #'magit-blame--remove-overlays t t)
+ (add-hook 'after-revert-hook #'magit-blame--refresh t t)
+ (add-hook 'read-only-mode-hook #'magit-blame-toggle-read-only t t)
(setq magit-blame-buffer-read-only buffer-read-only)
(when (or magit-blame-read-only magit-buffer-file-name)
(read-only-mode 1))
@@ -357,11 +357,11 @@ in `magit-blame-read-only-mode-map' instead.")
(kill-process magit-blame-process)
(while magit-blame-process
(sit-for 0.01))) ; avoid racing the sentinel
- (remove-hook 'after-save-hook 'magit-blame--refresh t)
- (remove-hook 'post-command-hook 'magit-blame-goto-chunk-hook t)
- (remove-hook 'before-revert-hook 'magit-blame--remove-overlays t)
- (remove-hook 'after-revert-hook 'magit-blame--refresh t)
- (remove-hook 'read-only-mode-hook 'magit-blame-toggle-read-only t)
+ (remove-hook 'after-save-hook #'magit-blame--refresh t)
+ (remove-hook 'post-command-hook #'magit-blame-goto-chunk-hook t)
+ (remove-hook 'before-revert-hook #'magit-blame--remove-overlays t)
+ (remove-hook 'after-revert-hook #'magit-blame--refresh t)
+ (remove-hook 'read-only-mode-hook #'magit-blame-toggle-read-only t)
(unless magit-blame-buffer-read-only
(read-only-mode -1))
(magit-blame-read-only-mode -1)
@@ -429,17 +429,17 @@ modes is toggled, then this mode also gets toggled
automatically.
(list (line-number-at-pos (window-start))
(line-number-at-pos (1- (window-end nil t)))))
(set-process-sentinel magit-this-process
- 'magit-blame-process-quickstart-sentinel)))
+ #'magit-blame-process-quickstart-sentinel)))
(defun magit-blame-run-process (revision file args &optional lines)
(let ((process (magit-parse-git-async
"blame" "--incremental" args
(and lines (list "-L" (apply #'format "%s,%s" lines)))
revision "--" file)))
- (set-process-filter process 'magit-blame-process-filter)
- (set-process-sentinel process 'magit-blame-process-sentinel)
+ (set-process-filter process #'magit-blame-process-filter)
+ (set-process-sentinel process #'magit-blame-process-sentinel)
(process-put process 'arguments (list revision file args))
- (setq magit-blame-cache (make-hash-table :test 'equal))
+ (setq magit-blame-cache (make-hash-table :test #'equal))
(setq magit-blame-process process)))
(defun magit-blame-process-quickstart-sentinel (process event)
@@ -883,8 +883,8 @@ then also kill the buffer."
(not (= pos (if previous (point-min) (point-max))))
(setq pos (funcall
(if previous
- 'previous-single-char-property-change
- 'next-single-char-property-change)
+ #'previous-single-char-property-change
+ #'next-single-char-property-change)
pos 'magit-blame-chunk)))
(--when-let (magit-blame--overlay-at pos)
(when (equal (oref (magit-blame-chunk-at pos) orig-rev) rev)
@@ -897,7 +897,7 @@ then also kill the buffer."
(defun magit-blame-previous-chunk-same-commit ()
"Move to the previous chunk from the same commit."
(interactive)
- (magit-blame-next-chunk-same-commit 'previous-single-char-property-change))
+ (magit-blame-next-chunk-same-commit #'previous-single-char-property-change))
(defun magit-blame-cycle-style ()
"Change how blame information is visualized.
@@ -951,14 +951,14 @@ instead of the hash, like `kill-ring-save' would."
:class 'transient-option
:argument "-M"
:allow-empty t
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
(transient-define-argument magit-blame:-C ()
:description "Detect lines moved or copied between files"
:class 'transient-option
:argument "-C"
:allow-empty t
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
;;; Utilities
diff --git a/lisp/magit-bookmark.el b/lisp/magit-bookmark.el
index b65b3acebb..a803aeeae5 100644
--- a/lisp/magit-bookmark.el
+++ b/lisp/magit-bookmark.el
@@ -47,7 +47,7 @@ and the buffer-local values of the variables referenced in its
;; of `bookmark-make-record-function', which states that such
;; functions must do that. See #4356.
(let ((bookmark (cons nil (bookmark-make-record-default 'no-file))))
- (bookmark-prop-set bookmark 'handler 'magit--handle-bookmark)
+ (bookmark-prop-set bookmark 'handler #'magit--handle-bookmark)
(bookmark-prop-set bookmark 'mode major-mode)
(bookmark-prop-set bookmark 'filename (magit-toplevel))
(bookmark-prop-set bookmark 'defaults (list (magit-bookmark-name)))
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index c663eb14bc..7b6e27e8b4 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -605,7 +605,7 @@ defaulting to the branch at point."
;; If that is not the case, then this deletes the tracking branches.
(set-process-sentinel
magit-this-process
- (apply-partially 'magit-delete-remote-branch-sentinel remote refs)))
+ (apply-partially #'magit-delete-remote-branch-sentinel remote
refs)))
(t
(dolist (ref refs)
(message "Delete %s (was %s)" ref
@@ -614,8 +614,8 @@ defaulting to the branch at point."
(magit-refresh)))))
((> (length branches) 1)
(setq branches (delete (magit-get-current-branch) branches))
- (mapc 'magit-branch-maybe-delete-pr-remote branches)
- (mapc 'magit-branch-unset-pushRemote branches)
+ (mapc #'magit-branch-maybe-delete-pr-remote branches)
+ (mapc #'magit-branch-unset-pushRemote branches)
(magit-run-git "branch" (if force "-D" "-d") branches))
(t ; And now for something completely different.
(let* ((branch (car branches))
@@ -847,7 +847,7 @@ and also rename the respective reflog file."
(interactive (list (oref transient-current-prefix scope)))
(magit-run-git-with-editor "branch" "--edit-description" branch))
-(add-hook 'find-file-hook 'magit-branch-description-check-buffers)
+(add-hook 'find-file-hook #'magit-branch-description-check-buffers)
(defun magit-branch-description-check-buffers ()
(and buffer-file-name
@@ -896,7 +896,7 @@ and also rename the respective reflog file."
(transient-define-infix magit-branch.<branch>.rebase ()
:class 'magit--git-variable:choices
- :scope 'magit--read-branch-scope
+ :scope #'magit--read-branch-scope
:variable "branch.%s.rebase"
:fallback "pull.rebase"
:choices '("true" "false")
@@ -904,10 +904,10 @@ and also rename the respective reflog file."
(transient-define-infix magit-branch.<branch>.pushRemote ()
:class 'magit--git-variable:choices
- :scope 'magit--read-branch-scope
+ :scope #'magit--read-branch-scope
:variable "branch.%s.pushRemote"
:fallback "remote.pushDefault"
- :choices 'magit-list-remotes)
+ :choices #'magit-list-remotes)
(transient-define-infix magit-pull.rebase ()
:class 'magit--git-variable:choices
@@ -918,7 +918,7 @@ and also rename the respective reflog file."
(transient-define-infix magit-remote.pushDefault ()
:class 'magit--git-variable:choices
:variable "remote.pushDefault"
- :choices 'magit-list-remotes)
+ :choices #'magit-list-remotes)
(transient-define-infix magit-branch.autoSetupMerge ()
:class 'magit--git-variable:choices
diff --git a/lisp/magit-clone.el b/lisp/magit-clone.el
index 8f5e910b3c..96889d9156 100644
--- a/lisp/magit-clone.el
+++ b/lisp/magit-clone.el
@@ -139,7 +139,7 @@ the name of the owner. Also see `magit-clone-name-alist'."
("m" "mirror" magit-clone-mirror)]
(interactive (list (or magit-clone-always-transient current-prefix-arg)))
(if transient
- (transient-setup #'magit-clone)
+ (transient-setup 'magit-clone)
(call-interactively #'magit-clone-regular)))
(transient-define-argument magit-clone:--filter ()
@@ -147,7 +147,7 @@ the name of the owner. Also see `magit-clone-name-alist'."
:class 'transient-option
:key "-f"
:argument "--filter="
- :reader 'magit-clone-read-filter)
+ :reader #'magit-clone-read-filter)
(defun magit-clone-read-filter (prompt initial-input history)
(magit-completing-read prompt
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index c2b5a42912..8eabac5a55 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -174,7 +174,7 @@ Also see https://github.com/magit/magit/issues/4132.";
:shortarg "-S"
:argument "--gpg-sign="
:allow-empty t
- :reader 'magit-read-gpg-signing-key)
+ :reader #'magit-read-gpg-signing-key)
(defvar magit-gpg-secret-key-hist nil)
@@ -219,7 +219,7 @@ Also see https://github.com/magit/magit/issues/4132.";
:class 'transient-option
:shortarg "-C"
:argument "--reuse-message="
- :reader 'magit-read-reuse-message
+ :reader #'magit-read-reuse-message
:history-key 'magit-revision-history)
(defun magit-read-reuse-message (prompt &optional default history)
@@ -417,7 +417,7 @@ depending on the value of option
`magit-commit-squash-confirm'."
((and (magit-rebase-in-progress-p)
(not (magit-anything-unstaged-p))
(y-or-n-p "Nothing staged. Continue in-progress rebase? "))
- (setq this-command 'magit-rebase-continue)
+ (setq this-command #'magit-rebase-continue)
(magit-run-git-sequencer "rebase" "--continue")
nil)
((and (file-exists-p (magit-git-dir "MERGE_MSG"))
@@ -579,14 +579,14 @@ See `magit-commit-absorb' for an alternative
implementation."
:class 'transient-option
:shortarg "-c"
:argument "--context="
- :reader 'transient-read-number-N0)
+ :reader #'transient-read-number-N0)
(transient-define-argument magit-autofixup:--strict ()
:description "Strictness"
:class 'transient-option
:shortarg "-s"
:argument "--strict="
- :reader 'transient-read-number-N0)
+ :reader #'transient-read-number-N0)
;;; Pending Diff
@@ -624,11 +624,11 @@ See `magit-commit-absorb' for an alternative
implementation."
;; Mention `magit-diff-while-committing' because that's
;; always what I search for when I try to find this line.
-(add-hook 'server-switch-hook 'magit-commit-diff)
-(add-hook 'with-editor-filter-visit-hook 'magit-commit-diff)
+(add-hook 'server-switch-hook #'magit-commit-diff)
+(add-hook 'with-editor-filter-visit-hook #'magit-commit-diff)
(add-to-list 'with-editor-server-window-alist
- (cons git-commit-filename-regexp 'switch-to-buffer))
+ (cons git-commit-filename-regexp #'switch-to-buffer))
;;; Message Utilities
@@ -640,7 +640,7 @@ See `magit-commit-absorb' for an alternative
implementation."
(append (buffer-list (selected-frame))
(buffer-list)))))
-(defvar magit-commit-add-log-insert-function 'magit-commit-add-log-insert
+(defvar magit-commit-add-log-insert-function #'magit-commit-add-log-insert
"Used by `magit-commit-add-log' to insert a single entry.")
(defun magit-commit-add-log ()
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index ed90c76a51..e76c898bd6 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -64,6 +64,8 @@
(declare-function forge--pullreq-ref "forge-pullreq" (pullreq))
;; For `magit-diff-wash-diff'
(declare-function ansi-color-apply-on-region "ansi-color")
+;; For `magit-diff-wash-submodule'
+(declare-function magit-log-wash-log "magit-log" (style args))
;; For keymaps and menus
(declare-function magit-apply "magit-apply" (&rest args))
(declare-function magit-stage "magit-apply" (&optional indent))
@@ -72,6 +74,19 @@
(declare-function magit-reverse "magit-apply" (&rest args))
(declare-function magit-file-rename "magit-files" (file newname))
(declare-function magit-file-untrack "magit-files" (files &optional force))
+(declare-function magit-commit-add-log "magit-commit" ())
+(declare-function magit-diff-trace-definition "magit-log" ())
+(declare-function magit-patch-save "magit-patch" (files &optional arg))
+(declare-function magit-do-async-shell-command "magit-extras" (file))
+(declare-function magit-add-change-log-entry "magit-extras"
+ (&optional whoami file-name other-window))
+(declare-function magit-add-change-log-entry-other-window "magit-extras"
+ (&optional whoami file-name))
+(declare-function magit-diff-edit-hunk-commit "magit-extras" (file))
+(declare-function magit-smerge-keep-current "magit-apply" ())
+(declare-function magit-smerge-keep-upper "magit-apply" ())
+(declare-function magit-smerge-keep-base "magit-apply" ())
+(declare-function magit-smerge-keep-lower "magit-apply" ())
(eval-when-compile
(cl-pushnew 'orig-rev eieio--known-slot-names)
@@ -934,7 +949,7 @@ and `:slant'."
:key "--"
:argument "--"
:prompt "Limit to file(s): "
- :reader 'magit-read-files
+ :reader #'magit-read-files
:multi-value t)
(defun magit-read-files (prompt initial-input history &optional list-fn)
@@ -948,28 +963,28 @@ and `:slant'."
:description "Context lines"
:class 'transient-option
:argument "-U"
- :reader 'transient-read-number-N0)
+ :reader #'transient-read-number-N0)
(transient-define-argument magit-diff:-M ()
:description "Detect renames"
:class 'transient-option
:argument "-M"
:allow-empty t
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
(transient-define-argument magit-diff:-C ()
:description "Detect copies"
:class 'transient-option
:argument "-C"
:allow-empty t
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
(transient-define-argument magit-diff:--diff-algorithm ()
:description "Diff algorithm"
:class 'transient-option
:key "-A"
:argument "--diff-algorithm="
- :reader 'magit-diff-select-algorithm)
+ :reader #'magit-diff-select-algorithm)
(defun magit-diff-select-algorithm (&rest _ignore)
(magit-read-char-case nil t
@@ -983,7 +998,7 @@ and `:slant'."
:class 'transient-option
:key "-i"
:argument "--ignore-submodules="
- :reader 'magit-diff-select-ignore-submodules)
+ :reader #'magit-diff-select-ignore-submodules)
(defun magit-diff-select-ignore-submodules (&rest _ignored)
(magit-read-char-case "Ignore submodules " t
@@ -996,7 +1011,7 @@ and `:slant'."
:class 'transient-option
:key "-m"
:argument "--color-moved="
- :reader 'magit-diff-select-color-moved-mode)
+ :reader #'magit-diff-select-color-moved-mode)
(defun magit-diff-select-color-moved-mode (&rest _ignore)
(magit-read-char-case "Color moved " t
@@ -1011,7 +1026,7 @@ and `:slant'."
:class 'transient-option
:key "=w"
:argument "--color-moved-ws="
- :reader 'magit-diff-select-color-moved-ws-mode)
+ :reader #'magit-diff-select-color-moved-ws-mode)
(defun magit-diff-select-color-moved-ws-mode (&rest _ignore)
(magit-read-char-case "Ignore whitespace " t
@@ -1244,7 +1259,7 @@ be committed."
(magit-diff-while-amending args)))))
(define-key git-commit-mode-map
- (kbd "C-c C-d") 'magit-diff-while-committing)
+ (kbd "C-c C-d") #'magit-diff-while-committing)
(defun magit-diff-while-amending (&optional args)
(magit-diff-setup-buffer "HEAD^" "--cached" args nil))
@@ -1776,7 +1791,7 @@ current frame and contains information about that commit
or
stash, then instead scroll the buffer up. If there is no
commit or stash at point, then prompt for a commit."
(interactive)
- (magit-diff-show-or-scroll 'scroll-up))
+ (magit-diff-show-or-scroll #'scroll-up))
(defun magit-diff-show-or-scroll-down ()
"Update the commit or diff buffer for the thing at point.
@@ -1787,14 +1802,14 @@ current frame and contains information about that
commit or
stash, then instead scroll the buffer down. If there is no
commit or stash at point, then prompt for a commit."
(interactive)
- (magit-diff-show-or-scroll 'scroll-down))
+ (magit-diff-show-or-scroll #'scroll-down))
(defun magit-diff-show-or-scroll (fn)
(let (rev cmd buf win)
(cond
(magit-blame-mode
(setq rev (oref (magit-current-blame-chunk) orig-rev))
- (setq cmd 'magit-show-commit)
+ (setq cmd #'magit-show-commit)
(setq buf (magit-get-mode-buffer 'magit-revision-mode)))
((derived-mode-p 'git-rebase-mode)
(with-slots (action-type target)
@@ -1802,21 +1817,21 @@ commit or stash at point, then prompt for a commit."
(if (not (eq action-type 'commit))
(user-error "No commit on this line")
(setq rev target)
- (setq cmd 'magit-show-commit)
+ (setq cmd #'magit-show-commit)
(setq buf (magit-get-mode-buffer 'magit-revision-mode)))))
(t
(magit-section-case
(branch
(setq rev (magit-ref-maybe-qualify (oref it value)))
- (setq cmd 'magit-show-commit)
+ (setq cmd #'magit-show-commit)
(setq buf (magit-get-mode-buffer 'magit-revision-mode)))
(commit
(setq rev (oref it value))
- (setq cmd 'magit-show-commit)
+ (setq cmd #'magit-show-commit)
(setq buf (magit-get-mode-buffer 'magit-revision-mode)))
(stash
(setq rev (oref it value))
- (setq cmd 'magit-stash-show)
+ (setq cmd #'magit-stash-show)
(setq buf (magit-get-mode-buffer 'magit-stash-mode))))))
(if rev
(if (and buf
@@ -1833,7 +1848,7 @@ commit or stash at point, then prompt for a commit."
(`scroll-up (point-min))
(`scroll-down (point-max)))))))
(let ((magit-display-buffer-noselect t))
- (if (eq cmd 'magit-show-commit)
+ (if (eq cmd #'magit-show-commit)
(apply #'magit-show-commit rev (magit-show-commit--arguments))
(funcall cmd rev))))
(call-interactively #'magit-show-commit))))
@@ -1862,24 +1877,24 @@ commit or stash at point, then prompt for a commit."
(let ((children (--mapcat (oref it children) sections)))
(cond ((and (--any-p (oref it hidden) children)
(--any-p (oref it children) children))
- (mapc 'magit-section-show-headings sections))
- ((seq-some 'magit-section-hidden-body children)
- (mapc 'magit-section-show-children sections))
+ (mapc #'magit-section-show-headings sections))
+ ((seq-some #'magit-section-hidden-body children)
+ (mapc #'magit-section-show-children sections))
(t
- (mapc 'magit-section-hide sections)))))))
+ (mapc #'magit-section-hide sections)))))))
;;; Diff Mode
(defvar magit-diff-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-mode-map)
- (define-key map (kbd "C-c C-d") 'magit-diff-while-committing)
- (define-key map (kbd "C-c C-b") 'magit-go-backward)
- (define-key map (kbd "C-c C-f") 'magit-go-forward)
- (define-key map (kbd "SPC") 'scroll-up)
- (define-key map (kbd "DEL") 'scroll-down)
- (define-key map (kbd "j") 'magit-jump-to-diffstat-or-diff)
- (define-key map [remap write-file] 'magit-patch-save)
+ (define-key map (kbd "C-c C-d") #'magit-diff-while-committing)
+ (define-key map (kbd "C-c C-b") #'magit-go-backward)
+ (define-key map (kbd "C-c C-f") #'magit-go-forward)
+ (define-key map (kbd "SPC") #'scroll-up)
+ (define-key map (kbd "DEL") #'scroll-down)
+ (define-key map (kbd "j") #'magit-jump-to-diffstat-or-diff)
+ (define-key map [remap write-file] #'magit-patch-save)
map)
"Keymap for `magit-diff-mode'.")
@@ -1986,16 +2001,16 @@ Staging and applying changes is documented in info node
(magit-menu-set map [magit-file-rename]
#'magit-file-rename "Rename file"
'(:enable (eq (magit-diff-scope) 'file)))
- (define-key map (kbd "C-j") 'magit-diff-visit-worktree-file)
- (define-key map (kbd "C-<return>") 'magit-diff-visit-worktree-file)
- (define-key map (kbd "C-x 4 <return>") 'magit-diff-visit-file-other-window)
- (define-key map (kbd "C-x 5 <return>") 'magit-diff-visit-file-other-frame)
- (define-key map "&" 'magit-do-async-shell-command)
- (define-key map "C" 'magit-commit-add-log)
- (define-key map (kbd "C-x a") 'magit-add-change-log-entry)
- (define-key map (kbd "C-x 4 a") 'magit-add-change-log-entry-other-window)
- (define-key map (kbd "C-c C-t") 'magit-diff-trace-definition)
- (define-key map (kbd "C-c C-e") 'magit-diff-edit-hunk-commit)
+ (define-key map (kbd "C-j") #'magit-diff-visit-worktree-file)
+ (define-key map (kbd "C-<return>") #'magit-diff-visit-worktree-file)
+ (define-key map (kbd "C-x 4 <return>")
#'magit-diff-visit-file-other-window)
+ (define-key map (kbd "C-x 5 <return>") #'magit-diff-visit-file-other-frame)
+ (define-key map "&" #'magit-do-async-shell-command)
+ (define-key map "C" #'magit-commit-add-log)
+ (define-key map (kbd "C-x a") #'magit-add-change-log-entry)
+ (define-key map (kbd "C-x 4 a") #'magit-add-change-log-entry-other-window)
+ (define-key map (kbd "C-c C-t") #'magit-diff-trace-definition)
+ (define-key map (kbd "C-c C-e") #'magit-diff-edit-hunk-commit)
map)
"Keymap for diff sections.
The classes `magit-file-section' and `magit-hunk-section' derive
@@ -2012,10 +2027,10 @@ keymap is the parent of their keymaps.")
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-diff-section-base-map)
(let ((m (make-sparse-keymap)))
- (define-key m (kbd "RET") 'magit-smerge-keep-current)
- (define-key m (kbd "u") 'magit-smerge-keep-upper)
- (define-key m (kbd "b") 'magit-smerge-keep-base)
- (define-key m (kbd "l") 'magit-smerge-keep-lower)
+ (define-key m (kbd "RET") #'magit-smerge-keep-current)
+ (define-key m (kbd "u") #'magit-smerge-keep-upper)
+ (define-key m (kbd "b") #'magit-smerge-keep-base)
+ (define-key m (kbd "l") #'magit-smerge-keep-lower)
(define-key map smerge-command-prefix m))
map)
"Keymap for `hunk' sections.")
@@ -2112,7 +2127,7 @@ keymap is the parent of their keymaps.")
(magit-diff-wash-diffstat))
(when (re-search-forward magit-diff-headline-re limit t)
(goto-char (line-beginning-position))
- (magit-wash-sequence (apply-partially 'magit-diff-wash-diff args))
+ (magit-wash-sequence (apply-partially #'magit-diff-wash-diff args))
(insert ?\n)))
(defun magit-jump-to-diffstat-or-diff ()
@@ -2388,7 +2403,7 @@ section or a child thereof."
(let ((default-directory
(file-name-as-directory
(expand-file-name module (magit-toplevel)))))
- (magit-git-wash (apply-partially 'magit-log-wash-log 'module)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'module)
"log" "--oneline" "--left-right" range)
(delete-char -1)))))
((and (looking-at "^Submodule \\([^ ]+\\) \\([^ ]+\\) (\\([^)]+\\))$")
@@ -2429,7 +2444,7 @@ section or a child thereof."
(while (not (or (eobp) (looking-at "^[^-+\s\\]")))
(forward-line))
(oset section end (point))
- (oset section washer 'magit-diff-paint-hunk)
+ (oset section washer #'magit-diff-paint-hunk)
(oset section combined combined)
(if combined
(oset section from-ranges (butlast ranges))
@@ -2750,7 +2765,7 @@ or a ref which is not a branch, then it inserts nothing."
1))
(gravatar-size (- size 2)))
(ignore-errors ; service may be unreachable
- (gravatar-retrieve email 'magit-insert-revision-gravatar-cb
+ (gravatar-retrieve email #'magit-insert-revision-gravatar-cb
(list gravatar-size rev
(point-marker)
align-to column))))))))
@@ -3001,8 +3016,8 @@ actually a `diff' but a `diffstat' section."
(and (region-active-p)
;; TODO implement this from first principals
;; currently it's trial-and-error
- (not (and (or (eq this-command 'mouse-drag-region)
- (eq last-command 'mouse-drag-region)
+ (not (and (or (eq this-command #'mouse-drag-region)
+ (eq last-command #'mouse-drag-region)
;; When another window was previously
;; selected then the last-command is
;; some byte-code function.
@@ -3055,7 +3070,7 @@ are highlighted."
(let ((beg (oref section start))
(cnt (oref section content))
(end (oref section end)))
- (when (or (eq this-command 'mouse-drag-region)
+ (when (or (eq this-command #'mouse-drag-region)
(not selection))
(unless (and (region-active-p)
(<= (region-beginning) beg))
@@ -3063,7 +3078,7 @@ are highlighted."
(if (oref section hidden)
(oset section washer #'ignore)
(dolist (child (oref section children))
- (when (or (eq this-command 'mouse-drag-region)
+ (when (or (eq this-command #'mouse-drag-region)
(not (and (region-active-p)
(<= (region-beginning)
(oref child start)))))
@@ -3085,7 +3100,7 @@ are highlighted."
(oref section end))
(pcase (list (oref section type)
(and (member section selection)
- (not (eq this-command 'mouse-drag-region))))
+ (not (eq this-command #'mouse-drag-region))))
(`(file t) 'magit-diff-file-heading-selection)
(`(file nil) 'magit-diff-file-heading-highlight)
(`(module t) 'magit-diff-file-heading-selection)
diff --git a/lisp/magit-ediff.el b/lisp/magit-ediff.el
index 2fe4ff178b..437a874bf6 100644
--- a/lisp/magit-ediff.el
+++ b/lisp/magit-ediff.el
@@ -55,7 +55,7 @@ invoked using Magit."
:package-version '(magit . "2.2.0")
:group 'magit-ediff
:type 'hook
- :get 'magit-hook-custom-get
+ :get #'magit-hook-custom-get
:options '(magit-ediff-cleanup-auxiliary-buffers
magit-ediff-restore-previous-winconf))
@@ -353,16 +353,16 @@ mind at all, then it asks the user for a command to run."
(call-interactively
(magit-read-char-case
"Failed to read your mind; do you want to " t
- (?c "[c]ommit" 'magit-ediff-show-commit)
- (?r "[r]ange" 'magit-ediff-compare)
- (?s "[s]tage" 'magit-ediff-stage)
- (?v "resol[v]e" 'magit-ediff-resolve))))
- ((eq command 'magit-ediff-compare)
- (apply 'magit-ediff-compare revA revB
+ (?c "[c]ommit" #'magit-ediff-show-commit)
+ (?r "[r]ange" #'magit-ediff-compare)
+ (?s "[s]tage" #'magit-ediff-stage)
+ (?v "resol[v]e" #'magit-ediff-resolve))))
+ ((eq command #'magit-ediff-compare)
+ (apply #'magit-ediff-compare revA revB
(magit-ediff-read-files revA revB file)))
- ((eq command 'magit-ediff-show-commit)
+ ((eq command #'magit-ediff-show-commit)
(magit-ediff-show-commit revB))
- ((eq command 'magit-ediff-show-stash)
+ ((eq command #'magit-ediff-show-stash)
(magit-ediff-show-stash revB))
(file
(funcall command file))
diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 024e763585..69aba3cb6a 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -81,19 +81,19 @@ popup."
:class 'transient-option
:shortarg "-t"
:argument "--tool="
- :reader 'magit--read-mergetool)
+ :reader #'magit--read-mergetool)
(transient-define-infix magit-merge.guitool ()
:class 'magit--git-variable
:variable "merge.guitool"
:global t
- :reader 'magit--read-mergetool)
+ :reader #'magit--read-mergetool)
(transient-define-infix magit-merge.tool ()
:class 'magit--git-variable
:variable "merge.tool"
:global t
- :reader 'magit--read-mergetool)
+ :reader #'magit--read-mergetool)
(defun magit--read-mergetool (prompt _initial-input history)
(let ((choices nil)
@@ -218,8 +218,8 @@ like pretty much every other keymap:
(kbd \"C-x g\") \\='ido-enter-magit-status)"
(interactive)
(setq ido-exit 'fallback)
- (setq ido-fallback 'magit-status) ; for Emacs >= 26.2
- (with-no-warnings (setq fallback 'magit-status)) ; for Emacs 25
+ (setq ido-fallback #'magit-status) ; for Emacs >= 26.2
+ (with-no-warnings (setq fallback #'magit-status)) ; for Emacs 25
(exit-minibuffer))
;;;###autoload
@@ -745,7 +745,7 @@ the minibuffer too."
(user-error "Revision stack is empty")))
(define-key git-commit-mode-map
- (kbd "C-c C-w") 'magit-pop-revision-stack)
+ (kbd "C-c C-w") #'magit-pop-revision-stack)
;;;###autoload
(defun magit-copy-section-value (arg)
diff --git a/lisp/magit-fetch.el b/lisp/magit-fetch.el
index 921b38047e..2b7161db68 100644
--- a/lisp/magit-fetch.el
+++ b/lisp/magit-fetch.el
@@ -73,7 +73,7 @@
With a prefix argument or when the push-remote is either not
configured or unusable, then let the user first configure the
push-remote."
- :description 'magit-fetch--pushremote-description
+ :description #'magit-fetch--pushremote-description
(interactive (list (magit-fetch-arguments)))
(let ((remote (magit-get-push-remote)))
(when (or current-prefix-arg
diff --git a/lisp/magit-files.el b/lisp/magit-files.el
index 991ad61b20..96c19b42f1 100644
--- a/lisp/magit-files.el
+++ b/lisp/magit-files.el
@@ -154,7 +154,7 @@ then only after asking. A non-nil value for REVERT is
ignored if REV is
(magit-get-revision-buffer rev file t))
(defun magit-get-revision-buffer (rev file &optional create)
- (funcall (if create 'get-buffer-create 'get-buffer)
+ (funcall (if create #'get-buffer-create #'get-buffer)
(format "%s.~%s~" file (subst-char-in-string ?/ ?_ rev))))
(defun magit-revert-rev-file-buffer (_ignore-auto noconfirm)
@@ -326,12 +326,12 @@ to `magit-dispatch'."
(defvar magit-blob-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map "p" 'magit-blob-previous)
- (define-key map "n" 'magit-blob-next)
- (define-key map "b" 'magit-blame-addition)
- (define-key map "r" 'magit-blame-removal)
- (define-key map "f" 'magit-blame-reverse)
- (define-key map "q" 'magit-kill-this-buffer)
+ (define-key map "p" #'magit-blob-previous)
+ (define-key map "n" #'magit-blob-next)
+ (define-key map "b" #'magit-blame-addition)
+ (define-key map "r" #'magit-blame-removal)
+ (define-key map "f" #'magit-blame-reverse)
+ (define-key map "q" #'magit-kill-this-buffer)
map)
"Keymap for `magit-blob-mode'.")
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index f300f29267..958bddfd60 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -707,7 +707,7 @@ See info node `(magit)Debugging Tools' for more
information."
(replace-regexp-in-string "\\`[^.]+" #'downcase it t t)
(replace-regexp-in-string "[^.]+\\'" #'downcase it t t))
(magit--with-refresh-cache (cons (magit-toplevel) 'config)
- (let ((configs (make-hash-table :test 'equal)))
+ (let ((configs (make-hash-table :test #'equal)))
(dolist (conf (magit-git-items "config" "--list" "-z"))
(let* ((nl-pos (cl-position ?\n conf))
(key (substring conf 0 nl-pos))
@@ -717,7 +717,7 @@ See info node `(magit)Debugging Tools' for more
information."
(defun magit-get (&rest keys)
"Return the value of the Git variable specified by KEYS."
- (car (last (apply 'magit-get-all keys))))
+ (car (last (apply #'magit-get-all keys))))
(defun magit-get-all (&rest keys)
"Return all values of the Git variable specified by KEYS."
@@ -725,7 +725,7 @@ See info node `(magit)Debugging Tools' for more
information."
(arg (and (or (null (car keys))
(string-prefix-p "--" (car keys)))
(pop keys)))
- (key (mapconcat 'identity keys ".")))
+ (key (mapconcat #'identity keys ".")))
(if (and magit--refresh-cache (not arg))
(magit-config-get-from-cached-list key)
(magit-git-items "config" arg "-z" "--get-all" key))))
@@ -736,7 +736,7 @@ Also see `magit-git-config-p'."
(let ((arg (and (or (null (car keys))
(string-prefix-p "--" (car keys)))
(pop keys)))
- (key (mapconcat 'identity keys ".")))
+ (key (mapconcat #'identity keys ".")))
(equal (if magit--refresh-cache
(car (last (magit-config-get-from-cached-list key)))
(magit-git-str "config" arg "--bool" key))
@@ -747,7 +747,7 @@ Also see `magit-git-config-p'."
(let ((arg (and (or (null (car keys))
(string-prefix-p "--" (car keys)))
(pop keys)))
- (key (mapconcat 'identity keys ".")))
+ (key (mapconcat #'identity keys ".")))
(if value
(magit-git-success "config" arg key value)
(magit-git-success "config" arg "--unset" key))
@@ -761,7 +761,7 @@ Also see `magit-git-config-p'."
(let ((arg (and (or (null (car keys))
(string-prefix-p "--" (car keys)))
(pop keys)))
- (var (mapconcat 'identity keys ".")))
+ (var (mapconcat #'identity keys ".")))
(when (magit-get var)
(magit-call-git "config" arg "--unset-all" var))
(dolist (v values)
@@ -1219,8 +1219,8 @@ are considered."
"Return t if there are any staged or unstaged changes.
If optional FILES is non-nil, then only changes to those files
are considered."
- (or (apply 'magit-anything-staged-p ignore-submodules files)
- (apply 'magit-anything-unstaged-p ignore-submodules files)))
+ (or (apply #'magit-anything-staged-p ignore-submodules files)
+ (apply #'magit-anything-unstaged-p ignore-submodules files)))
(defun magit-anything-unmerged-p (&rest files)
"Return t if there are any merge conflicts.
@@ -1282,9 +1282,9 @@ string \"true\", otherwise return nil."
"Return full hash for REV if it names an existing commit."
(magit-rev-verify (concat rev "^{commit}")))
-(defalias 'magit-rev-verify-commit 'magit-commit-p)
+(defalias 'magit-rev-verify-commit #'magit-commit-p)
-(defalias 'magit-rev-hash 'magit-commit-p)
+(defalias 'magit-rev-hash #'magit-commit-p)
(defun magit-rev-equal (a b)
"Return t if there are no differences between the commits A and B."
@@ -1358,7 +1358,7 @@ Git."
(unless (string-match-p "[~^]" it) it)))
(defun magit-get-shortname (rev)
- (let* ((fn (apply-partially 'magit-rev-name rev))
+ (let* ((fn (apply-partially #'magit-rev-name rev))
(name (or (funcall fn "refs/tags/*")
(funcall fn "refs/heads/*")
(funcall fn "refs/remotes/*"))))
@@ -2047,7 +2047,7 @@ exists in the current repository is considered its main
branch."
(defun magit-rev-diff-count (a b)
"Return the commits in A but not B and vice versa.
Return a list of two integers: (A>B B>A)."
- (mapcar 'string-to-number
+ (mapcar #'string-to-number
(split-string (magit-git-string "rev-list"
"--count" "--left-right"
(concat a "..." b))
@@ -2337,7 +2337,7 @@ and this option only controls what face is used.")
(magit-rev-hash (match-string 3 range)))
(magit-rev-hash range)))
-(put 'git-revision 'thing-at-point 'magit-thingatpt--git-revision)
+(put 'git-revision 'thing-at-point #'magit-thingatpt--git-revision)
(defun magit-thingatpt--git-revision ()
(--when-let
(let ((c "\s\n\t~^:?*[\\"))
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index e161d38515..39c3faf9d0 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -117,7 +117,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
:group 'magit-log
:group 'magit-margin
:type magit-log-margin--custom-type
- :initialize 'magit-custom-initialize-reset
+ :initialize #'magit-custom-initialize-reset
:set (apply-partially #'magit-margin-set-variable 'magit-log-mode))
(defcustom magit-log-margin-show-committer-date nil
@@ -145,7 +145,7 @@ This is useful if you use really long branch names."
:group 'magit-log
:type 'boolean)
-(defcustom magit-log-header-line-function 'magit-log-header-line-sentence
+(defcustom magit-log-header-line-function #'magit-log-header-line-sentence
"Function used to generate text shown in header line of log buffers."
:package-version '(magit . "2.12.0")
:group 'magit-log
@@ -153,7 +153,7 @@ This is useful if you use really long branch names."
(function-item magit-log-header-line-sentence)
function))
-(defcustom magit-log-trace-definition-function 'magit-which-function
+(defcustom magit-log-trace-definition-function #'magit-which-function
"Function used to determine the function at point.
This is used by the command `magit-log-trace-definition'.
You should prefer `magit-which-function' over `which-function'
@@ -249,7 +249,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
:group 'magit-log
:group 'magit-margin
:type magit-log-margin--custom-type
- :initialize 'magit-custom-initialize-reset
+ :initialize #'magit-custom-initialize-reset
:set-after '(magit-log-margin)
:set (apply-partially #'magit-margin-set-variable 'magit-log-select-mode))
@@ -289,7 +289,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
:group 'magit-log
:group 'magit-margin
:type magit-log-margin--custom-type
- :initialize 'magit-custom-initialize-reset
+ :initialize #'magit-custom-initialize-reset
:set-after '(magit-log-margin)
:set (apply-partially #'magit-margin-set-variable 'magit-cherry-mode))
@@ -545,28 +545,28 @@ the upstream isn't ahead of the current branch) show."
;; long argument ("--max-count").
:shortarg "-n"
:argument "-n"
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
(transient-define-argument magit:--author ()
:description "Limit to author"
:class 'transient-option
:key "-A"
:argument "--author="
- :reader 'magit-transient-read-person)
+ :reader #'magit-transient-read-person)
(transient-define-argument magit-log:--since ()
:description "Limit to commits since"
:class 'transient-option
:key "=s"
:argument "--since="
- :reader 'transient-read-date)
+ :reader #'transient-read-date)
(transient-define-argument magit-log:--until ()
:description "Limit to commits until"
:class 'transient-option
:key "=u"
:argument "--until="
- :reader 'transient-read-date)
+ :reader #'transient-read-date)
(transient-define-argument magit-log:--*-order ()
:description "Order commits by"
@@ -596,7 +596,7 @@ the upstream isn't ahead of the current branch) show."
:description "Trace line evolution"
:class 'transient-option
:argument "-L"
- :reader 'magit-read-file-trace)
+ :reader #'magit-read-file-trace)
(defun magit-read-file-trace (&rest _ignored)
(let ((file (magit-read-file-from-rev "HEAD" "File"))
@@ -608,7 +608,7 @@ the upstream isn't ahead of the current branch) show."
(defvar magit-log-read-revs-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map crm-local-completion-map)
- (define-key map "\s" 'self-insert-command)
+ (define-key map "\s" #'self-insert-command)
map))
(defun magit-log-read-revs (&optional use-current)
@@ -761,7 +761,7 @@ restrict the log to the lines that the region touches."
beg end)
(setq args (cons (format "-L%s,%s:%s" beg end file)
(cl-delete "-L" args :test
- 'string-prefix-p)))
+ #'string-prefix-p)))
(setq file nil))
args)
(and file (list file))
@@ -795,7 +795,7 @@ restrict the log to the lines that the region touches."
"")
file)
(cl-delete "-L" (car (magit-log-arguments))
- :test 'string-prefix-p))
+ :test #'string-prefix-p))
nil magit-log-buffer-file-locked))
(defun magit-diff-trace-definition ()
@@ -998,14 +998,14 @@ of the current repository first; creating it if
necessary."
(defvar magit-log-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-mode-map)
- (define-key map (kbd "C-c C-b") 'magit-go-backward)
- (define-key map (kbd "C-c C-f") 'magit-go-forward)
- (define-key map (kbd "C-c C-n") 'magit-log-move-to-parent)
- (define-key map "j" 'magit-log-move-to-revision)
- (define-key map "=" 'magit-log-toggle-commit-limit)
- (define-key map "+" 'magit-log-double-commit-limit)
- (define-key map "-" 'magit-log-half-commit-limit)
- (define-key map "q" 'magit-log-bury-buffer)
+ (define-key map (kbd "C-c C-b") #'magit-go-backward)
+ (define-key map (kbd "C-c C-f") #'magit-go-forward)
+ (define-key map (kbd "C-c C-n") #'magit-log-move-to-parent)
+ (define-key map "j" #'magit-log-move-to-revision)
+ (define-key map "=" #'magit-log-toggle-commit-limit)
+ (define-key map "+" #'magit-log-double-commit-limit)
+ (define-key map "-" #'magit-log-half-commit-limit)
+ (define-key map "q" #'magit-log-bury-buffer)
map)
"Keymap for `magit-log-mode'.")
@@ -1101,7 +1101,7 @@ Type \\[magit-reset] to reset `HEAD' to the commit at
point.
(and (member "--reverse" args)
" in reverse")
(and files (concat " touching "
- (mapconcat 'identity files " ")))
+ (mapconcat #'identity files " ")))
(--some (and (string-prefix-p "-L" it)
(concat " " it))
args)))
@@ -1227,7 +1227,7 @@ Do not add this to a hook variable."
(defvar magit-log-count nil)
-(defvar magit-log-format-message-function 'magit-log-propertize-keywords)
+(defvar magit-log-format-message-function #'magit-log-propertize-keywords)
(defun magit-log-wash-log (style args)
(setq args (-flatten args))
@@ -1243,7 +1243,7 @@ Do not add this to a hook variable."
(let ((magit-log-count 0))
(when (looking-at "^\\.\\.\\.")
(magit-delete-line))
- (magit-wash-sequence (apply-partially 'magit-log-wash-rev style
+ (magit-wash-sequence (apply-partially #'magit-log-wash-rev style
(magit-abbrev-length)))
(if (derived-mode-p 'magit-log-mode 'magit-reflog-mode)
(when (eq magit-log-count (magit-log-get-commit-limit))
@@ -1584,13 +1584,13 @@ The shortstat style is experimental and rather slow."
(defvar magit-log-select-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-log-mode-map)
- (define-key map (kbd "C-c C-b") 'undefined)
- (define-key map (kbd "C-c C-f") 'undefined)
- (define-key map (kbd ".") 'magit-log-select-pick)
- (define-key map (kbd "e") 'magit-log-select-pick)
- (define-key map (kbd "C-c C-c") 'magit-log-select-pick)
- (define-key map (kbd "q") 'magit-log-select-quit)
- (define-key map (kbd "C-c C-k") 'magit-log-select-quit)
+ (define-key map (kbd "C-c C-b") #'undefined)
+ (define-key map (kbd "C-c C-f") #'undefined)
+ (define-key map (kbd ".") #'magit-log-select-pick)
+ (define-key map (kbd "e") #'magit-log-select-pick)
+ (define-key map (kbd "C-c C-c") #'magit-log-select-pick)
+ (define-key map (kbd "q") #'magit-log-select-quit)
+ (define-key map (kbd "C-c C-k") #'magit-log-select-quit)
map)
"Keymap for `magit-log-select-mode'.")
@@ -1692,8 +1692,8 @@ Call `magit-log-select-quit-function' if set."
(defvar magit-cherry-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-mode-map)
- (define-key map "q" 'magit-log-bury-buffer)
- (define-key map "L" 'magit-margin-settings)
+ (define-key map "q" #'magit-log-bury-buffer)
+ (define-key map "L" #'magit-margin-settings)
map)
"Keymap for `magit-cherry-mode'.")
@@ -1751,7 +1751,7 @@ Type \\[magit-cherry-pick] to apply the commit at point.
"Insert commit sections into a `magit-cherry-mode' buffer."
(magit-insert-section (cherries)
(magit-insert-heading "Cherry commits:")
- (magit-git-wash (apply-partially 'magit-log-wash-log 'cherry)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'cherry)
"cherry" "-v" "--abbrev"
magit-buffer-upstream
magit-buffer-refname)))
@@ -1918,7 +1918,7 @@ not shared with any local commit) with \"+\", and all
others with
(when (magit-git-success "rev-parse" "@{upstream}")
(magit-insert-section (unpulled "..@{upstream}")
(magit-insert-heading "Unpulled commits:")
- (magit-git-wash (apply-partially 'magit-log-wash-log 'cherry)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'cherry)
"cherry" "-v" (magit-abbrev-arg)
(magit-get-current-branch) "@{upstream}"))))
@@ -1931,7 +1931,7 @@ all others with \"-\"."
(when (magit-git-success "rev-parse" "@{upstream}")
(magit-insert-section (unpushed "@{upstream}..")
(magit-insert-heading "Unpushed commits:")
- (magit-git-wash (apply-partially 'magit-log-wash-log 'cherry)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'cherry)
"cherry" "-v" (magit-abbrev-arg) "@{upstream}"))))
;;; _
diff --git a/lisp/magit-margin.el b/lisp/magit-margin.el
index ae8d8ad9bf..ae0c310880 100644
--- a/lisp/magit-margin.el
+++ b/lisp/magit-margin.el
@@ -137,9 +137,9 @@ does not carry to other options."
(magit-set-window-margin window)
(if enable
(add-hook 'window-configuration-change-hook
- 'magit-set-window-margin nil t)
+ #'magit-set-window-margin nil t)
(remove-hook 'window-configuration-change-hook
- 'magit-set-window-margin t))))
+ #'magit-set-window-margin t))))
(when (and enable (or refresh magit-set-buffer-margin-refresh))
(magit-refresh-buffer))))))
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 49632590c8..c05822bf27 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -52,8 +52,9 @@
(declare-function magit-hunk-section-p "magit-diff" (section) t)
;; For `magit-mode-setup-internal'
(declare-function magit-status-goto-initial-section "magit-status" ())
-;; For `magit-mode' from `bookmark'
+;; For `magit-mode'
(defvar bookmark-make-record-function)
+(declare-function magit--make-bookmark "magit-bookmark" ())
;;; Options
@@ -109,7 +110,7 @@ inside your function."
:group 'magit-refresh
:type 'hook)
-(defcustom magit-display-buffer-function 'magit-display-buffer-traditional
+(defcustom magit-display-buffer-function #'magit-display-buffer-traditional
"The function used to display a Magit buffer.
All Magit buffers (buffers whose major-modes derive from
@@ -130,7 +131,7 @@ which in turn uses the function specified here."
:package-version '(magit . "2.3.0")
:group 'magit-buffers
:type 'hook
- :get 'magit-hook-custom-get
+ :get #'magit-hook-custom-get
:options '(magit-save-window-configuration))
(defcustom magit-post-display-buffer-hook '(magit-maybe-set-dedicated)
@@ -138,11 +139,11 @@ which in turn uses the function specified here."
:package-version '(magit . "2.3.0")
:group 'magit-buffers
:type 'hook
- :get 'magit-hook-custom-get
+ :get #'magit-hook-custom-get
:options '(magit-maybe-set-dedicated))
(defcustom magit-generate-buffer-name-function
- 'magit-generate-buffer-name-default-function
+ #'magit-generate-buffer-name-default-function
"The function used to generate the name for a Magit buffer."
:package-version '(magit . "2.3.0")
:group 'magit-buffers
@@ -197,7 +198,7 @@ support additional %-sequences."
:group 'magit-buffers
:type 'boolean)
-(defcustom magit-bury-buffer-function 'magit-mode-quit-window
+(defcustom magit-bury-buffer-function #'magit-mode-quit-window
"The function used to bury or kill the current Magit buffer."
:package-version '(magit . "3.2.0")
:group 'magit-buffers
@@ -336,6 +337,7 @@ recommended value."
(defvar magit-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-section-mode-map)
+ ;; Don't function-quote but make sure all commands are autoloaded.
(define-key map [C-return] 'magit-visit-thing)
(define-key map (kbd "RET") 'magit-visit-thing)
(define-key map (kbd "M-TAB") 'magit-dired-jump)
@@ -536,10 +538,10 @@ Magit is documented in info node `(magit)'."
(hack-dir-local-variables-non-file-buffer)
(face-remap-add-relative 'header-line 'magit-header-line)
(setq mode-line-process (magit-repository-local-get 'mode-line-process))
- (setq-local revert-buffer-function 'magit-refresh-buffer)
- (setq-local bookmark-make-record-function 'magit--make-bookmark)
- (setq-local imenu-create-index-function 'magit--imenu-create-index)
- (setq-local isearch-filter-predicate 'magit-section--open-temporarily))
+ (setq-local revert-buffer-function #'magit-refresh-buffer)
+ (setq-local bookmark-make-record-function #'magit--make-bookmark)
+ (setq-local imenu-create-index-function #'magit--imenu-create-index)
+ (setq-local isearch-filter-predicate #'magit-section--open-temporarily))
;;; Local Variables
@@ -620,7 +622,7 @@ your mode instead of adding an entry to this variable.")
(with-current-buffer buffer
(setq magit-previous-section section)
(funcall mode)
- (magit-xref-setup 'magit-setup-buffer-internal bindings)
+ (magit-xref-setup #'magit-setup-buffer-internal bindings)
(pcase-dolist (`(,var ,val) bindings)
(set (make-local-variable var) val))
(when created
@@ -1171,7 +1173,7 @@ Run hooks `magit-pre-refresh-hook' and
`magit-post-refresh-hook'."
(with-current-buffer buffer
(magit-refresh-buffer))))
(setq magit-after-save-refresh-buffers nil)
- (remove-hook 'post-command-hook 'magit-after-save-refresh-buffers))
+ (remove-hook 'post-command-hook #'magit-after-save-refresh-buffers))
(defun magit-after-save-refresh-status ()
"Refresh the status buffer of the current repository.
@@ -1190,7 +1192,7 @@ should obviously not add this function to that hook."
(magit-inside-worktree-p t))
(--when-let (ignore-errors (magit-get-mode-buffer 'magit-status-mode))
(add-to-list 'magit-after-save-refresh-buffers it)
- (add-hook 'post-command-hook 'magit-after-save-refresh-buffers))))
+ (add-hook 'post-command-hook #'magit-after-save-refresh-buffers))))
(defun magit-maybe-save-repository-buffers ()
"Maybe save file-visiting buffers belonging to the current repository.
diff --git a/lisp/magit-notes.el b/lisp/magit-notes.el
index 5d0fbec133..668e0bfb5a 100644
--- a/lisp/magit-notes.el
+++ b/lisp/magit-notes.el
@@ -71,21 +71,21 @@
(transient-define-infix magit-core.notesRef ()
:class 'magit--git-variable
:variable "core.notesRef"
- :reader 'magit-notes-read-ref
+ :reader #'magit-notes-read-ref
:prompt "Set local core.notesRef")
(transient-define-infix magit-notes.displayRef ()
:class 'magit--git-variable
:variable "notes.displayRef"
:multi-value t
- :reader 'magit-notes-read-refs
+ :reader #'magit-notes-read-refs
:prompt "Set local notes.displayRef")
(transient-define-infix magit-global-core.notesRef ()
:class 'magit--git-variable
:variable "core.notesRef"
:global t
- :reader 'magit-notes-read-ref
+ :reader #'magit-notes-read-ref
:prompt "Set global core.notesRef")
(transient-define-infix magit-global-notes.displayRef ()
@@ -93,7 +93,7 @@
:variable "notes.displayRef"
:global t
:multi-value t
- :reader 'magit-notes-read-refs
+ :reader #'magit-notes-read-refs
:prompt "Set global notes.displayRef")
(transient-define-argument magit-notes:--ref ()
@@ -101,7 +101,7 @@
:class 'transient-option
:key "-r"
:argument "--ref="
- :reader 'magit-notes-read-ref)
+ :reader #'magit-notes-read-ref)
(transient-define-argument magit-notes:--strategy ()
:description "Merge strategy"
diff --git a/lisp/magit-obsolete.el b/lisp/magit-obsolete.el
index e6605f343f..59f52ed20a 100644
--- a/lisp/magit-obsolete.el
+++ b/lisp/magit-obsolete.el
@@ -34,10 +34,10 @@
;;; Obsolete since v3.0.0
(define-obsolete-function-alias 'magit-diff-visit-file-worktree
- 'magit-diff-visit-worktree-file "Magit 3.0.0")
+ #'magit-diff-visit-worktree-file "Magit 3.0.0")
(define-obsolete-function-alias 'magit-status-internal
- 'magit-status-setup-buffer "Magit 3.0.0")
+ #'magit-status-setup-buffer "Magit 3.0.0")
(define-obsolete-variable-alias 'magit-mode-setup-hook
'magit-setup-buffer-hook "Magit 3.0.0")
@@ -46,10 +46,10 @@
'magit-branch-direct-configure "Magit 3.0.0")
(define-obsolete-function-alias 'magit-dispatch-popup
- 'magit-dispatch "Magit 3.0.0")
+ #'magit-dispatch "Magit 3.0.0")
(define-obsolete-function-alias 'magit-repolist-column-dirty
- 'magit-repolist-column-flag "Magit 3.0.0")
+ #'magit-repolist-column-flag "Magit 3.0.0")
(define-obsolete-variable-alias 'magit-disable-line-numbers
'magit-section-disable-line-numbers "Magit 3.0.0")
diff --git a/lisp/magit-patch.el b/lisp/magit-patch.el
index e526beadab..1d7bc100fc 100644
--- a/lisp/magit-patch.el
+++ b/lisp/magit-patch.el
@@ -163,7 +163,7 @@ which creates patches for all commits that are reachable
from
:key "C-m v "
:shortarg "-v"
:argument "--reroll-count="
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
(transient-define-argument magit-format-patch:--interdiff ()
:description "Insert interdiff"
@@ -214,21 +214,21 @@ which creates patches for all commits that are reachable
from
:class 'transient-option
:key "C-m C-f"
:argument "--from="
- :reader 'magit-transient-read-person)
+ :reader #'magit-transient-read-person)
(transient-define-argument magit-format-patch:--to ()
:description "To"
:class 'transient-option
:key "C-m C-t"
:argument "--to="
- :reader 'magit-transient-read-person)
+ :reader #'magit-transient-read-person)
(transient-define-argument magit-format-patch:--cc ()
:description "CC"
:class 'transient-option
:key "C-m C-c"
:argument "--cc="
- :reader 'magit-transient-read-person)
+ :reader #'magit-transient-read-person)
(transient-define-argument magit-format-patch:--output-directory ()
:description "Output directory"
@@ -236,7 +236,7 @@ which creates patches for all commits that are reachable
from
:key "C-m o "
:shortarg "-o"
:argument "--output-directory="
- :reader 'transient-read-existing-directory)
+ :reader #'transient-read-existing-directory)
;;;###autoload (autoload 'magit-patch-apply "magit-patch" nil t)
(transient-define-prefix magit-patch-apply (file &rest args)
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index aff19918a9..ced3acc894 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -954,7 +954,7 @@ as argument."
(apply fn name buffer program args)))
(advice-add 'tramp-sh-handle-start-file-process :around
-
'tramp-sh-handle-start-file-process--magit-tramp-process-environment)
+
#'tramp-sh-handle-start-file-process--magit-tramp-process-environment)
(defun tramp-sh-handle-process-file--magit-tramp-process-environment
(fn program &optional infile destination display &rest args)
@@ -965,7 +965,7 @@ as argument."
(apply fn program infile destination display args)))
(advice-add 'tramp-sh-handle-process-file :around
- 'tramp-sh-handle-process-file--magit-tramp-process-environment)
+ #'tramp-sh-handle-process-file--magit-tramp-process-environment)
(defvar magit-mode-line-process-map
(let ((map (make-sparse-keymap)))
diff --git a/lisp/magit-pull.el b/lisp/magit-pull.el
index 8411bb3383..947bf01996 100644
--- a/lisp/magit-pull.el
+++ b/lisp/magit-pull.el
@@ -87,8 +87,8 @@
With a prefix argument or when the push-remote is either not
configured or unusable, then let the user first configure the
push-remote."
- :if 'magit-get-current-branch
- :description 'magit-pull--pushbranch-description
+ :if #'magit-get-current-branch
+ :description #'magit-pull--pushbranch-description
(interactive (list (magit-pull-arguments)))
(pcase-let ((`(,branch ,remote)
(magit--select-push-remote "pull from there")))
@@ -117,8 +117,8 @@ push-remote."
With a prefix argument or when the upstream is either not
configured or unusable, then let the user first configure
the upstream."
- :if 'magit-get-current-branch
- :description 'magit-pull--upstream-description
+ :if #'magit-get-current-branch
+ :description #'magit-pull--upstream-description
(interactive (list (magit-pull-arguments)))
(let* ((branch (or (magit-get-current-branch)
(user-error "No branch is checked out")))
diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index 918053baa7..89e3dc25b4 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -83,8 +83,8 @@
When the push-remote is not configured, then read the push-remote
from the user, set it, and then push to it. With a prefix
argument the push-remote can be changed before pushed to it."
- :if 'magit-get-current-branch
- :description 'magit-push--pushbranch-description
+ :if #'magit-get-current-branch
+ :description #'magit-push--pushbranch-description
(interactive (list (magit-push-arguments)))
(pcase-let ((`(,branch ,remote ,changed)
(magit--select-push-remote "push there")))
@@ -122,8 +122,8 @@ argument the push-remote can be changed before pushed to
it."
With a prefix argument or when the upstream is either not
configured or unusable, then let the user first configure
the upstream."
- :if 'magit-get-current-branch
- :description 'magit-push--upstream-description
+ :if #'magit-get-current-branch
+ :description #'magit-push--upstream-description
(interactive (list (magit-push-arguments)))
(let* ((branch (or (magit-get-current-branch)
(user-error "No branch is checked out")))
@@ -288,7 +288,7 @@ what this command will do. For example:
(transient-insert-suffix \\='magit-push \"p\"
\\='(\"i\" magit-push-implicitly))"
- :description 'magit-push-implicitly--desc
+ :description #'magit-push-implicitly--desc
(interactive (list (magit-push-arguments)))
(run-hooks 'magit-credential-hook)
(magit-run-git-async "push" "-v" args))
diff --git a/lisp/magit-reflog.el b/lisp/magit-reflog.el
index 9a38b779f8..4acd59c526 100644
--- a/lisp/magit-reflog.el
+++ b/lisp/magit-reflog.el
@@ -68,7 +68,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
:group 'magit-log
:group 'magit-margin
:type magit-log-margin--custom-type
- :initialize 'magit-custom-initialize-reset
+ :initialize #'magit-custom-initialize-reset
:set-after '(magit-log-margin)
:set (apply-partially #'magit-margin-set-variable 'magit-reflog-mode))
@@ -136,8 +136,8 @@ If `HEAD' is detached, then show the reflog for that
instead."
(defvar magit-reflog-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-log-mode-map)
- (define-key map (kbd "C-c C-n") 'undefined)
- (define-key map (kbd "L") 'magit-margin-settings)
+ (define-key map (kbd "C-c C-n") #'undefined)
+ (define-key map (kbd "L") #'magit-margin-settings)
map)
"Keymap for `magit-reflog-mode'.")
@@ -168,7 +168,7 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point.
(defun magit-reflog-refresh-buffer ()
(magit-set-header-line-format (concat "Reflog for " magit-buffer-refname))
(magit-insert-section (reflogbuf)
- (magit-git-wash (apply-partially 'magit-log-wash-log 'reflog)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'reflog)
"reflog" "show" "--format=%h%x00%aN%x00%gd%x00%gs" "--date=raw"
magit-buffer-log-args magit-buffer-refname "--")))
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index f7abc98809..c6f9ef0598 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -130,7 +130,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
:group 'magit-margin
:safe (lambda (val) (memq val '(all branch nil)))
:type magit-log-margin--custom-type
- :initialize 'magit-custom-initialize-reset
+ :initialize #'magit-custom-initialize-reset
:set-after '(magit-log-margin)
:set (apply-partially #'magit-margin-set-variable 'magit-refs-mode))
@@ -277,8 +277,8 @@ the outcome.
(defvar magit-refs-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-mode-map)
- (define-key map (kbd "C-y") 'magit-refs-set-show-commit-count)
- (define-key map (kbd "L") 'magit-margin-settings)
+ (define-key map (kbd "C-y") #'magit-refs-set-show-commit-count)
+ (define-key map (kbd "L") #'magit-margin-settings)
map)
"Keymap for `magit-refs-mode'.")
@@ -317,7 +317,7 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point.
(mapconcat #'identity magit-buffer-arguments " ")))
(magit-insert-section (branchbuf)
(magit-run-section-hook 'magit-refs-sections-hook))
- (add-hook 'kill-buffer-hook 'magit-preserve-section-visibility-cache))
+ (add-hook 'kill-buffer-hook #'magit-preserve-section-visibility-cache))
(cl-defmethod magit-buffer-value (&context (major-mode magit-refs-mode))
(cons magit-buffer-upstream magit-buffer-arguments))
@@ -373,14 +373,14 @@ Type \\[magit-reset] to reset `HEAD' to the commit at
point.
:class 'transient-option
:key "-c"
:argument "--contains="
- :reader 'magit-transient-read-revision)
+ :reader #'magit-transient-read-revision)
(transient-define-argument magit-for-each-ref:--sort ()
:description "Sort"
:class 'transient-option
:key "-s"
:argument "--sort="
- :reader 'magit-read-ref-sort)
+ :reader #'magit-read-ref-sort)
(defun magit-read-ref-sort (prompt initial-input _history)
(magit-completing-read prompt
@@ -512,7 +512,7 @@ line is inserted at all."
(magit-insert-section (branchdesc branch t)
(magit-insert-heading branch ": " (car desc))
(when (cdr desc)
- (insert (mapconcat 'identity (cdr desc) "\n"))
+ (insert (mapconcat #'identity (cdr desc) "\n"))
(insert "\n\n")))))
(defun magit-insert-tags ()
@@ -605,7 +605,7 @@ line is inserted at all."
(magit-make-margin-overlay nil t)))
(defun magit-refs--format-local-branches ()
- (let ((lines (-keep 'magit-refs--format-local-branch
+ (let ((lines (-keep #'magit-refs--format-local-branch
(magit-git-lines
"for-each-ref"
(concat "--format=\
@@ -744,7 +744,7 @@ line is inserted at all."
(magit-insert-section-body
(let ((start (point))
(magit-insert-section--current nil))
- (magit-git-wash (apply-partially 'magit-log-wash-log 'cherry)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'cherry)
"cherry" "-v" (magit-abbrev-arg) magit-buffer-upstream ref)
(if (= (point) start)
(message "No cherries for %s" ref)
diff --git a/lisp/magit-remote.el b/lisp/magit-remote.el
index 4be41fcfaa..dae578612a 100644
--- a/lisp/magit-remote.el
+++ b/lisp/magit-remote.el
@@ -309,20 +309,20 @@ refspec."
(transient-define-infix magit-remote.<remote>.url ()
:class 'magit--git-variable:urls
- :scope 'magit--read-remote-scope
+ :scope #'magit--read-remote-scope
:variable "remote.%s.url"
:multi-value t
:history-key 'magit-remote.<remote>.*url)
(transient-define-infix magit-remote.<remote>.fetch ()
:class 'magit--git-variable
- :scope 'magit--read-remote-scope
+ :scope #'magit--read-remote-scope
:variable "remote.%s.fetch"
:multi-value t)
(transient-define-infix magit-remote.<remote>.pushurl ()
:class 'magit--git-variable:urls
- :scope 'magit--read-remote-scope
+ :scope #'magit--read-remote-scope
:variable "remote.%s.pushurl"
:multi-value t
:history-key 'magit-remote.<remote>.*url
@@ -330,12 +330,12 @@ refspec."
(transient-define-infix magit-remote.<remote>.push ()
:class 'magit--git-variable
- :scope 'magit--read-remote-scope
+ :scope #'magit--read-remote-scope
:variable "remote.%s.push")
(transient-define-infix magit-remote.<remote>.tagopt ()
:class 'magit--git-variable:choices
- :scope 'magit--read-remote-scope
+ :scope #'magit--read-remote-scope
:variable "remote.%s.tagOpt"
:choices '("--no-tags" "--tags"))
diff --git a/lisp/magit-repos.el b/lisp/magit-repos.el
index efd8147ecc..7b83a03fe1 100644
--- a/lisp/magit-repos.el
+++ b/lisp/magit-repos.el
@@ -64,7 +64,7 @@ This option controls which repositories are being listed by
:package-version '(magit . "2.9.0")
:group 'magit-repolist
:type 'hook
- :get 'magit-hook-custom-get
+ :get #'magit-hook-custom-get
:options '(hl-line-mode))
(defcustom magit-repolist-columns
@@ -260,11 +260,11 @@ If it contains \"%s\" then the directory is substituted
for that."
(defvar magit-repolist-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
- (define-key map (kbd "C-m") 'magit-repolist-status)
- (define-key map (kbd "m") 'magit-repolist-mark)
- (define-key map (kbd "u") 'magit-repolist-unmark)
- (define-key map (kbd "f") 'magit-repolist-fetch)
- (define-key map (kbd "5") 'magit-repolist-find-file-other-frame)
+ (define-key map (kbd "C-m") #'magit-repolist-status)
+ (define-key map (kbd "m") #'magit-repolist-mark)
+ (define-key map (kbd "u") #'magit-repolist-unmark)
+ (define-key map (kbd "f") #'magit-repolist-fetch)
+ (define-key map (kbd "5") #'magit-repolist-find-file-other-frame)
map)
"Local keymap for Magit-Repolist mode buffers.")
@@ -272,11 +272,11 @@ If it contains \"%s\" then the directory is substituted
for that."
"Major mode for browsing a list of Git repositories."
(setq-local x-stretch-cursor nil)
(setq tabulated-list-padding 0)
- (add-hook 'tabulated-list-revert-hook 'magit-repolist-refresh nil t)
+ (add-hook 'tabulated-list-revert-hook #'magit-repolist-refresh nil t)
(setq imenu-prev-index-position-function
- 'magit-imenu--repolist-prev-index-position-function)
+ #'magit-imenu--repolist-prev-index-position-function)
(setq imenu-extract-index-name-function
- 'magit-imenu--repolist-extract-index-name-function))
+ #'magit-imenu--repolist-extract-index-name-function))
(defun magit-repolist-setup (columns)
(unless magit-repository-directories
@@ -530,7 +530,7 @@ instead."
directory-files-no-dot-files-regexp t)))))
(defun magit-list-repos-uniquify (alist)
- (let (result (dict (make-hash-table :test 'equal)))
+ (let (result (dict (make-hash-table :test #'equal)))
(dolist (a (delete-dups alist))
(puthash (car a) (cons (cdr a) (gethash (car a) dict)) dict))
(maphash
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 80416be5f0..02cc0dc701 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -336,9 +336,9 @@ no effect. This also has no effect for Emacs >= 28, where
(defvar magit-section-heading-map
(let ((map (make-sparse-keymap)))
- (define-key map [double-down-mouse-1] 'ignore)
- (define-key map [double-mouse-1] 'magit-mouse-toggle-section)
- (define-key map [double-mouse-2] 'magit-mouse-toggle-section)
+ (define-key map [double-down-mouse-1] #'ignore)
+ (define-key map [double-mouse-1] #'magit-mouse-toggle-section)
+ (define-key map [double-mouse-2] #'magit-mouse-toggle-section)
map)
"Keymap used in the heading line of all expandable sections.
This keymap is used in addition to the section-specifi keymap,
@@ -360,26 +360,26 @@ if any.")
(magit--context-menu-local menu last-input-event))
(magit-section-context-menu menu last-input-event)
menu)))))
- (define-key map [left-fringe mouse-1] 'magit-mouse-toggle-section)
- (define-key map [left-fringe mouse-2] 'magit-mouse-toggle-section)
- (define-key map (kbd "TAB") 'magit-section-toggle)
- (define-key map [C-tab] 'magit-section-cycle)
- (define-key map [M-tab] 'magit-section-cycle)
+ (define-key map [left-fringe mouse-1] #'magit-mouse-toggle-section)
+ (define-key map [left-fringe mouse-2] #'magit-mouse-toggle-section)
+ (define-key map (kbd "TAB") #'magit-section-toggle)
+ (define-key map [C-tab] #'magit-section-cycle)
+ (define-key map [M-tab] #'magit-section-cycle)
;; [backtab] is the most portable binding for Shift+Tab.
- (define-key map [backtab] 'magit-section-cycle-global)
- (define-key map (kbd "^") 'magit-section-up)
- (define-key map (kbd "p") 'magit-section-backward)
- (define-key map (kbd "n") 'magit-section-forward)
- (define-key map (kbd "M-p") 'magit-section-backward-sibling)
- (define-key map (kbd "M-n") 'magit-section-forward-sibling)
- (define-key map (kbd "1") 'magit-section-show-level-1)
- (define-key map (kbd "2") 'magit-section-show-level-2)
- (define-key map (kbd "3") 'magit-section-show-level-3)
- (define-key map (kbd "4") 'magit-section-show-level-4)
- (define-key map (kbd "M-1") 'magit-section-show-level-1-all)
- (define-key map (kbd "M-2") 'magit-section-show-level-2-all)
- (define-key map (kbd "M-3") 'magit-section-show-level-3-all)
- (define-key map (kbd "M-4") 'magit-section-show-level-4-all)
+ (define-key map [backtab] #'magit-section-cycle-global)
+ (define-key map (kbd "^") #'magit-section-up)
+ (define-key map (kbd "p") #'magit-section-backward)
+ (define-key map (kbd "n") #'magit-section-forward)
+ (define-key map (kbd "M-p") #'magit-section-backward-sibling)
+ (define-key map (kbd "M-n") #'magit-section-forward-sibling)
+ (define-key map (kbd "1") #'magit-section-show-level-1)
+ (define-key map (kbd "2") #'magit-section-show-level-2)
+ (define-key map (kbd "3") #'magit-section-show-level-3)
+ (define-key map (kbd "4") #'magit-section-show-level-4)
+ (define-key map (kbd "M-1") #'magit-section-show-level-1-all)
+ (define-key map (kbd "M-2") #'magit-section-show-level-2-all)
+ (define-key map (kbd "M-3") #'magit-section-show-level-3-all)
+ (define-key map (kbd "M-4") #'magit-section-show-level-4-all)
map)
"Parent keymap for all keymaps of modes derived from `magit-section-mode'.")
@@ -406,11 +406,11 @@ Magit-Section is documented in info node
`(magit-section)'."
(add-hook 'post-command-hook #'magit-section-post-command-hook t t)
(add-hook 'deactivate-mark-hook #'magit-section-deactivate-mark t t)
(setq-local redisplay-highlight-region-function
- 'magit-section--highlight-region)
+ #'magit-section--highlight-region)
(setq-local redisplay-unhighlight-region-function
- 'magit-section--unhighlight-region)
+ #'magit-section--unhighlight-region)
(when (fboundp 'magit-section-context-menu)
- (add-hook 'context-menu-functions 'magit-section-context-menu 10 t))
+ (add-hook 'context-menu-functions #'magit-section-context-menu 10 t))
(when magit-section-disable-line-numbers
(when (bound-and-true-p global-linum-mode)
(linum-mode -1))
@@ -932,7 +932,7 @@ children."
(defun magit-section-hide-children (section)
"Recursively hide the bodies of children of the current section."
(interactive (list (magit-current-section)))
- (mapc 'magit-section-hide (oref section children)))
+ (mapc #'magit-section-hide (oref section children)))
(defun magit-section-show-headings (section)
"Recursively show headings of children of the current section.
@@ -959,7 +959,7 @@ hidden."
(cond ((and (--any-p (oref it hidden) children)
(--any-p (oref it children) children))
(magit-section-show-headings section))
- ((seq-some 'magit-section-hidden-body children)
+ ((seq-some #'magit-section-hidden-body children)
(magit-section-show-children section))
(t
(magit-section-hide section))))))
@@ -971,14 +971,14 @@ hidden."
(cond ((and (--any-p (oref it hidden) children)
(--any-p (oref it children) children))
(magit-section-show-headings magit-root-section))
- ((seq-some 'magit-section-hidden-body children)
+ ((seq-some #'magit-section-hidden-body children)
(magit-section-show-children magit-root-section))
(t
- (mapc 'magit-section-hide children)))))
+ (mapc #'magit-section-hide children)))))
(defun magit-section-hidden-body (section &optional pred)
(--if-let (oref section children)
- (funcall (or pred '-any-p) 'magit-section-hidden-body it)
+ (funcall (or pred #'-any-p) #'magit-section-hidden-body it)
(and (oref section content)
(oref section hidden))))
@@ -1884,7 +1884,7 @@ invisible."
(funcall fn)))
(advice-add 'isearch-clean-overlays :around
- 'isearch-clean-overlays@magit-mode)
+ #'isearch-clean-overlays@magit-mode)
;;; Utilities
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index 025d7aac2f..6601b99d82 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -165,7 +165,7 @@ This discards all changes made since the sequence started."
:class 'transient-option
:shortarg "-m"
:argument "--mainline="
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
(defun magit-cherry-pick-read-args (prompt)
(list (or (nreverse (magit-region-values 'commit))
@@ -176,8 +176,8 @@ This discards all changes made since the sequence started."
(declare (indent defun))
(let ((commits (or (nreverse (magit-region-values 'commit))
(list (funcall (if away
- 'magit-read-branch-or-commit
- 'magit-read-other-branch-or-commit)
+ #'magit-read-branch-or-commit
+ #'magit-read-other-branch-or-commit)
(format "%s cherry" (capitalize verb))))))
(current (or (magit-get-current-branch)
(and allow-detached (magit-rev-parse "HEAD")))))
@@ -340,7 +340,7 @@ the process manually."
(magit-run-git-sequencer
(if revert "revert" "cherry-pick")
(pcase-let ((`(,merge ,non-merge)
- (-separate 'magit-merge-commit-p commits)))
+ (-separate #'magit-merge-commit-p commits)))
(cond
((not merge)
(--remove (string-prefix-p "--mainline=" it) args))
@@ -448,7 +448,7 @@ without prompting."
:class 'transient-option
:argument "-p"
:allow-empty t
- :reader 'transient-read-number-N+)
+ :reader #'transient-read-number-N+)
;;;###autoload
(defun magit-am-apply-patches (&optional files args)
@@ -580,8 +580,8 @@ This discards all changes made since the sequence started."
With a prefix argument or when the push-remote is either not
configured or unusable, then let the user first configure the
push-remote."
- :if 'magit-get-current-branch
- :description 'magit-pull--pushbranch-description
+ :if #'magit-get-current-branch
+ :description #'magit-pull--pushbranch-description
(interactive (list (magit-rebase-arguments)))
(pcase-let ((`(,branch ,remote)
(magit--select-push-remote "rebase onto that")))
@@ -594,8 +594,8 @@ push-remote."
With a prefix argument or when the upstream is either not
configured or unusable, then let the user first configure
the upstream."
- :if 'magit-get-current-branch
- :description 'magit-rebase--upstream-description
+ :if #'magit-get-current-branch
+ :description #'magit-rebase--upstream-description
(interactive (list (magit-rebase-arguments)))
(let* ((branch (or (magit-get-current-branch)
(user-error "No branch is checked out")))
@@ -1052,7 +1052,7 @@ status buffer (i.e. the reverse of how they will be
applied)."
(magit-sequence-insert-commit "gone" stop 'magit-sequence-drop)))
(setq stop nil))))
(dolist (rev done)
- (apply 'magit-sequence-insert-commit
+ (apply #'magit-sequence-insert-commit
(cond ((equal rev stop)
;; ...but its reincarnation lives on.
;; Or it didn't die in the first place.
diff --git a/lisp/magit-stash.el b/lisp/magit-stash.el
index 09b25865d2..12b5d20bc4 100644
--- a/lisp/magit-stash.el
+++ b/lisp/magit-stash.el
@@ -79,7 +79,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
:group 'magit-stash
:group 'magit-margin
:type magit-log-margin--custom-type
- :initialize 'magit-custom-initialize-reset
+ :initialize #'magit-custom-initialize-reset
:set-after '(magit-log-margin)
:set (apply-partially #'magit-margin-set-variable 'magit-stashes-mode))
@@ -419,7 +419,7 @@ instead of \"Stashes:\"."
(backward-char)
(magit-log-format-margin autostash author date)))))
(if verified
- (magit-git-wash (apply-partially 'magit-log-wash-log 'stash)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'stash)
"reflog" "--format=%gd%x00%aN%x00%at%x00%gs" ref)
(insert ?\n)
(save-excursion
@@ -448,7 +448,7 @@ instead of \"Stashes:\"."
(magit-insert-heading (if (equal magit-buffer-refname "refs/stash")
"Stashes:"
(format "Stashes [%s]:" magit-buffer-refname)))
- (magit-git-wash (apply-partially 'magit-log-wash-log 'stash)
+ (magit-git-wash (apply-partially #'magit-log-wash-log 'stash)
"reflog" "--format=%gd%x00%aN%x00%at%x00%gs" magit-buffer-refname)))
(cl-defmethod magit-buffer-value (&context (major-mode magit-stashes-mode))
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index c9a0850a20..1a8d4773a6 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -171,7 +171,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
:group 'magit-status
:group 'magit-margin
:type magit-log-margin--custom-type
- :initialize 'magit-custom-initialize-reset
+ :initialize #'magit-custom-initialize-reset
:set-after '(magit-log-margin)
:set (apply-partially #'magit-margin-set-variable 'magit-status-mode))
@@ -292,7 +292,7 @@ prefix arguments:
(put 'magit-status 'interactive-only 'magit-status-setup-buffer)
;;;###autoload
-(defalias 'magit 'magit-status
+(defalias 'magit #'magit-status
"An alias for `magit-status' for better discoverability.
Instead of invoking this alias for `magit-status' using
@@ -338,8 +338,8 @@ init file: (global-set-key (kbd \"C-x g\")
'magit-status-quick)."
(defvar magit-status-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map magit-mode-map)
- (define-key map "j" 'magit-status-jump)
- (define-key map [remap dired-jump] 'magit-dired-jump)
+ (define-key map "j" #'magit-status-jump)
+ (define-key map [remap dired-jump] #'magit-dired-jump)
map)
"Keymap for `magit-status-mode'.")
@@ -460,7 +460,7 @@ status buffer is first created."
(when (and magit-status-initial-section
(derived-mode-p 'magit-status-mode))
(add-hook 'magit-refresh-buffer-hook
- 'magit-status-goto-initial-section-1 nil t)))
+ #'magit-status-goto-initial-section-1 nil t)))
(defun magit-status-goto-initial-section-1 ()
"In a `magit-status-mode' buffer, jump `magit-status-initial-section'.
@@ -479,7 +479,7 @@ This function removes itself from
`magit-refresh-buffer-hook'."
(magit-section-hide section)
(magit-section-show section))))
(remove-hook 'magit-refresh-buffer-hook
- 'magit-status-goto-initial-section-1 t))
+ #'magit-status-goto-initial-section-1 t))
(defun magit-status-maybe-update-revision-buffer (&optional _)
"When moving in the status buffer, update the revision buffer.
diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el
index fed35475ea..9770da0405 100644
--- a/lisp/magit-submodule.el
+++ b/lisp/magit-submodule.el
@@ -185,7 +185,7 @@ and also setting this variable to t will lead to tears."
())
(cl-defmethod transient-format-description ((obj magit--git-submodule-suffix))
- (let ((value (delq nil (mapcar 'transient-infix-value transient--suffixes))))
+ (let ((value (delq nil (mapcar #'transient-infix-value
transient--suffixes))))
(replace-regexp-in-string
"\\[--[^]]+\\]"
(lambda (match)
@@ -482,7 +482,7 @@ or, failing that, the abbreviated HEAD commit hash."
(magit-with-toplevel
(let* ((modules (magit-list-module-paths))
(path-format (format "%%-%is "
- (min (apply 'max (mapcar 'length modules))
+ (min (apply #'max (mapcar #'length modules))
(/ (window-width) 2))))
(branch-format (format "%%-%is " (min 25 (/ (window-width) 3)))))
(dolist (module modules)
@@ -517,8 +517,8 @@ or, failing that, the abbreviated HEAD commit hash."
(defvar magit-module-section-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "C-j") 'magit-submodule-visit)
- (define-key map [C-return] 'magit-submodule-visit)
+ (define-key map (kbd "C-j") #'magit-submodule-visit)
+ (define-key map [C-return] #'magit-submodule-visit)
(magit-menu-set map [magit-visit-thing]
#'magit-submodule-visit "Visit %s")
(magit-menu-set map [magit-stage-file]
@@ -615,7 +615,7 @@ These sections can be expanded to show the respective
commits."
":")
(oset sec range range)
(magit-git-wash
- (apply-partially 'magit-log-wash-log 'module)
+ (apply-partially #'magit-log-wash-log 'module)
"-c" "push.default=current" "log" "--oneline" range)
(when (> (point)
(oref sec content))
@@ -644,7 +644,7 @@ These sections can be expanded to show the respective
commits."
:group 'magit-repolist-mode
(setq-local x-stretch-cursor nil)
(setq tabulated-list-padding 0)
- (add-hook 'tabulated-list-revert-hook 'magit-submodule-list-refresh nil t)
+ (add-hook 'tabulated-list-revert-hook #'magit-submodule-list-refresh nil t)
(setq imenu-prev-index-position-function
#'magit-imenu--submodule-prev-index-position-function)
(setq imenu-extract-index-name-function
diff --git a/lisp/magit-subtree.el b/lisp/magit-subtree.el
index 3d0514ed40..d7bbece785 100644
--- a/lisp/magit-subtree.el
+++ b/lisp/magit-subtree.el
@@ -71,7 +71,7 @@
:class 'transient-option
:shortarg "-P"
:argument "--prefix="
- :reader 'magit-subtree-read-prefix)
+ :reader #'magit-subtree-read-prefix)
(defun magit-subtree-read-prefix (prompt &optional default _history)
(let* ((insert-default-directory nil)
@@ -107,7 +107,7 @@
:class 'transient-option
:key "-o"
:argument "--onto="
- :reader 'magit-transient-read-revision)
+ :reader #'magit-transient-read-revision)
(defun magit-subtree-prefix (transient prompt)
(--if-let (--first (string-prefix-p "--prefix=" it)
diff --git a/lisp/magit-tag.el b/lisp/magit-tag.el
index 7c3fd0cd6c..a9c9da9e12 100644
--- a/lisp/magit-tag.el
+++ b/lisp/magit-tag.el
@@ -58,7 +58,7 @@
:class 'transient-option
:shortarg "-u"
:argument "--local-user="
- :reader 'magit-read-gpg-signing-key
+ :reader #'magit-read-gpg-signing-key
:history-key 'magit:--gpg-sign)
;;;###autoload
diff --git a/lisp/magit-wip.el b/lisp/magit-wip.el
index d5c8072b8d..adcd8da639 100644
--- a/lisp/magit-wip.el
+++ b/lisp/magit-wip.el
@@ -140,10 +140,10 @@ variant `magit-wip-after-save-mode'."
:lighter magit-wip-after-save-local-mode-lighter
(if magit-wip-after-save-local-mode
(if (and buffer-file-name (magit-inside-worktree-p t))
- (add-hook 'after-save-hook 'magit-wip-commit-buffer-file t t)
+ (add-hook 'after-save-hook #'magit-wip-commit-buffer-file t t)
(setq magit-wip-after-save-local-mode nil)
(user-error "Need a worktree and a file"))
- (remove-hook 'after-save-hook 'magit-wip-commit-buffer-file t)))
+ (remove-hook 'after-save-hook #'magit-wip-commit-buffer-file t)))
(defun magit-wip-after-save-local-mode-turn-on ()
(and buffer-file-name
@@ -224,8 +224,8 @@ command which is about to be called are committed."
:lighter magit-wip-initial-backup-mode-lighter
:global t
(if magit-wip-initial-backup-mode
- (add-hook 'before-save-hook 'magit-wip-commit-initial-backup)
- (remove-hook 'before-save-hook 'magit-wip-commit-initial-backup)))
+ (add-hook 'before-save-hook #'magit-wip-commit-initial-backup)
+ (remove-hook 'before-save-hook #'magit-wip-commit-initial-backup)))
(defun magit--any-wip-mode-enabled-p ()
"Return non-nil if any global wip mode is enabled."
@@ -377,7 +377,7 @@ commit message."
(defun magit-wip-maybe-add-commit-hook ()
(when (and magit-wip-merge-branch
(magit-wip-any-enabled-p))
- (add-hook 'git-commit-post-finish-hook 'magit-wip-commit nil t)))
+ (add-hook 'git-commit-post-finish-hook #'magit-wip-commit nil t)))
(defun magit-wip-any-enabled-p ()
(or magit-wip-mode
diff --git a/lisp/magit-worktree.el b/lisp/magit-worktree.el
index e42e16921b..a86b0ddd7c 100644
--- a/lisp/magit-worktree.el
+++ b/lisp/magit-worktree.el
@@ -33,7 +33,7 @@
;;; Options
-(defcustom magit-worktree-read-directory-name-function 'read-directory-name
+(defcustom magit-worktree-read-directory-name-function #'read-directory-name
"Function used to read a directory for worktree commands.
This is called with one argument, the prompt, and can be used
to e.g. use a base directory other than `default-directory'.
diff --git a/lisp/magit.el b/lisp/magit.el
index 442aac1b11..24fbf0e8ee 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -290,7 +290,7 @@ Also see info node `(magit)Commands for Buffers Visiting
Files'."
(define-key map key def)))))))
(if after-init-time
(magit-maybe-define-global-key-bindings)
- (add-hook 'after-init-hook 'magit-maybe-define-global-key-bindings t)))
+ (add-hook 'after-init-hook #'magit-maybe-define-global-key-bindings t)))
;;; Dispatch Popup
@@ -487,7 +487,7 @@ is run in the top-level directory of the current working
tree."
;;; Version
-(defvar magit-version 'undefined
+(defvar magit-version #'undefined
"The version of Magit that you're using.
Use the function by the same name instead of this variable.")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit 7c8254f6db: Function-quote many more functions,
ELPA Syncer <=