aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorDmitry Gutov2017-12-14 11:18:51 +0200
committerDmitry Gutov2017-12-14 11:18:51 +0200
commit7e9eef0ffd90cd7e39f15b003e4a9770be27b0ce (patch)
tree65c46eac3785849457ba9d989ed4acf19b3e8fac /etc
parent6067f0c702e3652a9d489852752f038320cb91ae (diff)
downloademacs-7e9eef0ffd90cd7e39f15b003e4a9770be27b0ce.tar.gz
emacs-7e9eef0ffd90cd7e39f15b003e4a9770be27b0ce.zip
Consolidate 'widen' calls
* lisp/progmodes/prog-mode.el (prog-indentation-context): Un-document all elements but the first. (prog-widen): Remove. (http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00321.html) * doc/lispref/text.texi (Mode-Specific Indent): Update. * lisp/progmodes/ruby-mode.el (ruby-calculate-indent): Don't call widen. * lisp/progmodes/python.el (python-indent-guess-indent-offset) (python-info-current-defun): Replace prog-widen with widen; these functions are not called during indentation. (python-indent-context) (python-indent--calculate-indentation) (python-info-dedenter-opening-block-message) (python-info-line-ends-backslash-p) (python-info-beginning-of-backslash) (python-info-continuation-line-p) (python-info-current-defun): Remove 'widen' calls. * lisp/indent.el (indent-according-to-mode) (indent-for-tab-command, indent-region): Move them here. * lisp/textmodes/mhtml-mode.el (mhtml-indent-line): Bind prog-indentation-context to one-element list.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 4ccf468693c..eb076c943bc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1107,11 +1107,11 @@ This allows better indentation support in modes that support multiple
1107programming languages in the same buffer, like literate programming 1107programming languages in the same buffer, like literate programming
1108environments or ANTLR programs with embedded Python code. 1108environments or ANTLR programs with embedded Python code.
1109 1109
1110A major mode can provide indentation context for a sub-mode through 1110A major mode can provide indentation context for a sub-mode. To
1111the 'prog-indentation-context' variable. To support this, modes that 1111support this, modes should use 'prog-first-column' instead of a
1112provide indentation should use 'prog-widen' instead of 'widen' and 1112literal zero and never call 'widen' in their indentation functions.
1113'prog-first-column' instead of a literal zero. See the node 1113See the node "(elisp) Mode-Specific Indent" in the ELisp manual for
1114"(elisp) Mode-Specific Indent" in the ELisp manual for more details. 1114more details.
1115 1115
1116** ERC 1116** ERC
1117 1117