1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Avoid warnings about lexbind cookies where they aren't needed

* lisp/emacs-lisp/warnings.el (warning-inhibit-types): New variable.
(display-warning): If TYPE matches 'warning-inhibit-types', don't
display the warning, even if it's emitted during startup.
* lisp/startup.el (normal-top-level):
* lisp/savehist.el (savehist-mode):
* lisp/url/url-cookie.el (url-cookie-parse-file):
* lisp/recentf.el (recentf-load-list):
* lisp/abbrev.el (read-abbrev-file): Bind 'warning-inhibit-types'
to avoid warning about missing lexbind cookie when loading files
that Emacs itself generates.
This commit is contained in:
Eli Zaretskii 2025-04-10 14:36:43 +03:00
parent 426a016d61
commit 50947fd512
6 changed files with 21 additions and 9 deletions

View file

@ -225,7 +225,8 @@ about loading the abbrevs."
(list
(read-file-name (format-prompt "Read abbrev file" abbrev-file-name)
nil abbrev-file-name t)))
(load (or file abbrev-file-name) nil quietly)
(let ((warning-inhibit-types '((files missing-lexbind-cookie))))
(load (or file abbrev-file-name) nil quietly))
(setq abbrevs-changed nil))
(defun quietly-read-abbrev-file (&optional file)