aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-03-10 18:40:09 -0400
committerGlenn Morris2015-03-10 18:40:09 -0400
commit6c9681afe9d7296bc984f602a26cf78d577fcc1e (patch)
treecfdef882fdd5bfde7c5034094633735155f4bdd5
parent8db37916ca4241ee977901ae589a86a609a32c3c (diff)
downloademacs-6c9681afe9d7296bc984f602a26cf78d577fcc1e.tar.gz
emacs-6c9681afe9d7296bc984f602a26cf78d577fcc1e.zip
* 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.
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog16
-rw-r--r--lisp/progmodes/js.el18
-rw-r--r--test/ChangeLog8
4 files changed, 24 insertions, 20 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ad8b6f27812..6f59064560e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -389,6 +389,8 @@ The remainder were:
389 389
390** New ERT function `ert-summarize-tests-batch-and-exit'. 390** New ERT function `ert-summarize-tests-batch-and-exit'.
391 391
392** New js.el option `js-indent-first-initialiser'.
393
392--- 394---
393** `Info-fontify-maximum-menu-size' can be t for no limit. 395** `Info-fontify-maximum-menu-size' can be t for no limit.
394 396
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c7cf53df5e0..5184167ecd8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,16 +1,12 @@
12015-03-10 Jackson Ray Hamilton <jackson@jacksonrayhamilton.com> 12015-03-10 Glenn Morris <rgm@gnu.org>
2
3 * lisp/progmodes/js.el (js--proper-indentation): Add new custom
4 option `js-indent-first-initialiser' and a function to utilize it,
5 `js--maybe-goto-declaration-keyword-end'.
6 2
7 * test/indent/js.js: Add local variables. 3 * progmodes/js.el (js-indent-first-initialiser):
4 Fix doc, type, version.
8 5
9 * test/indent/js-indent-first-initialiser-t.js: New test for 62015-03-10 Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
10 `js-indent-first-initialiser'.
11 7
12 * test/indent/js-indent-first-initialiser-dynamic.js: New test for 8 * progmodes/js.el (js-indent-first-initialiser): New option.
13 `js-indent-first-initialiser'. 9 (js--maybe-goto-declaration-keyword-end): New function.
14 10
152015-03-10 Thomas Fitzsimmons <fitzsim@fitzsim.org> 112015-03-10 Thomas Fitzsimmons <fitzsim@fitzsim.org>
16 12
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 27e67bb77c1..7e547428da9 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -510,12 +510,9 @@ getting timeout messages."
510 :group 'js) 510 :group 'js)
511 511
512(defcustom js-indent-first-initialiser nil 512(defcustom js-indent-first-initialiser nil
513 "Specially indent the first variable declaration's initialiser 513 "Non-nil means specially indent the first variable declaration's initialiser.
514in variable statements.
515
516Normally, the first declaration's initialiser is unindented, and 514Normally, the first declaration's initialiser is unindented, and
517subsequent declarations have their identifiers lined up against 515subsequent declarations have their identifiers aligned with it:
518the first:
519 516
520 var o = { 517 var o = {
521 foo: 3 518 foo: 3
@@ -526,8 +523,8 @@ the first:
526 }, 523 },
527 bar = 2; 524 bar = 2;
528 525
529When t, always indent the first declaration's initialiser by an 526If this option has the value t, indent the first declaration's
530additional level: 527initialiser by an additional level:
531 528
532 var o = { 529 var o = {
533 foo: 3 530 foo: 3
@@ -538,8 +535,8 @@ additional level:
538 }, 535 },
539 bar = 2; 536 bar = 2;
540 537
541When `dynamic', if there is only one declaration, don't indent 538If this option has the value `dynamic', if there is only one declaration,
542the first one's initialiser; otherwise, indent it. 539don't indent the first one's initialiser; otherwise, indent it.
543 540
544 var o = { 541 var o = {
545 foo: 3 542 foo: 3
@@ -549,7 +546,8 @@ the first one's initialiser; otherwise, indent it.
549 foo: 3 546 foo: 3
550 }, 547 },
551 bar = 2;" 548 bar = 2;"
552 :type 'boolean 549 :version "25.1"
550 :type '(choice (const nil) (const t) (const dynamic))
553 :safe 'symbolp 551 :safe 'symbolp
554 :group 'js) 552 :group 'js)
555 553
diff --git a/test/ChangeLog b/test/ChangeLog
index 03cc2818478..93ee3c5bc16 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,11 @@
12015-03-10 Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
2
3 * indent/js.js: Add local variables.
4
5 * indent/js-indent-first-initialiser-t.js:
6 * indent/js-indent-first-initialiser-dynamic.js:
7 New tests for `js-indent-first-initialiser'.
8
12015-03-10 Przemyslaw Wojnowski <esperanto@cumego.com> 92015-03-10 Przemyslaw Wojnowski <esperanto@cumego.com>
2 10
3 * automated/cl-lib-tests.el: Add tests for plusp, second, ... 11 * automated/cl-lib-tests.el: Add tests for plusp, second, ...