]> git.eshelyaron.com Git - emacs.git/commitdiff
(which-function): Handle case when (car imenu--index-alist) is nil.
authorKarl Heuer <kwzh@gnu.org>
Wed, 30 Sep 1998 19:02:23 +0000 (19:02 +0000)
committerKarl Heuer <kwzh@gnu.org>
Wed, 30 Sep 1998 19:02:23 +0000 (19:02 +0000)
lisp/which-func.el

index af9fc74cd82e0ef97b9905016d05778380a2a0c6..782882d1be4e1067b42b248176051a912c84c168 100644 (file)
@@ -204,8 +204,9 @@ is located before first function, returns nil."
    (let ((pair (car-safe imenu--index-alist))
          (rest (cdr-safe imenu--index-alist))
          (name nil))
-     (while (and pair (or (not (number-or-marker-p (cdr pair)))
-                         (> (point) (cdr pair))))
+     (while (and (or rest pair)
+                (or (not (number-or-marker-p (cdr pair)))
+                    (> (point) (cdr pair))))
        (setq name (car pair))
        (setq pair (car-safe rest))
        (setq rest (cdr-safe rest)))