;ELC   
;;; Compiled by nelhage@mit.edu on Wed Mar 21 17:22:38 2007
;;; from file /home/nelhage/tmp/auctex-11.84/preview/prv-emacs.el
;;; in Emacs version 23.0.0.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`prv-emacs.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\300\302!\210\300\303!\207" [require tex-site tex latex] 2)
#@53 List of macros only present when compiling/loading.
(defvar preview-compatibility-macros nil (#$ . 678))
#@160 Color to appear transparent in previews.
Set this to something unusual when using `preview-transparent-border',
to the default background in most other cases.
(custom-declare-variable 'preview-transparent-color ''(highlight :background) '(#$ . 790) :type '(radio (const :tag "None" nil) (const :tag "Autodetect" t) (color :tag "By name" :value "white") (list :tag "Take from face" :value (default :background) (face) (choice :tag "What to take" (const :tag "Background" :value :background) (const :tag "Foreground" :value :foreground)))) :group 'preview-appearance)
#@553 Width of transparent border for previews in pt.
Setting this to a numeric value will add a border of
`preview-transparent-color' around images, and will turn
the heuristic-mask setting of images to default to 't since
then the borders are correctly detected even in case of
palette operations.  If the transparent color is something
not present otherwise in the image, the cursor display
will affect just this border.  A width of 0 is interpreted
by PostScript as meaning a single pixel, other widths are
interpreted as PostScript points (1/72 of 1in)
(custom-declare-variable 'preview-transparent-border '(unless (fboundp 'posn-object-x-y) 1.5) '(#$ . 1363) :group 'preview-appearance :type '(choice (const :value nil :tag "No border") (number :value 1.5 :tag "Border width in pt")))
#@79 Get heuristic-mask to use for previews.
Consults `preview-transparent-color'.
(defalias 'preview-get-heuristic-mask #[nil ";\203	 \301!\207:\203 @\250\203 \207\301\302@A@\303#!\207" [preview-transparent-color color-values preview-inherited-face-attribute default] 5 (#$ . 2154)])
(defalias 'preview-create-icon-1 #[(file type ascent border) "\304\305\306	\307\n\205\f \310BBBBBBB\207" [file type ascent border image :file :type :ascent (:mask (heuristic t))] 8])
(put 'preview-create-icon-1 'byte-optimizer 'byte-compile-inline-expand)
#@58 Create an icon from FILE, image TYPE, ASCENT and BORDER.
(defalias 'preview-create-icon #[(file type ascent border) "	\n\304\305\306	\307\n\205 \310,BBBBBBB	\n\257\207" [file type ascent border image :file :type :ascent (:mask (heuristic t))] 8 (#$ . 2707)])
(byte-code "\301\302\303\304#\210\305B\306\305!\204 \307\305\310\"\210\311B\306\311!\204$ \307\311\312\"\210\312\207" [current-load-list put preview-filter-specs :type #[(keyword value &rest args) "\302!\203 \303\304\305	!BBB\207\306\307\310\"\207" [value args image-type-available-p image :type preview-filter-specs-1 throw preview-filter-specs nil] 5] preview-tb-icon-specs default-boundp set-default ((:type xpm :file "prvtex24.xpm") (:type xbm :file "prvtex24.xbm")) preview-tb-icon nil] 4)
#@145 Cause FUN (function call form) to be called when redisplayed.
FUN must be a form with OV as first argument,
REST as the remainder, returning T.
(defalias 'preview-add-urgentization #[(fun ov &rest rest) "\304\305\"\211@\306=?\205 \307\305\306\nBB	BB#)\207" [ov dispro fun rest overlay-get display when overlay-put] 8 (#$ . 3488)])
#@147 Undo urgentization of OV by `preview-add-urgentization'.
Returns the old arguments to `preview-add-urgentization'
if there was any urgentization.
(defalias 'preview-remove-urgentization #[(ov) "\302\303\"\211\242\304=\205 	A@\305\303	AA#\210)\207" [ov dispro overlay-get display when overlay-put] 6 (#$ . 3832)])
#@56 Prepare a later call of `preview-replace-active-icon'.
(defalias 'preview-icon-copy #[(icon) "\301AB\207" [icon image] 2 (#$ . 4155)])
(put 'preview-icon-copy 'byte-optimizer 'byte-compile-inline-expand)
#@61 Replace the active Icon in OV by REPLACEMENT, another icon.
(defalias 'preview-replace-active-icon #[(ov replacement) "\304\305\"\211@\n\211@A)\241\210	\nA\241)\207" [ov img replacement x overlay-get preview-image] 4 (#$ . 4366)])
(byte-code "\301\302\303\304#\210\305B\306\305!\204 \307\305\310\"\210\311B\306\311!\204$ \307\311\312\"\210\301\207" [current-load-list put preview-replace-active-icon byte-optimizer byte-compile-inline-expand preview-button-1 default-boundp set-default [mouse-2] preview-button-2 [mouse-3]] 4)
#@383 Generate a clickable string or keymap.
If MAP is non-nil, it specifies a keymap to add to, otherwise
a new one is created.  If GLYPH is given, the result is made
to display it wrapped in a string.  In that case,
HELPSTRING is a format string with one or two %s specifiers
for preview's clicks, displayed as a help-echo.  CLICK1 and CLICK2
are functions to call on preview's clicks.
(defalias 'preview-make-clickable '(macro . #[(&optional map glyph helpstring click1 click2) "\306\307\206 \310DC\311	\205 \312\307\305	FC\n\205 \312\307\313\nFC\203H \314\315\316\317\320\321\f;\2037 \322\f#\202< \322\f\323BB\324BBBBBBBB\202I \307C#BB\207" [map click1 click2 glyph helpstring preview-button-1 let resmap (make-sparse-keymap) append define-key preview-button-2 propertize "x" 'display 'mouse-face 'highlight 'help-echo format (preview-button-1 preview-button-2) ('keymap resmap)] 16 (#$ . 4908)]))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\305\301\306\307#\210\305\301\310\311#\210\305\301\312\313#\207" [current-load-list preview-overlay default-boundp set-default nil put modification-hooks (preview-handle-modification) insert-in-front-hooks (preview-handle-insert-in-front) insert-behind-hooks (preview-handle-insert-behind)] 4)
#@39 List of tentatively changed overlays.
(defvar preview-change-list nil (#$ . 6165))
#@134 *Regexp denoting end of preamble.
This is the location up to which preamble changes are considered
to require redumping of a format.
(custom-declare-variable 'preview-dump-threshold '"^ *\\\\begin *{document}" '(#$ . -6255) :group 'preview-latex :type 'string)
#@145 Hook function for change hooks on preamble.
See info node `(elisp) Overlay Properties' for
definition of OV, AFTER-CHANGE, BEG, END and LENGTH.
(defalias 'preview-preamble-changed-function #[(ov after-change beg end &optional length) "\302\301\"\303	!\210\304	!\210	\305\241)\207" [ov format-cons overlay-get preview-unwatch-preamble preview-format-kill t] 3 (#$ . 6523)])
#@214 Set up a watch on master file FILE.
FILE can be an associated buffer instead of a filename.
COMMAND is the command that generated the format.
FORMAT-CONS contains the format info for the main
format dump handler.
(defalias 'preview-watch-preamble #[(file command format-cons) "\306!\203\n \202 \307!\310\f\n\205G r\nq\210\212\214~\210eb\210\311\310\312#\204. \313\314\"\210\315e`\"\316	\303#\210\316	\317\320#\210\316	\321\322#\210	+B\241*\207" [file ov buffer format-cons command preview-dump-threshold bufferp find-buffer-visiting nil re-search-forward t error "Can't find preamble of `%s'" make-overlay overlay-put insert-in-front-hooks (preview-preamble-changed-function) modification-hooks (preview-preamble-changed-function)] 6 (#$ . 6905)])
#@95 Stop watching a format on FORMAT-CONS.
The watch has been set up by `preview-watch-preamble'.
(defalias 'preview-unwatch-preamble #[(format-cons) "A:\205 \211AA)\203 \302\211AA)!\210A\303\241\207" [format-cons x delete-overlay nil] 3 (#$ . 7670)])
#@247 Register not yet changed OV for verification.
This stores the old contents of the overlay in the
`preview-prechange' property and puts the overlay into
`preview-change-list' where `preview-check-changes' will
find it at some later point of time.
(defalias 'preview-register-change #[(ov) "\302\303\"?\2050 \302\304\"\305=\203 \306\303\307#\210\202+ \306\303\214~\210\310\311!\312!\")#\210	B\211\207" [ov preview-change-list overlay-get preview-prechange preview-state disabled overlay-put t buffer-substring-no-properties overlay-start overlay-end] 7 (#$ . 7933)])
#@118 Check whether the contents under the overlay have changed.
Disable it if that is the case.  Ignores text properties.
(defalias 'preview-check-changes #[nil "\303\211\203 \n@\303\304\305\217\210\306	\307\303#\210\nA\211\204 *\303\211\207" [preview-change-list ov --dolist-tail-- nil (byte-code "r\302!q\210\214~\210\303\304!\305!\")\306	G!\203! \307!\210\202D \310\311\"\312=\204D \313	\310\314\"\"\204D \315\316\317#\210\315\320\317#\210\321!\210*\317\207" [ov text overlay-buffer buffer-substring-no-properties overlay-start overlay-end zerop preview-delete overlay-get preview-state disabled preview-relaxed-string= preview-prechange overlay-put insert-in-front-hooks nil insert-behind-hooks preview-disable] 5) ((error)) overlay-put preview-prechange] 5 (#$ . 8514)])
#@153 Hook function for `insert-in-front-hooks' property.
See info node `(elisp) Overlay Properties' for
definition of OV, AFTER-CHANGE, BEG, END and LENGTH.
(defalias 'preview-handle-insert-in-front #[(ov after-change beg end &optional length) "\203 	?\205 \304\n\305\"\306=\205 \307\n\310\n!#\207\311\n!\207" [after-change undo-in-progress ov end overlay-get preview-state active move-overlay overlay-end preview-register-change] 5 (#$ . 9310)])
#@234 Hook function for `insert-behind-hooks' property.
This is needed in case `insert-before-markers' is used at the
end of the overlay.  See info node `(elisp) Overlay Properties'
for definition of OV, AFTER-CHANGE, BEG, END and LENGTH.
(defalias 'preview-handle-insert-behind #[(ov after-change beg end &optional length) "\203 	?\205 \304\n\305\"\306=\205 \307\n\310\n!#\207\311\n!\207" [after-change undo-in-progress ov beg overlay-get preview-state active move-overlay overlay-start preview-register-change] 4 (#$ . 9764)])
#@150 Hook function for `modification-hooks' property.
See info node `(elisp) Overlay Properties' for
definition of OV, AFTER-CHANGE, BEG, END and LENGTH.
(defalias 'preview-handle-modification #[(ov after-change beg end &optional length) "?\205 \302	!\207" [after-change ov preview-register-change] 2 (#$ . 10299)])
#@348 Toggle visibility of preview overlay OV.
ARG can be one of the following: t displays the overlay,
nil displays the underlying text, and 'toggle toggles.
If EVENT is given, it indicates the window where the event
occured, either by being a mouse event or by directly being
the window in question.  This may be used for cursor restoration
purposes.
(defalias 'preview-toggle #[(ov &optional arg event) "\306!	\307=\203 \310\303\"\311=?\202 	\203 \311\202 \312\310\302\"\310\303\"\313=\204\301 \314\303#\210\311=\203\203 \314\315\316#\210\317!\320!=\203R \314\321\n@#\210\202z \322\323\211 \203s  @\314\324\325\n@##\210 A\211 \204[ *\314\321\323#\210\314\326\323#\210\202\270 \327\323\211 \203\237  @\314\323#\210 A\211 \204\214 *\314\326\330#\210\nA\204\261 \n\331!\241\210\314\321\nA#\210\f\203\301 \332\333\f\"\210+!\205\362 \334\335!!\203\325 !\202\361 !\211!:\203\345 !A@\202\353 \336 `\337\325F)\211\"@)\"\207" [ov arg strings preview-state old-urgent prop preview-remove-urgentization toggle overlay-get active inactive disabled overlay-put category preview-overlay overlay-start overlay-end before-string (display keymap mouse-face help-echo) nil get-text-property 0 face (display keymap mouse-face help-echo) preview-face preview-inactive-string apply preview-add-urgentization preview-restore-position windowp selected-window (0 . 0) --dolist-tail-- event position] 8 (#$ . 10619)])
#@156 This is supposed to translate unrepresentable base encodings
into something that can be used safely for byte streams in the
run buffer.  A noop for Emacs.
(defalias 'preview-buffer-recode-system #[(base) "\207" [base] 1 (#$ . 12064)])
(put 'preview-buffer-recode-system 'byte-optimizer 'byte-compile-inline-expand)
#@54 Setup proper buffer hooks and behavior for previews.
(defalias 'preview-mode-setup #[nil "\306\300!\210\307\310\311\312\313\314$\210\310\315\316\313\314$\210\317	\n\"\210\204! \320\f!\2035 \321\n\322\323\324\325\326\327BBBBB#\210\205v \330! \313!\331\332\"\333Q \"\203U  \334\211\224O \335 #\"\211!A:\205u \336!!\210\337p!\211$A@)!#*\207" [desktop-save-buffer preview-menu LaTeX-mode-map preview-tb-icon preview-tb-icon-specs buffer-file-name make-local-variable desktop-buffer-preview-misc-data add-hook pre-command-hook preview-mark-point nil t post-command-hook preview-move-point easy-menu-add preview-filter-specs define-key [tool-bar preview] menu-item "Preview at point" preview-at-point :image (:help "Preview on/off at point") expand-file-name string-match "\\." "\\'" 0 assoc preview-unwatch-preamble preview-watch-preamble filename format-cons TeX-default-extension preview-dumped-alist x] 10 (#$ . 12386)])
#@32 Marker for fake intangibility.
(defvar preview-marker (make-marker) (#$ . 13331))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\304\207" [current-load-list preview-temporary-opened default-boundp set-default nil] 3)
#@56 Restored cursor position marker for reopened previews.
(defvar preview-last-location nil (#$ . 13560))
(make-variable-buffer-local 'preview-last-location)
#@39 Mark position for fake intangibility.
(defalias 'preview-mark-point #[nil "\302`\303\"\304=\203 \204 \305 `\306\223\210	`\306\223\210\307 \210	`\306\223\207" [preview-last-location preview-marker get-char-property preview-state active make-marker nil preview-move-point] 3 (#$ . 13721)])
#@284 Tweak position after opening/closing preview.
The treated overlay OV has been triggered in WINDOW.  This function
records the original buffer position for reopening, or restores it
after reopening.  Note that by using the mouse, you can open/close
overlays not in the active window.
(defalias 'preview-restore-position #[(ov window) "\303!\304	!=\205N r\303!q\210\305\306\"\307=\203) \n\206 \310 \311	!\312\223\211\202M \313\n!\205M \303!\314\n!=\205M \315!\nW\205M \316!\nV\205M \317	\n\")\207" [ov window preview-last-location overlay-buffer window-buffer overlay-get preview-state active make-marker window-point nil markerp marker-buffer overlay-start overlay-end set-window-point] 3 (#$ . 14021)])
#@42 Move point out of fake-intangible areas.
(defalias 'preview-move-point #[nil "\306 \210\307`\310	!\307\f\307\211\203V @\311!\203M \312\313\"\314=\203M \311!p=\203I 	\315!X\204A 	\316!Y\203I \317\320\"\210\202M BA\211\204 \307*\n\205\303 \204\201 \204\201 \321\322!p=\205{ 	\323!Z\211\"\203\207 \324\n!\202\303 \n\203\301 \312\n@\313\"\325=\203\272 	\315\n@!V\203\272 \310\203\260 \326W\203\260 \315\n@!\202\264 \316\n@!\211!\202\274 \nA\211\204\213 	b,\207" [newlist pt lst distance preview-temporary-opened ov preview-check-changes nil overlays-at overlay-buffer overlay-get preview-state inactive overlay-start overlay-end preview-toggle t preview-auto-reveal-p marker-buffer marker-position preview-open-overlays active 0 --dolist-tail-- disable-point-adjustment global-disable-point-adjustment preview-auto-reveal preview-marker] 6 (#$ . 14738)])
#@68 Open all previews in LIST, optionally restricted to enclosing POS.
(defalias 'preview-open-overlays #[(list &optional pos) "\305\211\2058 \n@\306	\307\"\310=\2030 \203( \311	!V\2030 \312	!W\2030 \313	!\210	\fB\nA\211\204 \305*\207" [list ovr --dolist-tail-- pos preview-temporary-opened nil overlay-get preview-state active overlay-start overlay-end preview-toggle] 4 (#$ . 15637)])
(ad-add-advice 'replace-highlight '(preview nil t (advice lambda nil "Make `query-replace' open preview text about to be replaced." (preview-open-overlays (overlays-in (ad-get-arg 0) (ad-get-arg 1))))) 'before nil)
#@44 *Make `query-replace' autoreveal previews.
(custom-declare-variable 'preview-query-replace-reveal 't '(#$ . -16251) :group 'preview-appearance :type 'boolean :require 'preview :set #[(symbol value) "\302	\"\210	\203 \303\304\305\306#\210\202 \307\304\305\306#\210\310\304!\207" [symbol value set-default ad-enable-advice replace-highlight before preview ad-disable-advice ad-activate] 4] :initialize #'custom-initialize-reset)
(byte-code "\300\301\302\217\203 \303\304\305\"\210\202 \303\304\306\"\210\300\207" [nil (byte-code "\300\301\302\303\211$\210\304\207" [face-attribute default :height nil t] 5) ((wrong-number-of-arguments)) defalias preview-inherited-face-attribute #[(face attribute &optional inherit) "\303	\304\n$\207" [face attribute inherit face-attribute nil] 5 "Fetch face attribute while adhering to inheritance.\nThis searches FACE for an ATTRIBUTE, using INHERIT\nfor resolving unspecified or relative specs.  See the fourth\nargument of function `face-attribute' for details."] #[(face attribute &optional inherit) "\306	\"\2034 \307\306\310\"\311\f!\203 \fC\202  \f:\205  \f)\311!\203, C\2022 :\2052 \"\204< \n\202\201 \312\n!\203l \313@	A\206L \314#\211\250\203[ \315\n_!\202h \312!\203g \n_\202h \n)\202\201 \n\316=\203\200 \313@	A\206| \314#\202\201 \n)\207" [face attribute value inherit ancestors avalue face-attribute append :inherit facep floatp preview-inherited-face-attribute t round unspecified] 5 "Fetch face attribute while adhering to inheritance.\nThis searches FACE for an ATTRIBUTE.  If it is 'unspecified,\nfirst inheritance is consulted (if INHERIT is non-NIL), then\nINHERIT is searched if it is a face or a list of faces.\nRelative specs are evaluated recursively until they get absolute or\nare not resolvable.  Relative specs are float values."]] 3)
#@247 Return colors from the current display.
Fetches the current screen colors and makes a vector
of colors as numbers in the range 0..65535.
Pure borderless black-on-white will return triple NIL.
The fourth value is the transparent border thickness.
(defalias 'preview-get-colors #[nil "\304\305\306\307\310#!\304\305\306\311\310#!\312 \211\313\232\203 \314	\315\232\203# \314\247\2033 :\2033 @\250\2045 \314\316\n	$+\207" [mask fg bg preview-transparent-border color-values preview-inherited-face-attribute preview-reference-face :background default :foreground preview-get-heuristic-mask (65535 65535 65535) nil (0 0 0) vector] 7 (#$ . 18080)])
#@33 Return t if the mark is active.
(defalias 'preview-mark-active '(macro . #[nil "\300\207" [mark-active] 1 (#$ . 18741)]))
#@57 Convert the printable IMAGE rendition back to an image.
(defalias 'preview-import-image #[(image) ";\203 \305\306\307#\207@\300=\203 \207@A@\3108G\311W\203( \312 \202+ \3138\300\314\f\315\316\n	\205; \317,BBBBBBB\207" [image border ascent type file propertize face preview-face 2 4 preview-get-heuristic-mask 3 :file :type :ascent (:mask (heuristic t))] 8 (#$ . 18869)])
#@34 Check if IMAGETYPE is supported.
(defalias 'preview-supports-image-type #[(imagetype) "\301!\207" [imagetype image-type-available-p] 2 (#$ . 19262)])
(byte-code "\300\301\302\303#\210\304\305!\207" [put preview-supports-image-type byte-optimizer byte-compile-inline-expand provide prv-emacs] 4)
