Emacs: lua-mode hook

master
Pierre Neidhardt 2014-03-25 09:23:12 +01:00
parent 6ab5d0f080
commit f011538a1e
3 changed files with 13 additions and 3 deletions

View File

@ -86,6 +86,7 @@ Example: to assign some-function to C-i, use
(add-hook 'graphviz-dot-mode-hook (lambda () (require 'mode-dot)))
(load-external "\\.lua\\'" 'lua-mode nil 'sh-mode)
(add-hook 'lua-mode-hook (lambda () (require 'mode-lua)))
(load-external "\\.md\\'\\|\\.markdown\\'" 'markdown-mode)
;; If we need more option, add it to a dedicated file.

10
.emacs.d/mode-lua.el Normal file
View File

@ -0,0 +1,10 @@
;;==============================================================================
;; Lua
;;==============================================================================
(add-hook-and-eval
'lua-mode-hook
(lambda ()
(set (make-local-variable 'compile-command) (concat "lua " buffer-file-name))))
(provide 'mode-lua)

View File

@ -2,10 +2,9 @@
;; Perl
;;==============================================================================
(add-hook
'python-mode-hook
(add-hook-and-eval
'perl-mode-hook
(lambda ()
(set (make-local-variable 'compilation-scroll-output) t)
(set (make-local-variable 'compile-command) (concat "perl " buffer-file-name))))
(provide 'mode-perl)