summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eldoc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r--lisp/emacs-lisp/eldoc.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 710ff821f1..d6fa09e94a 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -367,7 +367,9 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
(and (stringp doc)
(substitute-command-keys
(save-match-data
- (let ((start (if (string-match "^\\*" doc) (match-end 0) 0)))
+ ;; Don't use "^" in the regexp below since it may match
+ ;; anywhere in the doc-string.
+ (let ((start (if (string-match "\\`\\*" doc) (match-end 0) 0)))
(cond ((string-match "\n" doc)
(substring doc start (match-beginning 0)))
((zerop start) doc)