mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 13:08:51 +08:00
parent
bdc2cb2aa6
commit
c3c07e7169
30
el-get.el
30
el-get.el
|
@ -831,7 +831,7 @@ itself.")
|
||||||
(run-hook-with-args hooks package)
|
(run-hook-with-args hooks package)
|
||||||
(run-hook-with-args 'el-get-post-remove-hooks package)))
|
(run-hook-with-args 'el-get-post-remove-hooks package)))
|
||||||
|
|
||||||
(defun el-get-remove (package)
|
(defun el-get-remove (package &optional package-status-alist)
|
||||||
"Remove any PACKAGE that is know to be installed or required."
|
"Remove any PACKAGE that is know to be installed or required."
|
||||||
(interactive
|
(interactive
|
||||||
(list (el-get-read-package-with-status "Remove" "required" "installed")))
|
(list (el-get-read-package-with-status "Remove" "required" "installed")))
|
||||||
|
@ -843,20 +843,20 @@ itself.")
|
||||||
(let ((fallback-source
|
(let ((fallback-source
|
||||||
(or (ignore-errors (el-get-package-def package))
|
(or (ignore-errors (el-get-package-def package))
|
||||||
(list :name package :type 'builtin))))
|
(list :name package :type 'builtin))))
|
||||||
(el-get-with-status-sources
|
(el-get-with-status-sources package-status-alist
|
||||||
(let* ((source (or (ignore-errors (el-get-package-def package))
|
(let* ((source (or (ignore-errors (el-get-package-def package))
|
||||||
fallback-source))
|
fallback-source))
|
||||||
;; Put the fallback source into `el-get-sources' so that
|
;; Put the fallback source into `el-get-sources' so that
|
||||||
;; other functions will pick it up.
|
;; other functions will pick it up.
|
||||||
(el-get-sources (cons source el-get-sources))
|
(el-get-sources (cons source el-get-sources))
|
||||||
(method (el-get-package-method source))
|
(method (el-get-package-method source))
|
||||||
(remove (el-get-method method :remove))
|
(remove (el-get-method method :remove))
|
||||||
(url (plist-get source :url)))
|
(url (plist-get source :url)))
|
||||||
;; remove the package now
|
;; remove the package now
|
||||||
(el-get-remove-autoloads package)
|
(el-get-remove-autoloads package)
|
||||||
(funcall remove package url 'el-get-post-remove)
|
(funcall remove package url 'el-get-post-remove)
|
||||||
(el-get-save-package-status package "removed")
|
(el-get-save-package-status package "removed")
|
||||||
(message "el-get remove %s" package)))))
|
(message "el-get remove %s" package)))))
|
||||||
|
|
||||||
(defun el-get-reinstall (package)
|
(defun el-get-reinstall (package)
|
||||||
"Remove PACKAGE and then install it again."
|
"Remove PACKAGE and then install it again."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user