Advise symbol-file to return doom-file property
...if it exists. Otherwise fall back on original functionality. This allows certain symbols to overwrite where Emacs thinks they were defined. Warning: only use this for autodefs! It may have unintended side-effects for other symbols.
This commit is contained in:
parent
da5e2d54ca
commit
1184967531
1 changed files with 7 additions and 0 deletions
|
@ -213,6 +213,13 @@ with functions that require it (like modeline segments)."
|
|||
buffer))
|
||||
(advice-add #'make-indirect-buffer :around #'doom*set-indirect-buffer-filename)
|
||||
|
||||
(defun doom*symbol-file (orig-fn symbol &optional type)
|
||||
"If a `doom-file' symbol property exists on SYMBOL, use that instead of the
|
||||
original value of `symbol-file'."
|
||||
(or (get symbol 'doom-file)
|
||||
(funcall orig-fn symbol type)))
|
||||
(advice-add #'symbol-file :around #'doom*symbol-file)
|
||||
|
||||
;; Truly silence startup message
|
||||
(fset #'display-startup-echo-area-message #'ignore)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue