diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2017-11-22 09:10:24 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2017-11-25 00:18:45 +0300 |
commit | 7a45268935f2319ae8349cafd858495dfc891a50 (patch) | |
tree | 8c9e914c77785f013243f8a68705e91e1189dd4c /gnu/packages/patches | |
parent | 8cc1fce1ba0cde80c924af6abbe49ce22fcc06d8 (diff) | |
download | guix-7a45268935f2319ae8349cafd858495dfc891a50.tar.gz |
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.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/emacs-highlight-stages-add-gexp.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/patches/emacs-highlight-stages-add-gexp.patch b/gnu/packages/patches/emacs-highlight-stages-add-gexp.patch new file mode 100644 index 0000000000..931355b4fe --- /dev/null +++ b/gnu/packages/patches/emacs-highlight-stages-add-gexp.patch @@ -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)))) |