Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mori-dev/249219 to your computer and use it in GitHub Desktop.
Save mori-dev/249219 to your computer and use it in GitHub Desktop.
;;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