mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
Avoid potential problems with user's hooks
* yasnippet.el (yas--font-lock-keywords): ignore-errors from emacs-lisp-mode call, in case user's hooks cause problems (e.g. enabling `yas-minor-mode' before we finish loading).
This commit is contained in:
parent
4af9fc9815
commit
4c6064ce1a
@ -880,7 +880,7 @@ Honour `yas-dont-activate', which see."
|
|||||||
(defvar yas--font-lock-keywords
|
(defvar yas--font-lock-keywords
|
||||||
(append '(("^#.*$" . font-lock-comment-face))
|
(append '(("^#.*$" . font-lock-comment-face))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(emacs-lisp-mode)
|
(ignore-errors (emacs-lisp-mode))
|
||||||
(font-lock-set-defaults)
|
(font-lock-set-defaults)
|
||||||
(if (eq t (car-safe font-lock-keywords))
|
(if (eq t (car-safe font-lock-keywords))
|
||||||
;; They're "compiled", so extract the source.
|
;; They're "compiled", so extract the source.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user