From: Martin Rudalics Date: Fri, 28 Nov 2008 10:23:21 +0000 (+0000) Subject: (eldoc-docstring-first-line): Don't match X-Git-Tag: emacs-pretest-23.0.90~1463 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d1243c82656339b063c3f0d027b1eb9ff90f554;p=emacs.git (eldoc-docstring-first-line): Don't match any but the first "*" in a doc-string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b85f3ffbc70..a3e37246f42 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-11-28 Martin Rudalics + + * emacs-lisp/eldoc.el (eldoc-docstring-first-line): Don't match + any but the first "*" in a doc-string. + 2008-11-28 Glenn Morris * format.el (format-write-file): Improve previous doc fix. diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 710ff821f1d..d6fa09e94a5 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)