2010-01-10 71 views
1

Emacs在更改主题,添加插件和配置后的4秒内延迟和闪烁是否正常? (Vim没有发生这种情况)。Emacs在更改主题和添加插件时缓慢启动

这里是我的.emacs:

;; set tab width 

;; turn on tabs 
(setq indent-tabs-mode t) 
(setq-default indent-tabs-mode t) 

;; bind the tab key 
(global-set-key (kbd "TAB") 'self-insert-command) 

;; set the tab width 
(setq default-tab-width 4) 
(setq tab-width 4) 
(setq c-basic-indent 4) 

;; set open recent files 

(require 'recentf) 
(recentf-mode 1) 
(setq recentf-max-menu-items 25) 
(global-set-key "\C-x\ \C-r" 'recentf-open-files) 

;; set yasnippet 

(add-to-list 'load-path "D:/Program Files/emacs-23.1/site-lisp/plugins/yasnippet-0.6.1c") 
(require 'yasnippet) 
(yas/initialize) 
(yas/load-directory "D:/Program Files/emacs-23.1/site-lisp/plugins/yasnippet-0.6.1c/snippets") 

;; set yasnippet dropdown prompt 

(setq yas/prompt-functions '(yas/dropdown-prompt)) 

;; set yasnippet no indent 

(setq yas/indent-line 'none) 

;; same syntax hightlight for all languages 

(global-font-lock-mode 1) 

;; remove bold 

(mapc 
    (lambda (face) 
     (when (eq (face-attribute face :weight) 'bold) 
     (set-face-attribute face nil :weight 'normal))) 
(face-list)) 

;; set color theme 

(require 'color-theme) 
(color-theme-initialize) 
(color-theme-charcoal-black) 

;; set line number 

(global-linum-mode 1) 

;; set the highlight current line minor mode 

;; in every buffer, the line which contains the cursor will be fully 
;; highlighted 

(global-hl-line-mode 1) 

;; prevent emacs from making backup files 

(setq make-backup-files nil) 

;; default 

    (custom-set-variables 
    ;; custom-set-variables was added by Custom. 
    ;; If you edit it by hand, you could mess it up, so be careful. 
    ;; Your init file should contain only one such instance. 
    ;; If there is more than one, they won't work right. 
'(tool-bar-mode nil)) 
(custom-set-faces 
    ;; custom-set-faces was added by Custom. 
    ;; If you edit it by hand, you could mess it up, so be careful. 
    ;; Your init file should contain only one such instance. 
    ;; If there is more than one, they won't work right. 
'(default ((t (:inherit nil :stipple nil :background "SystemWindow" :foreground "SystemWindowText" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "outline" :family "Monaco"))))) 

我能提高吗?

回答

3

闪烁是正常的。通过字节编译你的elisp代码可以提高速度。为此,请执行M-x byte-compile-file并为您的.emacs指定路径,然后为每个尚未经过字节编译的elisp目录(可能为yasnippet)执行C-u 0 M-x byte-recompile-directory

重新启动Emacs并查看速度是否增加。如果仍然缓慢,启动Emacs切换到消息后缓冲和形式查找信息

加载C:\ FOO \ bar.el(源)... 做

如果“(source)”部分在这里,字节编译C:\ foo目录也是如此。

另外请记住,每次更改后都必须重新编译.emacs。

+0

!我最好坚持用Vim。不管怎么说,多谢拉。 – alexchenco 2010-01-10 11:19:37