comparison lisp/emacs-lisp/lisp-mode.el @ 64088:6b665a797211

(lisp-mode-variables): Prevent adaptive filling from using prefix when filling a single-line docstring.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 04 Jul 2005 20:13:34 +0000
parents 18a818a2ee7c
children 1c727f4fdfb0 f9a65d7ebd29
comparison
equal deleted inserted replaced
64087:16a14151b339 64088:6b665a797211
170 (setq local-abbrev-table lisp-mode-abbrev-table) 170 (setq local-abbrev-table lisp-mode-abbrev-table)
171 (make-local-variable 'paragraph-ignore-fill-prefix) 171 (make-local-variable 'paragraph-ignore-fill-prefix)
172 (setq paragraph-ignore-fill-prefix t) 172 (setq paragraph-ignore-fill-prefix t)
173 (make-local-variable 'fill-paragraph-function) 173 (make-local-variable 'fill-paragraph-function)
174 (setq fill-paragraph-function 'lisp-fill-paragraph) 174 (setq fill-paragraph-function 'lisp-fill-paragraph)
175 ;; Adaptive fill mode gets the fill wrong for a one-line paragraph made of
176 ;; a single docstring. Let's fix it here.
177 (set (make-local-variable 'adaptive-fill-function)
178 (lambda () (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")))
175 ;; Adaptive fill mode gets in the way of auto-fill, 179 ;; Adaptive fill mode gets in the way of auto-fill,
176 ;; and should make no difference for explicit fill 180 ;; and should make no difference for explicit fill
177 ;; because lisp-fill-paragraph should do the job. 181 ;; because lisp-fill-paragraph should do the job.
178 ;; I believe that newcomment's auto-fill code properly deals with it -stef 182 ;; I believe that newcomment's auto-fill code properly deals with it -stef
179 ;;(set (make-local-variable 'adaptive-fill-mode) nil) 183 ;;(set (make-local-variable 'adaptive-fill-mode) nil)