[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 93cd841: Document new treatment of 'comment-auto-
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] emacs-26 93cd841: Document new treatment of 'comment-auto-fill-only-comments' |
Date: |
Mon, 6 Nov 2017 02:48:13 -0500 (EST) |
branch: emacs-26
commit 93cd8415b2536a4df15513d6dd1a409f55b81ac4
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Document new treatment of 'comment-auto-fill-only-comments'
* doc/lispref/text.texi (Auto Filling): Add reference to Emacs
manual. Add description of 'comment-auto-fill-only-comments'.
* etc/NEWS: Mention new treatment of
'comment-auto-fill-only-comments'.
---
doc/lispref/text.texi | 24 ++++++++++++++++--------
etc/NEWS | 5 +++++
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index baa3c70..4872dbd 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1886,10 +1886,10 @@ prefix or @code{nil}, meaning it has failed to
determine a prefix.
@cindex filling, automatic
@cindex Auto Fill mode
address@hidden FIXME: I don't think any of the variables below is a/an
normal/abnormal hook.
- Auto Fill mode is a minor mode that fills lines automatically as text
-is inserted. This section describes the hook used by Auto Fill mode.
-For a description of functions that you can call explicitly to fill and
+Auto Fill mode is a minor mode that fills lines automatically as text is
+inserted. @xref{Auto Fill,,, emacs, The GNU Emacs Manual}. This
+section describes some variables used by Auto Fill mode. For a
+description of functions that you can call explicitly to fill and
justify existing text, see @ref{Filling}.
Auto Fill mode also enables the functions that change the margins and
@@ -1898,11 +1898,11 @@ justification style to refill portions of the text.
@xref{Margins}.
@defvar auto-fill-function
The value of this buffer-local variable should be a function (of no
arguments) to be called after self-inserting a character from the table
address@hidden It may be @code{nil}, in which case nothing
-special is done in that case.
address@hidden, see below. It may be @code{nil}, in which case
+nothing special is done in that case.
-The value of @code{auto-fill-function} is @code{do-auto-fill} when
-Auto-Fill mode is enabled. That is a function whose sole purpose is to
+The value of @code{auto-fill-function} is @code{do-auto-fill} when Auto
+Fill mode is enabled. That is a function whose sole purpose is to
implement the usual strategy for breaking a line.
@end defvar
@@ -1919,6 +1919,14 @@ self-inserted---space and newline in most language
environments. They
have an entry @code{t} in the table.
@end defvar
address@hidden comment-auto-fill-only-comments
+This variable, if address@hidden, means to fill lines automatically
+within comments only. More precisley, this means that if a comment
+syntax was defined for the current buffer, then self-inserting a
+character outside of a comment will not call @code{auto-fill-function}.
address@hidden defopt
+
+
@node Sorting
@section Sorting Text
@cindex sorting text
diff --git a/etc/NEWS b/etc/NEWS
index 9853aa6..f79c2cb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1272,6 +1272,11 @@ table implementation. This uses a new bytecode op
'switch', which
isn't compatible with previous Emacs versions. This functionality can
be disabled by setting 'byte-compile-cond-use-jump-table' to nil.
++++
+** If 'comment-auto-fill-only-comments' is non-nil, 'auto-fill-function'
+is now called only if either no comment syntax is defined for the
+current buffer or the self-insertion takes place within a comment.
+
---
** The alist 'ucs-names' is now a hash table.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 93cd841: Document new treatment of 'comment-auto-fill-only-comments',
Martin Rudalics <=