From: Lars Ingebrigtsen Date: Thu, 28 Apr 2016 10:05:15 +0000 (+0200) Subject: Don't consider colons to be paragraphs starting chars in strings X-Git-Tag: emacs-26.0.90~2132 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=866e3c050fe64fee81f29a335a50a11b2562422e;p=emacs.git Don't consider colons to be paragraphs starting chars in strings * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't consider colons to start paragraphs in (doc) strings (bug#7751). --- diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 74aebc0a66a..4f3af2a7d7f 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1216,8 +1216,15 @@ and initial semicolons." ;; ;; The `fill-column' is temporarily bound to ;; `emacs-lisp-docstring-fill-column' if that value is an integer. - (let ((paragraph-start (concat paragraph-start - "\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)")) + (let ((paragraph-start + (concat paragraph-start + (format "\\|\\s-*\\([(;%s\"]\\|`(\\|#'(\\)" + ;; If we're inside a string (like the doc + ;; string), don't consider a colon to be + ;; a paragraph-start character. + (if (nth 3 (syntax-ppss)) + "" + ":")))) (paragraph-separate (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) (fill-column (if (and (integerp emacs-lisp-docstring-fill-column)