]> git.eshelyaron.com Git - emacs.git/commitdiff
image-mode.el (image-kill-buffer): New command bound to k.
authorArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 4 Feb 2015 20:02:14 +0000 (18:02 -0200)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Fri, 6 Feb 2015 09:43:50 +0000 (07:43 -0200)
lisp/ChangeLog
lisp/image-mode.el

index 31f10d3c91df06b2b914bb950b6b6522f791550f..68c2dab829d0613101846228b28cebd7ab667e90 100644 (file)
 
 2015-02-04  Artur Malabarba  <bruce.connor.am@gmail.com>
 
+       * 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.
index 9e527f1f0b3373de00974d9d92b036de9dab646f..e6d6a3edb715e2334407b23ae281caec620d223d 100644 (file)
@@ -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)