Skip to content

Commit

Permalink
elisp-refs, emms, pdf, xwidget: Use kill-current-buffer
Browse files Browse the repository at this point in the history
kill-this-buffer says

> This command can be reliably invoked only from the menu bar,
> otherwise it could decide to silently do nothing.
  • Loading branch information
condy0919 committed Jun 5, 2024
1 parent acc38ea commit a64a0a9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions modes/elisp-refs/evil-collection-elisp-refs.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; evil-collection-elisp-refs.el --- Evil bindings for Elisp Refs -*- lexical-binding: t -*-

;; Copyright (C) 2017 James Nguyen
;; Copyright (C) 2017, 2024 James Nguyen

;; Author: James Nguyen <[email protected]>
;; Maintainer: James Nguyen <[email protected]>
Expand Down Expand Up @@ -46,7 +46,7 @@
(kbd "RET") 'elisp-refs-visit-match

;; quit
"q" 'kill-this-buffer))
"q" 'kill-current-buffer))

(provide 'evil-collection-elisp-refs)
;;; evil-collection-elisp-refs.el ends here
4 changes: 2 additions & 2 deletions modes/emms/evil-collection-emms.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; evil-collection-emms.el --- Evil bindings for EMMS -*- lexical-binding: t -*-

;; Copyright (C) 2017 Pierre Neidhardt
;; Copyright (C) 2017, 2024 Pierre Neidhardt

;; Author: Pierre Neidhardt <[email protected]>
;; Maintainer: James Nguyen <[email protected]>
Expand Down Expand Up @@ -239,7 +239,7 @@ The return value is the yanked text."
"C" 'emms-metaplaylist-mode-new-buffer
"." 'emms-metaplaylist-mode-center-current
"D" 'emms-metaplaylist-mode-kill-buffer
"q" 'kill-this-buffer)
"q" 'kill-current-buffer)

(evil-set-initial-state 'emms-stream-mode 'normal)
(evil-collection-define-key 'normal 'emms-stream-mode-map
Expand Down
6 changes: 3 additions & 3 deletions modes/pdf/evil-collection-pdf.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; evil-collection-pdf.el --- Evil bindings for pdf-tools -*- lexical-binding: t -*-

;; Copyright (C) 2017 Pierre Neidhardt
;; Copyright (C) 2017, 2024 Pierre Neidhardt

;; Author: Pierre Neidhardt <[email protected]>
;; Maintainer: James Nguyen <[email protected]>
Expand Down Expand Up @@ -195,8 +195,8 @@ instead, which is useless and counterintuitive."

;; quit
"q" 'quit-window
"Q" 'kill-this-buffer
"ZQ" 'kill-this-buffer
"Q" 'kill-current-buffer
"ZQ" 'kill-current-buffer
"ZZ" 'quit-window)


Expand Down
4 changes: 2 additions & 2 deletions modes/xwidget/evil-collection-xwidget.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; evil-collection-xwidget.el --- Evil bindings for Xwidget -*- lexical-binding: t -*-

;; Copyright (C) 2020, 2022 Ruslan Kamashev
;; Copyright (C) 2020, 2022, 2024 Ruslan Kamashev

;; Author: Ruslan Kamashev <[email protected]>
;; Maintainer: James Nguyen <[email protected]>
Expand Down Expand Up @@ -72,7 +72,7 @@ F is the name of function, N is the pixel height."
(setq evil-collection-xwidget-webkit-last-closed-tab-url
(xwidget-webkit-uri (xwidget-webkit-current-session)))
(let ((kill-buffer-query-functions nil))
(kill-this-buffer)))
(kill-current-buffer)))

(defun evil-collection-xwidget-webkit-restore-last-closed-tab ()
"Restore last closed tab."
Expand Down

0 comments on commit a64a0a9

Please sign in to comment.