From fd8771f59fabfa7c5d76c2d9fc8916ec721ba071 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Sun, 9 Feb 2003 01:46:04 +0000 Subject: [PATCH] (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. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/cc-mode.el | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d251161489..888157367c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-02-09 Martin Stjernholm + + * progmodes/cc-mode.el (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. + 2003-02-08 Kim F. Storm * printing.el (pr-get-symbol): Define during compile. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2073a4a337..94eb6fcaea 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -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 -- 2.20.1