# HG changeset patch # User Stefan Monnier # Date 1120508014 0 # Node ID 6b665a797211f4a973d95da439e3b6a5489b5932 # Parent 16a14151b33998b0a60ffb031cd4fd81c51d4b42 (lisp-mode-variables): Prevent adaptive filling from using prefix when filling a single-line docstring. diff -r 16a14151b339 -r 6b665a797211 lisp/emacs-lisp/lisp-mode.el --- a/lisp/emacs-lisp/lisp-mode.el Mon Jul 04 18:54:30 2005 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Mon Jul 04 20:13:34 2005 +0000 @@ -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.