Prefer symbol for eval-after-load's FILE argument

Call eval-after-load with a symbol rather than a string to avoid
potential name conflicts with files that do not provide the feature
(e.g., if a user configures speedbar in a file named "speedbar.el")

Reported-by: John Foerch <jjfoerch@gmail.com>
Ref: https://orgmode.org/list/CAEeGWGKfrV7w9qtPRpAhFtiOCH-+8_ydEe11EoMAkUkbTq1fuA@mail.gmail.com
This commit is contained in:
Kyle Meyer 2020-11-06 00:32:16 -05:00
parent 20374f69e8
commit 51c4cc1a8a
5 changed files with 15 additions and 15 deletions

View File

@ -44,7 +44,7 @@
(org-babel-eval cmd body)))
;;;###autoload
(eval-after-load "org"
(eval-after-load 'org
'(add-to-list 'org-src-lang-modes '("php" . php)))
(defvar org-babel-default-header-args:php '())

View File

@ -36,7 +36,7 @@
))
;;;###autoload
(eval-after-load "org"
(eval-after-load 'org
'(add-to-list 'org-src-lang-modes '("redis" . redis)))
(provide 'ob-redis)

View File

@ -81,7 +81,7 @@
;; TODO: temporary can't find way to let sclang output to stdout for org-babel.
(:output . "none")))
(eval-after-load "org"
(eval-after-load 'org
'(progn
(add-to-list 'org-src-lang-modes '("sclang" . sclang))))

View File

@ -479,7 +479,7 @@ NEW-MARK and OLD-MARK are the text of the new and old marks."
;;; Setting it all up
(eval-after-load "org"
(eval-after-load 'org
'(progn
(add-to-list 'org-todo-setup-filter-hook
#'org-choose-setup-filter)

View File

@ -914,7 +914,7 @@ This also applied for speedbar access."
(setq last-level level)))))
(aref subs 1))))
(eval-after-load "imenu"
(eval-after-load 'imenu
'(progn
(add-hook 'imenu-after-jump-hook
(lambda ()
@ -976,7 +976,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'."
(defvar speedbar-file-key-map)
(declare-function speedbar-add-supported-extension "speedbar" (extension))
(eval-after-load "speedbar"
(eval-after-load 'speedbar
'(progn
(speedbar-add-supported-extension ".org")
(define-key speedbar-file-key-map "<" 'org-speedbar-set-agenda-restriction)
@ -1086,7 +1086,7 @@ ELEMENT is the element at point."
(flyspell-delete-region-overlays beg end)))
(defvar flyspell-delayed-commands)
(eval-after-load "flyspell"
(eval-after-load 'flyspell
'(add-to-list 'flyspell-delayed-commands 'org-self-insert-command))
;;;; Bookmark
@ -1100,7 +1100,7 @@ ELEMENT is the element at point."
(org-show-context 'bookmark-jump)))
;; Make `bookmark-jump' shows the jump location if it was hidden.
(eval-after-load "bookmark"
(eval-after-load 'bookmark
'(if (boundp 'bookmark-after-jump-hook)
;; We can use the hook
(add-hook 'bookmark-after-jump-hook 'org-bookmark-jump-unhide)
@ -1154,13 +1154,13 @@ key."
(local-set-key org-calendar-insert-diary-entry-key
#'org-agenda-diary-entry)))
(eval-after-load "calendar"
(eval-after-load 'calendar
'(add-hook 'calendar-mode-hook #'org--setup-calendar-bindings))
;;;; Saveplace
;; Make sure saveplace shows the location if it was hidden
(eval-after-load "saveplace"
(eval-after-load 'saveplace
'(defadvice save-place-find-file-hook (after org-make-visible activate)
"Make the position visible."
(org-bookmark-jump-unhide)))
@ -1168,7 +1168,7 @@ key."
;;;; Ecb
;; Make sure ecb shows the location if it was hidden
(eval-after-load "ecb"
(eval-after-load 'ecb
'(defadvice ecb-method-clicked (after esf/org-show-context activate)
"Make hierarchy visible when jumping into location from ECB tree buffer."
(when (derived-mode-p 'org-mode)
@ -1182,17 +1182,17 @@ key."
(org-invisible-p))
(org-show-context 'mark-goto)))
(eval-after-load "simple"
(eval-after-load 'simple
'(defadvice pop-to-mark-command (after org-make-visible activate)
"Make the point visible with `org-show-context'."
(org-mark-jump-unhide)))
(eval-after-load "simple"
(eval-after-load 'simple
'(defadvice exchange-point-and-mark (after org-make-visible activate)
"Make the point visible with `org-show-context'."
(org-mark-jump-unhide)))
(eval-after-load "simple"
(eval-after-load 'simple
'(defadvice pop-global-mark (after org-make-visible activate)
"Make the point visible with `org-show-context'."
(org-mark-jump-unhide)))
@ -1201,7 +1201,7 @@ key."
;; Make "session.el" ignore our circular variable.
(defvar session-globals-exclude)
(eval-after-load "session"
(eval-after-load 'session
'(add-to-list 'session-globals-exclude 'org-mark-ring))
(provide 'org-compat)