[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode d81bc28 028/217: indenting code lines also remo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode d81bc28 028/217: indenting code lines also removes trailing whitespace |
Date: |
Sun, 29 Aug 2021 11:30:37 -0400 (EDT) |
branch: elpa/scala-mode
commit d81bc2885bf9ef02e13d0fe80acb6024cd9730c5
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>
indenting code lines also removes trailing whitespace
---
scala-mode-indent.el | 4 +++-
scala-mode-lib.el | 6 ++++++
scala-mode-map.el | 7 ++-----
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/scala-mode-indent.el b/scala-mode-indent.el
index c0e2512..b88d8c1 100644
--- a/scala-mode-indent.el
+++ b/scala-mode-indent.el
@@ -624,7 +624,9 @@ strings"
(scala-indent:toggle-effective-run-on-strategy)
(scala-indent:reset-effective-run-on-strategy)))
; (message "run-on-strategy is %s" (scala-indent:run-on-strategy))
- (scala-indent:indent-line-to (scala-indent:calculate-indent-for-line)))
+ (scala-indent:indent-line-to (scala-indent:calculate-indent-for-line))
+ (scala-lib:delete-trailing-whitespace)
+ )
(defun scala-indent:indent-line (&optional strategy)
"Indents the current line."
diff --git a/scala-mode-lib.el b/scala-mode-lib.el
index 373f493..8f8a2c6 100644
--- a/scala-mode-lib.el
+++ b/scala-mode-lib.el
@@ -14,3 +14,9 @@
,@body
(point)))
+(defun scala-lib:delete-trailing-whitespace ()
+ (save-excursion
+ (end-of-line)
+ (skip-syntax-backward " ")
+ (unless (bolp)
+ (delete-char (- (line-end-position) (point))))))
diff --git a/scala-mode-map.el b/scala-mode-map.el
index 6c44f45..bb4dabc 100644
--- a/scala-mode-map.el
+++ b/scala-mode-map.el
@@ -26,14 +26,11 @@
(let ((keymap (make-sparse-keymap)))
(scala-mode-map:define-keys
keymap
- (([backspace] 'backward-delete-char-untabify)
-
+ (
+ ([backtab] 'scala-indent:indent-with-reluctant-strategy)
;; TODO: remove, use forward-sexp-function insetead
- ([backtab] 'scala-indent:indent-with-reluctant-strategy)
((kbd "C-M-b") 'scala-syntax:backward-sexp)
-
([(control c)(control r)] 'scala-indent:rotate-run-on-strategy)
- ;; ("\r" 'scala-newline)
([(control c)(control c)] 'comment-region)
;; ("}" 'scala-electric-brace)
))
- [nongnu] elpa/scala-mode 970d88e 187/217: make keywords match case sensitive (#133), (continued)
- [nongnu] elpa/scala-mode 970d88e 187/217: make keywords match case sensitive (#133), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5209142 189/217: Support for identifiers consisting from operator characters (#138), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6f49104 193/217: scala-syntax:propertize-dollar, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 2a7b0fd 195/217: Moved ensime/emacs-scala-mode back to hvesalai/emacs-scala-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5d28cb3 210/217: feat: support trailing commas (>= Scala 2.12.2), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b21befd 211/217: Fix README.md indenting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d837c96 203/217: doc: supports both Scala 2 and 3 (to some extent), not just 2.9, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 2bf5621 207/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 402d6df 209/217: Merge pull request #165 from fommil/sbtn, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ac8106f 025/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d81bc28 028/217: indenting code lines also removes trailing whitespace,
ELPA Syncer <=
- [nongnu] elpa/scala-mode 26cd0b7 040/217: merged from align-parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 884795f 052/217: more fixes to strings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 7113976 059/217: Indenting for multi-line strings with margin, fixed row comment indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 8d4f34f 058/217: Use font-lock-doc-face for scaladoc comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 689bd7d 089/217: (require 'package), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode cb3f278 086/217: Update for marmalade / melpa package., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1a241eb 076/217: Add `scala-indent:insert-asterisk-on-multiline-comment`., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5cd1b20 068/217: Properly align constructor val and var params., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ad73d10 096/217: Merge pull request #49 from zbskii/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode defa2af 098/217: pkg.el cleanup, ELPA Syncer, 2021/08/29