Commits

duyanning committed d380b0a

refactor

  • Participants
  • Parent commits 16efed6

Comments (0)

Files changed (2)

 
 [HKEY_CLASSES_ROOT\*\shell\Emacs\command]
 @="\"F:\\emacs\\bin\\emacsclientw\" -n -a \"F:\\emacs\\bin\\runemacs.exe\"  \"%1\""
+;@="\"F:\\emacs\\bin\\emacsclientw\" -n -c -a \"F:\\emacs\\bin\\runemacs.exe\"  \"%1\""
 
 
 ; עĘÍÓáֺĹ
     (add-to-list 'load-path (file-name-directory dir-or-file-path))))
 
 
+(defun add-package (name dir-or-file-path)
+  (if (not (file-exists-p dir-or-file-path))
+      (progn
+        (message "no %s" name)
+        nil)
+    (add-to-load-path dir-or-file-path)
+    t)
+  )
+
+
 ;;;; 甄别宿主平台
 
 ;; (equal system-name "DYN-ASUS")
   (load-win7-font-settings)
   ;;(tool-bar-mode 1)
   ;;(tool-bar-mode -1) ; 有了这行,frame最大化就有问题。http://stackoverflow.com/questions/815239/how-to-maximize-emacs-on-windows-at-startup  可通过注册去除工ĺ
-  (w32-send-sys-command 61488)          ; frame最大化
+  ;;(w32-send-sys-command 61488)          ; frame最大化
 
   ;;(make-frame-visible)
 )
 ;;         (bar a)
 ;;       (qux 2))))
 (defun configure-paredit ()
-  (if (not (file-exists-p paredit-path))
-      (message "no paredit")
-    (add-to-load-path paredit-path)
+  (when (add-package "paredit" paredit-path)
     (autoload 'paredit-mode "paredit"
-      "Minor mode for pseudo-structurally editing Lisp code." t)
-
-    ;; (add-hook 'emacs-lisp-mode-hook       (lambda () (paredit-mode +1)))
-    ;; (add-hook 'lisp-mode-hook             (lambda () (paredit-mode +1)))
-    ;; (add-hook 'lisp-interaction-mode-hook (lambda () (paredit-mode +1)))
-    ;; (add-hook 'scheme-mode-hook           (lambda () (paredit-mode +1)))
-
-    ;; 交换C-M-p与C-M-b;C-M-n与C-M-f
-    ;; (add-hook 'paredit-mode-hook
-    ;;           (lambda ()
-    ;;             (define-key paredit-mode-map (kbd "C-M-n") 'paredit-forward)
-    ;;             (define-key paredit-mode-map (kbd "C-M-p") 'paredit-backward)
-    ;;             (define-key paredit-mode-map (kbd "C-M-f") 'paredit-forward-up)
-    ;;             (define-key paredit-mode-map (kbd "C-M-b") 'paredit-backward-down)
-    ;;             ))
-    )
+      "Minor mode for pseudo-structurally editing Lisp code." t))
   )