From: Karl Heuer Date: Wed, 30 Sep 1998 19:02:23 +0000 (+0000) Subject: (which-function): Handle case when (car imenu--index-alist) is nil. X-Git-Tag: emacs-20.4~1599 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d1804b71b65227f00bc2729fa2f3b30c0e2ba066;p=emacs.git (which-function): Handle case when (car imenu--index-alist) is nil. --- diff --git a/lisp/which-func.el b/lisp/which-func.el index af9fc74cd82..782882d1be4 100644 --- a/lisp/which-func.el +++ b/lisp/which-func.el @@ -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)))