Skip to content
Snippets Groups Projects
Commit 2faf8bdd authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Use magic comments for autoloads in Emacs mode file

Also automatically trigger the mode for files with the .mod extension.

(cherry picked from commit 47c2fa36)
parent a6c48c9c
Branches
Tags
No related merge requests found
......@@ -28,8 +28,6 @@
;; add this to your .emacs or site-init.el file:
;;
;; (require 'dynare)
;; (autoload 'dynare-mode "dynare" "Enter dynare mode." t)
;; (setq auto-mode-alist (cons '("\\.mod\\'" . dynare-mode) auto-mode-alist))
;;; Commentary:
;;
......@@ -107,7 +105,8 @@ For detail, see `comment-dwim'."
("(\\(+\\|-\\)[1-9])" . font-lock-constant-face)
))
;; define the major mode
;;; define the major mode
;;;###autoload
(define-derived-mode dynare-mode fundamental-mode
"dynare mode"
"dynare is a mode for editing mod files used by dynare."
......@@ -149,5 +148,9 @@ For detail, see `comment-dwim'."
(setq dynare-functions-regexp nil)
)
;;; mode trigger
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.mod$" . dynare-mode))
(provide 'dynare)
;;; dynare.el ends here
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment