(flyspell-post-command-hook): Do nothing unless flyspell-mode is enabled.
[bpt/emacs.git] / lisp / image-mode.el
index 6687ed3..8cdf22a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; image-mode.el --- support for visiting image files
 ;;
-;; Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 ;;
 ;; Author: Richard Stallman <rms@gnu.org>
 ;; Keywords: multimedia
@@ -332,7 +332,7 @@ to toggle between display as an image and display as text."
 
   (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
   (if (display-images-p)
-      (if (not (image-get-display-property))
+      (if (not (get-text-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