码迷,mamicode.com
首页 > 系统相关 > 详细

emacs package install

时间:2015-09-09 01:01:57      阅读:319      评论:0      收藏:0      [点我收藏+]

标签:

1.  .elc 是 .el的编译文件,运行速度更快. Elisp source code can be byte-compile.

php-mode.el >> php mode.elc

2. 加载方式

a. 半路加载:  M-x load file >> your file >> M-x php-mode

b. 启动就自动加载

If you want emacs to load the file when it starts,

(1) put the file in the dir ~/.emacs.d/lisp/, (create that directory if it doesn‘t exist.)

(2) then put the following in your emacs init file:(.emacs)

;; Tell emacs where is your personal elisp lib dir
(add-to-list ‘load-path "~/.emacs.d/lisp/")

;; load the packaged named php-mode.
(load "php-mode") ;; best not to include the ending “.el” or “.elc”

3.  当打开文件自动激活模式: Auto-Activation of Mode When Opening File

;; setup files ending in “.js” to open in js2-mode
(add-to-list ‘auto-mode-alist ‘("\\.js\\‘" . js2-mode))


--------------------------------------------------

What is the Purpose of 〔~/.emacs.d/〕 Path?

By convention, the ~/.emacs.d/ is a dir for all your personal emacs files. It is the default value of the variable user-emacs-directory. On Windows, the path is %HOMEPATH%/.emacs.d/. 〔? Windows Environment Variables Basic Tutorial〕 Emacs 23 should have created this dir for you. If it‘s not there, you can just create it yourself.

By convention, the dir ~/.emacs.d/lisp/ is for packages you manually installed. (ELPA packages are installed at ~/.emacs.d/elpa/)

-----------------------------------------------------

emacs package install

标签:

原文地址:http://www.cnblogs.com/htmlphp/p/4793369.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!