changeset 49654:b025ca405045

(c-basic-common-init): Install `c-fill-paragraph' on `fill-paragraph-function'. Although it's not the normal way to call it in a CC Mode buffer it makes a direct call to `fill-paragraph' work better.
author Martin Stjernholm <mast@lysator.liu.se>
date Sun, 09 Feb 2003 01:44:35 +0000
parents 783b5336021a
children 9ae045dbc337
files lisp/progmodes/cc-mode.el
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el	Sat Feb 08 17:28:43 2003 +0000
+++ b/lisp/progmodes/cc-mode.el	Sun Feb 09 01:44:35 2003 +0000
@@ -335,6 +335,12 @@
 	comment-start-skip "/\\*+ *\\|//+ *"
 	comment-multi-line t)
 
+  ;; Install `c-fill-paragraph' on `fill-paragraph-function' so that a
+  ;; direct call to `fill-paragraph' behaves better.  This still
+  ;; doesn't work with filladapt but it's better than nothing.
+  (make-local-variable 'fill-paragraph-function)
+  (setq fill-paragraph-function 'c-fill-paragraph)
+
   ;; Set `require-final-newline' only if we should.
   (let ((rfn (assq mode c-require-final-newline)))
     (when rfn