aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2005-04-01 04:48:39 +0000
committerLuc Teirlinck2005-04-01 04:48:39 +0000
commit5e9961be68adf22b0fe1190fe67fb79ddfa2de55 (patch)
tree8d0dd7bfa90a0134b66e7e8eef96eeff737735bb
parentea98eb11f5549737255e90512969014777723f04 (diff)
downloademacs-5e9961be68adf22b0fe1190fe67fb79ddfa2de55.tar.gz
emacs-5e9961be68adf22b0fe1190fe67fb79ddfa2de55.zip
(mode-require-final-newline): Make Custom correctly report a nil value
and allow to set it to nil via Custom. Doc fix.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/files.el10
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ff0c3894c5e..17c580e0efc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12005-03-31 Luc Teirlinck <teirllm@auburn.edu>
2
3 * files.el (mode-require-final-newline): Make Custom correctly
4 report a nil value and allow to set it to nil via Custom.
5 Doc fix.
6
12005-04-01 Kenichi Handa <handa@m17n.org> 72005-04-01 Kenichi Handa <handa@m17n.org>
2 8
3 * international/characters.el: Enable the correct case setting for 9 * international/characters.el: Enable the correct case setting for
diff --git a/lisp/files.el b/lisp/files.el
index 15d6f794e16..eca86c52a79 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -291,7 +291,7 @@ from `mode-require-final-newline'."
291 :group 'editing-basics) 291 :group 'editing-basics)
292 292
293(defcustom mode-require-final-newline t 293(defcustom mode-require-final-newline t
294 "*Whether to add a newline at the end of the file, in certain major modes. 294 "*Whether to add a newline at end of file, in certain major modes.
295Those modes set `require-final-newline' to this value when you enable them. 295Those modes set `require-final-newline' to this value when you enable them.
296They do so because they are used for files that are supposed 296They do so because they are used for files that are supposed
297to end in newlines, and the question is how to arrange that. 297to end in newlines, and the question is how to arrange that.
@@ -299,10 +299,16 @@ to end in newlines, and the question is how to arrange that.
299A value of t means do this only when the file is about to be saved. 299A value of t means do this only when the file is about to be saved.
300A value of `visit' means do this right after the file is visited. 300A value of `visit' means do this right after the file is visited.
301A value of `visit-save' means do it at both of those times. 301A value of `visit-save' means do it at both of those times.
302Any other non-nil value means ask user whether to add a newline, when saving." 302Any other non-nil value means ask user whether to add a newline, when saving.
303nil means don't add newlines.
304
305You will have to be careful if you set this to nil: you will have
306to remember to manually add a final newline whenever you finish a
307file that really needs one."
303 :type '(choice (const :tag "When visiting" visit) 308 :type '(choice (const :tag "When visiting" visit)
304 (const :tag "When saving" t) 309 (const :tag "When saving" t)
305 (const :tag "When visiting or saving" visit-save) 310 (const :tag "When visiting or saving" visit-save)
311 (const :tag "Never" nil)
306 (other :tag "Ask" ask)) 312 (other :tag "Ask" ask))
307 :group 'editing-basics 313 :group 'editing-basics
308 :version "22.1") 314 :version "22.1")