aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love1998-03-18 16:02:37 +0000
committerDave Love1998-03-18 16:02:37 +0000
commitfe3188ecbd12e887dc41940328bbbac51652c6ca (patch)
tree3e5e04908c9c315e2906bdcdcd0f66819e20d57b
parent01e02ab3875e43f10a0cf286455831b62b6c325e (diff)
downloademacs-fe3188ecbd12e887dc41940328bbbac51652c6ca.tar.gz
emacs-fe3188ecbd12e887dc41940328bbbac51652c6ca.zip
(lisp-fill-paragraph): Adjust
paragraph-start in default filling case so that filling doc strings works.
-rw-r--r--lisp/emacs-lisp/lisp-mode.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index d248479cdb3..109a891b579 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -802,7 +802,17 @@ and initial semicolons."
802 (buffer-substring (match-beginning 0) (match-end 0))))))) 802 (buffer-substring (match-beginning 0) (match-end 0)))))))
803 803
804 (if (not has-comment) 804 (if (not has-comment)
805 (fill-paragraph justify) 805 ;; `paragraph-start' is set here (not in the buffer-local
806 ;; variable so that `forward-paragraph' et al work as
807 ;; expected) so that filling (doc) strings works sensibly.
808 ;; Adding the opening paren to avoid the following sexp being
809 ;; filled means that sexps generally aren't filled as normal
810 ;; text, which is probably sensible. The `;' and `:' stop the
811 ;; filled para at following comment lines and keywords
812 ;; (typically in `defcustom').
813 (let ((paragraph-start (concat paragraph-start
814 "\\|\\s-*[\(;:\"]")))
815 (fill-paragraph justify))
806 816
807 ;; Narrow to include only the comment, and then fill the region. 817 ;; Narrow to include only the comment, and then fill the region.
808 (save-excursion 818 (save-excursion