Use magic comments for autoloads in Emacs mode file
Also automatically trigger the mode for files with the .mod extension.time-shift
parent
209e16888d
commit
47c2fa3610
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue