Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion emacs/k3-mode.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; k3-mode.el -- Emacs mode for the K Framework
;;; k3-mode.el -- Emacs mode for the K Framework -*- lexical-binding: t; -*-

;; Updated from k-mode.el to support the new keywords in K3

Expand All @@ -7,6 +7,8 @@
;; (load-library "k3-mode")
;; (add-to-list 'auto-mode-alist '("\\.k$" . k3-mode)) ;; to launch k3-mode for .k files

;;; Commentary:
;;
;; Currently has syntax highlighting for:
;; - keywords
;; - declarations (e.g. ops, syntax, etc)
Expand All @@ -18,6 +20,8 @@

(require 'comint)

;;; Code:

;;;; Options ;;;;
(defvar k-dash-comments nil
"Set to make \"--\" be used as a beginning of a line comment
Expand Down Expand Up @@ -120,6 +124,7 @@

;;;; K Mode ;;;;

;;;###autoload
(define-derived-mode k3-mode fundamental-mode
"k3 mode"
"Major Mode for the K3 framwork"
Expand All @@ -139,4 +144,9 @@
;;(setq k-keywords nil k-keywords-regex nil)
)

;;;###autoload
(add-to-list 'auto-mode-alist '("\\.k$" . k3-mode))

(provide 'k3-mode)

;;; k3-mode.el ends here