]> code.delx.au - gnu-emacs-elpa/commitdiff
Closes #318: Don't use CL-LABELS for backward compatibility with older emacsen
authorJoão Távora <joaotavora@gmail.com>
Mon, 2 Sep 2013 10:55:55 +0000 (11:55 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 2 Sep 2013 10:55:55 +0000 (11:55 +0100)
yasnippet.el

index dab6b55dde1d5db1fefd63d87fce262494980e05..a6754abfa86ffd13d00d4078df95633f8cc86341 100644 (file)
@@ -696,19 +696,18 @@ defined direct keybindings to the command
 (defun yas--modes-to-activate ()
   "Compute list of mode symbols that are active for `yas-expand'
 and friends."
-  (cl-labels
-      ((dfs (mode &optional explored)
-            (push mode explored)
-            (cons mode
-                  (loop for neighbour
-                        in (remove nil (cons (get mode
-                                                  'derived-mode-parent)
-                                             (gethash mode yas--parents)))
-
-                        unless (memq neighbour explored)
-                        append (dfs neighbour explored)))))
+  (let ((dfs (lambda (mode &optional explored)
+               (push mode explored)
+               (cons mode
+                     (loop for neighbour
+                           in (remove nil (cons (get mode
+                                                     'derived-mode-parent)
+                                                (gethash mode yas--parents)))
+
+                           unless (memq neighbour explored)
+                           append (funcall dfs neighbour explored))))))
     (remove-duplicates (append yas-extra-modes
-                               (dfs major-mode)))))
+                               (funcall dfs major-mode)))))
 
 (defvar yas-minor-mode-hook nil
   "Hook run when `yas-minor-mode' is turned on.")