2016-06-12 05:13:56 +00:00
|
|
|
;;;; Hacks for editing SFZ files
|
|
|
|
|
|
|
|
;; lern to syntax table
|
|
|
|
(define-derived-mode sfz-mode html-mode "SFZ"
|
|
|
|
"Major mode for editing SFZ files."
|
|
|
|
(highlight-lines-matching-regexp "^//" "font-lock-comment-face")
|
|
|
|
;; (highlight-lines-matching-regexp " [a-z]*" "font-lock-constant-face")
|
2017-06-03 05:44:46 +00:00
|
|
|
(setq comment-start "//"
|
|
|
|
comment-end "")
|
2016-06-12 05:13:56 +00:00
|
|
|
(auto-fill-mode -2))
|
|
|
|
(add-to-list 'auto-mode-alist
|
|
|
|
(cons "\\.sfz$" 'sfz-mode))
|
|
|
|
|
|
|
|
(defun sfz-prev-group ()
|
|
|
|
(interactive)
|
|
|
|
(re-search-backward "<group>")
|
|
|
|
(beginning-of-line))
|
|
|
|
|
|
|
|
(defun sfz-next-group ()
|
|
|
|
(interactive)
|
|
|
|
(forward-char)
|
|
|
|
(re-search-forward "<group>")
|
|
|
|
(beginning-of-line))
|
|
|
|
|
|
|
|
(define-key sfz-mode-map (kbd "M-p") 'sfz-prev-group)
|
|
|
|
(define-key sfz-mode-map (kbd "M-n") 'sfz-next-group)
|
2020-06-12 14:03:00 +00:00
|
|
|
|
|
|
|
(provide 'cp-sfz)
|