1
0
Fork 0

[oni-core] Set ‘safe-local-variable-directories’

This is a new variable in Emacs 30 that lets me specify which directories can be
trusted with local variable values. (Or it should be, I haven't seen it
available yet.)
This commit is contained in:
Tom Willemse 2023-09-11 21:06:09 -07:00
parent e2a8115ba8
commit 655ce45b2f

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 2023.0814.145257 ;; Version: 2023.0911.210534
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame) ;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame)
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
@ -539,5 +539,11 @@ which normally have their errors suppressed."
(goto-char (match-end 0)) (goto-char (match-end 0))
(buffer-substring-no-properties (point) (line-end-position))))))) (buffer-substring-no-properties (point) (line-end-position)))))))
(if (boundp 'safe-local-variable-directories)
(setq safe-local-variable-directories
(cl-delete-if
(lambda (d) (string-match-p (rx "/" (or "." ".." "foreign") eos) d))
(directory-files "~/projects/" t))))
(provide 'oni-core) (provide 'oni-core)
;;; oni-core.el ends here ;;; oni-core.el ends here