emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9a7bce6: Make elint load `require'd packages


From: Lars Ingebrigtsen
Subject: master 9a7bce6: Make elint load `require'd packages
Date: Sat, 12 Dec 2020 08:13:45 -0500 (EST)

branch: master
commit 9a7bce6241f5fc9ed982e95084641f3021314829
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/emacs-lisp/elint.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index ef97c82..79b72ff 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
 ;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]