mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 13:08:51 +08:00
Merge pull request #268 from dabrahams/fixes-267
BUGFIX: post-remove hooks weren't being run
This commit is contained in:
commit
b13ca7bdba
14
el-get.el
14
el-get.el
|
@ -2982,7 +2982,8 @@ called by `el-get' (usually at startup) for each package in
|
|||
"Run the post-remove hooks for PACKAGE."
|
||||
(let* ((source (el-get-package-def package))
|
||||
(hooks (el-get-method (plist-get source :type) :remove-hook)))
|
||||
(run-hook-with-args hooks package)))
|
||||
(run-hook-with-args hooks package)
|
||||
(run-hook-with-args 'el-get-post-remove-hooks package)))
|
||||
|
||||
(defun el-get-remove (package)
|
||||
"Remove any PACKAGE that is know to be installed or required."
|
||||
|
@ -3093,6 +3094,12 @@ entry which is not a symbol and is not already a known recipe."
|
|||
"This package has been updated successfully by el-get."))
|
||||
(add-hook 'el-get-post-update-hooks 'el-get-post-update-notification)
|
||||
|
||||
(defun el-get-post-remove-notification (package)
|
||||
"Notify the PACKAGE has been removed."
|
||||
(el-get-notify (format "%s removed" package)
|
||||
"This package has been removed successfully by el-get."))
|
||||
(add-hook 'el-get-post-remove-hooks 'el-get-post-remove-notification)
|
||||
|
||||
(defun el-get-post-error-notification (package info)
|
||||
"Notify the PACKAGE has failed to install."
|
||||
(el-get-notify (format "%s failed to install" package)
|
||||
|
@ -3112,6 +3119,11 @@ entry which is not a symbol and is not already a known recipe."
|
|||
(el-get-verbose-message "el-get updated package %s" package))
|
||||
(add-hook 'el-get-post-update-hooks 'el-get-post-update-message)
|
||||
|
||||
(defun el-get-post-remove-message (package)
|
||||
"After PACKAGE remove is done, message about it"
|
||||
(el-get-verbose-message "el-get removed package %s" package))
|
||||
(add-hook 'el-get-post-remove-hooks 'el-get-post-remove-message)
|
||||
|
||||
(defun el-get-post-error-message (package info)
|
||||
"After PACKAGE fails to install, just message about it"
|
||||
(el-get-verbose-message "el-get failed to initialize package %s" package))
|
||||
|
|
Loading…
Reference in New Issue
Block a user