[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/image-mode.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/image-mode.el,v |
Date: |
Tue, 30 Oct 2007 17:09:43 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 07/10/30 17:09:43
Index: image-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/image-mode.el,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- image-mode.el 28 Aug 2007 22:31:41 -0000 1.27
+++ image-mode.el 30 Oct 2007 17:09:41 -0000 1.28
@@ -59,7 +59,7 @@
(set-window-hscroll (selected-window)
(max 0 (+ (window-hscroll) n))))
(t
- (let* ((image (get-text-property 1 'display))
+ (let* ((image (get-char-property (point-min) 'display))
(edges (window-inside-edges))
(win-width (- (nth 2 edges) (nth 0 edges)))
(img-width (ceiling (car (image-size image)))))
@@ -82,7 +82,7 @@
(set-window-vscroll (selected-window)
(max 0 (+ (window-vscroll) n))))
(t
- (let* ((image (get-text-property 1 'display))
+ (let* ((image (get-char-property (point-min) 'display))
(edges (window-inside-edges))
(win-height (- (nth 3 edges) (nth 1 edges)))
(img-height (ceiling (cdr (image-size image)))))
@@ -156,7 +156,7 @@
(and arg
(/= (setq arg (prefix-numeric-value arg)) 1)
(image-next-line (- arg 1)))
- (let* ((image (get-text-property 1 'display))
+ (let* ((image (get-char-property (point-min) 'display))
(edges (window-inside-edges))
(win-width (- (nth 2 edges) (nth 0 edges)))
(img-width (ceiling (car (image-size image)))))
@@ -172,7 +172,7 @@
(defun image-eob ()
"Scroll to the bottom-right corner of the image in the current window."
(interactive)
- (let* ((image (get-text-property 1 'display))
+ (let* ((image (get-char-property (point-min) 'display))
(edges (window-inside-edges))
(win-width (- (nth 2 edges) (nth 0 edges)))
(img-width (ceiling (car (image-size image))))
@@ -221,7 +221,7 @@
(setq major-mode 'image-mode)
(add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
(if (and (display-images-p)
- (not (get-text-property (point-min) 'display)))
+ (not (get-char-property (point-min) 'display)))
(image-toggle-display)
;; Set next vars when image is already displayed but local
;; variables were cleared by kill-all-local-variables
@@ -232,7 +232,7 @@
(message "%s" (concat
(substitute-command-keys
"Type \\[image-toggle-display] to view as ")
- (if (get-text-property (point-min) 'display)
+ (if (get-char-property (point-min) 'display)
"text" "an image") "."))))
;;;###autoload
@@ -245,13 +245,13 @@
:version "22.1"
(if (not image-minor-mode)
(image-toggle-display-text)
- (if (get-text-property (point-min) 'display)
+ (if (get-char-property (point-min) 'display)
(setq cursor-type nil truncate-lines t)
(setq image-type "text"))
(add-hook 'change-major-mode-hook (lambda () (image-minor-mode -1)) nil t)
(message "%s" (concat (substitute-command-keys
"Type \\[image-toggle-display] to view the image as ")
- (if (get-text-property (point-min) 'display)
+ (if (get-char-property (point-min) 'display)
"text" "an image") "."))))
;;;###autoload
@@ -281,7 +281,7 @@
(defun image-toggle-display-text ()
"Showing the text of the image file."
- (if (get-text-property (point-min) 'display)
+ (if (get-char-property (point-min) 'display)
(image-toggle-display)))
(defvar archive-superior-buffer)
@@ -292,7 +292,7 @@
This command toggles between showing the text of the image file
and showing the image as an image."
(interactive)
- (if (get-text-property (point-min) 'display)
+ (if (get-char-property (point-min) 'display)
(let ((inhibit-read-only t)
(buffer-undo-list t)
(modified (buffer-modified-p)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/image-mode.el,v,
Stefan Monnier <=