]> code.delx.au - gnu-emacs-elpa/commitdiff
Avoid potential problems with user's hooks
authorNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 9 Apr 2016 23:36:32 +0000 (19:36 -0400)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 9 Apr 2016 23:50:47 +0000 (19:50 -0400)
* 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

index cff623fb6788c78e49b3381eecc1804aa866e8ac..b19490ba05adb5f8dd242d202f0e031a44cb5681 100644 (file)
@@ -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.