emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ruby-end 5aba673f0e 85/91: ruby-end-code-at-point-p: Ch


From: ELPA Syncer
Subject: [elpa] externals/ruby-end 5aba673f0e 85/91: ruby-end-code-at-point-p: Check syntax-ppss instead of text props
Date: Wed, 25 Jan 2023 19:58:47 -0500 (EST)

branch: externals/ruby-end
commit 5aba673f0ebbd55e2a2b33aea576717701c08e0e
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    ruby-end-code-at-point-p: Check syntax-ppss instead of text props
    
    Closes #15
---
 ruby-end.el | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ruby-end.el b/ruby-end.el
index 19d4f159a7..c54e642ac4 100644
--- a/ruby-end.el
+++ b/ruby-end.el
@@ -99,7 +99,6 @@ When nil, any `last-command' will do."
   "\\(?:^\\|\\s-+\\)\\(?:do\\|def\\|class\\|module\\|case\\|for\\|begin\\)"
   "Regular expression matching blocks before point.")
 
-
 (defconst ruby-end-expand-after-re
   "\\s-*$"
   "Regular expression matching after point.")
@@ -165,10 +164,7 @@ When nil, any `last-command' will do."
 
 (defun ruby-end-code-at-point-p ()
   "Check if point is code, or comment or string."
-  (let ((properties (text-properties-at (point))))
-    (and
-     (null (memq 'font-lock-string-face properties))
-     (null (memq 'font-lock-comment-face properties)))))
+  (not (nth 8 (syntax-ppss))))
 
 ;;;###autoload
 (define-minor-mode ruby-end-mode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]