diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/electric.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/electric.el b/lisp/electric.el index 53e53bd975c..a14deb71afb 100644 --- a/lisp/electric.el +++ b/lisp/electric.el | |||
| @@ -270,10 +270,13 @@ or comment." | |||
| 270 | (goto-char before) | 270 | (goto-char before) |
| 271 | (condition-case-unless-debug () | 271 | (condition-case-unless-debug () |
| 272 | (indent-according-to-mode) | 272 | (indent-according-to-mode) |
| 273 | (error (throw 'indent-error nil))) | 273 | (error (throw 'indent-error nil)))) |
| 274 | ;; The goal here will be to remove the trailing | 274 | (unless (eq electric-indent-inhibit 'electric-layout-mode) |
| 275 | ;; whitespace after reindentation of the previous line | 275 | ;; Unless we're operating under |
| 276 | ;; because that may have (re)introduced it. | 276 | ;; `electric-layout-mode' (Bug#35254), the goal here |
| 277 | ;; will be to remove the trailing whitespace after | ||
| 278 | ;; reindentation of the previous line because that | ||
| 279 | ;; may have (re)introduced it. | ||
| 277 | (goto-char before) | 280 | (goto-char before) |
| 278 | ;; We were at EOL in marker `before' before the call | 281 | ;; We were at EOL in marker `before' before the call |
| 279 | ;; to `indent-according-to-mode' but after we may | 282 | ;; to `indent-according-to-mode' but after we may |
| @@ -451,7 +454,7 @@ If multiple rules match, only first one is executed.") | |||
| 451 | ;; really wants to reindent, then | 454 | ;; really wants to reindent, then |
| 452 | ;; `last-command-event' should be in | 455 | ;; `last-command-event' should be in |
| 453 | ;; `electric-indent-chars'. | 456 | ;; `electric-indent-chars'. |
| 454 | (let ((electric-indent-inhibit t)) | 457 | (let ((electric-indent-inhibit 'electric-layout-mode)) |
| 455 | (funcall nl-after))))))) | 458 | (funcall nl-after))))))) |
| 456 | (pcase sym | 459 | (pcase sym |
| 457 | ('before (funcall nl-before)) | 460 | ('before (funcall nl-before)) |