Commit 6c9681af authored by Glenn Morris's avatar Glenn Morris
Browse files

* lisp/progmodes/js.el (js-indent-first-initialiser): Fix doc, type, version.

First line of the doc string should be a complete sentence.

* etc/NEWS: Mention new option.

# Fix associated ChangeLog entries.
parent 8db37916
...@@ -389,6 +389,8 @@ The remainder were: ...@@ -389,6 +389,8 @@ The remainder were:
** New ERT function `ert-summarize-tests-batch-and-exit'. ** New ERT function `ert-summarize-tests-batch-and-exit'.
** New js.el option `js-indent-first-initialiser'.
--- ---
** `Info-fontify-maximum-menu-size' can be t for no limit. ** `Info-fontify-maximum-menu-size' can be t for no limit.
......
2015-03-10 Jackson Ray Hamilton <jackson@jacksonrayhamilton.com> 2015-03-10 Glenn Morris <rgm@gnu.org>
* lisp/progmodes/js.el (js--proper-indentation): Add new custom
option `js-indent-first-initialiser' and a function to utilize it,
`js--maybe-goto-declaration-keyword-end'.
   
* test/indent/js.js: Add local variables. * progmodes/js.el (js-indent-first-initialiser):
Fix doc, type, version.
   
* test/indent/js-indent-first-initialiser-t.js: New test for 2015-03-10 Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
`js-indent-first-initialiser'.
   
* test/indent/js-indent-first-initialiser-dynamic.js: New test for * progmodes/js.el (js-indent-first-initialiser): New option.
`js-indent-first-initialiser'. (js--maybe-goto-declaration-keyword-end): New function.
   
2015-03-10 Thomas Fitzsimmons <fitzsim@fitzsim.org> 2015-03-10 Thomas Fitzsimmons <fitzsim@fitzsim.org>
   
......
...@@ -510,12 +510,9 @@ getting timeout messages." ...@@ -510,12 +510,9 @@ getting timeout messages."
:group 'js) :group 'js)
(defcustom js-indent-first-initialiser nil (defcustom js-indent-first-initialiser nil
"Specially indent the first variable declaration's initialiser "Non-nil means specially indent the first variable declaration's initialiser.
in variable statements.
Normally, the first declaration's initialiser is unindented, and Normally, the first declaration's initialiser is unindented, and
subsequent declarations have their identifiers lined up against subsequent declarations have their identifiers aligned with it:
the first:
var o = { var o = {
foo: 3 foo: 3
...@@ -526,8 +523,8 @@ the first: ...@@ -526,8 +523,8 @@ the first:
}, },
bar = 2; bar = 2;
When t, always indent the first declaration's initialiser by an If this option has the value t, indent the first declaration's
additional level: initialiser by an additional level:
var o = { var o = {
foo: 3 foo: 3
...@@ -538,8 +535,8 @@ additional level: ...@@ -538,8 +535,8 @@ additional level:
}, },
bar = 2; bar = 2;
When `dynamic', if there is only one declaration, don't indent If this option has the value `dynamic', if there is only one declaration,
the first one's initialiser; otherwise, indent it. don't indent the first one's initialiser; otherwise, indent it.
var o = { var o = {
foo: 3 foo: 3
...@@ -549,7 +546,8 @@ the first one's initialiser; otherwise, indent it. ...@@ -549,7 +546,8 @@ the first one's initialiser; otherwise, indent it.
foo: 3 foo: 3
}, },
bar = 2;" bar = 2;"
:type 'boolean :version "25.1"
:type '(choice (const nil) (const t) (const dynamic))
:safe 'symbolp :safe 'symbolp
:group 'js) :group 'js)
......
2015-03-10 Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
* indent/js.js: Add local variables.
* indent/js-indent-first-initialiser-t.js:
* indent/js-indent-first-initialiser-dynamic.js:
New tests for `js-indent-first-initialiser'.
2015-03-10 Przemyslaw Wojnowski <esperanto@cumego.com> 2015-03-10 Przemyslaw Wojnowski <esperanto@cumego.com>
* automated/cl-lib-tests.el: Add tests for plusp, second, ... * automated/cl-lib-tests.el: Add tests for plusp, second, ...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment