[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode 600d27b 115/217: join-line cannot be re-defined
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode 600d27b 115/217: join-line cannot be re-defined like this |
Date: |
Sun, 29 Aug 2021 11:30:55 -0400 (EDT) |
branch: elpa/scala-mode
commit 600d27b7aaf1e00edd6150adebd7ab626790582a
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>
join-line cannot be re-defined like this
---
README.md | 22 ++++++++++------------
scala-mode2-map.el | 21 +++++----------------
scala-mode2.el | 4 +---
3 files changed, 16 insertions(+), 31 deletions(-)
diff --git a/README.md b/README.md
index b778e8d..0516fad 100644
--- a/README.md
+++ b/README.md
@@ -274,12 +274,17 @@ To re-fill a paragraph, use the *fill-paragraph* command
( **M-q**
command. To set the default, you use the *customize-variable* command
or a mode-hook.
-## Joinin lines
+## Joinin lines (delete indentation)
-Scala-mode defines its own join-line function. Besides doing what the
-normal join-line function does, it also removes comment marks
-(asterisks and slashes) when comment lines are joined and space when
-code lines are joined and the uppper line ended with a dot.
+Scala-mode defines its own *scala-indent:join-line' function. Besides
+doing what the normal *join-line* (aka *delete-indentation*) function
+does, it also removes comment marks (asterisks and slashes) when
+comment lines are joined and space when code lines are joined and the
+uppper line ended with a dot.
+
+In scala-mode2 buffers *scala-indent:join-line* replaces
+*delete-indentation* in your key bindings. The default binding is
+**M-^**.
## Motion
@@ -342,13 +347,6 @@ you may want to try. Just copy-paste it to your `.emacs`
file.
;; (newline-and-indent)
;; (scala-indent:insert-asterisk-on-multiline-comment)))
- ;; Bind the 'join-line' command to M-RET. This command is normally
- ;; bound to M-^ which is hard to access, especially on some European
- ;; keyboards. The 'join-line' command has the effect or joining the
- ;; current line with the previous while fixing whitespace at the
- ;; joint.
- (local-set-key (kbd "M-RET") 'join-line)
-
;; Bind the backtab (shift tab) to
;; 'scala-indent:indent-with-reluctant-strategy command. This is usefull
;; when using the 'eager' mode by default and you want to "outdent" a
diff --git a/scala-mode2-map.el b/scala-mode2-map.el
index 8870730..be35b31 100644
--- a/scala-mode2-map.el
+++ b/scala-mode2-map.el
@@ -4,13 +4,11 @@
(require 'scala-mode2-indent)
-(defmacro scala-mode-map:define-keys (key-map key-funcs)
- (cons 'progn (mapcar
- #'(lambda (key-func)
- `(define-key ,key-map ,(car key-func) ,(cadr key-func)))
- key-funcs)))
-
-(defvar scala-mode-map nil
+(defvar scala-mode-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map prog-mode-map)
+ (substitute-key-definition 'delete-indentation 'scala-ident:join-line map
global-map)
+ map)
"Local key map used for scala mode")
(defun scala-mode-map:add-self-insert-hooks ()
@@ -25,13 +23,4 @@
(add-hook 'post-command-hook
'scala-indent:remove-indent-from-previous-empty-line))
-(when (not scala-mode-map)
- (let ((keymap (make-sparse-keymap)))
- (scala-mode-map:define-keys
- keymap
- (
-;; ([(control c)(control r)] 'scala-indent:rotate-run-on-strategy)
- ))
- (setq scala-mode-map keymap)))
-
(provide 'scala-mode2-map)
diff --git a/scala-mode2.el b/scala-mode2.el
index 5e5b5b2..ff25e5e 100644
--- a/scala-mode2.el
+++ b/scala-mode2.el
@@ -106,8 +106,7 @@ When started, runs `scala-mode-hook'.
'forward-sexp-function
'find-tag-default-function
'indent-line-function
- 'indent-tabs-mode
- 'join-line)
+ 'indent-tabs-mode)
(add-hook 'syntax-propertize-extend-region-functions
'scala-syntax:propertize-extend-region)
@@ -139,7 +138,6 @@ When started, runs `scala-mode-hook'.
find-tag-default-function 'scala-mode:find-tag
indent-line-function 'scala-indent:indent-line
indent-tabs-mode nil
- join-line 'scala-indent:join-line
)
(use-local-map scala-mode-map)
;; add indent functionality to some characters
- [nongnu] elpa/scala-mode 711091a 087/217: moved provides to end of files, (continued)
- [nongnu] elpa/scala-mode 711091a 087/217: moved provides to end of files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6312b36 082/217: Make the code agreeable to Emacs-Lisp mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 18a52f0 094/217: Update installation instructions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a1ea0b7 097/217: Proper instructions and autoload settings for package-based install, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 763c93c 107/217: scala-indent:join-line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c62ecf9 109/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode aea047a 104/217: Create .gitignore with *.elc, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d4cccb0 112/217: scala-mode:set-scala-syntax-mode to support sbt-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c9dd697 103/217: alphaid-re for SIP11 support, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 89c7138 102/217: Merge pull request #52 from non/topic/octal-escapes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 600d27b 115/217: join-line cannot be re-defined like this,
ELPA Syncer <=
- [nongnu] elpa/scala-mode 890b7eb 129/217: Document */ behavior in multi-line comments., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 3d330ad 126/217: Makefile clean-up 2, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6c4e8dc 128/217: Delete automatic space between * and /., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 84ff656 138/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c90e085 131/217: Tweaked syntax rules to make highlighting more customizeable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 68959cd 144/217: imenu is mostly working., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1954eaa 146/217: move all stuff related to moving between defintions to bottom of scala-mode-syntax.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e6a2755 147/217: Add stuff to readme. Small fixes. got rid fo whitespace changes., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 13c0f39 150/217: README changes., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode aaf1ed8 149/217: Readme update., ELPA Syncer, 2021/08/29