From 4c6064ce1aff07fe4481b5e2d987c8a7f044c207 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 9 Apr 2016 19:36:32 -0400 Subject: [PATCH] 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 cff623fb6..b19490ba0 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. -- 2.39.2