;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
nil " Image" image-mode-map
:group 'image
:version "22.1"
- (unless (or (eq major-mode 'image-mode) image-minor-mode)
- (use-local-map image-mode-map)))
+ (if (not image-minor-mode)
+ (image-toggle-display-text)
+ (if (get-text-property (point-min) 'display)
+ (setq cursor-type nil truncate-lines t))
+ (add-hook 'change-major-mode-hook (lambda () (image-minor-mode -1)) nil t)
+ (message (concat (substitute-command-keys
+ "Type \\[image-toggle-display] to view the image as ")
+ (if (get-text-property (point-min) 'display)
+ "text" "an image") "."))))
;;;###autoload
(defun image-mode-maybe ()