igph-mode 1.1, now with tab highlighting. - geomyidae - A small C-based gopherd. Err bitreich.org 70
hgit clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ URL:git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ bitreich.org 70
1Log /scm/geomyidae/log.gph bitreich.org 70
1Files /scm/geomyidae/files.gph bitreich.org 70
1Refs /scm/geomyidae/refs.gph bitreich.org 70
1Tags /scm/geomyidae/tag bitreich.org 70
1README /scm/geomyidae/file/README.gph bitreich.org 70
1LICENSE /scm/geomyidae/file/LICENSE.gph bitreich.org 70
i--- Err bitreich.org 70
1commit 0bf8a3b9d7371bf83b44a64b882a224607d9d41c /scm/geomyidae/commit/0bf8a3b9d7371bf83b44a64b882a224607d9d41c.gph bitreich.org 70
1parent 9f6992fbf205ebf60a0674c9ec29a86c73cb4fa9 /scm/geomyidae/commit/9f6992fbf205ebf60a0674c9ec29a86c73cb4fa9.gph bitreich.org 70
hAuthor: Troels Henriksen <athas@sigkill.dk> URL:mailto:athas@sigkill.dk bitreich.org 70
iDate: Thu, 4 Aug 2022 19:26:38 +0200 Err bitreich.org 70
i Err bitreich.org 70
igph-mode 1.1, now with tab highlighting. Err bitreich.org 70
i Err bitreich.org 70
iSigned-off-by: Christoph Lohmann <20h@r-36.net> Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M gph/emacs/gph-mode.el | 19 +++++++++++++++---- Err bitreich.org 70
i Err bitreich.org 70
i1 file changed, 15 insertions(+), 4 deletions(-) Err bitreich.org 70
i--- Err bitreich.org 70
1diff --git a/gph/emacs/gph-mode.el b/gph/emacs/gph-mode.el /scm/geomyidae/file/gph/emacs/gph-mode.el.gph bitreich.org 70
i@@ -2,9 +2,9 @@ Err bitreich.org 70
i Err bitreich.org 70
i ;; Copyright (C) Troels Henriksen (athas@sigkill.dk) 2022 Err bitreich.org 70
i ;; Err bitreich.org 70
i-;; URL: https://github.com/diku-dk/futhark-mode Err bitreich.org 70
i+;; URL: gopher://sigkill.dk/1/programming Err bitreich.org 70
i ;; Keywords: gopher Err bitreich.org 70
i-;; Version: 1.0 Err bitreich.org 70
i+;; Version: 1.1 Err bitreich.org 70
i ;; Package-Requires: ((emacs "25.1")) Err bitreich.org 70
i Err bitreich.org 70
i ;; This file is not part of GNU Emacs. Err bitreich.org 70
i@@ -15,7 +15,9 @@ Err bitreich.org 70
i ;;; Commentary: Err bitreich.org 70
i ;; .gph is the map file format used by the geomyidae Gopher daemon. Err bitreich.org 70
i ;; This Emacs mode provides basic understanding of the link syntax, Err bitreich.org 70
i-;; such that highlighting and folding works properly. Err bitreich.org 70
i+;; such that highlighting and folding works properly. It also Err bitreich.org 70
i+;; highlights tab characters in pink because these are not allowed in Err bitreich.org 70
i+;; .gph files. Err bitreich.org 70
i ;; Err bitreich.org 70
i ;; Files with the ".gph" extension are automatically handled by this mode. Err bitreich.org 70
i ;; Err bitreich.org 70
i@@ -27,6 +29,14 @@ Err bitreich.org 70
i (eval-when-compile Err bitreich.org 70
i (require 'rx)) Err bitreich.org 70
i Err bitreich.org 70
i+(defface gph-tabs-face Err bitreich.org 70
i+ '((((class color)) (:background "hotpink")) Err bitreich.org 70
i+ (t (:reverse-video t))) Err bitreich.org 70
i+ "Face to use for highlighting tabs in Font-Lock mode.") Err bitreich.org 70
i+ Err bitreich.org 70
i+(defvar gph-tabs 'gph-tabs-face Err bitreich.org 70
i+ "Face to use for highlighting tabs in Font-Lock mode.") Err bitreich.org 70
i+ Err bitreich.org 70
i (defvar gph--font-lock-defaults Err bitreich.org 70
i (let* ((type-rx '(or "0" "1" "3" "7" "8" "9" "g" "I" "h" "i")) Err bitreich.org 70
i (desc-rx '(* (not "|"))) Err bitreich.org 70
i@@ -36,7 +46,8 @@ Err bitreich.org 70
i (link-rx `(: line-start "[" ,type-rx "|" ,desc-rx "|" ,path-rx "|" ,host-rx "|" ,port-rx "]")) Err bitreich.org 70
i (badlink-rx `(: line-start "[" (* anything)))) Err bitreich.org 70
i `((,(rx-to-string link-rx) 0 font-lock-doc-markup-face) Err bitreich.org 70
i- (,(rx-to-string badlink-rx) 0 font-lock-warning-face)))) Err bitreich.org 70
i+ (,(rx-to-string badlink-rx) 0 font-lock-warning-face) Err bitreich.org 70
i+ ("\t" 0 gph-tabs)))) Err bitreich.org 70
i Err bitreich.org 70
i (defvar gph-mode-hook nil Err bitreich.org 70
i "Hook for `gph-mode'. Is run whenever the mode is entered.") Err bitreich.org 70
.
Response:
text/plain