changeset 49470:13365bab7fce

(c-require-final-newline): Added a variable to make the initialization of require-final-newline' more configurable.
author Martin Stjernholm <mast@lysator.liu.se>
date Sun, 26 Jan 2003 21:36:15 +0000
parents edde976160fb
children d54529028b15
files lisp/progmodes/cc-mode.el lisp/progmodes/cc-vars.el
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el	Sun Jan 26 18:39:08 2003 +0000
+++ b/lisp/progmodes/cc-mode.el	Sun Jan 26 21:36:15 2003 +0000
@@ -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
--- a/lisp/progmodes/cc-vars.el	Sun Jan 26 18:39:08 2003 +0000
+++ b/lisp/progmodes/cc-vars.el	Sun Jan 26 21:36:15 2003 +0000
@@ -704,6 +704,13 @@
   :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'."