43 |
;;;###autoload (push '("\\.tiff\\'" . image-mode) auto-mode-alist) |
;;;###autoload (push '("\\.tiff\\'" . image-mode) auto-mode-alist) |
44 |
;;;###autoload (push '("\\.tif\\'" . image-mode) auto-mode-alist) |
;;;###autoload (push '("\\.tif\\'" . image-mode) auto-mode-alist) |
45 |
;;;###autoload (push '("\\.xbm\\'" . image-mode) auto-mode-alist) |
;;;###autoload (push '("\\.xbm\\'" . image-mode) auto-mode-alist) |
46 |
|
;;;###autoload (push '("\\.xpm\\'" . image-mode) auto-mode-alist) |
47 |
;;;###autoload (push '("\\.pbm\\'" . image-mode) auto-mode-alist) |
;;;###autoload (push '("\\.pbm\\'" . image-mode) auto-mode-alist) |
48 |
;;;###autoload (push '("\\.pgm\\'" . image-mode) auto-mode-alist) |
;;;###autoload (push '("\\.pgm\\'" . image-mode) auto-mode-alist) |
49 |
;;;###autoload (push '("\\.ppm\\'" . image-mode) auto-mode-alist) |
;;;###autoload (push '("\\.ppm\\'" . image-mode) auto-mode-alist) |
76 |
(interactive) |
(interactive) |
77 |
(if (get-text-property (point-min) 'display) |
(if (get-text-property (point-min) 'display) |
78 |
(let ((inhibit-read-only t) |
(let ((inhibit-read-only t) |
79 |
(buffer-undo-list t)) |
(buffer-undo-list t) |
80 |
|
(modified (buffer-modified-p))) |
81 |
(remove-list-of-text-properties (point-min) (point-max) |
(remove-list-of-text-properties (point-min) (point-max) |
82 |
'(display intangible read-nonsticky |
'(display intangible read-nonsticky |
83 |
read-only front-sticky)) |
read-only front-sticky)) |
84 |
|
(set-buffer-modified-p modified) |
85 |
(kill-local-variable 'cursor-type) |
(kill-local-variable 'cursor-type) |
86 |
(kill-local-variable 'truncate-lines) |
(kill-local-variable 'truncate-lines) |
87 |
(message "Repeat this command to go back to displaying the image")) |
(message "Repeat this command to go back to displaying the image")) |
100 |
;; read-only when we're visiting the file (as |
;; read-only when we're visiting the file (as |
101 |
;; opposed to just inserting it). |
;; opposed to just inserting it). |
102 |
read-only t front-sticky (read-only))) |
read-only t front-sticky (read-only))) |
103 |
(buffer-undo-list t)) |
(buffer-undo-list t) |
104 |
|
(modified (buffer-modified-p))) |
105 |
(add-text-properties (point-min) (point-max) props) |
(add-text-properties (point-min) (point-max) props) |
106 |
|
(set-buffer-modified-p modified) |
107 |
;; Inhibit the cursor when the buffer contains only an image, |
;; Inhibit the cursor when the buffer contains only an image, |
108 |
;; because cursors look very strange on top of images. |
;; because cursors look very strange on top of images. |
109 |
(setq cursor-type nil) |
(setq cursor-type nil) |