diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-02-18 19:51:15 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-02-18 19:51:15 +0200 |
commit | 61aa93ed0d083435c6fef9ab85d5776f233376e1 (patch) | |
tree | c3f834c8252e63b5dec4d315944cba74bfc93063 /lisp | |
parent | a167e505d53ca8a971e38fd85f757ca2e2cebda8 (diff) | |
download | emacs-61aa93ed0d083435c6fef9ab85d5776f233376e1.tar.gz |
Fix bug #8047 with require-final-newline and image file display.
image-mode.el (image-toggle-display-image): Disable
require-final-newline in buffers visiting binary image files.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/image-mode.el | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index da5b9ebbda2..8caa24c1f40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2011-02-18 Eli Zaretskii <eliz@gnu.org> + * image-mode.el (image-toggle-display-image): Disable + require-final-newline in buffers visiting binary image files. + (Bug#8047) + * international/mule-cmds.el (read-char-by-name, ucs-insert): Document completion with asterisk and a substring. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index b30a43080d6..191e347330d 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -507,6 +507,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 'require-final-newline) nil)) ;; Allow navigation of large images (set (make-local-variable 'auto-hscroll-mode) nil) (setq image-type type) |