From c13ce396aeedefa97d7f819e20256428ec82140c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 4 Jul 2005 20:13:45 +0000 Subject: (lisp-mode-variables): Prevent adaptive filling from using prefix when filling a single-line docstring. --- lisp/emacs-lisp/lisp-mode.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 75dfe313de8..8469aec1362 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -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. -- cgit v1.2.3