summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2008-11-28 10:23:21 +0000
committerMartin Rudalics <rudalics@gmx.at>2008-11-28 10:23:21 +0000
commit4d1243c82656339b063c3f0d027b1eb9ff90f554 (patch)
tree859c3a9d3060be1c496f73c650ccd84b81d6acb3 /lisp/emacs-lisp
parent59bc82c0b9e6072f3e889efe74a126e0a9228302 (diff)
(eldoc-docstring-first-line): Don't match
any but the first "*" in a doc-string.
Diffstat (limited to 'lisp/emacs-lisp')
-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)