diff options
Diffstat (limited to 'lisp/progmodes/which-func.el')
-rw-r--r-- | lisp/progmodes/which-func.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 0279319cc89..adf378f6bc7 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -319,7 +319,9 @@ If no function name is found, return nil." namestack (cons (car pair) namestack) alist (cdr pair))) - ((number-or-marker-p (setq mark (cdr pair))) + ((or (number-or-marker-p (setq mark (cdr pair))) + (and (overlayp mark) + (setq mark (overlay-start mark)))) (when (and (>= (setq offset (- (point) mark)) 0) (< offset minoffset)) ; Find the closest item. (setq minoffset offset |