[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6c58d90: Make more load-hooks obsolete (Bug#21563)
From: |
Stefan Kangas |
Subject: |
master 6c58d90: Make more load-hooks obsolete (Bug#21563) |
Date: |
Tue, 20 Oct 2020 13:14:14 -0400 (EDT) |
branch: master
commit 6c58d900427e8195c5cfc37e7422bdb0bc73c047
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Make more load-hooks obsolete (Bug#21563)
* lisp/progmodes/dcl-mode.el (dcl-mode):
* lisp/progmodes/idlw-complete-structtag.el: Recommend
with-eval-after-load instead of load-hooks.
* lisp/calc/calc-ext.el (calc-ext-load-hook):
* lisp/emacs-lisp/bytecomp.el (bytecomp-load-hook):
* lisp/emacs-lisp/cl-extra.el (cl-extra-load-hook):
* lisp/emacs-lisp/cl-macs.el (cl-macs-load-hook):
* lisp/emacs-lisp/cl-seq.el (cl-seq-load-hook):
* lisp/gnus/message.el (message-load-hook):
* lisp/gnus/nnheader.el (nnheader-load-hook):
* lisp/gnus/nnmail.el (nnmail-load-hook):
* lisp/progmodes/dcl-mode.el (dcl-mode-load-hook):
* lisp/textmodes/tex-mode.el (tex-mode-load-hook):
* lisp/whitespace.el (whitespace-load-hook): Obsolete for
with-eval-after-load. Note that these variables are never declared,
but the byte-compiler will still warn about them if used.
---
lisp/calc/calc-ext.el | 2 ++
lisp/emacs-lisp/bytecomp.el | 2 ++
lisp/emacs-lisp/cl-extra.el | 2 ++
lisp/emacs-lisp/cl-macs.el | 2 ++
lisp/emacs-lisp/cl-seq.el | 2 ++
lisp/gnus/message.el | 2 ++
lisp/gnus/nnheader.el | 2 ++
lisp/gnus/nnmail.el | 2 ++
lisp/progmodes/dcl-mode.el | 5 +++--
lisp/progmodes/idlw-complete-structtag.el | 7 +++----
lisp/textmodes/tex-mode.el | 2 ++
lisp/whitespace.el | 3 ++-
12 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index c48d159..23248ce 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -3458,6 +3458,8 @@ A command spec is a command name symbol, a keyboard macro
string, a
list containing a numeric entry string, or nil.
A key may contain additional specs for Inverse, Hyperbolic, and Inv+Hyp.")
+(make-obsolete-variable 'calc-ext-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'calc-ext-load-hook)
(provide 'calc-ext)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b63d06a..a547b67 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5259,6 +5259,8 @@ and corresponding effects."
byte-compile-variable-ref))))
nil)
+(make-obsolete-variable 'bytecomp-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'bytecomp-load-hook)
;;; bytecomp.el ends here
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 5bf7479..23c784f 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -910,6 +910,8 @@ Outputs to the current buffer."
(mapc #'cl--describe-class-slot cslots))))
+(make-obsolete-variable 'cl-extra-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'cl-extra-load-hook)
;; Local variables:
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 147a0a8..1501ed4 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3430,6 +3430,8 @@ STRUCT and SLOT-NAME are symbols. INST is a structure
instance."
(nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst)
(aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name)))))))
+(make-obsolete-variable 'cl-macs-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'cl-macs-load-hook)
;; Local variables:
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index f90cce9..d34d501 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -1042,6 +1042,8 @@ Atoms are compared by `eql'; cons cells are compared
recursively.
(and (not (consp cl-x)) (not (consp cl-y)) (cl--check-match cl-x cl-y)))
+(make-obsolete-variable 'cl-seq-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'cl-seq-load-hook)
;; Local variables:
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 7d89739..150f70e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -8863,6 +8863,8 @@ will then start up Emacs ready to compose mail."
(provide 'message)
+(make-obsolete-variable 'message-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'message-load-hook)
;; Local Variables:
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 67dc379..2952e20 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -1067,6 +1067,8 @@ See `find-file-noselect' for the arguments."
(setq nnheader-last-message-time now)
(apply 'nnheader-message args))))
+(make-obsolete-variable 'nnheader-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'nnheader-load-hook)
(provide 'nnheader)
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index b630814..57801d6 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -2082,6 +2082,8 @@ Doesn't change point."
(format "%S" split)
"\n"))))
+(make-obsolete-variable 'nnmail-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'nnmail-load-hook)
(provide 'nnmail)
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index ab3321f..ca45795 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -557,8 +557,7 @@ Variables controlling indentation style and extra features:
dcl-imenu-label-call
Change the text that is used as sub-listing labels in imenu.
-Loading this package calls the value of the variable
-`dcl-mode-load-hook' with no args, if that value is non-nil.
+To run code after DCL mode has loaded, use `with-eval-after-load'.
Turning on DCL mode calls the value of the variable `dcl-mode-hook'
with no args, if that value is non-nil.
@@ -2192,6 +2191,8 @@ otherwise return nil."
(provide 'dcl-mode)
+(make-obsolete-variable 'dcl-mode-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'dcl-mode-load-hook) ; for your customizations
;;; dcl-mode.el ends here
diff --git a/lisp/progmodes/idlw-complete-structtag.el
b/lisp/progmodes/idlw-complete-structtag.el
index 3bc3971..120cfcd 100644
--- a/lisp/progmodes/idlw-complete-structtag.el
+++ b/lisp/progmodes/idlw-complete-structtag.el
@@ -53,11 +53,10 @@
;;
;; INSTALLATION
;; ============
-;; Put this file on the emacs load path and load it with the following
-;; line in your init file:
+;; Load it with the following line in your init file:
;;
-;; (add-hook 'idlwave-load-hook
-;; (lambda () (require 'idlw-complete-structtag)))
+;; (with-eval-after-load 'idlwave
+;; (require 'idlw-complete-structtag))
;;
;; DESCRIPTION
;; ===========
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 11db25c..37ab11a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -3541,6 +3541,8 @@ There might be text before point."
(process-send-region tex-chktex--process (point-min) (point-max))
(process-send-eof tex-chktex--process))))
+(make-obsolete-variable 'tex-mode-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'tex-mode-load-hook)
(provide 'tex-mode)
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 6690578..94ed6dc 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -2473,7 +2473,8 @@ It should be added buffer-locally to
`write-file-functions'."
(provide 'whitespace)
-
+(make-obsolete-variable 'whitespace-load-hook
+ "use `with-eval-after-load' instead." "28.1")
(run-hooks 'whitespace-load-hook)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6c58d90: Make more load-hooks obsolete (Bug#21563),
Stefan Kangas <=