配置EMACS编辑器添加js和css mode
时间:2007-06-15 来源:jiahaolin
为了更好地编辑JS和CSS文件,现在加入了CSS-MODE和JAVASCRIPT-MODE,感觉比较不错,推荐大家都使用。
我使用的版本为
最近还想添加一个可以支持jsp/jstl的mode,想了想,也没有太大的必要,不急,先这么用着吧,需要的时候再添加。
上面几个EL的安装方法都很简单,只需要添加到路径再加上auto-load就可以了。
我使用的版本为
;;; javascript.el --- Major mode for editing JavaScript source text
;; Copyright (C) 2006 Karl Landström
;; Author: Karl Landström <[email protected]>
;; Maintainer: Karl Landström <[email protected]>
;; Version: 2.0 Beta 8
;; Date: 2006-12-26
;; Keywords: languages, oop
;;; html-helper-mode.el --- Major mode for composing html files.
;; Author: Nelson Minar <[email protected]>
;; Maintainer: Nelson Minar <[email protected]>
;; Created: 01 Feb 1994
;; Version: $Revision: 2.0 $
;; Keywords: HTML major-mode
;; LCD Archive Entry:
;; html-helper-mode|Nelson Minar|[email protected]|
;; Major mode for editing HTML.|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; File: css.el
;; Author: Last Modified: Pankaj Kamthan
;; Date: Nov 15, 1998
;; Description: An Emacs module for CSS support in html-helper-mode
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Commentary
;; 1. This code is a revised version of css.el by Jim Tom Polk
;; available at http://camalott.com/~jtpolk/emacs.html. Many spelling
;; errors have been corrected and minor additions have been made to the
;; code. The code has also been better organized.
;; 2. The module must be called after html-helper-mode loads. It runs well
;; from the html-helper-load-hook.
;; 3. To use the module, put the following in your .emacs file
;; (add-hook 'html-helper-load-hook
;; (function (lambda () (load "css.el"))))
;; 4. CSS1 support limited to that built-in MSIE.
;; 5. This code is distributed under the same terms as the original css.el.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 16-Mar-94|Version 2.0|ftp://ftp.reed.edu/pub/src/html-helper-mode.tar.Z
;;; tempo.el --- Flexible template insertion
;; Copyright (C) 1994 Free Software Foundation, Inc.
;; Author: David K}gedal <[email protected] >
;; Created: 16 Feb 1994
;; Version: 1.2.2
;; Keywords: extensions, languages, tools
;; $Revision: 1.32 $
;; This file is part of GNU Emacs.
;;;; A major mode for editing CSS.
;;; Adds font locking, some rather primitive indentation handling and
;;; some typing help.
;;;
(defvar cssm-version "0.10"
"The current version number of css-mode.")
;;; copyright (c) 1998 Lars Marius Garshol, [email protected]
;;; $Id: css-mode.el,v 1.5 1998/12/15 10:36:44 larsga Exp $
;;; css-mode is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published
;;; by the Free Software Foundation; either version 2, or (at your
;;; option) any later version.
;;;
;;; css-mode is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Emacs; see the file COPYING. If not, write to the
;;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
最近还想添加一个可以支持jsp/jstl的mode,想了想,也没有太大的必要,不急,先这么用着吧,需要的时候再添加。
上面几个EL的安装方法都很简单,只需要添加到路径再加上auto-load就可以了。
相关阅读 更多 +