/[emacs]/emacs/lisp/image-mode.el
ViewVC logotype

Diff of /emacs/lisp/image-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by miles, Fri Mar 18 02:53:44 2005 UTC revision 1.3 by rms, Mon Mar 21 17:42:36 2005 UTC
# Line 43  Line 43 
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)
# Line 75  and showing the image as an image." Line 76  and showing the image as an image."
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"))
# Line 97  and showing the image as an image." Line 100  and showing the image as an 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)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26