Use unload-function instead of unload-hook in ert
* lisp/emacs-lisp/ert.el (ert-unload-function): Rename from 'ert--unload-function'. (ert--unload-function): Make into obsolete function alias for the above.
This commit is contained in:
parent
e9d17e4197
commit
859608c051
1 changed files with 3 additions and 4 deletions
|
@ -2856,7 +2856,7 @@ To be used in the ERT results buffer."
|
|||
(ert--tests-running-mode-line-indicator))))
|
||||
(add-hook 'emacs-lisp-mode-hook #'ert--activate-font-lock-keywords)
|
||||
|
||||
(defun ert--unload-function ()
|
||||
(defun ert-unload-function ()
|
||||
"Unload function to undo the side-effects of loading ert.el."
|
||||
(ert--remove-from-list 'find-function-regexp-alist 'ert--test :key #'car)
|
||||
(ert--remove-from-list 'minor-mode-alist 'ert--current-run-stats :key #'car)
|
||||
|
@ -2990,9 +2990,6 @@ write erts files."
|
|||
(forward-line 1)))
|
||||
(nreverse specs))))
|
||||
|
||||
(defvar ert-unload-hook ())
|
||||
(add-hook 'ert-unload-hook #'ert--unload-function)
|
||||
|
||||
;;; Obsolete
|
||||
|
||||
(define-obsolete-function-alias 'ert-equal-including-properties
|
||||
|
@ -3000,6 +2997,8 @@ write erts files."
|
|||
(put 'ert-equal-including-properties 'ert-explainer
|
||||
'ert--explain-equal-including-properties)
|
||||
|
||||
(define-obsolete-function-alias 'ert--unload-function 'ert-unload-function "31.1")
|
||||
|
||||
(provide 'ert)
|
||||
|
||||
;;; ert.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue