mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
prot-*.el: prefer autoloading instead of declaring
This is done, where appropriate, to ensure that the relevant function is available the moment we need it.
This commit is contained in:
parent
10b45943fb
commit
0740aa2b4b
|
|
@ -408,9 +408,9 @@ Add to `prot-bongo-playlist-change-track-hook'."
|
|||
(declare-function bongo-insert-directory-tree "bongo")
|
||||
(declare-function bongo-insert-file "bongo")
|
||||
(declare-function bongo-library-buffer "bongo")
|
||||
(declare-function dired-filename-at-point "bongo")
|
||||
(declare-function dired-get-marked-files "bongo")
|
||||
(declare-function dired-next-line "bongo")
|
||||
(autoload 'dired-filename-at-point "bongo")
|
||||
(autoload 'dired-get-marked-files "bongo")
|
||||
(autoload 'dired-next-line "bongo")
|
||||
|
||||
(defmacro prot-bongo-dired-library (name doc val)
|
||||
"Create Bongo library function NAME with DOC and VAL."
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'subr-x))
|
||||
(when (featurep 'elfeed)
|
||||
(require 'elfeed))
|
||||
|
||||
|
|
@ -237,7 +238,6 @@ the buffer."
|
|||
(defvar elfeed-search-filter-active)
|
||||
(defvar elfeed-search-filter)
|
||||
(declare-function elfeed-db-get-all-tags "elfeed")
|
||||
(declare-function string-join "elfeed")
|
||||
(declare-function elfeed-search-update "elfeed")
|
||||
(declare-function elfeed-search-clear-filter "elfeed")
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ and after it."
|
|||
|
||||
;;;; Commands
|
||||
|
||||
(declare-function ffap-file-at-point "ffap.el")
|
||||
(autoload 'ffap-file-at-point "ffap.el")
|
||||
|
||||
(defmacro prot-eshell-ffap (name doc &rest body)
|
||||
"Make `find-file-at-point' commands for Eshell.
|
||||
|
|
@ -161,7 +161,7 @@ open the directory in a `dired' buffer."
|
|||
(insert
|
||||
(completing-read "Input from history: " hist nil t))))
|
||||
|
||||
(declare-function cl-remove-if-not "cl-seq")
|
||||
(autoload 'cl-remove-if-not "cl-seq")
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-eshell-find-subdirectory-recursive ()
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ on its own."
|
|||
:lighter " -Λ-" ; greek lambda majuscule
|
||||
(run-hooks 'prot-logos--focus-mode-hook))
|
||||
|
||||
(declare-function buffer-face-mode "face-remap")
|
||||
(declare-function variable-pitch-mode "face-remap")
|
||||
(autoload 'buffer-face-mode "face-remap")
|
||||
(autoload 'variable-pitch-mode "face-remap")
|
||||
|
||||
(defun prot-logos--variable-pitch-toggle ()
|
||||
"Make text use `variable-pitch' face, except for programming."
|
||||
|
|
@ -95,7 +95,7 @@ on its own."
|
|||
|
||||
(add-hook 'prot-logos--focus-mode-hook #'prot-logos--variable-pitch-toggle)
|
||||
|
||||
(declare-function olivetti-mode "olivetti")
|
||||
(autoload 'olivetti-mode "olivetti")
|
||||
|
||||
(defun prot-logos--olivetti-toggle ()
|
||||
"Toggle the variable `olivetti-mode', if available."
|
||||
|
|
@ -115,7 +115,7 @@ on its own."
|
|||
|
||||
(add-hook 'prot-logos--focus-mode-hook #'prot-logos--fringe-toggle)
|
||||
|
||||
(declare-function org-tree-slide-mode "org-tree-slide")
|
||||
(autoload 'org-tree-slide-mode "org-tree-slide")
|
||||
|
||||
(defun prot-logos--org-tree-slide-mode ()
|
||||
"Toggle variable `org-tree-slide-mode' if loaded and needed."
|
||||
|
|
@ -130,7 +130,7 @@ on its own."
|
|||
|
||||
(add-hook 'prot-logos--focus-mode-hook #'prot-logos--org-tree-slide-mode)
|
||||
|
||||
(declare-function org-indent-mode "org")
|
||||
(autoload 'org-indent-mode "org")
|
||||
|
||||
(defun prot-logos--org-indent-mode ()
|
||||
"Toggle variable `org-tree-slide-mode' if loaded and needed."
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ by `prot-minibuffer-completion-windows-regexp'."
|
|||
(setq commands (append commands (list function))))))))))
|
||||
commands))
|
||||
|
||||
(declare-function prot-common-minor-modes-active "prot-common")
|
||||
(autoload 'prot-common-minor-modes-active "prot-common")
|
||||
|
||||
(defun prot-minibuffer--extract-commands-minor ()
|
||||
"Extract commands from active minor modes."
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ mode line's typeface (or the default one if they are the same)."
|
|||
(let ((height (prot-moody--height)))
|
||||
(setq moody-mode-line-height height)))
|
||||
|
||||
(declare-function moody-replace-mode-line-buffer-identification "moody")
|
||||
(declare-function moody-replace-vc-mode "moody")
|
||||
(autoload 'moody-replace-mode-line-buffer-identification "moody")
|
||||
(autoload 'moody-replace-vc-mode "moody")
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode prot-moody-set-height
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ visibility. Else call `indent-for-tab-command'."
|
|||
|
||||
;;; Minor mode setup
|
||||
|
||||
(declare-function org-src-mode "org-src")
|
||||
(autoload 'org-src-mode "org-src")
|
||||
(defvar outline-minor-faces--font-lock-keywords)
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ Basically switches to a new branch or tag."
|
|||
(vc-responsible-backend dir))))
|
||||
(vc-retrieve-tag dir name)))
|
||||
|
||||
(declare-function magit-status "magit")
|
||||
(autoload 'magit-status "magit")
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-project-magit-status ()
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ Add this to a hook, such as `imenu-after-jump-hook'."
|
|||
(recenter nil)
|
||||
(prot-pulse-pulse-line)))
|
||||
|
||||
(declare-function org-at-heading-p "org")
|
||||
(declare-function org-show-entry "org")
|
||||
(declare-function org-reveal "org")
|
||||
(declare-function outline-show-entry "outline")
|
||||
(autoload 'org-at-heading-p "org")
|
||||
(autoload 'org-show-entry "org")
|
||||
(autoload 'org-reveal "org")
|
||||
(autoload 'outline-show-entry "outline")
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-pulse-show-entry ()
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ end of the buffer.")
|
|||
"Regular expression that matches URLs.
|
||||
Copy of variable `browse-url-button-regexp'.")
|
||||
|
||||
(declare-function goto-address-mode "goto-addr")
|
||||
(autoload 'goto-address-mode "goto-addr")
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-search-occur-urls ()
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
;;;; General commands
|
||||
|
||||
(declare-function symbol-at-point "thingatpt")
|
||||
(autoload 'symbol-at-point "thingatpt")
|
||||
|
||||
;;;###autoload
|
||||
(defun prot-simple-describe-symbol (&optional arg)
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ With optional prefix ARG (\\[universal-argument]), use the
|
|||
(dir (if arg default-directory root)))
|
||||
(vc-dir dir)))
|
||||
|
||||
(declare-function log-view-current-entry "log-view")
|
||||
(declare-function dired-get-marked-files "dired")
|
||||
(autoload 'log-view-current-entry "log-view")
|
||||
(autoload 'dired-get-marked-files "dired")
|
||||
|
||||
(defun prot-vc--commit-num ()
|
||||
"Determime whether NUM is a positive integer."
|
||||
|
|
@ -202,7 +202,7 @@ completion."
|
|||
"Run `prot-vc-git-log-view-mode-hook'."
|
||||
(run-hooks 'prot-vc-git-log-view-mode-hook))
|
||||
|
||||
(declare-function vc-git-log-view-mode "vc-git")
|
||||
(autoload 'vc-git-log-view-mode "vc-git")
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode prot-vc-git-setup-mode
|
||||
|
|
|
|||
Loading…
Reference in a new issue