branch: externals/ruby-end commit 5aba673f0ebbd55e2a2b33aea576717701c08e0e Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@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