summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-12-12 14:13:32 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2020-12-12 14:13:40 +0100
commit9a7bce6241f5fc9ed982e95084641f3021314829 (patch)
treee44cae01e068461a742fd2056d5dd9d758a352fd /lisp/emacs-lisp
parentdb339f6dd1280cfd97309b1390cfa59c47e296b9 (diff)
downloademacs-9a7bce6241f5fc9ed982e95084641f3021314829.tar.gz
emacs-9a7bce6241f5fc9ed982e95084641f3021314829.tar.bz2
emacs-9a7bce6241f5fc9ed982e95084641f3021314829.zip
Make elint load `require'd packages
* lisp/emacs-lisp/elint.el (elint-require-form): New function to load files that are `require'd (bug#27006). (elint-special-forms): Add function.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/elint.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index ef97c8279d7..79b72ff969f 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -558,7 +558,8 @@ Return nil if there are no more forms, t otherwise."
(when . elint-check-conditional-form)
(unless . elint-check-conditional-form)
(and . elint-check-conditional-form)
- (or . elint-check-conditional-form))
+ (or . elint-check-conditional-form)
+ (require . elint-require-form))
"Functions to call when some special form should be linted.")
(defun elint-form (form env &optional nohandler)
@@ -953,6 +954,13 @@ Does basic handling of `featurep' tests."
(elint-form form env t))))
env)
+(defun elint-require-form (form _env)
+ "Load `require'd files."
+ (pcase form
+ (`(require ',x)
+ (require x)))
+ nil)
+
;;;
;;; Message functions
;;;