summaryrefslogtreecommitdiff
path: root/lisp/which-func.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/which-func.el')
-rw-r--r--lisp/which-func.el5
1 files changed, 3 insertions, 2 deletions
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)))