Polyfill kill-current-buffer in Emacs<=25.3 #1446

kill-current-buffer wasn't introduced until Emacs 26.
This commit is contained in:
Henrik Lissner 2019-06-01 00:13:47 -04:00
parent 8ce8679c86
commit 653bd99b77
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -536,6 +536,8 @@ to least)."
(require 'cl-lib)
(unless EMACS26+
(with-no-warnings
;; `kill-current-buffer' was introduced in Emacs 26
(defalias 'kill-current-buffer #'kill-this-buffer)
;; if-let and when-let were moved to (if|when)-let* in Emacs 26+ so we
;; alias them for 25 users.
(defalias 'if-let* #'if-let)