changeset 23350:df3df03d8a19

(which-function): Handle case when (car imenu--index-alist) is nil.
author Karl Heuer <kwzh@gnu.org>
date Wed, 30 Sep 1998 19:02:23 +0000
parents 081564884463
children a8979439d44b
files lisp/which-func.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/which-func.el	Tue Sep 29 18:20:36 1998 +0000
+++ b/lisp/which-func.el	Wed Sep 30 19:02:23 1998 +0000
@@ -204,8 +204,9 @@
    (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)))