Skip to content

Commit

Permalink
Fix fontification of names of functions defined using R function shor…
Browse files Browse the repository at this point in the history
…thand notation.
  • Loading branch information
Maxime Pettinger committed Mar 25, 2024
1 parent 5c24a72 commit 49bcd58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/ess-custom.el
Expand Up @@ -2097,7 +2097,8 @@ strings that should not be treated as `words’ by `regexp-opt' in
(defvar ess-R-function-name-regexp
(concat "\\(" "\\sw+" "\\)"
"[ \t]*" "\\(<-\\)"
"[ \t\n]*" "\\(function\\b\\|\\\\\\)"))
"[ \t\n]*" "\\(function\\b\\|\\(\\\\[ \t\n(]+\\)\\)"))
;; "[ \t\n(]+" after "\\\\" since cannot use "\\b" to bound a non-word

(defvar ess-S-function-name-regexp
ess-R-function-name-regexp)
Expand Down

0 comments on commit 49bcd58

Please sign in to comment.