Fix closure symbolp errors blocking stacktraces

Caused because of symbol-file advice assuming SYMBOL would always be a
symbol.

This would prevent backtraces from happening, making debugging
impossibly obtuse.

This may indirectly fix #701
This commit is contained in:
Henrik Lissner 2018-06-20 01:57:57 +02:00
parent 600d7bcb4f
commit 84756b33a0
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -228,7 +228,7 @@ with functions that require it (like modeline segments)."
(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)
(or (if (symbolp symbol) (get symbol 'doom-file))
(funcall orig-fn symbol type)))
(advice-add #'symbol-file :around #'doom*symbol-file)