]> code.delx.au - gnu-emacs/blobdiff - lisp/image-mode.el
Merge emacs-25 into master (using imerge)
[gnu-emacs] / lisp / image-mode.el
index 9e527f1f0b3373de00974d9d92b036de9dab646f..8ef9c277c364c45ab62df3ad3b210238de9520f8 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)
@@ -657,7 +658,12 @@ was inserted."
                           (not (and (boundp 'archive-superior-buffer)
                                     archive-superior-buffer))
                           (not (and (boundp 'tar-superior-buffer)
-                                    tar-superior-buffer)))))
+                                    tar-superior-buffer))
+                           ;; This means the buffer holds the
+                           ;; decrypted content (bug#21870).
+                           (not (and (boundp 'epa-file-encrypt-to)
+                                     (local-variable-p
+                                      'epa-file-encrypt-to))))))
         (file-or-data (if data-p
                           (string-make-unibyte
                            (buffer-substring-no-properties (point-min) (point-max)))
@@ -722,6 +728,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)