[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash c56925a 111/439: Add font-lock for new functions a
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash c56925a 111/439: Add font-lock for new functions and the `it` token. |
Date: |
Tue, 04 Aug 2015 20:26:59 +0000 |
branch: externals/dash
commit c56925a502c8b5974c092e7486f9ea3690a707b0
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Add font-lock for new functions and the `it` token.
---
dash.el | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 92 insertions(+), 0 deletions(-)
diff --git a/dash.el b/dash.el
index 89ea76c..f01f547 100644
--- a/dash.el
+++ b/dash.el
@@ -459,5 +459,97 @@ or with `-compare-fn' if that's non-nil."
(defalias '-contains-p '-contains?)
+(eval-after-load "lisp-mode"
+ '(progn
+ (let ((new-keywords '(
+ "--each"
+ "-each"
+ "--each-while"
+ "-each-while"
+ "--dotimes"
+ "-dotimes"
+ "-map"
+ "--map"
+ "--reduce-from"
+ "-reduce-from"
+ "--reduce"
+ "-reduce"
+ "--filter"
+ "-filter"
+ "-select"
+ "--select"
+ "--remove"
+ "-remove"
+ "-reject"
+ "--reject"
+ "--keep"
+ "-keep"
+ "-flatten"
+ "-concat"
+ "--mapcat"
+ "-mapcat"
+ "--first"
+ "-first"
+ "--any?"
+ "-any?"
+ "-some?"
+ "--some?"
+ "-any-p"
+ "--any-p"
+ "-some-p"
+ "--some-p"
+ "--all?"
+ "-all?"
+ "-every?"
+ "--every?"
+ "-all-p"
+ "--all-p"
+ "-every-p"
+ "--every-p"
+ "--none?"
+ "-none?"
+ "-none-p"
+ "--none-p"
+ "-take"
+ "-drop"
+ "--take-while"
+ "-take-while"
+ "--drop-while"
+ "-drop-while"
+ "-split-at"
+ "--split-with"
+ "-split-with"
+ "-partition"
+ "-partition-all"
+ "-interpose"
+ "-interleave"
+ "--replace-where"
+ "-replace-where"
+ "-partial"
+ "-rpartial"
+ "->"
+ "->>"
+ "-->"
+ "-distinct"
+ "-intersection"
+ "-difference"
+ "-contains?"
+ "-contains-p"
+ ))
+ (special-variables '(
+ "it"
+ "acc"
+ )))
+ (font-lock-add-keywords 'emacs-lisp-mode `((,(concat "\\<" (regexp-opt
special-variables 'paren) "\\>")
+ 1
font-lock-variable-name-face)) 'append)
+ (font-lock-add-keywords 'emacs-lisp-mode `((,(concat "(\\s-*"
(regexp-opt new-keywords 'paren) "\\>")
+ 1 font-lock-keyword-face))
'append))
+ (--each (buffer-list)
+ (with-current-buffer it
+ (when (and (eq major-mode 'emacs-lisp-mode)
+ (boundp 'font-lock-mode)
+ font-lock-mode)
+ (font-lock-refresh-defaults))))))
+
(provide 'dash)
;;; dash.el ends here
- [elpa] externals/dash 12ed9f6 100/439: Add destructive operations !cons og !cdr, (continued)
- [elpa] externals/dash 12ed9f6 100/439: Add destructive operations !cons og !cdr, Phillip Lord, 2015/08/04
- [elpa] externals/dash 79b56cc 101/439: Use --each, !cons and !cdr to simplify implementations., Phillip Lord, 2015/08/04
- [elpa] externals/dash 81a3247 104/439: Let -each and -each-while take multiple forms., Phillip Lord, 2015/08/04
- [elpa] externals/dash ba60707 103/439: Use --each-while to simplify implementations., Phillip Lord, 2015/08/04
- [elpa] externals/dash eb50d17 106/439: Add Melpa back in., Phillip Lord, 2015/08/04
- [elpa] externals/dash 4fedd2e 099/439: Add -partition and -partition-all, Phillip Lord, 2015/08/04
- [elpa] externals/dash 38eed45 095/439: Add rainbow-dash, Phillip Lord, 2015/08/04
- [elpa] externals/dash 49512b9 107/439: Simplify -take and -drop with --dotimes, Phillip Lord, 2015/08/04
- [elpa] externals/dash ed47814 105/439: Add -dotimes, Phillip Lord, 2015/08/04
- [elpa] externals/dash a08fc14 102/439: Add -each-while, Phillip Lord, 2015/08/04
- [elpa] externals/dash c56925a 111/439: Add font-lock for new functions and the `it` token.,
Phillip Lord <=
- [elpa] externals/dash a336d78 112/439: Add -only-some?, Phillip Lord, 2015/08/04
- [elpa] externals/dash 03370ea 108/439: Simplify examples-to-docs and examples-to-tests with dash, Phillip Lord, 2015/08/04
- [elpa] externals/dash ba80875 109/439: Nice indentation for --each, --each-while and --dotimes, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9a3dfdd 113/439: Name parameter PRED when function expects predicate., Phillip Lord, 2015/08/04
- [elpa] externals/dash a081c72 114/439: Fix tests., Phillip Lord, 2015/08/04
- [elpa] externals/dash 9faa422 115/439: Add -partition-by, Phillip Lord, 2015/08/04
- [elpa] externals/dash 51ddc13 110/439: Nice indentation for threading macros., Phillip Lord, 2015/08/04
- [elpa] externals/dash 2c5b86e 117/439: Add -join as alias to -distinct., Phillip Lord, 2015/08/04
- [elpa] externals/dash e9de223 116/439: Rename -replace-where to -map-when, Phillip Lord, 2015/08/04
- [elpa] externals/dash cca9b1b 121/439: Also run tests on Emacs24, Phillip Lord, 2015/08/04