branch: elpa/magit commit 7f47299581abb6f77870cb5abdae159fcd35b3d5 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Let the byte-compiler check more function references --- lisp/magit-apply.el | 16 ++++++------- lisp/magit-blame.el | 8 +++---- lisp/magit-commit.el | 10 ++++----- lisp/magit-diff.el | 24 ++++++++++---------- lisp/magit-ediff.el | 8 +++---- lisp/magit-log.el | 4 ++-- lisp/magit-mode.el | 32 ++++++++++++++------------ lisp/magit-process.el | 2 +- lisp/magit-refs.el | 10 ++++----- lisp/magit-section.el | 6 ++--- lisp/magit-stash.el | 8 +++---- lisp/magit-status.el | 60 ++++++++++++++++++++++++------------------------- lisp/magit-submodule.el | 10 ++++----- 13 files changed, 101 insertions(+), 97 deletions(-) diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el index 819c72d021c..cbbe2c1b6f1 100644 --- a/lisp/magit-apply.el +++ b/lisp/magit-apply.el @@ -406,10 +406,10 @@ ignored) files." (magit-wip-commit-after-apply files " after stage"))) (defvar magit-post-stage-hook-commands - '(magit-stage - magit-stage-buffer-file - magit-stage-file - magit-stage-modified)) + (list #'magit-stage + #'magit-stage-buffer-file + #'magit-stage-file + #'magit-stage-modified)) (defun magit-run-post-stage-hook () (when (memq this-command magit-post-stage-hook-commands) @@ -494,10 +494,10 @@ ignored) files." (magit-wip-commit-after-apply nil " after unstage")) (defvar magit-post-unstage-hook-commands - '(magit-unstage - magit-unstage-buffer-file - magit-unstage-file - magit-unstage-all)) + (list #'magit-unstage + #'magit-unstage-buffer-file + #'magit-unstage-file + #'magit-unstage-all)) (defun magit-run-post-unstage-hook () (when (memq this-command magit-post-unstage-hook-commands) diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el index 719b954dcf0..fb27be3ef67 100644 --- a/lisp/magit-blame.el +++ b/lisp/magit-blame.el @@ -157,15 +157,15 @@ and then turned on again when turning off the latter." :type '(choice (const :tag "No lighter" "") string)) (defcustom magit-blame-goto-chunk-hook - '(magit-blame-maybe-update-revision-buffer - magit-blame-maybe-show-message) + (list #'magit-blame-maybe-update-revision-buffer + #'magit-blame-maybe-show-message) "Hook run after point entered another chunk." :package-version '(magit . "2.13.0") :group 'magit-blame :type 'hook :get #'magit-hook-custom-get - :options '(magit-blame-maybe-update-revision-buffer - magit-blame-maybe-show-message)) + :options (list #'magit-blame-maybe-update-revision-buffer + #'magit-blame-maybe-show-message)) ;;; Faces diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el index 638828b68c0..94ce31de0a3 100644 --- a/lisp/magit-commit.el +++ b/lisp/magit-commit.el @@ -544,11 +544,11 @@ See `magit-commit-absorb' for an alternative implementation." :reader #'transient-read-number-N0) (defvar magit-post-commit-hook-commands - '(magit-commit-extend - magit-commit-fixup - magit-commit-augment - magit-commit-instant-fixup - magit-commit-instant-squash)) + (list #'magit-commit-extend + #'magit-commit-fixup + #'magit-commit-augment + #'magit-commit-instant-fixup + #'magit-commit-instant-squash)) (defun magit-run-post-commit-hook () (when (and (not this-command) diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index 60907e31a0a..644d3ea5b74 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -149,8 +149,8 @@ member of `magit-section-highlight-hook', which see." :type 'boolean) (defcustom magit-diff-highlight-hunk-region-functions - '(magit-diff-highlight-hunk-region-dim-outside - magit-diff-highlight-hunk-region-using-overlays) + (list #'magit-diff-highlight-hunk-region-dim-outside + #'magit-diff-highlight-hunk-region-using-overlays) "The functions used to highlight the hunk-internal region. `magit-diff-highlight-hunk-region-dim-outside' overlays the outside @@ -176,10 +176,10 @@ calling the face function instead." :set-after '(magit-diff-show-lines-boundaries) :group 'magit-diff :type 'hook - :options '(magit-diff-highlight-hunk-region-dim-outside - magit-diff-highlight-hunk-region-using-underline - magit-diff-highlight-hunk-region-using-overlays - magit-diff-highlight-hunk-region-using-face)) + :options (list #'magit-diff-highlight-hunk-region-dim-outside + #'magit-diff-highlight-hunk-region-using-underline + #'magit-diff-highlight-hunk-region-using-overlays + #'magit-diff-highlight-hunk-region-using-face)) (defcustom magit-diff-unmarked-lines-keep-foreground t "Whether `magit-diff-highlight-hunk-region-dim-outside' preserves foreground. @@ -348,12 +348,12 @@ and `--compact-summary'. See the git-diff(1) manpage." goto-address-mode)) (defcustom magit-revision-sections-hook - '(magit-insert-revision-tag - magit-insert-revision-headers - magit-insert-revision-message - magit-insert-revision-notes - magit-insert-revision-diff - magit-insert-xref-buttons) + (list #'magit-insert-revision-tag + #'magit-insert-revision-headers + #'magit-insert-revision-message + #'magit-insert-revision-notes + #'magit-insert-revision-diff + #'magit-insert-xref-buttons) "Hook run to insert sections into a `magit-revision-mode' buffer." :package-version '(magit . "2.3.0") :group 'magit-revision diff --git a/lisp/magit-ediff.el b/lisp/magit-ediff.el index 7f659810450..650268d80dc 100644 --- a/lisp/magit-ediff.el +++ b/lisp/magit-ediff.el @@ -42,8 +42,8 @@ :group 'magit-extensions) (defcustom magit-ediff-quit-hook - '(magit-ediff-cleanup-auxiliary-buffers - magit-ediff-restore-previous-winconf) + (list #'magit-ediff-cleanup-auxiliary-buffers + #'magit-ediff-restore-previous-winconf) "Hooks to run after finishing Ediff, when that was invoked using Magit. The hooks are run in the Ediff control buffer. This is similar to `ediff-quit-hook' but takes the needs of Magit into account. @@ -53,8 +53,8 @@ invoked using Magit." :group 'magit-ediff :type 'hook :get #'magit-hook-custom-get - :options '(magit-ediff-cleanup-auxiliary-buffers - magit-ediff-restore-previous-winconf)) + :options (list #'magit-ediff-cleanup-auxiliary-buffers + #'magit-ediff-restore-previous-winconf)) (defcustom magit-ediff-dwim-resolve-function #'magit-ediff-resolve-rest "The function `magit-ediff-dwim' uses to resolve conflicts." diff --git a/lisp/magit-log.el b/lisp/magit-log.el index 93a5d133f85..489d3131afa 100644 --- a/lisp/magit-log.el +++ b/lisp/magit-log.el @@ -300,8 +300,8 @@ AUTHOR-WIDTH has to be an integer. When the name of the author ;;;; Cherry Mode (defcustom magit-cherry-sections-hook - '(magit-insert-cherry-headers - magit-insert-cherry-commits) + (list #'magit-insert-cherry-headers + #'magit-insert-cherry-commits) "Hook run to insert sections into the cherry buffer." :package-version '(magit . "2.1.0") :group 'magit-log diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index 7becc742062..fa81b340356 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -54,17 +54,17 @@ ;;; Options (defcustom magit-mode-hook - '(magit-load-config-extensions) + (list #'magit-load-config-extensions) "Hook run when entering a mode derived from Magit mode." :package-version '(magit . "3.0.0") :group 'magit-modes :type 'hook - :options '(magit-load-config-extensions - bug-reference-mode)) + :options (list #'magit-load-config-extensions + #'bug-reference-mode)) (defcustom magit-setup-buffer-hook - '(magit-maybe-save-repository-buffers - magit-set-buffer-margin) + (list #'magit-maybe-save-repository-buffers + 'magit-set-buffer-margin) ; from magit-margin.el "Hook run by `magit-setup-buffer'. This is run right after displaying the buffer and right before @@ -75,10 +75,11 @@ should be used instead of this one." :package-version '(magit . "2.3.0") :group 'magit-modes :type 'hook - :options '(magit-maybe-save-repository-buffers - magit-set-buffer-margin)) + :options (list #'magit-maybe-save-repository-buffers + 'magit-set-buffer-margin)) -(defcustom magit-pre-refresh-hook '(magit-maybe-save-repository-buffers) +(defcustom magit-pre-refresh-hook + (list #'magit-maybe-save-repository-buffers) "Hook run before refreshing in `magit-refresh'. This hook, or `magit-post-refresh-hook', should be used @@ -90,9 +91,10 @@ inside your function." :package-version '(magit . "2.4.0") :group 'magit-refresh :type 'hook - :options '(magit-maybe-save-repository-buffers)) + :options (list #'magit-maybe-save-repository-buffers)) (defcustom magit-post-refresh-hook + ;; Do not function-quote to avoid circular dependencies. '(magit-auto-revert-buffers magit-run-post-commit-hook magit-run-post-stage-hook @@ -129,21 +131,22 @@ which in turn uses the function specified here." (function-item display-buffer) (function :tag "Function"))) -(defcustom magit-pre-display-buffer-hook '(magit-save-window-configuration) +(defcustom magit-pre-display-buffer-hook + (list #'magit-save-window-configuration) "Hook run by `magit-display-buffer' before displaying the buffer." :package-version '(magit . "2.3.0") :group 'magit-buffers :type 'hook :get #'magit-hook-custom-get - :options '(magit-save-window-configuration)) + :options (list #'magit-save-window-configuration)) -(defcustom magit-post-display-buffer-hook '(magit-maybe-set-dedicated) +(defcustom magit-post-display-buffer-hook (list #'magit-maybe-set-dedicated) "Hook run by `magit-display-buffer' after displaying the buffer." :package-version '(magit . "2.3.0") :group 'magit-buffers :type 'hook :get #'magit-hook-custom-get - :options '(magit-maybe-set-dedicated)) + :options (list #'magit-maybe-set-dedicated)) (defcustom magit-generate-buffer-name-function #'magit-generate-buffer-name-default-function @@ -269,7 +272,8 @@ and Buffer Variables'." (const :tag "use args from buffer if it is current" current) (const :tag "never use args from buffer" never))) -(defcustom magit-region-highlight-hook '(magit-diff-update-hunk-region) +(defcustom magit-region-highlight-hook + '(magit-diff-update-hunk-region) ; from magit-diff.el "Functions used to highlight the region. Each function is run with the current section as only argument diff --git a/lisp/magit-process.el b/lisp/magit-process.el index 179abca9e85..91c90def606 100644 --- a/lisp/magit-process.el +++ b/lisp/magit-process.el @@ -191,7 +191,7 @@ non-nil, then the password is read from the user instead." :package-version '(magit . "2.3.0") :group 'magit-process :type 'hook - :options '(magit-process-password-auth-source)) + :options (list #'magit-process-password-auth-source)) (defcustom magit-process-username-prompt-regexps '("^Username for '.*': ?$") diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el index b2a4ab086b9..bfb9f7a82a0 100644 --- a/lisp/magit-refs.el +++ b/lisp/magit-refs.el @@ -42,11 +42,11 @@ :type 'hook) (defcustom magit-refs-sections-hook - '(magit-insert-error-header - magit-insert-branch-description - magit-insert-local-branches - magit-insert-remote-branches - magit-insert-tags) + (list #'magit-insert-error-header + #'magit-insert-branch-description + #'magit-insert-local-branches + #'magit-insert-remote-branches + #'magit-insert-tags) "Hook run to insert sections into a references buffer." :package-version '(magit . "2.1.0") :group 'magit-refs diff --git a/lisp/magit-section.el b/lisp/magit-section.el index fef1c133364..89d3c598712 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -109,8 +109,8 @@ similar defect.") That function in turn is used by all section movement commands.") (defvar magit-section-highlight-hook - '(magit-section-highlight - magit-section-highlight-selection) + (list #'magit-section-highlight + #'magit-section-highlight-selection) "Functions used to highlight the current section. Each function is run with the current section as only argument until one of them returns non-nil.") @@ -123,7 +123,7 @@ unhighlighted without requiring a specialized unhighlighter, diff-related sections being the only exception.") (defvar magit-section-set-visibility-hook - '(magit-section-cached-visibility) + (list #'magit-section-cached-visibility) "Hook used to set the initial visibility of a section. Stop at the first function that returns non-nil. The returned value should be `show', `hide' or nil. If no function returns diff --git a/lisp/magit-stash.el b/lisp/magit-stash.el index 8cfb9d7dd75..cf1830acbcc 100644 --- a/lisp/magit-stash.el +++ b/lisp/magit-stash.el @@ -39,10 +39,10 @@ ;;;; Diff options (defcustom magit-stash-sections-hook - '(magit-insert-stash-notes - magit-insert-stash-worktree - magit-insert-stash-index - magit-insert-stash-untracked) + (list #'magit-insert-stash-notes + #'magit-insert-stash-worktree + #'magit-insert-stash-index + #'magit-insert-stash-untracked) "Hook run to insert sections into stash diff buffers." :package-version '(magit . "2.1.0") :group 'magit-stash diff --git a/lisp/magit-status.el b/lisp/magit-status.el index f9954f8d356..193693d4dee 100644 --- a/lisp/magit-status.el +++ b/lisp/magit-status.el @@ -41,12 +41,12 @@ :type 'hook) (defcustom magit-status-headers-hook - '(magit-insert-error-header - magit-insert-diff-filter-header - magit-insert-head-branch-header - magit-insert-upstream-branch-header - magit-insert-push-branch-header - magit-insert-tags-header) + (list #'magit-insert-error-header + #'magit-insert-diff-filter-header + #'magit-insert-head-branch-header + #'magit-insert-upstream-branch-header + #'magit-insert-push-branch-header + #'magit-insert-tags-header) "Hook run to insert headers into the status buffer. This hook is run by `magit-insert-status-headers', which in turn @@ -55,32 +55,32 @@ all." :package-version '(magit . "2.1.0") :group 'magit-status :type 'hook - :options '(magit-insert-error-header - magit-insert-diff-filter-header - magit-insert-repo-header - magit-insert-remote-header - magit-insert-head-branch-header - magit-insert-upstream-branch-header - magit-insert-push-branch-header - magit-insert-tags-header)) + :options (list #'magit-insert-error-header + #'magit-insert-diff-filter-header + #'magit-insert-repo-header + #'magit-insert-remote-header + #'magit-insert-head-branch-header + #'magit-insert-upstream-branch-header + #'magit-insert-push-branch-header + #'magit-insert-tags-header)) (defcustom magit-status-sections-hook - '(magit-insert-status-headers - magit-insert-merge-log - magit-insert-rebase-sequence - magit-insert-am-sequence - magit-insert-sequencer-sequence - magit-insert-bisect-output - magit-insert-bisect-rest - magit-insert-bisect-log - magit-insert-untracked-files - magit-insert-unstaged-changes - magit-insert-staged-changes - magit-insert-stashes - magit-insert-unpushed-to-pushremote - magit-insert-unpushed-to-upstream-or-recent - magit-insert-unpulled-from-pushremote - magit-insert-unpulled-from-upstream) + (list #'magit-insert-status-headers + #'magit-insert-merge-log + #'magit-insert-rebase-sequence + #'magit-insert-am-sequence + #'magit-insert-sequencer-sequence + #'magit-insert-bisect-output + #'magit-insert-bisect-rest + #'magit-insert-bisect-log + #'magit-insert-untracked-files + #'magit-insert-unstaged-changes + #'magit-insert-staged-changes + #'magit-insert-stashes + #'magit-insert-unpushed-to-pushremote + #'magit-insert-unpushed-to-upstream-or-recent + #'magit-insert-unpulled-from-pushremote + #'magit-insert-unpulled-from-upstream) "Hook run to insert sections into a status buffer." :package-version '(magit . "2.12.0") :group 'magit-status diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el index 01763f54abf..66a0937c6bd 100644 --- a/lisp/magit-submodule.el +++ b/lisp/magit-submodule.el @@ -29,11 +29,11 @@ ;;; Options (defcustom magit-module-sections-hook - '(magit-insert-modules-overview - magit-insert-modules-unpulled-from-upstream - magit-insert-modules-unpulled-from-pushremote - magit-insert-modules-unpushed-to-upstream - magit-insert-modules-unpushed-to-pushremote) + (list #'magit-insert-modules-overview + #'magit-insert-modules-unpulled-from-upstream + #'magit-insert-modules-unpulled-from-pushremote + #'magit-insert-modules-unpushed-to-upstream + #'magit-insert-modules-unpushed-to-pushremote) "Hook run by `magit-insert-modules'. That function isn't part of `magit-status-sections-hook's default