From 730bf80888d016d1bde15d7c777cb46d1616c084 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Thu, 24 Sep 2015 20:10:29 +0300 Subject: emacs: devel: Highlight 'modify-phases' keywords. * emacs/guix-guile.el (guix-guile-keyword-regexp): New function. * emacs/guix-devel.el (guix-devel-faces): New custom group. (guix-devel-modify-phases-keyword): New face. (guix-devel-modify-phases-keyword-regexp, guix-devel-font-lock-keywords): New variables. (guix-devel-modify-phases-font-lock-matcher, guix-devel-modify-phases-font-lock-pre): New functions. (guix-devel-mode): Adjust to add/remove font-lock-keywords. --- emacs/guix-guile.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'emacs/guix-guile.el') diff --git a/emacs/guix-guile.el b/emacs/guix-guile.el index 35a97d77a3..63322d7ed8 100644 --- a/emacs/guix-guile.el +++ b/emacs/guix-guile.el @@ -59,6 +59,10 @@ Return nil, if current buffer does not define a module." Transform elisp ARG (nil or non-nil) to the guile boolean (#f or #t)." (concat "#" (prin1-to-string (if arg 't 'f)))) +(defun guix-guile-keyword-regexp (keyword) + "Return regexp to find guile KEYWORD." + (format "(\\(%s\\)\\_>" keyword)) + (defun guix-guile-make-call-expression (proc &rest args) "Return \"(PROC ARGS ...)\" string. PROC and ARGS should be strings." -- cgit v1.2.3