[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ruby-end 9f0caf41d6 15/91: Update regular expressions f
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ruby-end 9f0caf41d6 15/91: Update regular expressions for matching expansion. |
Date: |
Wed, 25 Jan 2023 19:58:24 -0500 (EST) |
branch: externals/ruby-end
commit 9f0caf41d65fe1477f8ce54c258b8c26528593c8
Author: Johan Andersson <johan.rejeep@gmail.com>
Commit: Johan Andersson <johan.rejeep@gmail.com>
Update regular expressions for matching expansion.
---
ruby-end.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/ruby-end.el b/ruby-end.el
index ea2b3408d3..62e1f4becb 100644
--- a/ruby-end.el
+++ b/ruby-end.el
@@ -56,9 +56,13 @@
map)
"Keymap for `ruby-end-mode'.")
-(defvar ruby-end-keywords-re
+(defconst ruby-end-expand-before-re
"\\(?:^\\|\\s-+\\)\\(?:def\\|if\\|class\\|module\\|unless\\|case\\|while\\|do\\|until\\|for\\|begin\\)"
- "Regular expression matching from point and backwards a valid keyword.")
+ "Regular expression matching before point.")
+
+(defconst ruby-end-expand-after-re
+ "\\s-*$"
+ "Regular expression matching after point.")
(defun ruby-end-space ()
"Called when SPC-key is pressed."
@@ -90,8 +94,8 @@
"Checks if expansion (insertion of end) should be done."
(and
(ruby-end-code-at-point-p)
- (looking-back ruby-end-keywords-re)
- (looking-at "\\s-*$")))
+ (looking-back ruby-end-expand-before-re)
+ (looking-at ruby-end-expand-after-re)))
(defun ruby-end-code-at-point-p ()
"Checks if point is code, or comment or string."
- [elpa] branch externals/ruby-end created (now 2d4097afcb), ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 97db28da68 01/91: first commit, ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 9801aa199a 09/91: Do not expand when there's text after point., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 37b5fdad6d 13/91: Tests only pass when using read-kbd-macro instead of kbd, which really is the same..., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 9f0caf41d6 15/91: Update regular expressions for matching expansion.,
ELPA Syncer <=
- [elpa] externals/ruby-end 8cc9faf605 17/91: Allow to toggle on/off expansion with statement modifiers, ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 96c19df26d 22/91: adds option for adding the blank line between statement and end, ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 690e970812 23/91: Use when instead of if/progn., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 8787319fe3 04/91: Added code with tests., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 427237b83d 25/91: Fix whitespace and indent., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 45670f9134 26/91: Version bump., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 3f9349c3d0 28/91: Update espuds., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 25baf1c7d8 31/91: Update espuds., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end 18edd3af0b 32/91: Fix feature indentation., ELPA Syncer, 2023/01/25
- [elpa] externals/ruby-end cc1f6cf297 34/91: Add 'ruby' keyword., ELPA Syncer, 2023/01/25