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).
This commit is contained in:
Lars Ingebrigtsen 2016-04-28 12:05:15 +02:00
parent 8c3245ef01
commit 866e3c050f

View file

@ -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)