From 4d1243c82656339b063c3f0d027b1eb9ff90f554 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Fri, 28 Nov 2008 10:23:21 +0000 Subject: (eldoc-docstring-first-line): Don't match any but the first "*" in a doc-string. --- lisp/emacs-lisp/eldoc.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/eldoc.el') 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) -- cgit v1.2.3