catsoop/syntax-highlighting/emacs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-09-28 00:13:35 -04:00
..
README.md add notes about emacs syntax highlighting 2025-09-28 00:13:35 -04:00

Minimalist Emacs catsoop Mode

Dependencies:

  1. markdown-mode and multi-mode from MELPA Stable
  2. https://github.com/tarao/multi-mode-util

Once you have the two required packages installed, you can add the following to your .emacs to make a catsoop-mode and set it to be the default way to handle .catsoop files:

(require 'multi-mode-util)
(defun catsoop-mode ()
  "Treat the current buffer as a catsoop buffer."
  (interactive)
  (markdown-mode)
  (multi-install-chunk-finder
   "<python>[\r\n\t ]" "</python>" 'python-mode)
  (multi-install-chunk-finder
   "<question[^>]*>" "</question>" 'python-mode)
  (multi-install-chunk-finder
   "@{" "}" 'python-mode)
)
(setq auto-mode-alist (cons '("\\.catsoop$" . catsoop-mode)
                       auto-mode-alist))

Note that this is quite slow, but it does seem to work, more-or-less. If anyone can put together a better one, contributions would be welcome!