[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp image-mode.el
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] emacs/lisp image-mode.el |
Date: |
Thu, 05 Feb 2009 23:57:40 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Juri Linkov <jurta> 09/02/05 23:57:40
Modified files:
lisp : image-mode.el
Log message:
(image-mode): Use `image-get-display-property' instead of
`get-text-property'.
(image-minor-mode): Sync the logic with `image-mode' including the
activation of the image display by default.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/image-mode.el?cvsroot=emacs&r1=1.53&r2=1.54
Patches:
Index: image-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/image-mode.el,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- image-mode.el 5 Jan 2009 03:19:23 -0000 1.53
+++ image-mode.el 5 Feb 2009 23:57:39 -0000 1.54
@@ -332,7 +332,7 @@
(add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
(if (display-images-p)
- (if (not (get-text-property (point-min) 'display))
+ (if (not (image-get-display-property))
(image-toggle-display)
;; Set next vars when image is already displayed but local
;; variables were cleared by kill-all-local-variables
@@ -357,15 +357,20 @@
:version "22.1"
(if (not image-minor-mode)
(image-toggle-display-text)
- (if (image-get-display-property)
- (setq cursor-type nil truncate-lines t)
- (setq image-type "text"))
(image-mode-setup-winprops)
(add-hook 'change-major-mode-hook (lambda () (image-minor-mode -1)) nil t)
- (message "%s" (concat (substitute-command-keys
+ (if (display-images-p)
+ (if (not (image-get-display-property))
+ (image-toggle-display)
+ (setq cursor-type nil truncate-lines t))
+ (setq image-type "text")
+ (use-local-map image-mode-text-map))
+ (if (display-images-p)
+ (message "%s" (concat
+ (substitute-command-keys
"Type \\[image-toggle-display] to view the image as
")
(if (image-get-display-property)
- "text" "an image") "."))))
+ "text" "an image") ".")))))
;;;###autoload
(defun image-mode-maybe ()
@@ -477,8 +482,6 @@
`((image-type . ,image-type)
(handler . image-bookmark-jump))))
-
-
;;;###autoload
(defun image-bookmark-jump (bmk)
;; This implements the `handler' function interface for record type
- [Emacs-diffs] emacs/lisp image-mode.el,
Juri Linkov <=