Add better coloring to Pud connections

This commit is contained in:
Howard Abrams 2025-09-01 22:42:50 -07:00
parent b171fbc3bf
commit 6da8591a1d
3 changed files with 29 additions and 3 deletions

17
pud.org
View file

@ -2,7 +2,7 @@
#+author: Howard X. Abrams
#+date: 2025-01-18
#+filetags: emacs hamacs
#+lastmod: [2025-08-08 Fri]
#+lastmod: [2025-08-23 Sat]
A literate programming file for a Comint-based MUD client.
@ -244,6 +244,12 @@ Using Comint, and hoping to have the ANSI colors displayed.
(load "ansi-color" t)
#+END_SRC
Get full colors using the [[https://github.com/atomontage/xterm-color][xterm-color]] project:
#+BEGIN_SRC emacs-lisp
(use-package xterm-color)
#+END_SRC
Im going to use good ol fashion =telnet= for the connection:
#+BEGIN_SRC emacs-lisp
@ -427,7 +433,14 @@ Note that =comint-process-echoes=, depending on the mode and the circumstances,
;; (set (make-local-variable 'paragraph-separate) "\\'")
;; (set (make-local-variable 'font-lock-defaults) '(pud-font-lock-keywords t))
;; (set (make-local-variable 'paragraph-start) pud-prompt-regexp)
)
;; Get the xterm colorization on:
(require 'xterm-color)
(font-lock-mode -1)
;; Prevent font-locking from being re-enabled in this buffer
(make-local-variable 'font-lock-function)
(setq font-lock-function (lambda (_) nil))
(add-hook 'comint-preoutput-filter-functions 'xterm-color-filter nil t))
(add-hook 'pud-mode-hook 'pud--initialize)

View file

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: Evennia
# key: <ev
# --
#+BEGIN_SRC evennia
$0
#+END_SRC

6
snippets/tcl-mode/send Normal file
View file

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: send
# key: send
# --
send "${1}\n"
expectit "$0"