diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2016-04-28 12:05:15 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2016-04-28 12:05:15 +0200 |
commit | 866e3c050fe64fee81f29a335a50a11b2562422e (patch) | |
tree | bcfb3a5f3c3d4d7683c5f368cb413546dc5230b5 /lisp/emacs-lisp/lisp-mode.el | |
parent | 8c3245ef0107337d0a2284c58089e2e8e21e257c (diff) | |
download | emacs-866e3c050fe64fee81f29a335a50a11b2562422e.tar.gz |
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).
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 11 |
1 files changed, 9 insertions, 2 deletions
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) |