From e14961fca13be44a737b32fb1346554a7832a690 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 4 Feb 2015 18:02:14 -0200 Subject: [PATCH] image-mode.el (image-kill-buffer): New command bound to k. --- lisp/ChangeLog | 3 +++ lisp/image-mode.el | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31f10d3c91d..68c2dab829d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -108,6 +108,9 @@ 2015-02-04 Artur Malabarba + * image-mode.el (image-kill-buffer): New command. + (image-mode-map): Bind it to k. + * emacs-lisp/package.el (package-delete): Remove package from `package-selected-packages' even if it can't be deleted. (package-installed-p): Accept package-desc objects. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 9e527f1f0b3..e6d6a3edb71 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -380,6 +380,7 @@ call." (define-key map "a-" 'image-decrease-speed) (define-key map "a0" 'image-reset-speed) (define-key map "ar" 'image-reverse-speed) + (define-key map "k" 'image-kill-buffer) (define-key map [remap forward-char] 'image-forward-hscroll) (define-key map [remap backward-char] 'image-backward-hscroll) (define-key map [remap right-char] 'image-forward-hscroll) @@ -722,6 +723,11 @@ the image by calling `image-mode'." (image-mode-as-text) (image-mode))) +(defun image-kill-buffer () + "Kill the current buffer." + (interactive) + (kill-buffer (current-buffer))) + (defun image-after-revert-hook () (when (image-get-display-property) (image-toggle-display-text) -- 2.39.2