From: Alex Kost <alezost@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH] emacs: devel: Highlight Guix keywords.
Date: Fri, 16 Oct 2015 23:45:00 +0300 [thread overview]
Message-ID: <87pp0ey243.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 101 bytes --]
Please tell if I missed keywords that should be highlighted (or if I
added the ones that shouldn't)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-devel-Highlight-Guix-keywords.patch --]
[-- Type: text/x-patch, Size: 2120 bytes --]
From 31e50a4a0d381a8582eb59d14897b40afd09b94f Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Fri, 16 Oct 2015 23:38:38 +0300
Subject: [PATCH] emacs: devel: Highlight Guix keywords.
* emacs/guix-devel.el (guix-devel-keywords): New constant.
(guix-devel-font-lock-keywords): Use it.
---
emacs/guix-devel.el | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/emacs/guix-devel.el b/emacs/guix-devel.el
index c8bfbb0..f3ad4b9 100644
--- a/emacs/guix-devel.el
+++ b/emacs/guix-devel.el
@@ -178,9 +178,52 @@ to find 'modify-phases' keywords."
(ignore-errors (forward-sexp))
(save-excursion (up-list) (point)))))
+(defconst guix-devel-keywords
+ '("call-with-compressed-output-port"
+ "call-with-container"
+ "call-with-decompressed-port"
+ "call-with-derivation-narinfo"
+ "call-with-derivation-substitute"
+ "call-with-error-handling"
+ "call-with-temporary-directory"
+ "call-with-temporary-output-file"
+ "define-enumerate-type"
+ "define-gexp-compiler"
+ "define-lift"
+ "define-monad"
+ "define-operation"
+ "define-record-type*"
+ "emacs-substitute-sexps"
+ "emacs-substitute-variables"
+ "mbegin"
+ "mlet"
+ "mlet*"
+ "munless"
+ "mwhen"
+ "run-with-state"
+ "run-with-store"
+ "signature-case"
+ "substitute*"
+ "substitute-keyword-arguments"
+ "test-assertm"
+ "use-package-modules"
+ "use-service-modules"
+ "use-system-modules"
+ "with-atomic-file-output"
+ "with-atomic-file-replacement"
+ "with-derivation-narinfo"
+ "with-derivation-substitute"
+ "with-directory-excursion"
+ "with-error-handling"
+ "with-monad"
+ "with-mutex"
+ "with-store"))
+
(defvar guix-devel-font-lock-keywords
`((,(rx (or "#~" "#$" "#$@" "#+" "#+@")) .
'guix-devel-gexp-symbol)
+ (,(guix-guile-keyword-regexp (regexp-opt guix-devel-keywords))
+ (1 'font-lock-keyword-face))
(,(guix-guile-keyword-regexp "modify-phases")
(1 'font-lock-keyword-face)
(guix-devel-modify-phases-font-lock-matcher
--
2.5.0
next reply other threads:[~2015-10-16 20:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 20:45 Alex Kost [this message]
2015-10-17 13:40 ` [PATCH] emacs: devel: Highlight Guix keywords Ludovic Courtès
2015-10-17 15:48 ` Alex Kost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pp0ey243.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.