From: Eshel Yaron Date: Mon, 20 Jan 2025 21:11:52 +0000 (+0100) Subject: (scope-1): Recognize hook names in a few more functions X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8697f427bb03ecc30c3f7cde2f6abb95ef939594;p=emacs.git (scope-1): Recognize hook names in a few more functions --- diff --git a/lisp/emacs-lisp/scope.el b/lisp/emacs-lisp/scope.el index 34a29a1b0f7..206d3e7feee 100644 --- a/lisp/emacs-lisp/scope.el +++ b/lisp/emacs-lisp/scope.el @@ -1097,13 +1097,21 @@ a (possibly empty) list of safe macros.") special-variable-p local-variable-p local-variable-if-set-p default-value set-default make-local-variable - buffer-local-value add-to-list add-hook) + buffer-local-value add-to-list + add-hook run-hook-with-args run-hook-wrapped) (when-let* ((var-form (car forms)) ((memq (scope-sym-bare (car-safe var-form)) '(quote \`))) (var (cadr var-form)) (beg (scope-sym-pos var)) (bare (scope-sym-bare var))) (funcall scope-callback 'variable beg (length (symbol-name bare)) nil))) + ((run-hooks) + (dolist (var-form forms) + (when-let* (((memq (scope-sym-bare (car-safe var-form)) '(quote \`))) + (var (cadr var-form)) + (beg (scope-sym-pos var)) + (bare (scope-sym-bare var))) + (funcall scope-callback 'variable beg (length (symbol-name bare)) nil)))) ((featurep provide require) (when-let* ((feat-form (car forms)) ((memq (scope-sym-bare (car-safe feat-form)) '(quote \`)))