Created
December 4, 2009 18:13
-
-
Save mori-dev/249219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;install-elisp の (provide 'install-elisp) の上あたりに追記 | |
(defun install-elisp-proceed-without-byte-compile () | |
(interactive) | |
(write-file install-elisp-filename) | |
(install-elisp-confirmation-minor-mode -1)) | |
;;;###autoload | |
(defun install-elisp-without-byte-compile (url &optional filename) | |
(interactive "sInstall Emacs Lisp from URL: ") | |
(if (null install-elisp-repository-directory) | |
(with-output-to-temp-buffer "*Help*" | |
(princ "You must prepare to use install-elisp program! | |
Set `install-elisp-repository-directory' to your local Emacs Lisp repository directory in your ~/.emacs. | |
For example: (setq install-elisp-repository-directory \"~/emacs/lisp/\")")) | |
(%install-elisp-create-buffer url) | |
(and install-elisp-use-view-mode (view-mode 1)) | |
(setq install-elisp-filename | |
(%install-elisp-get-filename (or filename (file-name-nondirectory url)))) | |
(if (not install-elisp-confirm-flag) | |
(install-elisp-proceed-without-byte-compile) | |
(install-elisp-confirmation-minor-mode 1) | |
(message "Type C-c C-d to do installation!")))) | |
(defun install-elisp-from-without-byte-compile (baseurl) | |
"Return higher-order function installing from BASEURL, which accepts an argument FILENAME." | |
`(lambda (filename) | |
(install-elisp-without-byte-compile (concat ,baseurl filename) filename))) | |
(defun install-elisp-from-emacswiki-without-byte-compile (filename) | |
(interactive (list (if (fboundp 'oddmuse-read-pagename) | |
(oddmuse-read-pagename "EmacsWiki") | |
(read-string "PageName: ")))) | |
(funcall (install-elisp-from-without-byte-compile "http://www.emacswiki.org/cgi-bin/wiki/download/") filename)) | |
(define-key install-elisp-confirmation-minor-mode-map "\C-c\C-d" 'install-elisp-proceed-without-byte-compile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment