diff options
| author | Karl Fogel | 2015-11-19 17:32:37 -0600 |
|---|---|---|
| committer | Karl Fogel | 2015-11-19 17:32:43 -0600 |
| commit | c593538968a6d6c3d03da9ef6f489da6210e70e1 (patch) | |
| tree | 63bf4fd20e7e3c32ce4698c6d3ede93980d58762 /test | |
| parent | d81b0e1326a1ce3b588fa1b812b868fa877d41da (diff) | |
| download | emacs-c593538968a6d6c3d03da9ef6f489da6210e70e1.tar.gz emacs-c593538968a6d6c3d03da9ef6f489da6210e70e1.zip | |
Revert `open-line' electric-indent sensitivity
* lisp/simple.el (open-line): Remove electric indent code.
(electric-indent-just-newline): Don't declare.
* test/automated/simple-test.el (open-line-indent): Adjust test.
This partly reverts Artur Malabarba's change that added electric
indent sensitivity to `open-line' (Oct 24 22:26:27 2015 +0100, git
commit bd4f04f86), and adjusts a new test he added right afterwards
(Sat Oct 24 23:43:06 2015 +0100, git commit 207f235e3) accordingly.
However, the new INTERACTIVE argument to `open-line', which he also
added in the first commit, is not reverted here.
See the thread "Questioning the new behavior of `open-line'." on the
Emacs Devel mailing list, and in particular this message:
From: Artur Malabarba
Subject: Re: Questioning the new behavior of `open-line'.
To: Karl Fogel
Cc: David Kastrup, Pierpaolo Bernardi, emacs-devel
Date: Wed, 18 Nov 2015 21:03:58 +0000
Message-ID: \
<CAAdUY-KN06pvCMy5bt3+Buk3yeKjf6n9iB2FaSTTOPpCqPwyhA@mail.gmail.com>
https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01707.html
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/simple-test.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/automated/simple-test.el b/test/automated/simple-test.el index 07b5eaa93e4..7e0dbb786a7 100644 --- a/test/automated/simple-test.el +++ b/test/automated/simple-test.el | |||
| @@ -138,6 +138,21 @@ | |||
| 138 | (open-line 1))) | 138 | (open-line 1))) |
| 139 | '("- - " . "\n(a b c d)")))) | 139 | '("- - " . "\n(a b c d)")))) |
| 140 | 140 | ||
| 141 | ;; For a while, from 24 Oct - 19 Nov 2015, `open-line' in the Emacs | ||
| 142 | ;; development tree became sensitive to `electric-indent-mode', which | ||
| 143 | ;; it had not been before. This sensitivity was reverted for the | ||
| 144 | ;; Emacs 25 release, so it could be discussed further (see thread | ||
| 145 | ;; "Questioning the new behavior of `open-line'." on the Emacs Devel | ||
| 146 | ;; mailing list). The only test case here that started failing after | ||
| 147 | ;; the reversion is the third one, the one that currently expects | ||
| 148 | ;; `("(a b" . "\n \n c d)")'. If `open-line' were again sensitive | ||
| 149 | ;; to electric indent, then the three spaces between the two newlines | ||
| 150 | ;; would go away, leaving `("(a b" . "\n\n c d)")'. | ||
| 151 | ;; | ||
| 152 | ;; If electric indent sensitivity were re-enabled, we might also want | ||
| 153 | ;; to make the test cases below a bit stricter, or add some more test | ||
| 154 | ;; cases that are specific to `electric-indent-mode', since right now | ||
| 155 | ;; all but one of the cases pass with or without electric indent. | ||
| 141 | (ert-deftest open-line-indent () | 156 | (ert-deftest open-line-indent () |
| 142 | (should (equal (simple-test--dummy-buffer | 157 | (should (equal (simple-test--dummy-buffer |
| 143 | (electric-indent-local-mode 1) | 158 | (electric-indent-local-mode 1) |
| @@ -152,7 +167,7 @@ | |||
| 152 | (let ((current-prefix-arg nil)) | 167 | (let ((current-prefix-arg nil)) |
| 153 | (call-interactively #'open-line) | 168 | (call-interactively #'open-line) |
| 154 | (call-interactively #'open-line))) | 169 | (call-interactively #'open-line))) |
| 155 | '("(a b" . "\n\n c d)"))) | 170 | '("(a b" . "\n \n c d)"))) |
| 156 | (should (equal (simple-test--dummy-buffer | 171 | (should (equal (simple-test--dummy-buffer |
| 157 | (electric-indent-local-mode 1) | 172 | (electric-indent-local-mode 1) |
| 158 | (open-line 5 'interactive)) | 173 | (open-line 5 'interactive)) |