From 980a8a00df97f77988f7ee1005546c7eeed4d56b Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Sun, 26 Jan 2003 21:36:39 +0000 Subject: [PATCH] (c-require-final-newline): Added a variable to make the initialization of require-final-newline' more configurable. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/cc-mode.el | 2 +- lisp/progmodes/cc-vars.el | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62b37a7a7fb..35ec7379ed7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2003-01-26 Martin Stjernholm + + * progmodes/cc-vars.el, progmodes/cc-mode.el + (c-require-final-newline): Added a variable to make the + initialization of `require-final-newline' more configurable. + 2003-01-26 Jan D. * emacs-lisp/authors.el (authors-aliases): Add Jan D. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 40e5a3107a8..5148ff72dea 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -326,7 +326,7 @@ 'c-indent-new-comment-line))) ;; now set their values - (setq require-final-newline t + (setq require-final-newline c-require-final-newline parse-sexp-ignore-comments t indent-line-function 'c-indent-line indent-region-function 'c-indent-region diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 2b88a131776..50b09160ee3 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -704,6 +704,13 @@ space." :type 'function :group 'c) +(defcustom c-require-final-newline t + "*Controls whether a final newline is added to the file when saved. +This value is given to `require-final-newline' at mode initialization; +see that variable for details." + :type 'symbol + :group 'c) + (defcustom c-electric-pound-behavior nil "*List of behaviors for electric pound insertion. Only currently supported behavior is `alignleft'." -- 2.39.2