Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extended support for function shorthand notation (#1282)
* Implement font-locking for functions defined or specified (anonymous) using the backslash shorthand notation. Ensure extensibility by creating variables `ess-R-keystrings' and `ess-r--non-fn-kstrs' as complements to `ess-R-keywords' and `ess-r--non-fn-kwds'. Adjust `ess-r--find-fl-keyword' accordingly. Fixes #1278. Add question mark (shortcut to help) to both `ess-R-keystrings' and `ess-r--non-fn-kstrs'. * Function shorthand notation `\()' to trigger font-locking of function name * Add R function shorthand notation `\()' to `ess--r-s-function-pattern'. Allows function defined with the shorthand notation to be recognized as functions by e.g. `ess-r-beginning-of-function'. * Make the ESS-R 'keystrings' variable private by applying the 'two hyphens' convention and remove reference made to it from the docstring of `ess-R-keywords'. Set it to lowercase. * Add R shorthand notation for `function' to font-locking/fontification tests, excluding test related to backquoted function definition fontification. * Adjust `ess-r-font-lock-syntactic-face-function' so that it supports R function shorthand notation. Allows e.g. backquoted function names to be font-locked. * Fix fontification of names of functions defined using R function shorthand notation.
- Loading branch information
1 parent
e7b25b6
commit 8030e29
Showing
5 changed files
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters