[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode 5cd1b20 068/217: Properly align constructor val
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode 5cd1b20 068/217: Properly align constructor val and var params. |
Date: |
Sun, 29 Aug 2021 11:30:45 -0400 (EDT) |
branch: elpa/scala-mode
commit 5cd1b2045ccb5b2deca79cfabb339e75b4be638d
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Properly align constructor val and var params.
Fixes #24
---
scala-mode-indent.el | 2 +-
scala-mode-syntax.el | 22 ++++++++++++----------
scala-mode.el | 1 -
3 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/scala-mode-indent.el b/scala-mode-indent.el
index 0c95410..93caf73 100644
--- a/scala-mode-indent.el
+++ b/scala-mode-indent.el
@@ -606,7 +606,7 @@ anchor for calculating block indent for current point (or
point
(+ scala-indent:step lead))
;; other than case-line in case-block get double indent
((save-excursion
- (goto-char (1+ (nth 1 (syntax-ppss start))))
+ (goto-char (1+ (or (nth 1 (syntax-ppss start)) 0)))
(forward-comment (buffer-size))
(and (scala-syntax:looking-at-case-p)
(> start (match-beginning 0))))
diff --git a/scala-mode-syntax.el b/scala-mode-syntax.el
index 27b5f30..4691434 100644
--- a/scala-mode-syntax.el
+++ b/scala-mode-syntax.el
@@ -806,13 +806,15 @@ not. A list must be either enclosed in parentheses or
start with
(scala-syntax:beginning-of-code-line)
(when (scala-syntax:looking-back-token "," 1)
(goto-char (match-beginning 0))
- (ignore-errors ; catches when we get at parentheses
- (while (not (or (bobp)
- (looking-at scala-syntax:list-keywords-re)
- (scala-syntax:looking-back-empty-line-p)
- (scala-syntax:looking-back-token ";")))
- (scala-syntax:backward-sexp)))
- (cond ((= (char-syntax (char-before)) ?\()
- (point))
- ((looking-at scala-syntax:list-keywords-re)
- (goto-char (match-end 0)))))))
+ (let ((parenpoint (nth 1 (syntax-ppss))))
+ (if (and parenpoint (or (= (char-after parenpoint) ?\()
+ (= (char-after parenpoint) ?\[)))
+ (1+ parenpoint)
+ (ignore-errors ; catches when we get at parentheses
+ (while (not (or (bobp)
+ (looking-at scala-syntax:list-keywords-re)
+ (scala-syntax:looking-back-empty-line-p)
+ (scala-syntax:looking-back-token ";")))
+ (scala-syntax:backward-sexp)))
+ (when (looking-at scala-syntax:list-keywords-re)
+ (goto-char (match-end 0))))))))
diff --git a/scala-mode.el b/scala-mode.el
index 6ba9915..3e28f00 100644
--- a/scala-mode.el
+++ b/scala-mode.el
@@ -12,7 +12,6 @@
(require 'scala-mode-fontlock)
(require 'scala-mode-indent)
(require 'scala-mode-map)
-(require 'cc-cmds)
;; Tested only for emacs 24
(unless (<= 24 emacs-major-version)
- [nongnu] elpa/scala-mode 402d6df 209/217: Merge pull request #165 from fommil/sbtn, (continued)
- [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, 2021/08/29
- [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 <=
- [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
- [nongnu] elpa/scala-mode 13b30a6 093/217: Added Hugh Giddens to contributors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 9ab0a59 091/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c48b479 113/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode af2dc30 136/217: Removed Marmelade from README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 8d4d99b 156/217: Add optional flattening to creation of imenu index (again)., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode aebed53 168/217: Mark a couple of indentation variables as safe (#105), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ece95ca 170/217: use CI to compile PRs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 37e7537 173/217: rename to scala-mode (#110), ELPA Syncer, 2021/08/29