branch: master
commit 4c6064ce1aff07fe4481b5e2d987c8a7f044c207
Author: Noam Postavsky <[email protected]>
Commit: Noam Postavsky <[email protected]>
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).
---
yasnippet.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yasnippet.el b/yasnippet.el
index cff623f..b19490b 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -880,7 +880,7 @@ Honour `yas-dont-activate', which see."
(defvar yas--font-lock-keywords
(append '(("^#.*$" . font-lock-comment-face))
(with-temp-buffer
- (emacs-lisp-mode)
+ (ignore-errors (emacs-lisp-mode))
(font-lock-set-defaults)
(if (eq t (car-safe font-lock-keywords))
;; They're "compiled", so extract the source.