Mercurial > emacs
comparison lisp/image-mode.el @ 83463:38c49afb29d9
Merged from
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-31
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-503
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 01 Feb 2006 02:04:15 +0000 |
parents | 1239e70c4e3c |
children | 3bd95f4f2941 |
comparison
equal
deleted
inserted
replaced
83462:75949877b3ed | 83463:38c49afb29d9 |
---|---|
135 (kill-local-variable 'truncate-lines) | 135 (kill-local-variable 'truncate-lines) |
136 (if (called-interactively-p) | 136 (if (called-interactively-p) |
137 (message "Repeat this command to go back to displaying the image"))) | 137 (message "Repeat this command to go back to displaying the image"))) |
138 ;; Turn the image data into a real image, but only if the whole file | 138 ;; Turn the image data into a real image, but only if the whole file |
139 ;; was inserted | 139 ;; was inserted |
140 (let* ((data | 140 (let* ((image |
141 (string-make-unibyte | 141 (if (and (buffer-file-name) |
142 (buffer-substring-no-properties (point-min) (point-max)))) | 142 (not (buffer-modified-p))) |
143 (image | 143 (create-image (buffer-file-name)) |
144 (create-image data nil t)) | 144 (create-image |
145 (string-make-unibyte | |
146 (buffer-substring-no-properties (point-min) (point-max))) | |
147 nil t))) | |
145 (props | 148 (props |
146 `(display ,image | 149 `(display ,image |
147 intangible ,image | 150 intangible ,image |
148 rear-nonsticky (display intangible) | 151 rear-nonsticky (display intangible) |
149 ;; This a cheap attempt to make the whole buffer | 152 ;; This a cheap attempt to make the whole buffer |