]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix #619; find parents for extra-modes too
authorNoam Postavsky <npostavs@users.sourceforge.net>
Sun, 11 Oct 2015 16:55:47 +0000 (12:55 -0400)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Sun, 11 Oct 2015 17:09:00 +0000 (13:09 -0400)
* yasnippet.el (yas--modes-to-activate): Call dfs on yas--extra-modes as
  well.

yasnippet.el

index c38b9db2391ec75c6c6d2242dc28d1d1feb8ef79..a11901117bc1c1578acc47c6808445bd54322c9d 100644 (file)
@@ -741,10 +741,9 @@ and friends."
                                   (symbolp neighbour))
                         do (funcall dfs neighbour)))))
     (if mode
-        (progn (funcall dfs mode)
-               explored)
-      (funcall dfs major-mode)
-      (append yas--extra-modes explored))))
+        (funcall dfs mode)
+      (mapcar dfs (cons major-mode yas--extra-modes)))
+    explored))
 
 (defvar yas-minor-mode-hook nil
   "Hook run when `yas-minor-mode' is turned on.")