;ELC   
;;; Compiled by buildd@akateko.buildd on Fri Oct 25 13:51:26 2013
;;; from file /build/buildd/emacs23-23.4+1/debian/build-x/lisp/image-mode.el
;;; in Emacs version 23.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\301\302!\210\303B\304\303!\204 \305\303\306\"\210\307\303!\207" [current-load-list require image image-mode-winprops-alist default-boundp set-default t make-variable-buffer-local] 3)
#@118 Special hook run when image data is requested in a new window.
It is called with one argument, the initial WINPROPS.
(defvar image-mode-new-window-functions nil (#$ . 740))
#@78 Return winprops of WINDOW.
A winprops object has the shape (WINDOW . ALIST).
(defalias 'image-mode-winprops #[(&optional window cleanup) "\204\n \305 \202 \306!\204 \307\310\"\210	\203! \311\312\313\314\n\"\"\n\236\211\2049 \315\n\211@A)!B\316\317\"\210\311\n\"B)\207" [window cleanup image-mode-winprops-alist winprops x selected-window windowp error "Not a window: %s" delq nil mapcar #[(winprop) "\301\242!\205 \207" [winprop window-live-p] 2] copy-alist run-hook-with-args image-mode-new-window-functions] 6 (#$ . 919)])
(defalias 'image-mode-window-get #[(prop &optional winprops) ":\204	 \302!	A\236A\207" [winprops prop image-mode-winprops] 2])
(put 'image-mode-window-get 'setf-method #[(prop &optional winprops) "\306\307!\306\310!\306\311!	D\fD\nC	\n\312\fF+\313	E\257+\207" [--prop--temp-- --winprops--temp-- --val--temp-- prop winprops val make-symbol "--cl-prop--" "--cl-winprops--" "--cl-val--" image-mode-window-put image-mode-window-get] 7])
(defalias 'image-mode-window-put #[(prop val &optional winprops) ":\204	 \303!	\nB\304	A\236A\"B\241\207" [winprops prop val image-mode-winprops delq] 5])
(defalias 'image-set-window-vscroll #[(vscroll) "\301\300\302#\210\303\304 \"\207" [vscroll image-mode-window-put nil set-window-vscroll selected-window] 4])
(defalias 'image-set-window-hscroll #[(ncol) "\301\302\303#\210\304\305 \"\207" [ncol image-mode-window-put hscroll nil set-window-hscroll selected-window] 4])
(defalias 'image-mode-reapply-winprops #[nil "\304 \205- <\205- \305\306\307\"\310\302	\"\310\303	\"\n\203# \311\312 \n\"\210\205, \313\312 \"+\207" [image-mode-winprops-alist winprops hscroll vscroll image-get-display-property image-mode-winprops nil t image-mode-window-get set-window-hscroll selected-window set-window-vscroll] 3])
(defalias 'image-mode-setup-winprops #[nil "<\204 \301\302\303\304\301\305$\207" [image-mode-winprops-alist nil add-hook window-configuration-change-hook image-mode-reapply-winprops t] 5])
(defalias 'image-get-display-property #[nil "\300e\301\302 p=\205\f \303 #\207" [get-char-property display window-buffer selected-window] 5])
#@361 Wrapper around `image-size', to handle slice display properties.
If SPEC is an image display property, call `image-size' with the
given arguments.
If SPEC is a list of properties containing `image' and `slice'
properties, calculate the display size from the slice property.
If SPEC contains `image' but not `slice', call `image-size' with
the specified image.
(defalias 'image-display-size #[(spec &optional pixels frame) "@\304=\203 \305	\n#\207\306\304\"\306\303\"\211\203C \203C 	\203- \3078\3108B\202S \311\3078!\312\n!\245\311\3108!\313\n!\245B\202S \f\203O \305\f	\n#\202S \314\315\"*\207" [spec pixels frame slice image image-size assoc 3 4 float frame-char-width frame-char-height error "Invalid image specification: %s"] 5 (#$ . 3079)])
#@115 Scroll image in current window to the left by N character widths.
Stop if the right edge of the image is reached.
(defalias 'image-forward-hscroll #[(&optional n) "\305U\203 \306\207\305W\203 \307\305\310 \\]!\207\311 \312 \313\n8\n@Z\314\315	!@!\307\305\fZ]\310 \\^!,\207" [n image edges win-width img-width 0 nil image-set-window-hscroll window-hscroll image-get-display-property window-inside-edges 2 ceiling image-display-size] 4 (#$ . 3845) "p"])
#@115 Scroll image in current window to the right by N character widths.
Stop if the left edge of the image is reached.
(defalias 'image-backward-hscroll #[(&optional n) "\301[!\207" [n image-forward-hscroll] 2 (#$ . 4315) "p"])
#@100 Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached.
(defalias 'image-next-line #[(&optional n) "\305U\203 \306\207\305W\203 \307\305\310 \\]!\207\311 \312 \313\n8\nA@Z\314\315	!A!\307\305\fZ]\310 \\^!,\207" [n image edges win-height img-height 0 nil image-set-window-vscroll window-vscroll image-get-display-property window-inside-edges 3 ceiling image-display-size] 4 (#$ . 4546) "p"])
#@99 Scroll image in current window downward by N lines.
Stop if the top edge of the image is reached.
(defalias 'image-previous-line #[(&optional n) "\301[!\207" [n image-next-line] 2 (#$ . 4997) "p"])
#@408 Scroll image in current window upward by N lines.
Stop if the bottom edge of the image is reached.
If ARG is omitted or nil, scroll upward by a near full screen.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll downward.
If ARG is the atom `-', scroll downward by nearly full screen.
When calling from a program, supply as argument a number, nil, or `-'.
(defalias 'image-scroll-up #[(&optional n) "\204 \304 \305	8	A@Z\306\307\nZ]!*\207\310=\2032 \304 \305	8	A@Z\306\307\nZ^!*\207\306\311!!\207" [n edges win-height next-screen-context-lines window-inside-edges 3 image-next-line 0 - prefix-numeric-value] 4 (#$ . 5203) "P"])
#@405 Scroll image in current window downward by N lines.
Stop if the top edge of the image is reached.
If ARG is omitted or nil, scroll downward by a near full screen.
A near full screen is `next-screen-context-lines' less than a full screen.
Negative ARG means scroll upward.
If ARG is the atom `-', scroll upward by nearly full screen.
When calling from a program, supply as argument a number, nil, or `-'.
(defalias 'image-scroll-down #[(&optional n) "\204 \304 \305	8	A@Z\306\307\nZ^!*\207\310=\2032 \304 \305	8	A@Z\306\307\nZ]!*\207\306\311![!\207" [n edges win-height next-screen-context-lines window-inside-edges 3 image-next-line 0 - prefix-numeric-value] 4 (#$ . 5899) "P"])
#@200 Scroll horizontally to the left edge of the image in the current window.
With argument ARG not nil or 1, move forward ARG - 1 lines first,
stopping if the top or bottom edge of the image is reached.
(defalias 'image-bol #[(arg) "\203 \301!\211\302U\204 \303S!\210\304\305!\207" [arg prefix-numeric-value 1 image-next-line image-set-window-hscroll 0] 2 (#$ . 6595) "p"])
#@201 Scroll horizontally to the right edge of the image in the current window.
With argument ARG not nil or 1, move forward ARG - 1 lines first,
stopping if the top or bottom edge of the image is reached.
(defalias 'image-eol #[(arg) "\203 \305!\211\306U\204 \307S!\210\310 \311 \312\n8\n@Z\313\314	!@!\315\316\fZ]!,\207" [arg image edges win-width img-width prefix-numeric-value 1 image-next-line image-get-display-property window-inside-edges 2 ceiling image-display-size image-set-window-hscroll 0] 4 (#$ . 6978) "p"])
#@67 Scroll to the top-left corner of the image in the current window.
(defalias 'image-bob #[nil "\300\301!\210\302\301!\207" [image-set-window-hscroll 0 image-set-window-vscroll] 2 (#$ . 7512) nil])
#@71 Scroll to the bottom-right corner of the image in the current window.
(defalias 'image-eob #[nil "\306 \307 \310	8	@Z\311\312!@!\313	8	A@Z\311\312!A!\314\315\nZ]!\210\316\315\fZ]!.\207" [image edges win-width img-width win-height img-height image-get-display-property window-inside-edges 2 ceiling image-display-size 3 image-set-window-hscroll 0 image-set-window-vscroll] 4 (#$ . 7714) nil])
#@98 Fit the frame to the current image.
This function assumes the current frame has only one window.
(defalias 'image-mode-fit-frame #[nil "\304\305\306\"\307 \310	!\2034 \211@@)\311 =\2034 \211@A)\312 =\2034 \313\305\306\305#\210A\202N \n\314\n@!\240\210\n\314\nA!\241\210\313\305\306\n\311 \312 BB#\210\315\316 \n@\"\210\317\316 \nA\"+\207" [saved display size x frame-parameter nil image-mode-saved-size image-get-display-property image-display-size frame-width frame-height set-frame-parameter ceiling set-frame-width selected-frame set-frame-height] 7 (#$ . 8123) nil])
#@51 The image type for the current Image mode buffer.
(defvar image-type nil (#$ . 8710))
(make-variable-buffer-local 'image-type)
#@62 Internal variable to keep the previous non-image major mode.
(defvar image-mode-previous-major-mode nil (#$ . 8843))
#@31 Mode keymap for `image-mode'.
(defvar image-mode-map (byte-code "\301 \302!\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\317#\210\303\320\321#\210\303\322\323#\210\303\324\311#\210\303\325\313#\210\303\326\327#\210\303\330\331#\210\303\332\333#\210\303\334\335#\210)\207" [map make-sparse-keymap suppress-keymap define-key "q" quit-window "" image-toggle-display " " image-scroll-up "" image-scroll-down [remap forward-char] image-forward-hscroll [remap backward-char] image-backward-hscroll [remap previous-line] image-previous-line [remap next-line] image-next-line [remap scroll-up] [remap scroll-down] [remap move-beginning-of-line] image-bol [remap move-end-of-line] image-eol [remap beginning-of-buffer] image-bob [remap end-of-buffer] image-eob] 4) (#$ . 8966))
#@37 Mode keymap for `image-minor-mode'.
(defvar image-minor-mode-map (byte-code "\301 \302\303\304#\210)\207" [map make-sparse-keymap define-key "" image-toggle-display] 4) (#$ . 9813))
(put 'image-mode 'mode-class 'special)
#@141 Major mode for image files.
You can use \<image-mode-map>\[image-toggle-display]
to toggle between display as an image and display as text.
(defalias 'image-mode #[nil "\300\301\302\217\207" [err (byte-code "\306 \204	 \307\310!\210\311 \210\312\313 \204\" \314 \210\313 \204- \307\315!\210\202- \316\317\320\313 A\321\"\2038 \322\323\"\2029 \324\325!\210\326\327!\210\330\331 \210\332\333\334\316\317$\210\335\336!\210\337\340\341\342!\313 \203a \343\202b \344\345Q\"\207" [major-mode cursor-type truncate-lines image-type mode-name image-mode-map display-images-p error "Display does not support images" kill-all-local-variables image-mode image-get-display-property image-toggle-display-image "Invalid image" nil t plist-get :type format "Image[%s]" "Image" use-local-map make-local-variable bookmark-make-record-function image-bookmark-make-record image-mode-setup-winprops add-hook change-major-mode-hook image-toggle-display-text run-mode-hooks image-mode-hook message "%s" substitute-command-keys "Type \\[image-toggle-display] to view the image as " "text" "an image" "."] 5) ((error (byte-code "\301 \210\302\303!\203 \304\202 \305\306A\"\207" [err image-mode-as-text called-interactively-p any error message "Cannot display image: %s"] 3)))] 3 (#$ . 10046) nil])
#@101 Non-nil if Image minor mode is enabled.
Use the command `image-minor-mode' to change this variable.
(defvar image-minor-mode nil (#$ . 11339))
(make-variable-buffer-local 'image-minor-mode)
#@234 Toggle Image minor mode.
With arg, turn Image minor mode on if arg is positive, off otherwise.
It provides the key \<image-mode-map>\[image-toggle-display] to switch back to `image-mode'
to display an image file as the actual image.
(defalias 'image-minor-mode #[(&optional arg) "\303 	\304=\203 \n?\202( 	\203 \305	!\306V\202( \n\204\" \307\202( \310\311\302\"\210\312\211\2034 \313\314\315\312\307$\210\316\317\n\203> \320\202? \321\"\210\322\323!\203` \303 \203S \303 \232\203` \310\324\n\203] \325\202^ \326\"\210)\327 \210\n\207" [#1=#:last-message arg image-minor-mode current-message toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil add-hook change-major-mode-hook #[nil "\300\301!\207" [image-minor-mode -1] 2] run-hooks image-minor-mode-hook image-minor-mode-on-hook image-minor-mode-off-hook called-interactively-p any "Image minor mode %sabled" "en" "dis" force-mode-line-update] 6 (#$ . 11536) (list (or current-prefix-arg 'toggle))])
(add-minor-mode 'image-minor-mode '(:eval (if image-type (format " Image[%s]" image-type) " Image")) image-minor-mode-map)
#@533 Set a non-image mode as major mode in combination with image minor mode.
A non-image major mode found from `auto-mode-alist' or Fundamental mode
displays an image file as text.  `image-minor-mode' provides the key
\<image-mode-map>\[image-toggle-display] to switch back to `image-mode'
to display an image file as the actual image.

You can use `image-mode-as-text' in `auto-mode-alist' when you want
to display an image file as text initially.

See commands `image-mode' and `image-minor-mode' for more information
on these modes.
(defalias 'image-mode-as-text #[nil "\n\203\f \n \210\202& \306\307\310\311\"\"\306\307\310\312\f\"\"\313 \210\314\302!\210*	\315\316!\210\317 \210\320\321\322\323!\324 \203= \325\202> \326\327Q\")\207" [image-type previous-image-type image-mode-previous-major-mode auto-mode-alist magic-fallback-mode-alist major-mode delq nil mapcar #[(elt) "A\242\206 A\301>?\205 \207" [elt (image-mode image-mode-maybe image-mode-as-text)] 2] #[(elt) "A\242\206 A\301>?\205 \207" [elt (image-mode image-mode-maybe image-mode-as-text)] 2] normal-mode make-local-variable image-minor-mode 1 image-toggle-display-text message "%s" substitute-command-keys "Type \\[image-toggle-display] to view the image as " image-get-display-property "text" "an image" "."] 6 (#$ . 12666) nil])
(byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias image-mode-maybe image-mode nil make-obsolete "23.2"] 4)
#@77 Show the image file as text.
Remove text properties that display the image.
(defalias 'image-toggle-display-text #[nil "\303\211\304 \305ed\306#\210\307!\210\310\311!\205 \312\313!+\207" [modified buffer-undo-list inhibit-read-only t buffer-modified-p remove-list-of-text-properties (display intangible read-nonsticky read-only front-sticky) set-buffer-modified-p called-interactively-p any message "Repeat this command to go back to displaying the image"] 4 (#$ . 14109)])
#@115 Show the image of the image file.
Turn the image data into a real image, but only if the whole file
was inserted.
(defalias 'image-toggle-display-image #[nil "\306 \211\205- \307!\205- \310!?\205- \311 ?\205- \312\301!\205! 	?\205- \312\302!\205, \n??\211\203< \313\314ed\"!\202= \315\f\316#\317\f#$\320$\321$\322BBBB%\323\211&'\311 (\324$!\210\316)\325ed%#\210\326(!\210)\316*\323+\327\330,!\331\"\203\216 \332\333!\210\316\332\334!\210\316-\335=\203\245 \336\337\".\340\341!\205\256 \342\343!.	\207" [filename archive-superior-buffer tar-superior-buffer data-p file-or-data type buffer-file-name file-readable-p file-remote-p buffer-modified-p boundp string-make-unibyte buffer-substring-no-properties image-type nil create-image display intangible (rear-nonsticky (display intangible) read-only t front-sticky (read-only)) t image-refresh add-text-properties restore-buffer-modified-p coding-system-equal coding-system-base no-conversion make-local-variable require-final-newline auto-hscroll-mode image-mode format "Image[%s]" called-interactively-p any message "Repeat this command to go back to displaying the file as text" image props inhibit-read-only buffer-undo-list modified buffer-file-truename cursor-type truncate-lines buffer-file-coding-system major-mode mode-name] 6 (#$ . 14595)])
#@203 Toggle between image and text display.
If the current buffer is displaying an image file as an image,
call `image-mode-as-text' to switch to text.  Otherwise, display
the image by calling `image-mode'.
(defalias 'image-toggle-display #[nil "\300 \203 \301 \207\302 \207" [image-get-display-property image-mode-as-text image-mode] 1 (#$ . 15935) nil])
(defalias 'image-bookmark-make-record #[nil "\301 \300B\302B\244\207" [image-type bookmark-make-record-default ((handler . image-bookmark-jump))] 3])
(defalias 'image-bookmark-jump #[(bmk) "\302!	\303\301\"\230\204 \304 \210\207" [bmk image-type bookmark-default-handler bookmark-prop-get image-toggle-display] 5])
(provide 'image-mode)
