changeset 61198:c7462c0b2dc0

(mode-require-final-newline): Make Custom correctly report a nil value and allow to set it to nil via Custom. Doc fix.
author Luc Teirlinck <teirllm@auburn.edu>
date Fri, 01 Apr 2005 04:44:04 +0000
parents 188e0bfcbc42
children 839e949f2911
files lisp/files.el
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Fri Apr 01 02:06:49 2005 +0000
+++ b/lisp/files.el	Fri Apr 01 04:44:04 2005 +0000
@@ -291,7 +291,7 @@
   :group 'editing-basics)
 
 (defcustom mode-require-final-newline t
-  "*Whether to add a newline at the end of the file, in certain major modes.
+  "*Whether to add a newline at end of file, in certain major modes.
 Those modes set `require-final-newline' to this value when you enable them.
 They do so because they are used for files that are supposed
 to end in newlines, and the question is how to arrange that.
@@ -299,10 +299,16 @@
 A value of t means do this only when the file is about to be saved.
 A value of `visit' means do this right after the file is visited.
 A value of `visit-save' means do it at both of those times.
-Any other non-nil value means ask user whether to add a newline, when saving."
+Any other non-nil value means ask user whether to add a newline, when saving.
+nil means don't add newlines.
+
+You will have to be careful if you set this to nil: you will have
+to remember to manually add a final newline whenever you finish a
+file that really needs one."
   :type '(choice (const :tag "When visiting" visit)
 		 (const :tag "When saving" t)
 		 (const :tag "When visiting or saving" visit-save)
+		 (const :tag "Never" nil)
 		 (other :tag "Ask" ask))
   :group 'editing-basics
   :version "22.1")