duyanning avatar duyanning committed dd4f9a3

添加了一些新的package archives地址

Comments (0)

Files changed (1)

 ;; 为了加快启动速度,注释掉,需要时再通过C-x C-e执行吧
 ;; (require 'package)
 ;; (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
+;; (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
 
 ;; 确保在配置各个包之前先加载这些包
 (setq package-enable-at-startup nil)
 
 
 (defun configure-yaml-mode ()
-  (if (not (file-exists-p yaml-mode-path))
-      (message "no yaml-mode")
-    (add-to-load-path yaml-mode-path)
+  (when (add-package 'yaml-mode yaml-mode-path)
     (autoload 'yaml-mode "yaml-mode.el" "Major mode for editing YAML files" t)
     (add-to-list 'auto-mode-alist '("\\.yaml\\'" . yaml-mode))
     (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
     (add-hook 'yaml-mode-hook
               '(lambda ()
-                 (define-key yaml-mode-map "\C-c\C-c" 'comment-region)))
-    )
+                 (define-key yaml-mode-map "\C-c\C-c" 'comment-region))))
+  
   )
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.