mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: Add emacs-highlight-stages.
* gnu/packages/emacs.scm (emacs-highlight-stages): New variable. * gnu/packages/patches/emacs-highlight-stages-add-gexp.patch: New file. * gnu/local.mk (dist_patch_DATA): Add this.
This commit is contained in:
parent
8cc1fce1ba
commit
7a45268935
3 changed files with 52 additions and 0 deletions
|
@ -608,6 +608,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/einstein-build.patch \
|
%D%/packages/patches/einstein-build.patch \
|
||||||
%D%/packages/patches/emacs-exec-path.patch \
|
%D%/packages/patches/emacs-exec-path.patch \
|
||||||
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
|
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
|
||||||
|
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
|
||||||
%D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \
|
%D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \
|
||||||
%D%/packages/patches/emacs-source-date-epoch.patch \
|
%D%/packages/patches/emacs-source-date-epoch.patch \
|
||||||
%D%/packages/patches/erlang-man-path.patch \
|
%D%/packages/patches/erlang-man-path.patch \
|
||||||
|
|
|
@ -4861,6 +4861,31 @@ (define-public emacs-highlight-sexp
|
||||||
"This Emacs package highlights the s-exp at the current position.")
|
"This Emacs package highlights the s-exp at the current position.")
|
||||||
(license license:gpl3+)))
|
(license license:gpl3+)))
|
||||||
|
|
||||||
|
(define-public emacs-highlight-stages
|
||||||
|
(let ((commit "29cbc5b78261916da042ddb107420083da49b271")
|
||||||
|
(revision "1"))
|
||||||
|
(package
|
||||||
|
(name "emacs-highlight-stages")
|
||||||
|
(version (string-append "1.1.0" "-" revision "." (string-take commit 7)))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/zk-phi/highlight-stages.git")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (string-append name "-" version "-checkout"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0r6nbcrr0dqpgm8dir8ahzjy7rw4nrac48byamzrq96r7ajlxlv0"))
|
||||||
|
(patches
|
||||||
|
(search-patches "emacs-highlight-stages-add-gexp.patch"))))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(home-page "https://github.com/wigust/highlight-stages")
|
||||||
|
(synopsis "Minor mode that highlights (quasi-quoted) expressions")
|
||||||
|
(description "@code{highlight-stages} provides an Emacs minor mode that
|
||||||
|
highlights quasi-quoted expressions.")
|
||||||
|
(license license:gpl3+))))
|
||||||
|
|
||||||
(define-public emacspeak
|
(define-public emacspeak
|
||||||
(package
|
(package
|
||||||
(name "emacspeak")
|
(name "emacspeak")
|
||||||
|
|
26
gnu/packages/patches/emacs-highlight-stages-add-gexp.patch
Normal file
26
gnu/packages/patches/emacs-highlight-stages-add-gexp.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
|
Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
|
This patch adds highlighting for (guix) G-Expressions.
|
||||||
|
|
||||||
|
diff --git a/highlight-stages.el b/highlight-stages.el
|
||||||
|
index 3094c3c..e11260e 100644
|
||||||
|
--- a/highlight-stages.el
|
||||||
|
+++ b/highlight-stages.el
|
||||||
|
@@ -237,14 +237,14 @@ non-nil, (match-string 0) must be the expression matched."
|
||||||
|
|
||||||
|
(defun highlight-stages-lisp-quote-matcher (&optional limit)
|
||||||
|
(when (highlight-stages--search-forward-regexp
|
||||||
|
- "\\(?:`\\|\\(#?'\\)\\)\\|([\s\t\n]*\\(?:backquote\\|\\(quote\\)\\)[\s\t\n]+" limit)
|
||||||
|
+ "\\(?:`\\|\\(#?'\\)\\)\\|([\s\t\n]*\\(?:backquote\\|\\(quote\\)\\)[\s\t\n]+\\|\\(?:#~\\)\\|([\s\t\n]*\\(?:gexp\\)[\s\t\n]+" limit)
|
||||||
|
(prog1 (if (or (match-beginning 1) (match-beginning 2)) 'real t)
|
||||||
|
(set-match-data
|
||||||
|
(list (point)
|
||||||
|
(progn (ignore-errors (forward-sexp 1)) (point)))))))
|
||||||
|
|
||||||
|
(defun highlight-stages-lisp-escape-matcher (&optional limit)
|
||||||
|
- (when (highlight-stages--search-forward-regexp ",@?\\|([\s\t\n]*\\\\,@?+[\s\t\n]+" limit)
|
||||||
|
+ (when (highlight-stages--search-forward-regexp ",@?\\|([\s\t\n]*\\\\,@?+[\s\t\n]+\\|\\(unquote\\)\\|\\(unquote-splicing\\)\\|\\(ungexp-native\\)\\|\\(ungexp-splicing\\)\\|\\(ungexp-native-splicing\\)\\|\\(ungexp\\)\\|#\\$" limit)
|
||||||
|
(set-match-data
|
||||||
|
(list (point)
|
||||||
|
(progn (ignore-errors (forward-sexp 1)) (point))))
|
Loading…
Reference in a new issue