From d2981800dabfb0cdae9eaaf5a4c644c177fb0e12 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Wed, 24 Aug 2022 15:56:19 +0800 Subject: Add RUMU support --- init.el | 15 +++++++++++++++ rumu.el | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 rumu.el diff --git a/init.el b/init.el index ccba9dc..aeb700d 100644 --- a/init.el +++ b/init.el @@ -406,6 +406,21 @@ no effect." 'auto-mode-alist (cons "\\.rs$" #'rustic-mode)))) +;;; Rust Music Mode (rumu) + +(load-after-function rumu-mode "rumu.el" + "Load Rust music configurations" nil + (rumu-mode)) + +(cond + ((assoc "\\.rumu$" auto-mode-alist #'string=) + (setcdr + (assoc "\\.rumu$" auto-mode-alist #'string=) + #'rumu-mode)) + ((add-to-list + 'auto-mode-alist + (cons "\\.rumu$" #'rumu-mode)))) + ;;; Cat and mouse (cond ((display-mouse-p) (mouse-avoidance-mode 'none))) diff --git a/rumu.el b/rumu.el new file mode 100644 index 0000000..eeb900e --- /dev/null +++ b/rumu.el @@ -0,0 +1,39 @@ +;;; rumu.el --- Rust music sheet files -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 李俊緯 + +;; Author: 李俊緯 +;; Keywords: files, games, hypermedia, languages, multimedia, tools + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This file implements the major mode for dealing with Rust Music +;; files, called rumu files. +;; +;; This is a format for music sheets that are defined by my music +;; converter program written in Rust, and hence the name. + +;;; Code: + +(define-derived-mode rumu-mode text-mode "Rumu" + "Major mode for editing rumu files." + (set (make-local-variable 'comment-start) ";") + (set (make-local-variable 'comment-end) "") + (set (make-local-variable 'comment-use-syntax) t) + (set (make-local-variable 'comment-multi-line) nil)) + +(provide 'rumu) +;;; rumu.el ends here -- cgit v1.2.3-18-g5258