[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ruby-end afd0459b11 11/91: When not expanding, fall bac
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ruby-end afd0459b11 11/91: When not expanding, fall back instead of assuming that space inserts a blank. |
Date: |
Wed, 25 Jan 2023 19:58:24 -0500 (EST) |
branch: externals/ruby-end
commit afd0459b11794a85db5f9c920243602c85268d92
Author: Johan Andersson <johan.rejeep@gmail.com>
Commit: Johan Andersson <johan.rejeep@gmail.com>
When not expanding, fall back instead of assuming that space inserts a
blank.
---
ruby-end.el | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/ruby-end.el b/ruby-end.el
index a8fd51575d..416bcb9fb9 100644
--- a/ruby-end.el
+++ b/ruby-end.el
@@ -46,9 +46,12 @@
;;; Code:
+(defvar ruby-end-expand-key "SPC"
+ "Space key name.")
+
(defvar ruby-end-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "SPC") 'ruby-end-space)
+ (define-key map (kbd ruby-end-expand-key) 'ruby-end-space)
map)
"Keymap for `ruby-end-mode'.")
@@ -59,9 +62,15 @@
(defun ruby-end-space ()
"Called when SPC-key is pressed."
(interactive)
- (when (ruby-end-expand-p)
- (ruby-end-insert-end))
- (insert " "))
+ (cond
+ ((ruby-end-expand-p)
+ (ruby-end-insert-end)
+ (insert " "))
+ (t
+ (let ((ruby-end-mode nil))
+ (call-interactively
+ (key-binding
+ (kbd ruby-end-expand-key)))))))
(defun ruby-end-insert-end ()
"Closes block by inserting end."
- [elpa] externals/ruby-end 5e84c0c2fd 30/91: Update README., (continued)
- [elpa] externals/ruby-end 5e84c0c2fd 30/91: Update README., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 06c6378903 29/91: Update ecukes., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 47e5b92b8b 33/91: Autoformat using "cucumber --autoformat"., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 49354ca1a3 36/91: Add punctuation in doc., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end a7723ccdd2 38/91: These two are mixed up., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 91f3c3fc6e 40/91: Add option to expand on return., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 3b2794392a 03/91: Added necessary stuff for running Ecukes., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 5f9a9721a5 02/91: Added skeleton., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end d00bb287d6 05/91: Adding some docs., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end d957d3313b 12/91: Split on more than one line., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end afd0459b11 11/91: When not expanding, fall back instead of assuming that space inserts a blank.,
ELPA Syncer <=
- [elpa] externals/ruby-end 4498561af6 19/91: Split all keywords to modifiers and non-modifiers, ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 53605d0e85 20/91: Make `ruby-end-check-statement-modifiers` t by default., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end b04994ba90 21/91: Bumping version., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 73d6c51ef8 46/91: Ignore elpa dir., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end ba01dd2550 56/91: Update to version v0.2.2., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 1604c3c406 64/91: Ecukes depends on Espuds by default., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end ca8b4dc0a6 62/91: Run tests on snapshot., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end ab84e909b3 69/91: Override ruby-end-insert-newline to t if RET is pressed, ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 71b183a274 68/91: Run Ecukes tests in no win mode., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 0bd59d9eef 67/91: Add ert.el for Emacs-23., ELPA Syncer, 2023/01/25