(lisp-mode-variables): Prevent adaptive

filling from using prefix when filling a single-line docstring.
This commit is contained in:
Stefan Monnier 2005-07-04 20:13:45 +00:00
parent 0ea7c863fb
commit c13ce396ae
2 changed files with 21 additions and 10 deletions

View file

@ -172,6 +172,10 @@
(setq paragraph-ignore-fill-prefix t)
(make-local-variable 'fill-paragraph-function)
(setq fill-paragraph-function 'lisp-fill-paragraph)
;; Adaptive fill mode gets the fill wrong for a one-line paragraph made of
;; a single docstring. Let's fix it here.
(set (make-local-variable 'adaptive-fill-function)
(lambda () (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")))
;; Adaptive fill mode gets in the way of auto-fill,
;; and should make no difference for explicit fill
;; because lisp-fill-paragraph should do the job.