mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
lang/org: refactor load-path mods & don't forget it
Previously, Doom would forget lang/org's modification of the load-path if you call doom//reload-load-path (which is called when you do package management with an open Emacs session). No more!
This commit is contained in:
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
;; Ensure ELPA org is prioritized above built-in org.
|
;; Ensure ELPA org is prioritized above built-in org.
|
||||||
(eval-and-compile
|
(eval-and-compile
|
||||||
(when-let* ((path (locate-library "org" nil doom--base-load-path)))
|
(when-let* ((old-path (locate-library "org" nil doom--base-load-path)))
|
||||||
(setq load-path
|
(setq old-path (substring (file-name-directory old-path) 0 -1))
|
||||||
(delete (substring (file-name-directory path) 0 -1)
|
(delete old-path load-path)
|
||||||
load-path))))
|
|
||||||
|
|
||||||
|
;; We remove it from the base load path too so that `doom//reload-load-path'
|
||||||
|
;; won't undo this modification.
|
||||||
|
(delete old-path doom--base-load-path)))
|
||||||
|
Reference in New Issue
Block a user