summaryrefslogtreecommitdiff
path: root/lisp/image-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r--lisp/image-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 190ca08722b..64dcf9076ae 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -505,6 +505,11 @@ was inserted."
;; This just makes the arrow displayed in the right fringe
;; area look correct when the image is wider than the window.
(setq truncate-lines t)
+ ;; Disable adding a newline at the end of the image file when it
+ ;; is written with, e.g., C-x C-w.
+ (if (coding-system-equal (coding-system-base buffer-file-coding-system)
+ 'no-conversion)
+ (set (make-local-variable 'find-file-literally) t))
;; Allow navigation of large images
(set (make-local-variable 'auto-hscroll-mode) nil)
(setq image-type type)