* dash.el (dash--keywords): Prefer rx.

master
Basil L. Contovounesios 5 years ago
parent 4fb9613314
commit f61769dd3a
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 9
      dash.el

@ -2939,15 +2939,16 @@ structure such as plist or alist."
(defvar dash--keywords
`(;; TODO: Do not fontify the following automatic variables
;; globally; detect and limit to their local anaphoric scope.
(,(concat "\\_<" (regexp-opt '("acc" "it" "it-index" "other")) "\\_>")
(,(rx symbol-start (| "acc" "it" "it-index" "other") symbol-end)
0 font-lock-variable-name-face)
;; Macros in dev/examples.el. Based on `lisp-mode-symbol-regexp'.
(,(concat "(" (regexp-opt '("defexamples" "def-example-group") t)
"\\_>[\t ]+\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)*\\)")
(,(rx ?\( (group (| "defexamples" "def-example-group")) symbol-end
(+ (in "\t "))
(group (* (| (syntax word) (syntax symbol) (: ?\\ nonl)))))
(1 font-lock-keyword-face)
(2 font-lock-function-name-face))
;; Symbols in dev/examples.el.
,(concat "\\_<" (regexp-opt '("=>" "~>" "!!>")) "\\_>")
,(rx symbol-start (| "=>" "~>" "!!>") symbol-end)
;; Elisp macro fontification was static prior to Emacs 25.
,@(when (< emacs-major-version 25)
(let ((macs '("!cdr"

Loading…
Cancel
Save