From: Artur Malabarba Date: Wed, 4 Feb 2015 20:02:14 +0000 (-0200) Subject: image-mode.el (image-kill-buffer): New command bound to k. X-Git-Tag: emacs-25.0.90~2008^2~85 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e14961fca13be44a737b32fb1346554a7832a690;p=emacs.git image-mode.el (image-kill-buffer): New command bound to k. --- 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)