Created
February 25, 2010 10:30
-
-
Save handlename/314440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; .emacs written by NAGATA Hiroaki (handlename.net) | |
(add-to-list 'load-path "~/.emacs.d/site-lisp/") | |
(require 'cl) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; suppress opening new window | |
(setq ns-pop-up-frames nil) | |
;; | |
;; meta key | |
;;______________________________________________________________________ | |
(setq ns-command-modifier (quote meta)) | |
(setq ns-alternate-modifier (quote super)) | |
;; | |
;; Window settings | |
;;______________________________________________________________________ | |
(if window-system | |
(progn | |
(set-background-color "Black") | |
(set-foreground-color "LightGray") | |
(set-cursor-color "Red") | |
(set-frame-parameter nil 'alpha 80) | |
(tool-bar-mode nil) | |
(set-scroll-bar-mode nil) | |
(setq line-spacing 0.2) | |
(when (>= emacs-major-version 23) | |
(tool-bar-mode nil) | |
(set-face-attribute 'default nil | |
:family "M+2VM+IPAG circle" | |
:height 140) | |
(set-fontset-font | |
(frame-parameter nil 'font) | |
'japanese-jisx0208 | |
'("M+2VM+IPAG circle" . "iso10646-1")) | |
(set-fontset-font | |
(frame-parameter nil 'font) | |
'japanese-jisx0212 | |
'("M+2VM+IPAG circle" . "iso10646-1")) | |
(set-fontset-font | |
(frame-parameter nil 'font) | |
'mule-unicode-0100-24ff | |
'("M+2VM+IPAG circle" . "iso10646-1")) | |
(setq face-font-rescale-alist | |
'(("^-apple-hiragino.*" . 1.3) | |
(".*osaka-bold.*" . 1.2) | |
(".*osaka-medium.*" . 1.2) | |
(".*courier-bold-.*-mac-roman" . 1.0) | |
(".*monaco cy-bold-.*-mac-cyrillic" . 0.9) | |
(".*monaco-bold-.*-mac-roman" . 0.9) | |
("-cdac$" . 1.3)))) | |
(ns-toggle-fullscreen) | |
)) | |
;; | |
;; encoding | |
;;______________________________________________________________________ | |
(set-language-environment "Japanese") | |
(prefer-coding-system 'utf-8-unix) | |
(setq default-buffer-file-coding-system 'utf-8) | |
(set-buffer-file-coding-system 'utf-8) | |
(set-terminal-coding-system 'utf-8) | |
(set-keyboard-coding-system 'utf-8) | |
(set-clipboard-coding-system 'utf-8) | |
;; | |
;; general key bind | |
;;______________________________________________________________________ | |
(global-set-key (kbd "C-c a") 'align) | |
(global-set-key (kbd "C-c M-a") 'align-regexp) | |
(global-set-key (kbd "C-h") 'backward-delete-char) | |
(global-set-key (kbd "C-c d") 'delete-indentation) | |
(global-set-key (kbd "C-c C-e") 'eval-last-sexp) | |
(global-set-key (kbd "C-c e") 'eval-region) | |
(global-set-key (kbd "M-g") 'goto-line) | |
(global-set-key (kbd "C-S-i") 'indent-region) | |
(global-set-key (kbd "C-m") 'newline-and-indent) | |
(global-set-key (kbd "C-t") 'next-multiframe-window) | |
(global-set-key (kbd "M-<RET>") 'ns-toggle-fullscreen) | |
(global-set-key (kbd "C-S-t") 'previous-multiframe-window) | |
(global-set-key (kbd "M-r") 'replace-regexp) | |
(global-set-key (kbd "C-r") 'replace-string) | |
(global-set-key (kbd "C-/") 'undo) | |
;; | |
;; backup file | |
;;______________________________________________________________________ | |
(defun make-backup-file-name (filename) | |
(expand-file-name | |
(concat "~/.backup/" (file-name-nondirectory filename) "~") | |
(file-name-directory filename))) | |
;; | |
;; miscellaneous | |
;;______________________________________________________________________ | |
;; Bell | |
(setq ring-bell-function 'ignore) | |
;; Scroll | |
(setq scroll-step 1) | |
;; Line and column number | |
(global-linum-mode) | |
(column-number-mode t) | |
;; Fill column | |
(setq default-fill-column 72) | |
;; Truncate | |
(setq truncate-lines nil) | |
(setq truncate-partial-width-windows nil) | |
;; Indent | |
(setq-default tab-width 4) | |
(setq-default indent-tabs-mode nil) | |
(setq-default c-basic-offset 4) | |
(setq-default tab-width 4) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Additional functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; anything | |
;;______________________________________________________________________ | |
(require 'anything-config) | |
(define-key anything-map (kbd "C-M-n") 'anything-next-source) | |
(define-key anything-map (kbd "C-M-p") 'anything-previous-source) | |
;; Don't record histories. If not, anything get errer | |
(remove-hook 'kill-emacs-hook 'anything-c-adaptive-save-history) | |
(ad-disable-advice 'anything-exit-minibuffer 'before 'anything-c-adaptive-exit-minibuffer) | |
(ad-disable-advice 'anything-select-action 'before 'anything-c-adaptive-select-action) | |
(setq anything-c-adaptive-history-length 0) | |
;; Serach for current buffer | |
(defun anything-for-occur () | |
"Search current buffer in anything" | |
(interactive) | |
(anything '(anything-c-source-occur))) | |
(define-key global-map (kbd "C-s") 'anything-for-occur) | |
;; buffer list + buffer history + files in current directory | |
(defun anything-for-buffers () | |
"Open buffer list in anything" | |
(interactive) | |
(anything '(anything-c-source-buffers | |
anything-c-source-file-name-history | |
anything-c-source-files-in-current-dir))) | |
(define-key global-map (kbd "C-x b") 'anything-for-buffers) | |
;; calc | |
(defun anything-for-calc () | |
"Calculate in anything" | |
(interactive) | |
(anything '(anything-c-source-calculation-result))) | |
(define-key global-map (kbd "C-M-c") 'anything-for-calc) | |
;; killring history | |
(define-key global-map (kbd "C-M-y") 'anything-show-kill-ring) | |
;; emacs commands | |
(defun anything-for-emacs-commands () | |
"Execute emacs commands in anything" | |
(interactive) | |
(anything '(anything-c-source-emacs-commands))) | |
(define-key global-map (kbd "M-x") 'anything-for-emacs-commands) | |
;; tag jump | |
(require 'anything-etags) | |
(require 'anything-gtags) | |
(defun anything-etags-and-gtags-select () | |
"Tag jump using etags, gtags and `anything'." | |
(interactive) | |
(let* ((initial-pattern (regexp-quote (or (thing-at-point 'symbol) "")))) | |
(anything (list anything-c-source-gtags-select | |
anything-c-source-etags-select)) | |
"Find Tag: " nil)) | |
(define-key global-map (kbd "C-x t") 'anything-etags-and-gtags-select) | |
;; | |
;; highlight | |
;;______________________________________________________________________ | |
;; highlight current line | |
(require 'highlight-current-line) | |
(highlight-current-line-on t) | |
(set-face-background 'highlight-current-line-face "#101015") | |
;; hilight paren | |
(show-paren-mode 1) | |
;; highlight reagion | |
(setq transient-mark-mode t) | |
;; highlight edit characters | |
(require 'jaspace) | |
(setq jaspace-highlight-tabs t) | |
(add-hook 'mmm-mode-hook 'jaspace-mmm-mode-hook) | |
;; highlight current buffer | |
;; http://ksugita.blog62.fc2.com/blog-entry-8.html | |
(load-file "~/.emacs.d/site-lisp/hiwin.el") | |
;; | |
;; sense-region | |
;; http://taiyaki.org/elisp/sense-region/ | |
;;______________________________________________________________________ | |
(autoload 'sense-region-on | |
"sense-region" | |
"System to toggle region and rectangle." t nil) | |
(sense-region-on) | |
;; | |
;; align | |
;;______________________________________________________________________ | |
(require 'align) | |
;; Align for php-mode | |
;; http://d.hatena.ne.jp/Tetsujin/20070614/1181757931 | |
(add-to-list 'align-rules-list | |
'(php-assignment | |
(regexp . "[^-=!^&*+<>/.| \t\n]\\(\\s-*[.-=!^&*+<>/|]*\\)=>?\\(\\s-*\\)\\([^= \t\n]\\|$\\)") | |
(justify . t) | |
(tab-stop . nil) | |
(modes . '(php-mode)))) | |
(add-to-list 'align-dq-string-modes 'php-mode) | |
(add-to-list 'align-sq-string-modes 'php-mode) | |
(add-to-list 'align-open-comment-modes 'php-mode) | |
(setq align-region-separate (concat "\\(^\\s-*$\\)\\|" | |
"\\([({}\\(/\*\\)]$\\)\\|" | |
"\\(^\\s-*[)}\\(\*/\\)][,;]?$\\)\\|" | |
"\\(^\\s-*\\(}\\|for\\|while\\|if\\|else\\|" | |
"switch\\|case\\|break\\|continue\\|do\\)[ ;]\\)" | |
)) | |
;; | |
;; revive | |
;;______________________________________________________________________ | |
(autoload 'save-current-configuration "revive" "Save status" t) | |
(autoload 'resume "revive" "Resume Emacs" t) | |
(autoload 'wipe "revive" "Wipe emacs" t) | |
(define-key ctl-x-map "S" 'save-current-configuration) ; C-x S で状態保存 | |
(define-key ctl-x-map "F" 'resume) ; C-x F で復元 | |
(add-hook 'kill-emacs-hook 'save-current-configuration) ; 終了時に状態保存 | |
(resume) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; major mode settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; c++-mode | |
;;______________________________________________________________________ | |
(setenv "CPLUS_INCLUDE_PATH" "/opt/local/include") | |
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode)) | |
(add-hook 'c++-mode-hook | |
'(lambda () | |
(define-key mode-specific-map "c" 'compile) | |
(c-set-style "cc-mode"))) | |
;; | |
;; 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)) | |
(setq html-helper-basic-offset 0) | |
(setq html-helper-item-continue-indent 0) | |
;; | |
;; emacs-lisp-mode | |
;;______________________________________________________________________ | |
(add-hook 'emacs-lisp-mode | |
'(lambda () | |
(setq indent-tabs-mode nil))) | |
;; | |
;; Js2-mode | |
;;______________________________________________________________________ | |
(autoload 'js2-mode "js2" nil t) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
;; | |
;; lisp-mode | |
;;______________________________________________________________________ | |
(add-hook 'lisp-mode | |
'(lambda () | |
(setq indent-tabs-mode nil))) | |
;; | |
;; org-mode | |
;;______________________________________________________________________ | |
(require 'org-install) | |
;; | |
;; php-mode | |
;;______________________________________________________________________ | |
(require 'php-mode) | |
(autoload 'php-mode "php-mode") | |
(setq auto-mode-alist | |
(cons '("\\.php\\'" . php-mode) auto-mode-alist)) | |
(setq php-mode-force-pear) | |
(add-hook 'php-mode-hook | |
'(lambda () | |
(setq php-manual-path "/usr/share/doc/php/html") | |
(setq php-search-url "http://www.phppro.jp/") | |
(setq php-manual-url "http://www.phppro.jp/phpmanual") | |
(setq tab-width 4) | |
(setq c-basic-offset 4))) | |
;; | |
;; ruby-mode | |
;;______________________________________________________________________ | |
(add-hook 'ruby-mode-hook | |
'(lambda () | |
(setq tab-width 4) | |
(setq indent-tabs-mode 't) | |
(setq ruby-indent-level tab-width))) | |
;; | |
;; yatex-mode | |
;;______________________________________________________________________ | |
(add-to-list 'load-path "~/.emacs.d/site-lisp/yatex/") | |
(setq auto-mode-alist (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) | |
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) | |
(setq tex-command "/opt/local/bin/platex") | |
(setq dvi2-command "/opt/local/bin/xdvi") | |
(setq YaTeX-kanji-code 4) ;; utf-8 | |
(add-hook 'yatex-mode-hook'(lambda ()(setq auto-fill-function nil))) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; minor mode settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; auto complete | |
;;______________________________________________________________________ | |
(require 'auto-complete) | |
(append '(yahtml-mode) ac-modes) | |
(global-auto-complete-mode t) | |
(define-key ac-complete-mode-map "\M-n" 'ac-next) | |
(define-key ac-complete-mode-map "\M-p" 'ac-previous) | |
;; ac-my-completion for auto-complete | |
(defun ac-my-completion-list-in-files (files &optional keywords-variable) | |
"create completion list for auto-complete" | |
(let ((ksymbol keywords-variable) keywords) | |
(cond | |
((stringp files) | |
(setq files (list files))) | |
((stringp keywords-variable) | |
(setq ksymbol (intern keywords-variable)))) | |
(if (not (boundp ksymbol)) | |
(progn | |
(dolist (file files) | |
(let ((buffer (find-file-noselect file)) filename) | |
(setq filename (file-name-nondirectory file)) | |
(with-current-buffer buffer | |
(rename-buffer | |
(concat " *" filename "*") t) | |
(if (< (buffer-size) 131072) ; 128Kb | |
(save-excursion | |
(goto-char (point-min)) | |
(while (re-search-forward "^[^;]\\(\\s_\\|\\sw\\)+\\b$" nil t) | |
(let ((candidate (match-string-no-properties 0))) | |
(if (not (member candidate keywords)) | |
(push candidate keywords)))) | |
(setq keywords (nreverse keywords))))))) | |
;; (sort keywords #'(lambda (a b) (> (length a) (length b)))) | |
(if ksymbol | |
(set-default ksymbol keywords)) | |
(message (concat "Building ac-source keywords(" (symbol-name ksymbol) ")...done.")) | |
keywords)))) | |
(defun ac-my-completion-files (files mode-name &optional set-hook) | |
"set completion list to mode-variable for auto-complete" | |
(lexical-let | |
((--ac-source (intern (concat "ac-source-" mode-name))) | |
(--ac-source-keywords (intern (concat "ac-source-" mode-name "-keywords"))) | |
(--mode-hook (intern (concat mode-name "-mode-hook"))) | |
(--files files)) | |
(set-default --ac-source | |
(list (cons 'candidates | |
(lambda () | |
(all-completions ac-prefix (symbol-value --ac-source-keywords)))))) | |
(if set-hook | |
(add-hook --mode-hook | |
(lambda() | |
(ac-my-completion-list-in-files --files --ac-source-keywords) | |
(make-local-variable 'ac-sources) | |
(setq ac-sources (append ac-sources (list --ac-source))))) | |
(ac-my-completion-list-in-files --files --ac-source-keywords)))) | |
;; 以下をモード毎に設定 | |
(ac-my-completion-files "~/.emacs.d/completions/javascript+DOM" "javascript" t) | |
(ac-my-completion-files "~/.emacs.d/completions/C" "c" t) | |
(ac-my-completion-files "~/.emacs.d/completions/C++" "c++" t) | |
(ac-my-completion-files "~/.emacs.d/completions/PHP" "php" t) | |
(ac-my-completion-files "~/.emacs.d/completions/TeX" "yatex" t) | |
(ac-my-completion-files "~/.emacs.d/completions/HTML" "yahtml" t) | |
(ac-my-completion-files "~/.emacs.d/completions/elisp" "emacs-lisp" t) | |
;; auto-complete-etags | |
(require 'auto-complete-etags) | |
;; | |
;; Flymake | |
;;______________________________________________________________________ | |
(require 'flymake) | |
;; http://svn.coderepos.org/share/lang/elisp/set-perl5lib/set-perl5lib.el | |
(require 'set-perl5lib) | |
;; The face for errors and warnings | |
(set-face-background 'flymake-errline "red4") | |
(set-face-foreground 'flymake-errline "white") | |
(set-face-background 'flymake-warnline "yellow") | |
(set-face-foreground 'flymake-warnline "black") | |
;; Display errer message in mini buffer | |
;; http://d.hatena.ne.jp/xcezx/20080314/1205475020 | |
(defun flymake-display-err-minibuf () | |
"Displays the error/warning for the current line in the minibuffer" | |
(interactive) | |
(let* ((line-no (flymake-current-line-no)) | |
(line-err-info-list (nth 0 (flymake-find-err-info | |
flymake-err-info line-no))) | |
(count (length line-err-info-list))) | |
(while (> count 0) | |
(when line-err-info-list | |
(let* ((file (flymake-ler-file | |
(nth (1- count) line-err-info-list))) | |
(full-file (flymake-ler-full-file | |
(nth (1- count) line-err-info-list))) | |
(text (flymake-ler-text | |
(nth (1- count) line-err-info-list))) | |
(line (flymake-ler-line | |
(nth (1- count) line-err-info-list)))) | |
(message "[%s] %s" line text))) | |
(setq count (1- count))))) | |
(global-set-key "\C-cd" 'flymake-display-err-minibuf) | |
;; for C++ | |
;; http://d.hatena.ne.jp/suztomo/20080905/1220633281 | |
(defun flymake-cc-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "g++" (list "-Wall" "-Wextra" "-fsyntax-only" local-file)))) | |
(defun flymake-cch-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "g++" | |
(list "-Wall" "-Wextra" "-fsyntax-only" "-x c++-header" local-file)))) | |
(push '("\\.h$" flymake-cc-init) flymake-allowed-file-name-masks) | |
(push '("\\.cpp$" flymake-cc-init) flymake-allowed-file-name-masks) | |
(push '("\\.hpp$" flymake-cch-init) flymake-allowed-file-name-masks) | |
(add-hook 'c++-mode-hook | |
'(lambda () | |
(flymake-mode t))) | |
;; for C | |
(defun flymake-c-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "gcc" | |
(list "-Wall" "-Wextra" "-fsyntax-only" local-file)))) | |
(push '("\\.h$" flymake-cc-init) flymake-allowed-file-name-masks) | |
(push '("\\.c$" flymake-cc-init) flymake-allowed-file-name-masks) | |
(add-hook 'c-mode-hook | |
'(lambda () | |
(flymake-mode t))) | |
;; for Perl | |
;; http://unknownplace.org/memo/2007/12/21#e001 | |
(defvar flymake-perl-err-line-patterns | |
'(("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1))) | |
(defconst flymake-allowed-perl-file-name-masks | |
'(("\\.pl$" flymake-perl-init) | |
("\\.pm$" flymake-perl-init) | |
("\\.t$" flymake-perl-init))) | |
(defun flymake-perl-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "perl" (list "-wc" local-file)))) | |
(defun flymake-perl-load () | |
(interactive) | |
(defadvice flymake-post-syntax-check (before flymake-force-check-was-interrupted) | |
(setq flymake-check-was-interrupted t)) | |
(ad-activate 'flymake-post-syntax-check) | |
(setq flymake-allowed-file-name-masks | |
(append flymake-allowed-file-name-masks flymake-allowed-perl-file-name-masks)) | |
(setq flymake-err-line-patterns flymake-perl-err-line-patterns) | |
(set-perl5lib) | |
(flymake-mode t)) | |
(add-hook 'cperl-mode-hook 'flymake-perl-load) | |
;; for PHP | |
;; http://openlab.dino.co.jp/2008/08/05/223548324.html | |
;; (when (require 'flymake nil t) | |
;; (when (not (fboundp 'flymake-php-init)) | |
;; ;; flymake-php-initが未定義のバージョンだったら、自分で定義する | |
;; (defun flymake-php-init () | |
;; (let* | |
;; ((temp-file | |
;; (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace)) | |
;; (local-file | |
;; (file-relative-name | |
;; temp-file | |
;; (file-name-directory buffer-file-name)))) | |
;; (list "php" (list "-f" local-file "-l")))) | |
;; (setq flymake-allowed-file-name-masks | |
;; (append | |
;; flymake-allowed-file-name-masks | |
;; '(("\\.php[345]?$" flymake-php-init)))) | |
;; (setq flymake-err-line-patterns | |
;; (cons | |
;; '("\\(\\(?:Parse error\\|Fatal error\\|Warning\\): .*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1) | |
;; flymake-err-line-patterns)))) | |
;; | |
;; mmm-mode | |
;;______________________________________________________________________ | |
(require 'mmm-mode) | |
(setq mmm-global-mode 'maybe) | |
(set-face-background 'mmm-default-submode-face "#111111") | |
;; Setting from http://www.bookshelf.jp/soft/meadow_13.html#SEC101 | |
;; html + css | |
(mmm-add-classes | |
'((embedded-css | |
:submode css-mode | |
:front "<style[^>]*>" | |
:back "</style>"))) | |
(mmm-add-mode-ext-class nil "\\.html?\\'" 'embedded-css) | |
;; html + js | |
(mmm-add-classes | |
'((embedded-js | |
:submode js2-mode | |
:front "<script[^>]*>" | |
:back "</script>"))) | |
(mmm-add-mode-ext-class nil "\\.html?\\'" 'embedded-js) | |
;; html + php | |
(mmm-add-classes | |
'((html-php | |
:submode php-mode | |
:front "<\\?\\(php\\)?" | |
:back "\\?>"))) | |
(mmm-add-mode-ext-class nil "\\.php?\\'" 'html-php) | |
;; | |
;; zencoding-mode | |
;;______________________________________________________________________ | |
(require 'zencoding-mode) | |
(add-hook 'html-helper-mode-hook 'zencoding-mode) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment