]> git.eshelyaron.com Git - emacs.git/commit
Font-lock shorthands in elisp-mode for quick visual recognition (bug#50959)
authorJoão Távora <joaotavora@gmail.com>
Sun, 3 Oct 2021 10:56:16 +0000 (11:56 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sun, 3 Oct 2021 15:18:40 +0000 (16:18 +0100)
commite6fbc45b7b49a27ab4db348385762bafc330bcf3
treea98dfa4384b47ce6df346bfca254295c58d563d6
parent17e6f3bee5a30f463082fad19d58de453ec9f490
Font-lock shorthands in elisp-mode for quick visual recognition (bug#50959)

Only the shorthanded prefix is font-locked.  This allows the remainder
of the font-lock logic to subsist (e.g. for macro-defining symbols).

* lisp/shorthands.el (cl-lib): Require it when compiling.
(elisp-shorthand-font-lock-face): New face.
(shorthands--mismatch-from-end): New helper.
(shorthands-font-lock-shorthands): New helper.

* test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el:
Add some dummy test code.
lisp/shorthands.el
test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el