mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor: remove redundant backport
Was moved to doom-compat.el in201321c
. Amend:201321c929
This commit is contained in:
13
lisp/init.el
13
lisp/init.el
@ -13,19 +13,6 @@
|
|||||||
(doom-require 'doom-projects)
|
(doom-require 'doom-projects)
|
||||||
(doom-require 'doom-editor)
|
(doom-require 'doom-editor)
|
||||||
|
|
||||||
;; COMPAT: `safe-local-variable-directories' was introduced in Emacs 30.1
|
|
||||||
(unless (boundp 'safe-local-variable-directories)
|
|
||||||
(defvar safe-local-variable-directories ())
|
|
||||||
(define-advice hack-local-variables-filter (:around (fn variables dir-name) respect)
|
|
||||||
(let ((enable-local-variables
|
|
||||||
(if (delq nil (mapcar (lambda (dir)
|
|
||||||
(and dir-name dir
|
|
||||||
(file-equal-p dir dir-name)))
|
|
||||||
safe-local-variable-directories))
|
|
||||||
:all
|
|
||||||
enable-local-variables)))
|
|
||||||
(funcall fn variables dir-name))))
|
|
||||||
|
|
||||||
;; Ensure .dir-locals.el in $EMACSDIR and $DOOMDIR are always respected
|
;; Ensure .dir-locals.el in $EMACSDIR and $DOOMDIR are always respected
|
||||||
(add-to-list 'safe-local-variable-directories doom-emacs-dir)
|
(add-to-list 'safe-local-variable-directories doom-emacs-dir)
|
||||||
(add-to-list 'safe-local-variable-directories doom-user-dir)
|
(add-to-list 'safe-local-variable-directories doom-user-dir)
|
||||||
|
Reference in New Issue
Block a user