Skip to content

Commit

Permalink
Ensure `package-lint-main-file' always is a safe local variable
Browse files Browse the repository at this point in the history
Closes #22
  • Loading branch information
leotaku committed Feb 23, 2024
1 parent e567165 commit 174d7af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions elisp-check.el
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ search it for further `require' statements."
(cons (current-buffer) known-buffers)))))
(delete-dups (apply #'append (mapcar fun requires)))))

;; Ensure `package-lint-main-file' is always respected as a file-local
;; variable, even if has not been loaded. This is necessary because
;; Emacs will only apply safe local variables in batch mode.

(put 'package-lint-main-file 'safe-local-variable #'stringp)

(defun elisp-check--get-require (name prefix &optional known-buffers)
"Return required buffers for file with package NAME.
Expand Down

0 comments on commit 174d7af

Please sign in to comment.