end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

.emacsの一部

なんとなく、プログラムモードに関連する私の.emacsの一部です。
それぞれの説明はいつか時間のあるときに追記します。

;;html-helper-mode
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
(add-hook 'html-helper-load-hook '(lambda () (require 'html-font)))

;;css-mode
(autoload 'css-mode "css-mode")
(setq auto-mode-alist
     (cons '("\\.css\\'" . css-mode) auto-mode-alist))
(setq cssm-indent-function #'cssm-c-style-indenter)

;cperl-modeの設定
(autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl programs" t)
(setq auto-mode-alist
      (append '(("\\.\\([pP][Llm]\\|al\\|cgi\\|t\\)$" . cperl-mode))
              auto-mode-alist ))
(add-hook 'cperl-mode-hook
	  (lambda ()
	    (setq cperl-font-lock t)
	    (cperl-set-style "PerlStyle")))

;perltidy
(defun perltidy-region ()
  "Run perltidy on the current region."
  (interactive)
  (save-excursion
    (shell-command-on-region (point) (mark) "perltidy.bat -q" nil t)))
(defun perltidy-defun ()
  "Run perltidy on the current defun."
  (interactive)
  (save-excursion (mark-defun)
		  (perltidy-region)))
;;yaml-mode
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.\\(yaml\\|yml\\)$" . yaml-mode))

;;tt
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(setq auto-mode-alist
      (cons
       '("\\.html$" . html-helper-mode) auto-mode-alist))
(setq auto-mode-alist
      (cons
       '("\\.tt$" . html-helper-mode) auto-mode-alist))
(require 'html-tt)
(add-hook 'html-helper-mode-hook 'html-tt-load-hook)

;; js2-mode
(autoload 'js2-mode "js2" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))