branch: elpa/julia-mode commit 44c9959981510c17b100470ed7bbddd232d0e738 Author: justbur <jus...@burkett.cc> Commit: Yichao Yu <yyc1...@gmail.com>
julia-mode: Fix #15461 Partially reverts c8da4fb. This particular change is not terribly significant in terms of performance and should fix #15461. --- julia-mode.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/julia-mode.el b/julia-mode.el index bf365a4..47b6108 100644 --- a/julia-mode.el +++ b/julia-mode.el @@ -401,16 +401,15 @@ As a result, it is true inside \"foo\", `foo` and 'f'." (defun julia-at-keyword (kw-list) "Return the word at point if it matches any keyword in KW-LIST. KW-LIST is a list of strings. The word at point is not considered -a keyword if used as a field name, X.word, or quoted, :word. - -Assumes that point is not inside a comment." +a keyword if used as a field name, X.word, or quoted, :word." (and (or (= (point) 1) (and (not (equal (char-before (point)) ?.)) (not (equal (char-before (point)) ?:)))) (member (current-word t) kw-list) ;; 'end' is not a keyword when used for indexing, e.g. foo[end-2] (or (not (equal (current-word t) "end")) - (not (julia-in-brackets))))) + (not (julia-in-brackets)) + (not (julia-in-comment))))) ;; if backward-sexp gives an error, move back 1 char to move over the '(' (defun julia-safe-backward-sexp ()