diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-09-14 17:53:41 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-09-14 17:53:41 +0200 |
commit | a5e156581517d93b837f59992de8a8568582f8a9 (patch) | |
tree | 3a11ea82b8969be5caf3a0ac0eee32ffde606693 /lisp/vc/vc-git.el | |
parent | 15f42f193ba85489ee2a1e4406dae7944eee97b8 (diff) | |
download | emacs-a5e156581517d93b837f59992de8a8568582f8a9.tar.gz emacs-a5e156581517d93b837f59992de8a8568582f8a9.tar.bz2 emacs-a5e156581517d93b837f59992de8a8568582f8a9.zip |
Speed up Emacs build by autoloading vc-git-annotate-switches-safe-p
* lisp/vc/vc-git.el (vc-git-annotate-switches-safe-p): Put the
definition into the loaddefs file.
Diffstat (limited to 'lisp/vc/vc-git.el')
-rw-r--r-- | lisp/vc/vc-git.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 8d8ea33f8b3..b1025ed7149 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -119,13 +119,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (repeat :tag "Argument List" :value ("") string)) :version "23.1") +;; We put the entire function into the autoload file so that we don't +;; have to load a whole bunch of vc.*el files just to see whether the +;; file-local variable is safe. ;;;###autoload -(defun vc-git-annotate-switches-safe-p (switches) - "Check if local value of `vc-git-annotate-switches' is safe. +(progn + (defun vc-git-annotate-switches-safe-p (switches) + "Check if local value of `vc-git-annotate-switches' is safe. Currently only \"-w\" (ignore whitespace) is considered safe, but this list might be extended in the future." - ;; TODO: Probably most options are perfectly safe. - (equal switches "-w")) + ;; TODO: Probably most options are perfectly safe. + (equal switches "-w"))) (defcustom vc-git-annotate-switches nil "String or list of strings specifying switches for Git blame under VC. |