CSS

  • .emacs
    (autoload 'css-mode "css-mode")
    (setq auto-mode-alist (cons '("\\.css$" . css-mode) auto-mode-alist))

Visual Basic

  • .emacs
    (autoload 'visual-basic-mode "visual-basic-mode" "Visual Basic mode." t)
    (setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\)$" . 
                                     visual-basic-mode)) auto-mode-alist))

Java

Java Script

  • .emacs
    (setq auto-mode-alist (append '(("\\.js$" . java-mode)) auto-mode-alist))

Multi Mode

  • .emacs
    (autoload 'multi-mode
              "multi-mode"
              "Allowing multiple major modes in a buffer."
              t)

JSP

  • .emacs
    (defun jsp-mode () 
        (multi-mode 1 
    	 'html-mode
    	 '("<%" java-mode)
    
    	 '("%>" html-mode)))
    (setq auto-mode-alist (append '(("\\.jsp$" . jsp-mode)) auto-mode-alist))

HTML+Java Script+any

  • .emacs
    (defun mhtml-mode () 
      (multi-mode 1 
    			  'html-mode
    			  '("<SCRIPT" java-mode)
    			  '("/SCRIPT>" html-mode)))
    (setq auto-mode-alist (append '(("\\.\\(htm\\|html\\|shtm\\|shtml\\)$" . mhtml-mode)) auto-mode-alist))

C#

  • .emacs
    (autoload 'csharp-mode "csharp-mode" 
       "Major mode for editing C# code." t)
    (setq auto-mode-alist (cons '( "\\.cs\\'" . csharp-mode ) auto-mode-alist ))





トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: Tue, 12 Oct 2021 01:13:36 JST (1160d)