;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312\313\314\315\316\315\317\315\320& \210\305\321\307\322\311\306\313\314&\210\305\323\307\324\311\306\313\314&\207" [require tex-site tex tex-buf latex custom-declare-group preview nil "Embed Preview images into LaTeX buffers." :group AUCTeX :prefix "preview-" :link (custom-manual "(preview-latex)Top") (info-link "(preview-latex)The Emacs interface") (url-link :tag "Homepage" "https://www.gnu.org/software/auctex/") preview-gs "Preview's Ghostscript renderer." preview-appearance "Preview image appearance."] 14) (defconst preview-specs-type '(repeat (list :tag "Image spec" (const :format #1="" :value :type) (choice :tag "Image type" (const xpm) (const xbm) (symbol :tag "Other")) (set :inline t :tag "Minimum font size" (list :inline t :tag #1# (const :format #1# :value :min) (integer :tag "pixels"))) (const :format #1# :value :file) (string :tag "Filename") (set :inline t :tag "Ascent ratio" (list :inline t :tag #1# (const :format #1# :value :ascent) (integer :tag "percent of image" :value 50)))))) #@153 Set SYMBOL to VALUE and clear `preview-min-alist' property. This is used in icon specs, so that customizing will clear cached icons. (fn SYMBOL VALUE) (defalias 'preview-specs-setter #[514 "\300\301\302#\210\303\"\207" [put preview-min-alist nil set-default] 6 (#$ . 1187)]) (byte-code "\301\302\303\304\305DD\306\307\310\311\312\313& \207" [preview-specs-type custom-declare-variable preview-nonready-icon-specs funcall function #[0 "\300\207" [((:type xpm :min 26 :file "prvwrk24.xpm" :ascent 90) (:type xpm :min 22 :file "prvwrk20.xpm" :ascent 90) (:type xpm :min 17 :file "prvwrk16.xpm" :ascent 90) (:type xpm :min 15 :file "prvwrk14.xpm" :ascent 90) (:type xpm :file "prvwrk12.xpm" :ascent 90) (:type xbm :file "prvwrk24.xbm" :ascent 90))] 1] "The icon used for previews to be generated.\nThe spec must begin with `:type'. File names are relative to\n`load-path' and `data-directory', a spec `:min' requires a\nminimal pixel height for `preview-reference-face' before the spec\nwill be considered. Since evaluating the `:file' spec takes\nconsiderable time under XEmacs, it should come after the `:min'\nspec to avoid unnecessary evaluation time." :group preview-appearance :type :set preview-specs-setter] 10) #@105 The icon used for previews to be generated. Suitable spec is chosen from `preview-nonready-icon-specs'. (defvar preview-nonready-icon nil (#$ . 2417)) (byte-code "\301\302\303\304\305DD\306\307\310\311\312\313& \207" [preview-specs-type custom-declare-variable preview-error-icon-specs funcall function #[0 "\300\207" [((:type xpm :min 22 :file "prverr24.xpm" :ascent 90) (:type xpm :min 18 :file "prverr20.xpm" :ascent 90) (:type xpm :file "prverr16.xpm" :ascent 90) (:type xbm :file "prverr24.xbm" :ascent 90))] 1] "The icon used for PostScript errors.\nThe spec must begin with `:type'. File names are relative to\n`load-path' and `data-directory', a spec `:min' requires a\nminimal pixel height for `preview-reference-face' before the spec\nwill be considered. Since evaluating the `:file' spec takes\nconsiderable time under XEmacs, it should come after the `:min'\nspec to avoid unnecessary evaluation time." :group preview-appearance :type :set preview-specs-setter] 10) #@95 The icon used for PostScript errors. Suitable spec is chosen from `preview-error-icon-specs'. (defvar preview-error-icon nil (#$ . 3404)) (byte-code "\301\302\303\304\305DD\306\307\310\311\312\313& \207" [preview-specs-type custom-declare-variable preview-icon-specs funcall function #[0 "\300\207" [((:type xpm :min 24 :file "prvtex24.xpm" :ascent 75) (:type xpm :min 20 :file "prvtex20.xpm" :ascent 75) (:type xpm :min 16 :file "prvtex16.xpm" :ascent 75) (:type xpm :file "prvtex12.xpm" :ascent 75) (:type xbm :min 24 :file "prvtex24.xbm" :ascent 75) (:type xbm :min 16 :file "prvtex16.xbm" :ascent 75) (:type xbm :file "prvtex12.xbm" :ascent 75))] 1] "The icon used for an open preview.\nThe spec must begin with `:type'. File names are relative to\n`load-path' and `data-directory', a spec `:min' requires a\nminimal pixel height for `preview-reference-face' before the spec\nwill be considered. Since evaluating the `:file' spec takes\nconsiderable time under XEmacs, it should come after the `:min'\nspec to avoid unnecessary evaluation time." :group preview-appearance :type :set preview-specs-setter] 10) #@87 The icon used for an open preview. Suitable spec is chosen from `preview-icon-specs'. (defvar preview-icon nil (#$ . 4526)) (byte-code "\301\302\303\304\305\306\307\310&\210\311\300\312\313\314DD\315\305\316\317\320&\210\311\321\312\313\322DD\323\305\316\317\324&\210\311\325\312\313\326DD\327\305\316\317\330\331\332\333\"\334#&\207" [preview-image-creators custom-declare-group preview-latex nil "LaTeX options for preview." :group preview :prefix "preview-" custom-declare-variable funcall function #[0 "\300\207" [((dvipng (open preview-gs-open preview-dvipng-process-setup) (place preview-gs-place) (close preview-dvipng-close)) (png (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)) (jpeg (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)) (pnm (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)) (tiff (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)))] 1] "Define functions for generating images.\nThese functions get called in the process of generating inline\nimages of the specified type. The open function is called\nat the start of a rendering pass, the place function for\nplacing every image, the close function at the end of\nthe pass. Look at the documentation of the various\nfunctions used here for the default settings, and at\nthe function `preview-call-hook' through which those are\ncalled. Additional argument lists specified in here\nare passed to the functions before any additional\narguments given to `preview-call-hook'.\n\nNot all of these image types may be supported by your copy\nof Ghostscript, or by your copy of Emacs." preview-gs :type (alist :key-type (symbol :tag "Preview's image type") :value-type (alist :tag "Handler" :key-type (symbol :tag "Operation:") :value-type (list :tag "Handler" (function :tag "Handler function") (repeat :tag "Additional function args" :inline t sexp)) :options (open place close))) preview-gs-image-type-alist #[0 "\300\207" [((png png "-sDEVICE=png16m") (dvipng png "-sDEVICE=png16m") (jpeg jpeg "-sDEVICE=jpeg") (pnm pbm "-sDEVICE=pnmraw") (tiff tiff "-sDEVICE=tiff12nc"))] 1] "Alist of image types and corresponding Ghostscript options.\nThe `dvipng' and `postscript' (don't use) entries really specify\na fallback device when images can't be processed by the requested\nmethod, like when PDFTeX was used." (repeat (list :tag nil (symbol :tag "preview image-type") (symbol :tag "Emacs image-type") (repeat :inline t :tag "Ghostscript options" string))) preview-image-type #[0 "\300\207" [png] 1] "Image type to be used in images." append (choice) mapcar #[257 "\300@D\207" [const] 3 "\n\n(fn SYMBOL)"] ((symbol :tag "Other"))] 12) #@316 Call a function from `preview-image-creators'. This looks up SYMBOL in the `preview-image-creators' entry for the image type `preview-image-type' and calls the hook function given there with the arguments specified there followed by REST. If such a function is specified in there, that is. (fn SYMBOL &rest REST) (defalias 'preview-call-hook #[385 " \236A\236A\211\205\302@\303A\"\"\207" [preview-image-type preview-image-creators apply append] 8 (#$ . 7240)]) #@65 List of directory name, top directory name and reference count. (defvar TeX-active-tempdir nil (#$ . 7716)) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\210\302\314\304\305\315DD\316\310\317\312\320&\207" [make-variable-buffer-local TeX-active-tempdir custom-declare-variable preview-bb-filesize funcall function #[0 "\300\207" [1024] 1] "Size of file area scanned for bounding box information." :group preview-gs :type integer preview-preserve-indentation #[0 "\300\207" [t] 1] "Whether to keep additional whitespace at the left of a line." preview-appearance boolean] 8) #@63 Extract EPS bounding box vector from FILENAME. (fn FILENAME) (defalias 'preview-extract-bb #[257 "\302\303\304\"r\211q\210\305\306\"\216\307\310\311\304%\210eb\210\312\313\310\304#\205D\314 \203/\315\316\317\320!!^\2024\316\317\320!!\316\317\321!!\316\317\322!!\316\317\323!!$*\207" [preview-bb-filesize preview-preserve-indentation generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents-literally nil 0 search-forward-regexp "%%BoundingBox: +\\([-+]?[0-9.]+\\) +\\([-+]?[0-9.]+\\) +\\([-+]?[0-9.]+\\) +\\([-+]?[0-9.]+\\)" vector 72 string-to-number match-string 1 2 3 4] 9 (#$ . 8321)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\207" [custom-declare-variable preview-prefer-TeX-bb funcall function #[0 "\300\207" [nil] 1] "Prefer TeX bounding box to EPS one if available.\nIf `preview-fast-conversion' is set, this option is not\n consulted since the TeX bounding box has to be used anyway." :group preview-gs :type boolean preview-TeX-bb-border #[0 "\300\207" [0.5] 1] "Additional space in pt around Bounding Box from TeX." number] 8) #@48 Font size as parsed from the log of LaTeX run. (defvar preview-parsed-font-size nil (#$ . 9512)) (make-variable-buffer-local 'preview-parsed-font-size) #@52 Magnification as parsed from the log of LaTeX run. (defvar preview-parsed-magnification nil (#$ . 9670)) (make-variable-buffer-local 'preview-parsed-magnification) #@48 PDFoutput as parsed from the log of LaTeX run. (defvar preview-parsed-pdfoutput nil (#$ . 9840)) (make-variable-buffer-local 'preview-parsed-pdfoutput) #@47 Counters as parsed from the log of LaTeX run. (defvar preview-parsed-counters nil (#$ . 9998)) (make-variable-buffer-local 'preview-parsed-counters) #@48 Tightpage as parsed from the log of LaTeX run. (defvar preview-parsed-tightpage nil (#$ . 10153)) (make-variable-buffer-local 'preview-parsed-tightpage) #@56 Get magnification from `preview-parsed-magnification'. (defalias 'preview-get-magnification #[0 "\203\301\245\207\302\207" [preview-parsed-magnification 1000.0 1.0] 2 (#$ . 10312)]) #@111 Calculate bounding box from (ht dp wd). LIST consists of TeX dimensions in sp (1/65536 TeX point). (fn LIST) (defalias 'preview-TeX-bb #[257 "\211:\205l\302\303\304\"!\305\306\307\310H^\\\311\307H\312H[^\307^\\\306\307\310H]\\\311\307H\312H[]\307]\\$\203A\302\303\313\"!\202I\305 [ [ \211$\314\307\211W\203g\211HH\\I\266\211T\262\202K\266\266\203\207" [preview-parsed-tightpage preview-TeX-bb-border vconcat mapcar #[257 "\211\300\245\207" [65781.76] 3 "\n\n(fn X)"] vector 72 0 2 720 1 #[257 "\211\300\245\207" [65781.76] 3 "\n\n(fn X)"] 4] 12 (#$ . 10505)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\207" [custom-declare-variable preview-gs-command funcall function #[0 "\300\301!\206(\300\302!\211\205\303\304!\305P!\306U\205\211\262\206(\300\307!\206(\300\310!\207" [executable-find "rungs" "mgs" shell-command shell-quote-argument " -q -dNODISPLAY -c quit" 0 "GSWIN32C.EXE" "gs"] 4] "How to call gs for conversion from EPS. See also `preview-gs-options'." :group preview-gs :type string preview-gs-options #[0 "\300\207" [("-q" "-dDELAYSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4")] 1] "Options with which to call gs for conversion from EPS.\nSee also `preview-gs-command'." (repeat string)] 8) #@91 List of overlays to convert using gs. Buffer-local to the appropriate TeX process buffer. (defvar preview-gs-queue nil (#$ . 11859)) (make-variable-buffer-local 'preview-gs-queue) #@31 Overlays currently processed. (defvar preview-gs-outstanding nil (#$ . 12045)) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\207" [make-variable-buffer-local preview-gs-outstanding custom-declare-variable preview-gs-outstanding-limit funcall function #[0 "\300\207" [2] 1] "Number of requests allowed to be outstanding.\nThis is the number of not-yet-completed requests we\nmight at any time have piped into Ghostscript. If\nthis number is larger, the probability of Ghostscript\nworking continuously is higher when Emacs is rather\nbusy. If this number is smaller, redisplay will\nfollow changes in the displayed buffer area faster." :group preview-gs :type (restricted-sexp :match-alternatives ((lambda (value) (and (integerp value) (> value 0) (< value 10)))) :tag "small number")] 8) #@44 Accumulated answer of Ghostscript process. (defvar preview-gs-answer nil (#$ . 12865)) (make-variable-buffer-local 'preview-gs-answer) #@36 Image type for gs produced images. (defvar preview-gs-image-type nil (#$ . 13006)) (make-variable-buffer-local 'preview-gs-image-type) #@50 Pair of sequence numbers for gs produced images. (defvar preview-gs-sequence nil (#$ . 13147)) (make-variable-buffer-local 'preview-gs-sequence) #@131 Screen scale of images. Magnify by this factor to make images blend with other screen content. Buffer-local to rendering buffer. (defvar preview-scale nil (#$ . 13299)) (make-variable-buffer-local 'preview-scale) #@227 Color setup list. An array with elements 0, 1 and 2 for background, foreground and border colors, respectively. Each element is a list of 3 real numbers between 0 and 1, or NIL of nothing special should be done for the color (defvar preview-colors nil (#$ . 13520)) (make-variable-buffer-local 'preview-colors) #@27 Ghostscript setup string. (defvar preview-gs-init-string nil (#$ . 13838)) (make-variable-buffer-local 'preview-gs-init-string) #@43 PostScript file name for fast conversion. (defvar preview-ps-file nil (#$ . 13972)) (make-variable-buffer-local 'preview-ps-file) #@25 Parsed DSC information. (defvar preview-gs-dsc nil (#$ . 14108)) (make-variable-buffer-local 'preview-gs-dsc) #@136 Screen resolution where rendering started. Cons-cell of x and y resolution, given in dots per inch. Buffer-local to rendering buffer. (defvar preview-resolution nil (#$ . 14225)) (make-variable-buffer-local 'preview-resolution) #@148 Generate resolution argument for gs. Calculated from real-life factor SCALE and XRES and YRES, the screen resolution in dpi. (fn SCALE XRES YRES) (defalias 'preview-gs-resolution #[771 "\300\301_\302 \245_\302 \245#\207" [format "-r%gx%g" preview-get-magnification] 8 (#$ . 14461)]) #@156 Remove leading element of outstanding queue after error. Return element if non-nil. ERR is the error string to show as response of Ghostscript. (fn ERR) (defalias 'preview-gs-behead-outstanding #[257 "\211A\242\211\203\301\"\210\302\303\304#\210\207" [preview-gs-outstanding preview-gs-flag-error overlay-put queued nil] 6 (#$ . 14756)]) (defvar preview-gs-command-line nil) (make-variable-buffer-local 'preview-gs-command-line) (defvar preview-gs-file nil) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\207" [make-variable-buffer-local preview-gs-file custom-declare-variable preview-fast-conversion funcall function #[0 "\300\207" [t] 1] "Set this for single-file PostScript conversion.\nThis will have no effect when `preview-image-type' is\nset to `postscript'." :group preview-latex :type boolean] 8) #@567 Expand ARG as a string. It can already be a string. Or it can be a list, then it is recursively evaluated using SEPARATOR as separator. If a list element is in itself a CONS cell, the CAR of the list (after symbol dereferencing) can evaluate to either a string, in which case it is used as a separator for the rest of the list, or a boolean (t or nil) in which case the rest of the list is either evaluated and concatenated or ignored, respectively. ARG can be a symbol, and so can be the CDR of a cell used for string concatenation. (fn ARG &optional SEPARATOR) (defalias 'preview-string-expand #[513 ";\203\207:\203\300\301\302\303\304\305\"\"\206\306#\2079\203.\307>\204.\310J\"\207\311\312!\207" [mapconcat identity delq nil mapcar #[257 "\211:\203-\211@\2119\203\211\300>\204\211J\262\202\211;\203$\301A\"\207\211\205,\301A!\207\301!\207" [(t nil) preview-string-expand] 5 "\n\n(fn X)"] "" (t nil) preview-string-expand error "Bad string expansion"] 9 (#$ . 15602)]) #@405 Type to be used for `preview-string-expand'. Just a hack until we get to learn how to do this properly. Recursive definitions are not popular with Emacs, so we define this type just two levels deep. This kind of expandible string can either be just a string, or a cons cell with a separator string in the CAR, and either an explicit list of elements in the CDR, or a symbol to be consulted recursively. (defconst preview-expandable-string (byte-code "\300\211\301!!\207" [#[257 "\300\301\302\303\304\300\301\305\303\306\307 \257\310BBBF\311BBB\207" [choice string repeat :tag "Concatenate" cons "Separated list" (choice (string :tag "Separator") (symbol :tag "Indirect separator or flag")) ((symbol :tag "Indirect variable (no separator)")) ((symbol :tag "Indirect variable (with separator)"))] 13 "\n\n(fn X)"] sexp] 4) (#$ . 16616)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\210\300\316\302\303\317DD\320\306\307\310\311&\210\300\321\302\303\322DD\323\306\307\310\311&\210\300\324\302\303\325DD\326\306\307\310\311&\207" [custom-declare-variable preview-dvipng-command funcall function #[0 "\300\207" [#1="dvipng -picky -noghostscript %d -o %m/prev%%03d.png"] 1 #1#] "Command used for converting to separate PNG images.\n\nYou might specify options for converting to other image types,\nbut then you'll need to adapt `preview-dvipng-image-type'." :group preview-latex :type string preview-dvipng-image-type #[0 "\300\207" [png] 1] "Image type that dvipng produces.\n\nYou'll need to change `preview-dvipng-command' too,\nif you customize this." (choice (const png) (const gif) (symbol :tag "Other" :value png)) preview-dvips-command #[0 "\300\207" [#2="dvips -Pwww -i -E %d -o %m/preview.000"] 1 #2#] "Command used for converting to separate EPS images." preview-fast-dvips-command #[0 "\300\207" [#3="dvips -Pwww %d -o %m/preview.ps"] 1 #3#] "Command used for converting to a single PS file." preview-pdf2dsc-command #[0 "\300\207" [#4="pdf2dsc %(O?pdf) %m/preview.dsc"] 1 #4#] "Command used for generating dsc from a PDF file."] 8) #@54 Kill off everything remaining in `preview-gs-queue'. (defalias 'preview-gs-queue-empty #[0 "\302\303\"\210 \211\203\211@\304\305\"\203\303!\210A\266\202\202\210\306\211\211\207" [preview-gs-outstanding preview-gs-queue mapc preview-delete overlay-get queued nil] 6 (#$ . 18728)]) #@39 Last error raised and to be reported. (defvar preview-error-condition nil (#$ . 19026)) #@199 Log an error message to run buffer. ERR is the caught error syndrome, CONTEXT is where it occured, PROCESS is the process for which the run-buffer is to be used. (fn ERR CONTEXT &optional PROCESS) (defalias 'preview-log-error #[770 "\211\203\f\301\302!!\203Fr\211\203\302!\206pq\210\212\211\2033\302!\2033\303\304!!\2033\304!\2064db\210\305\306\307\310!#!\210\311p!\210*\211\207" [preview-error-condition buffer-name process-buffer marker-buffer process-mark insert-before-markers format "%s: %s\n" error-message-string display-buffer] 9 (#$ . 19121)]) #@142 Raise an error that has been logged. Makes sure that PROCESS is removed from the "Compilation" tag in the mode line. (fn &optional PROCESS) (defalias 'preview-reraise-error #[256 "\205\301\302\"\216\303@A\")\207" [preview-error-condition make-closure #[0 "\303\304\300\n\"\211\207" [V0 preview-error-condition compilation-in-progress nil delq] 3] signal] 4 (#$ . 19702)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable preview-pdf-color-adjust-method funcall function #[0 "\300\207" [t] 1] "Method to adjust colors of images generated from PDF.\nIt is not consulted when the latex command produces DVI files.\n\nThe valid values are:\n\nt: preview-latex transfers the foreground and background colors\nof Emacs to the generated images. This option requires that\nGhostscript has working DELAYBIND feature, thus is invalid with\ngs 9.27 (and possibly < 9.27).\n\n`compatible': preview-latex uses another mothod to transfer\ncolors. This option is provided for compatibility with older gs.\nSee the below explanation for detail.\n\nnil: no adjustment is done and \"black on white\" image is\ngenerated regardless of Emacs color. This is provided for fallback for\ngs 9.27 users with customized foreground color. See the below\nexplanation for detail.\n\nWhen the latex command produces PDF rather than DVI and Emacs has\nnon-trivial foreground color, the traditional method (`compatible')\nmakes gs >= 9.27 to stop with error. Here, \"non-trivial foreground\ncolor\" includes customized themes.\n\nIf you use such non-trivial foreground color and the version of\nGhostscript equals to 9.27, you have two options:\n\n- Choose the value `compatible' and customize\n`preview-reference-face' to have default (black) foreground\ncolor. This makes the generated image almost non-readable on\ndark background, so the next option would be your only choice in\nthat case.\n- Choose the value nil, which forces plain \"black on white\"\nappearance for the generated image. You can at least read what\nare written in the image although they may not match with your\nEmacs color well." :group preview-appearance :type (choice (const :tag "Adjust to Emacs color (gs > 9.27)" t) (const :tag "Compatibility for gs =< 9.27" compatible) (const :tag "No adjustment (B/W, for gs 9.27)" nil))] 8) #@156 Sentinel function for rendering process. Gets the default PROCESS and STRING arguments and tries to restart Ghostscript if necessary. (fn PROCESS STRING) (defalias 'preview-gs-sentinel #[514 "\3061\321\307!\211\310>\203\311\"\312\313!!\205\312r\313!q\210db\210\314\315 \316$\210\317u\210\320\321 \322\323O\261\210\324u\210\325!\210\211\326>\205\311\n\315\327!\316\260\330!\211\204o \203o\212\331\332!!\203g\332!\202hdb\210\314!\210)\333!\210\211\203}\334=\203\225\f\203\216\3351\215\336\f!0\210\202\216\210\337 \266\202\202\311\340 \211\203\275\211@\341\342\"\262\3431\261\336A@!0\210\202\262\210\340\241\210A\266\202\202\227\266 \244\340\344 \266\202)\2620\210\202\330\345\346#\266\347!\207" [compilation-in-progress mode-name preview-gs-answer preview-gs-queue preview-ps-file preview-gs-outstanding (error) process-status (exit signal) delq buffer-name process-buffer insert-before-markers "\n" " " -1 " at " current-time-string 0 -5 1 TeX-command-mode-line (exit signal) process-name preview-gs-behead-outstanding marker-buffer process-mark delete-process signal (file-error) preview-delete-file preview-gs-queue-empty nil overlay-get filenames (file-error) preview-gs-restart preview-log-error "Ghostscript" preview-reraise-error] 11 (#$ . 22040)]) #@163 Filter function for processing Ghostscript output. Gets the usual PROCESS and STRING parameters, see `set-process-filter' for a description. (fn PROCESS STRING) (defalias 'preview-gs-filter #[514 "r\301!q\210P\302\303\"\2035\304\225\304O\305O\3061*\307\"0\266\202\n\310\311#\266\202\n)\312 \207" [preview-gs-answer process-buffer string-match "GS\\(<[0-9]+\\)?>" 0 nil (error) preview-gs-transact preview-log-error "Ghostscript filter" preview-reraise-error] 9 (#$ . 23355)]) #@45 Start a new Ghostscript conversion process. (defalias 'preview-gs-restart #[0 "\205p \203 \211@T\240\210\202\306C \306\241\210\307\310\311\312\310\313 @ @\f$!\"\314\315\316p &db\210\317\320\321\322\323 D\"\324#\325#\210\326 \327\307\"\210\330\331\"\210\332\333\"\210\334!\"\210\316\"\211#B#\335!\210\336 \210)\262\207" [preview-gs-queue preview-gs-sequence process-connection-type TeX-active-tempdir preview-gs-image-type preview-gs-command 1 nil format "-sOutputFile=%s" file-relative-name "%s/pr%d-%%d.%s" apply start-process "Preview-Ghostscript" insert-before-markers "Running `Preview-Ghostscript' with ``" mapconcat shell-quote-argument append " " "''\n" "" set-process-query-on-exit-flag set-process-sentinel preview-gs-sentinel set-process-filter preview-gs-filter process-send-string TeX-command-mode-line force-mode-line-update preview-gs-command-line preview-gs-answer preview-gs-init-string mode-name compilation-in-progress] 9 (#$ . 23859)]) #@103 Start a Ghostscript conversion pass. SETUP may contain a parser setup function. (fn &optional SETUP) (defalias 'preview-gs-open #[256 " \236\211A@\306\307\fAA\"\310\311\312?\205)rq\210\205(\313 ?)\"\"\314 \210\315\2066\316!\207" [preview-image-type preview-gs-image-type-alist preview-gs-image-type preview-gs-sequence preview-gs-options preview-gs-command-line nil append format "{DELAYSAFER{.setsafe}if}stopped pop/.preview-BP currentpagedevice/BeginPage get dup null eq{pop{pop}bind}if def<>setpagedevice/preview-do{/.preview-ST[count 4 roll save]def dup length 0 eq{pop}{setpagedevice}{ifelse exec}stopped{handleerror quit}if .preview-ST aload pop restore}bind def " preview-gs-color-string TeX-PDF-from-DVI preview-gs-queue-empty preview-parse-messages preview-gs-dvips-process-setup preview-colors preview-pdf-color-adjust-method TeX-command-buffer TeX-PDF-mode preview-gs-init-string] 7 (#$ . 24848)]) #@156 Return string to be used as color value for an RGB component. Conversion from Emacs color numbers (0 to 65535) in VALUE to Ghostscript floats. (fn VALUE) (defalias 'preview-gs-color-value #[257 "\300\301\302\245\"\207" [format "%g" 65535.0] 5 (#$ . 25907)]) #@82 Return a string that patches PDF foreground color to work properly. (fn COLORS) (defalias 'preview-pdf-color-string #[257 "\211\301H\211\205 \302\267\202\303\304\305\306#\307Q\207\310\304\305\306#\311Q\207\312\207" [preview-pdf-color-adjust-method 1 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (t 13 compatible 22)) "/initgraphics {\n //initgraphics\n /RG where {\n pop " mapconcat preview-gs-color-value " " " 3 copy rg RG\n } if\n} bind def .bindnow " "/GS_PDF_ProcSet GS_PDF_ProcSet dup maxlength dict copy dup begin/graphicsbeginpage{//graphicsbeginpage exec " " 3 copy rg RG}bind store end readonly store " ""] 7 (#$ . 26173)]) #@175 Return a string setting up COLORS. If optional argument SUPPRESS-FGBG is non-nil, behave as if FG/BG colors were just the default value. (fn COLORS &optional SUPPRESS-FGBG) (defalias 'preview-gs-color-string #[513 "\211?\205\300H?\205\301H\302H\303H\203\211\204'\205(?\205(\304\2054\305\306\307#\310P\205I\205I\311\312\305\306\307#\302_#\203Q\204[\205\\?\205\\\313\205i\305\306\307#\314P\260\207" [0 1 2 3 "gsave " mapconcat preview-gs-color-value " " " setrgbcolor clippath fill " format "%s setrgbcolor false setstrokeadjust %g setlinewidth clippath strokepath matrix setmatrix true {2 index{newpath}if round exch round exch moveto pop false}{round exch round exch lineto}{curveto}{closepath}pathforall pop fill " "grestore " " setrgbcolor"] 14 (#$ . 26867)]) #@174 Return color setup tokens for dvipng. Makes a string of options suitable for passing to dvipng. Pure borderless black-on-white will return an empty string. (fn COLORS RES) (defalias 'preview-dvipng-color-string #[514 "\300H\301H\302H\303H\205\304\305\306\307\310#\"\205&\304\311\306\307\310#\"\2057\2057\304\312\306\307\310#\"\205I\304\313\301\314 _\315\245!]\"R\207" [0 1 2 3 format "--bg \"rgb %s\" " mapconcat preview-gs-color-value " " "--fg \"rgb %s\" " "--bd \"rgb %s\" " "--bd %d" round 72.0] 15 (#$ . 27681)]) #@50 Check if IMAGETYPE is supported. (fn IMAGETYPE) (defalias 'preview-supports-image-type #[257 "\300!\207" [image-type-available-p] 3 (#$ . 28230)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put preview-supports-image-type speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@46 Set up Dvips process for conversions via gs. (defalias 'preview-gs-dvips-process-setup #[0 "\306!\262\204\307\310\"\210\311 \312\313\n! @ A#C\"\f\203#\314 \207\315 !\316\211p\257\207" [preview-gs-image-type preview-gs-command-line preview-scale preview-resolution preview-parsed-pdfoutput preview-fast-conversion image-type-available-p error "preview-image-type setting '%s unsupported by this Emacs" append preview-gs-resolution preview-hook-enquiry preview-pdf2dsc-process-setup preview-start-dvips preview-gs-dvips-sentinel TeX-sentinel-function TeX-active-tempdir preview-ps-file] 6 (#$ . 28538)]) #@39 Set up dvipng process for conversion. (defalias 'preview-dvipng-process-setup #[0 "\306\307\310 !\n@\nA#C\" \203#\f\311!\262\203\312 \207\313\314\f\"\207 \311!\262\2041\313\315 \"\210\316 \317\211p\320 \257\207" [preview-gs-command-line preview-scale preview-resolution preview-parsed-pdfoutput preview-gs-image-type preview-dvipng-image-type append preview-gs-resolution preview-hook-enquiry image-type-available-p preview-pdf2dsc-process-setup error "preview-image-type setting '%s unsupported by this Emacs" "preview-dvipng-image-type setting '%s unsupported by this Emacs" preview-start-dvipng preview-dvipng-sentinel t TeX-sentinel-function TeX-active-tempdir] 6 (#$ . 29162)]) (defalias 'preview-pdf2dsc-process-setup #[0 "\304 \305\211p \n \257\207" [TeX-sentinel-function TeX-active-tempdir preview-ps-file preview-gs-image-type preview-start-pdf2dsc preview-pdf2dsc-sentinel] 6]) #@20 Abort a Dvips run. (defalias 'preview-dvips-abort #[0 "\304 \210\3051\306r q\210\211@\307\310\")\262!0\210\202\210\n\203-\3111,\312\n!0\210\202-\210\313\211\207" [preview-gs-file TeX-command-buffer preview-ps-file TeX-sentinel-function preview-gs-queue-empty (file-error) delete-file "dvi" t (file-error) preview-delete-file nil] 5 (#$ . 30074)]) (defalias 'preview-dvipng-abort 'preview-dvips-abort) #@202 Sentinel function for indirect rendering DviPS process. The usual PROCESS and COMMAND arguments for `TeX-sentinel-function' apply. Starts gs if GSSTART is set. (fn PROCESS COMMAND &optional GSSTART) (defalias 'preview-gs-dvips-sentinel #[770 "\3051n\306!\307\267\202f\310!\210\311\3121)\313r\nq\210@\314\315\")!0\210\202.\210\202.\210 \2035\316 \210\205g\f\203D\317 \266\202\202i \205g\3201U\321 !0\266\202\202i\266\311\202i\310!\210\322 \266\202\202i\311\266\2020\210\202v\323\324#\266\325!\207" [preview-gs-file TeX-sentinel-function TeX-command-buffer preview-ps-file preview-gs-queue (error) process-status #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (exit 14 signal 91)) delete-process nil (file-error) delete-file "dvi" t preview-prepare-fast-conversion preview-gs-restart (file-error) preview-delete-file preview-dvips-abort preview-log-error "DviPS sentinel" preview-reraise-error] 9 (#$ . 30492)]) #@200 Sentinel function for indirect rendering PDF process. The usual PROCESS and COMMAND arguments for `TeX-sentinel-function' apply. Starts gs if GSSTART is set. (fn PROCESS COMMAND &optional GSSTART) (defalias 'preview-pdf2dsc-sentinel #[770 "\3061a\307!\211\310\267\202Y\311!\210\312 \313=\203$\n\314H\203$\315 \316\"\f\317\n!P\320 \210\205Z \203:\321 \202Z\205Z\3221K\323!0\202Z\210\312\202Z\311!\210\324 \202Z\312\2620\210\202i\325\326#\266\327!\207" [TeX-sentinel-function preview-pdf-color-adjust-method preview-colors preview-gs-command-line preview-gs-init-string preview-gs-queue (error) process-status #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (exit 13 signal 80)) delete-process nil t 1 append ("-dDELAYBIND") preview-pdf-color-string preview-prepare-fast-conversion preview-gs-restart (file-error) preview-delete-file preview-dvips-abort preview-log-error "PDF2DSC sentinel" preview-reraise-error preview-ps-file] 8 (#$ . 31478)]) #@91 Clean up after PROCESS and set up queue accumulated in CLOSEDATA. (fn PROCESS CLOSEDATA) (defalias 'preview-gs-close #[514 "\244\205X\203I \203B\306!\307=\2030\n\2040 \203-\3101,\311 !0\210\202-\210\312 \207\f\2038\313\2029\314\315\316\"\262\211\207\317\320 A#\207\321!\210\306!\322=?\205X\323 \207" [preview-gs-queue TeX-process-asynchronous TeX-sentinel-function preview-ps-file preview-parsed-pdfoutput preview-gs-file process-status exit (file-error) preview-delete-file preview-gs-restart preview-pdf2dsc-sentinel preview-gs-dvips-sentinel make-closure #[514 "\300\301#\207" [V0 t] 6 "\n\n(fn PROCESS COMMAND)"] TeX-synchronous-sentinel "Preview-DviPS" delete-process signal preview-dvips-abort] 6 (#$ . 32498)]) #@215 Sentinel function for indirect rendering DviPNG process. The usual PROCESS and COMMAND arguments for `TeX-sentinel-function' apply. Places all snippets if PLACEALL is set. (fn PROCESS COMMAND &optional PLACEALL) (defalias 'preview-dvipng-sentinel #[770 "\3011-\302!\211\303\267\202%\304!\210\305\205&\306 \202&\304!\210\307 \202&\305\2620\210\2025\310\311#\266\312!\207" [TeX-sentinel-function (error) process-status #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (exit 13 signal 28)) delete-process nil preview-dvipng-place-all preview-dvipng-abort preview-log-error "DviPNG sentinel" preview-reraise-error] 8 (#$ . 33249)]) #@91 Clean up after PROCESS and set up queue accumulated in CLOSEDATA. (fn PROCESS CLOSEDATA) (defalias 'preview-dvipng-close #[514 "\203 \305\"\207 \244\205B \2033\n\203,\306!\307=\203( \204(\310 \207\311\211\207\312\313\fA#\207\314!\210\306!\315=?\205B\316 \207" [preview-parsed-pdfoutput preview-gs-queue TeX-process-asynchronous TeX-sentinel-function preview-gs-file preview-gs-close process-status exit preview-dvipng-place-all #[514 "\300\301#\207" [preview-dvipng-sentinel t] 6 "\n\n(fn PROCESS COMMAND)"] TeX-synchronous-sentinel "Preview-DviPNG" delete-process signal preview-dvipng-abort] 6 (#$ . 33938)]) #@161 Parse DSC comments of FILE. Returns a vector with offset/length pairs corresponding to the pages. Page 0 corresponds to the initialization section. (fn FILE) (defalias 'preview-dsc-parse #[257 "\301\302\303\"r\211q\210\304\305\"\216\306\307!\210\310!\210e\307\211\211\211\211\311\312\313\307\303#\203\237\311\224\262\206/`Sf\314>\203\203G\315\316\n$\210\202\317\224\203\\\211\311U\203U\262\211T\262\202\320\224\203x\211\311U\203q\315\321\n#\210\202\211S\262\202\211\311V\204\322\224\203\224ZDB\262\262\202\323\224\203\262\202\211\311U\204\255\315\324\n#\210\206\265dZDB\262\325\237!)\266\207*\207" [case-fold-search generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] set-buffer-multibyte nil insert-file-contents-literally 0 search-forward-regexp "%%\\(?:\\(BeginDocument:\\)\\|\\(EndDocument[\n ]\\)\\|\\(Page:\\)\\|\\(Trailer[\n ]\\)\\)" (10 13 nil) error "Premature %%%%Trailer in `%s' at offsets %d/%d" 1 2 "Unmatched %%%%EndDocument in `%s' at offset %d" 3 4 "Unmatched %%%%BeginDocument in `%s' at offset %d" vconcat] 14 (#$ . 34577)]) #@224 Generate PostScript code accessing PAGE in the DSC object. The returned PostScript code will need the file on top of the stack, and will replace it with an executable object corresponding to the wanted page. (fn PAGE DSC) (defalias 'preview-gs-dsc-cvx #[514 "\211H\300\301@SA@#\207" [format "dup %d setfileposition %d()/SubFileDecode filter cvx"] 7 (#$ . 35758)]) #@135 Make a PostScript string from filename STR. The file name is first made relative unless NONREL is not NIL. (fn STR &optional NONREL) (defalias 'preview-ps-quote-filename #[513 "\211\204 \300!\262\301\302\303#\211\262\203&\304\305\306\307$\262\310\\\262\202\n\311\312Q\207" [file-relative-name 0 string-match "[\\()]" replace-match "\\\\\\&" t nil 2 "(" ")"] 8 (#$ . 36133)]) #@51 This fixes up all parameters for fast conversion. (defalias 'preview-prepare-fast-conversion #[0 "@:\203@@:\203\303@@!@\202@@\202@@:\2031@@:\2031@@\2023\211C\304!\305\306\307\310\311#\"\305\312\307\313\314#\"\n\305\315\313!\316\317 \"#R\211\207" [preview-ps-file preview-gs-dsc preview-gs-init-string last preview-dsc-parse format "systemdict /.addcontrolpath known {%s} if " mapconcat #[257 "\300\301\302!\"\207" [format "/PermitFileReading %s .addcontrolpath" preview-ps-quote-filename] 5 "\n\n(fn F)"] "\n" "{<> setuserparams .locksafe} stopped pop " preview-ps-quote-filename "" " %s(r)file /.preview-ST 1 index def %s exec .preview-ST " preview-gs-dsc-cvx 0] 11 (#$ . 36529)]) #@314 Make a displayed overlay render with higher priority. This function is used in fake conditional display properties for reordering the conversion order to prioritize on-screen images. OV is the overlay in question, and BUFF is the Ghostscript process buffer where the buffer-local queue is located. (fn OV BUFF) (defalias 'preview-gs-urgentize #[514 "\301!\210\302\303\"\203\304!\203r\211q\210B)\305\207" [preview-gs-queue preview-remove-urgentization overlay-get queued overlay-buffer t] 5 (#$ . 37269)]) #@67 Prepare a later call of `preview-replace-active-icon'. (fn ICON) (defalias 'preview-icon-copy #[257 "\300AB\207" [image] 3 (#$ . 37792)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put preview-icon-copy speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@82 Replace the active Icon in OV by REPLACEMENT, another icon. (fn OV REPLACEMENT) (defalias 'preview-replace-active-icon #[514 "\300\301\"\211@@A\241\210\211A\241\207" [overlay-get preview-image] 5 (#$ . 38081)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put preview-replace-active-icon speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@597 Generate an image placeholder rendered over by Ghostscript. This enters OV into all proper queues in order to make it render this image for real later, and returns the overlay after setting a placeholder image. SNIPPET gives the number of the snippet in question for the file to be generated. BOX is a bounding box if we already know one via TeX. RUN-BUFFER is the buffer of the TeX process, TEMPDIR is the correct copy of `TeX-active-tempdir', PS-FILE is a copy of `preview-ps-file', IMAGETYPE is the image type for the file extension. (fn OV SNIPPET BOX RUN-BUFFER TEMPDIR PS-FILE IMAGETYPE) (defalias 'preview-gs-place #[1799 "\301\302\303=?\205\304\206\305\306 \"\"C#\210\301\307\310\311 ##\210\301\312\313AB\262C#\210\314\315#\210C\207" [preview-nonready-icon overlay-put filenames t preview-make-filename format "preview.%03d" queued vector nil preview-image image preview-add-urgentization preview-gs-urgentize] 14 (#$ . 38456)]) (defvar preview-button-1 [mouse-2]) (defvar preview-button-2 [mouse-3]) #@434 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. (fn &optional MAP GLYPH HELPSTRING CLICK1 CLICK2) (defalias 'preview-make-clickable '(macro . #[1280 "\302\303\206\304DC\305\205\306\303\300FC\205!\306\303\301FC\203O\307\310\311 \312\313\314;\203=\315 #\202C\315\316BB\317BBBBBBBB\202P\303C#BB\207" [preview-button-1 preview-button-2 let resmap (make-sparse-keymap) append define-key propertize "x" 'display 'mouse-face 'highlight 'help-echo format (preview-button-1 preview-button-2) ('keymap resmap)] 21 (#$ . 39501)])) #@60 Display STRING in a new view buffer on click. (fn STRING) (defalias 'preview-mouse-open-error #[257 "\302\303!r\211q\210\304 \210\305\300!\210\306\307\310 \210c\210eb\210)\311!\207" [view-exit-action buffer-undo-list get-buffer-create "*Preview-Ghostscript-Error*" kill-all-local-variables make-local-variable kill-buffer t erase-buffer view-buffer-other-window] 4 (#$ . 40389)]) #@124 Display eps FILE in a view buffer on click. Place point at POSITION, else beginning of file. (fn FILE &optional POSITION) (defalias 'preview-mouse-open-eps #[513 "\302\303\304#\305!\212\211\203\306!\210\202\307!\210 \310\301!=\203'\203' \210\206,eb\210\311\312\313\314!\")\207" [auto-mode-alist major-mode assoc-default "x.ps" string-match get-file-buffer pop-to-buffer view-file-other-window default-value message "%s" substitute-command-keys "Try \\[ps-run-start] \\[ps-run-buffer] and \\\\[ps-run-mouse-goto-error] on error offset."] 8 (#$ . 40781)]) #@67 Make an eps error flag in overlay OV for ERR string. (fn OV ERR) (defalias 'preview-gs-flag-error #[514 "\306\307\"\211@@\310\311\312A@@!\"\313\314\315D \"\316#\317\n\306\320\"\321H\260\322\323\"\262\324 \325 #\210\325\f \203]@:\203K@A@\202N@#\306\f\320\"\326HH@D\202`C\322\327#\262#\210\330\331\332$\333\334\335\336\337 & \262\340\341\211B#\210\342!\207" [preview-gs-command preview-gs-command-line preview-gs-init-string preview-button-1 preview-button-2 preview-ps-file overlay-get filenames format "-sOutputFile=%s" file-relative-name mapconcat shell-quote-argument append " " "\nGS>" queued 1 make-closure #[0 "\301\300!\207" [V0 preview-mouse-open-error] 2 nil "@"] make-sparse-keymap define-key 2 #[0 "\302\303\304\305\300\"\304\306\307\310\301\"\"E!\207" [V0 V1 popup-menu "PostScript error" vector "View error" "View source" make-closure #[0 "\301\302\300\"\207" [V0 apply preview-mouse-open-eps] 3 nil "@"]] 8 nil nil] propertize "x" display mouse-face highlight help-echo "[mouse-2] views error message\n[mouse-3] more options" keymap overlay-put strings preview-toggle preview-gs-dsc preview-error-icon] 17 (#$ . 41373)]) #@280 Work off Ghostscript transaction. This routine is the action routine called via the process filter. The Ghostscript process buffer of PROCESS will already be selected, and and the standard output of Ghostscript up to the next prompt will be given as ANSWER. (fn PROCESS ANSWER) (defalias 'preview-gs-transact #[514 "\211A\242\306\307\"?\203s\310!\203s\311\312\"\211\203r\211\313H\311\314\"\211@A@\2036\315 \"\210\202j\3161B\317!0\210\202C\210\320\314A#\210\321@ \322!\n\323H$\311\324\"\211@@A\241\210\211A\241\266\320\312\325#\266\210G W\203F\f\211A\242\211\262\203F\311\312\"\211\203B>\204B\310!\203B\311\314\"\211\326\327\330 @ A $*\"C\244@@\313+\203\273\313H\206\317;\203\306\331!\206\317\313H\206\317\332\333!I\323H\327\334,\203\344\335\336-\"P\202\371\327\337\340<\203\365\341!@\202\367!\".\203\342\202\327\343\323H\313HZ\344H\345HZ\313H \345H%# \211AT\241\210C\244\345I\210\3461@\347\n\"0\266\202s\266\210\202s?\205V\3501T\351!0\207\210\325\207" [preview-gs-outstanding preview-gs-image-type preview-colors preview-gs-outstanding-limit preview-gs-queue preview-gs-sequence string-match "\\`GS\\(<[0-9]+\\)?>\\'" overlay-buffer overlay-get queued 0 filenames preview-gs-flag-error (file-error) preview-delete-file overlay-put preview-create-icon preview-ascent-from-bb 2 preview-image nil preview-make-filename format "pr%d-%d.%s" preview-extract-bb error "No bounding box" "%s<<%s>>preview-do\n" "dup " preview-gs-dsc-cvx "%s(r)file cvx" preview-ps-quote-filename last "" "/PageSize[%g %g]/PageOffset[%g %g[1 1 dtransform exch]{0 ge{neg}if exch}forall]" 3 1 (error) process-send-string (error) process-send-eof TeX-active-tempdir preview-prefer-TeX-bb preview-ps-file preview-gs-dsc preview-parsed-tightpage] 19 (#$ . 42555)]) #@243 Gets a value from a configured hook. HOOK is a list or single item, for which the first resolving to non-nil counts. Entries can be a callable function, or a symbol that is consulted, or a value. Lists are evaluated recursively. (fn HOOK) (defalias 'preview-hook-enquiry #[257 "\300!\203 \211 \207\211:\203%\301\211\204$\203$\302@!\262A\262\202\207\2119\2033\303!\2033\211J\207\207" [functionp nil preview-hook-enquiry boundp] 4 (#$ . 44403)]) #@255 Fetch face attribute while adhering to inheritance. This searches FACE for an ATTRIBUTE, using INHERIT for resolving unspecified or relative specs. See the fourth argument of function `face-attribute' for details. (fn FACE ATTRIBUTE &optional INHERIT) (defalias 'preview-inherited-face-attribute #[770 "\300\301$\207" [face-attribute nil] 8 (#$ . 44872)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\210\300\316\302\303\317DD\320\306\307\310\321&\207" [custom-declare-variable preview-scale-function funcall function #[0 "\300\207" [preview-scale-from-face] 1] "Scale factor for included previews.\nThis can be either a function to calculate the scale, or\na fixed number." :group preview-appearance :type (choice (function-item preview-scale-from-face) (const 1.0) (number :value 1.0) (function :value preview-scale-from-face)) preview-default-document-pt #[0 "\300\207" [10] 1] "Assumed document point size for `preview-scale-from-face'.\nIf the point size (such as 11pt) of the document cannot be\ndetermined from the document options itself, assume this size.\nThis is for matching screen font size and previews." (choice (const :tag "10pt" 10) (const :tag "11pt" 11) (const :tag "12pt" 12) (number :tag "Other" :value 11.0)) preview-document-pt-list #[0 "\300\207" [(preview-parsed-font-size preview-auctex-font-size preview-default-document-pt)] 1] "How `preview-document-pt' figures out the document size." (repeat (choice (restricted-sexp :match-alternatives (functionp) :tag "Function" :value preview-auctex-font-size) (variable :value preview-parsed-font-size) (number :value 11)))] 8) #@206 Calculate the default font size of document. If packages, classes or styles were called with an option like 10pt, size is taken from the first such option if you had let your document be parsed by AucTeX. (defalias 'preview-auctex-font-size #[0 "\301\302!\206\303\302\304\305\306\307\"\"\310#\211\205\311\312\313\"!\207" [LaTeX-provided-package-options LaTeX-match-class-option "\\`\\([0-9]+\\)pt\\'" TeX-member apply append mapcar cdr string-match string-to-number match-string 1] 7 (#$ . 46542)]) #@46 Calculate the default font size of document. (defalias 'preview-document-pt #[0 "\301!\207" [preview-document-pt-list preview-hook-enquiry] 2 (#$ . 47053)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put preview-document-pt speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@237 Calculate preview scale from `preview-reference-face'. This calculates the scale of EPS images from a document assumed to have a default font size given by function `preview-document-pt' so that they match the reference face in height. (defalias 'preview-scale-from-face #[0 "\300\301\302\303#\304\245\305\306\"\207" [preview-inherited-face-attribute preview-reference-face :height default 10.0 make-closure #[0 "\300\302 !\245\207" [V0 preview-document-pt-list preview-hook-enquiry] 3]] 4 (#$ . 47363)]) #@173 Value to filter out too large icons. Icon specs with :size larger than this value is not used. Appropriate value is determined at run time according to the display in use. (defvar preview-min-spec nil (#$ . 47876)) #@228 Make an image from a preview spec list. The first spec that is workable (given the current setting of `preview-min-spec') from the given symbol is used here. The icon is cached in the property list of the symbol. (fn SYMBOL) (defalias 'preview-make-image #[257 "\301N\236\206\302\301\303J!BB#@A\207" [preview-min-spec preview-min-alist put preview-filter-specs] 8 (#$ . 48098)]) #@72 Find the first of the fitting specs and make an image. (fn SPEC-LIST) (defalias 'preview-filter-specs #[257 "\300\203\3012\302@!0\211\262\204A\262\202\207" [nil preview-filter-specs preview-filter-specs-1] 4 (#$ . 48495)]) #@14 (fn SPECS) (defalias 'preview-filter-specs-1 #[257 "\211\205\300@N\203\301\300@N\"\207\211@A@\302AA!BB\207" [preview-filter-specs apply preview-filter-specs-1] 5 (#$ . 48738)]) (byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put preview-filter-specs :min #[642 "V\203 \301\302\303\"\207\304!\207" [preview-min-spec throw preview-filter-specs nil preview-filter-specs-1] 6 "\n\n(fn KEYWORD VALUE &rest ARGS)"] :file #[642 "\301\302\302\303\"\"\304!BB\207" [TeX-data-directory :file expand-file-name "images" preview-filter-specs-1] 9 "\n\n(fn KEYWORD VALUE &rest ARGS)"]] 4) #@159 This calculates the image ascent from its bounding box. The bounding box BB needs to be a 4-component vector of numbers (can be float if available). (fn BB) (defalias 'preview-ascent-from-bb #[257 "\211\300H\301H\302X\203\211\302V\203\303\304\305ZZ\245_!\207\306\207" [1 3 720 round 100.0 720.0 100] 8 (#$ . 49346)]) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\304\305%\210\311\312\313\314\315DD\316\304\305\317\320&\207" [custom-declare-face preview-face ((((background dark)) (:background "dark slate gray")) (t (:background "beige"))) "Face to use for the preview source." :group preview-appearance preview-reference-face ((t nil)) "Face consulted for colors and scale of active previews.\nFallback to :inherit and 'default implemented." custom-declare-variable preview-auto-reveal funcall function #[0 "\300\207" [(eval (preview-arrived-via (key-binding [left]) (key-binding [right]) #'backward-char #'forward-char))] 1] "Cause previews to open automatically when entered.\nPossibilities are:\nT autoopens,\nNIL doesn't,\na symbol will have its value consulted if it exists,\ndefaulting to NIL if it doesn't.\nAn integer will specify a maximum cursor movement distance.\nLarger movements won't open the preview.\nA CONS-cell means to call a function for determining the value.\nThe CAR of the cell is the function to call which receives\nthe CDR of the CONS-cell in the rest of the arguments, while\npoint and current buffer point to the position in question.\nAll of the options show reasonable defaults." :type (choice (const :tag "Off" nil) (const :tag "On" t) (symbol :tag "Indirect variable" :value reveal-mode) (integer :tag "Maximum distance" :value 1) (cons :tag "Function call" :value (eval (preview-arrived-via (key-binding [left]) (key-binding [right]))) function (list :tag "Argument list" (repeat :inline t sexp))))] 8) #@332 Decide whether to auto-reveal. Returns non-NIL if region should be auto-opened. See `preview-auto-reveal' for definitions of MODE, which gets set to `preview-auto-reveal'. DISTANCE specifies the movement distance with which point has been reached in case it has been a movement starting in the current buffer. (fn MODE DISTANCE) (defalias 'preview-auto-reveal-p #[514 "9\203\300!\2051J\207\250\203$\211\2051\211\301U?\2051\302!X\207:\2030\303@A\"\207\207" [boundp 0 abs apply] 5 (#$ . 51215)]) #@99 Indicate auto-opening. Returns non-NIL if called by one of the commands in LIST. (fn &rest LIST) (defalias 'preview-arrived-via #[128 ">\207" [this-command] 3 (#$ . 51734)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\310\315\306\307&\210\300\316\302\303\317DD\320\306\307\310\321&\207" [custom-declare-variable preview-equality-transforms funcall function #[0 "\300\207" [(identity preview-canonical-spaces)] 1] "Transformation functions for region changes.\nThese functions are tried in turn on the strings from the\nregions of a preview to decide whether a preview is to be considered\nchanged. If any transform leads to equal results, the preview is\nconsidered unchanged." :group preview-appearance :type (repeat function) preview-transparent-color #[0 "\300\207" [(highlight :background)] 1] "Color to appear transparent in previews.\nSet this to something unusual when using `preview-transparent-border',\nto the default background in most other cases." (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)))) preview-transparent-border #[0 "\300\207" [nil] 1] "Width of transparent border for previews in pt.\nSetting this to a numeric value will add a border of\n`preview-transparent-color' around images, and will turn\nthe heuristic-mask setting of images to default to 't since\nthen the borders are correctly detected even in case of\npalette operations. If the transparent color is something\nnot present otherwise in the image, the cursor display\nwill affect just this border. A width of 0 is interpreted\nby PostScript as meaning a single pixel, other widths are\ninterpreted as PostScript points (1/72 of 1in)" (choice (const :value nil :tag "No border") (number :value 1.5 :tag "Border width in pt"))] 8) #@79 Get heuristic-mask to use for previews. Consults `preview-transparent-color'. (defalias 'preview-get-heuristic-mask #[0 ";\203 \301!\207:\203@\250\203\207\301\302@A@\303#!\207" [preview-transparent-color color-values preview-inherited-face-attribute default] 5 (#$ . 53741)]) #@32 (fn FILE TYPE ASCENT BORDER) (defalias 'preview-create-icon-1 #[1028 "\300\301\302\303\205\304BBBBBBB\207" [image :file :type :ascent (:mask (heuristic t))] 12 (#$ . 54035)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put preview-create-icon-1 speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@88 Create an icon from FILE, image TYPE, ASCENT and BORDER. (fn FILE TYPE ASCENT BORDER) (defalias 'preview-create-icon #[1028 "\300\301\302\303\205\304BBBBBBB\266\204\257\207" [image :file :type :ascent (:mask (heuristic t))] 16 (#$ . 54374)]) (put 'preview-filter-specs :type #[642 "\300!\203\301\302\303!BBB\207\304\305\306\"\207" [image-type-available-p image :type preview-filter-specs-1 throw preview-filter-specs nil] 8 "\n\n(fn KEYWORD VALUE &rest ARGS)"]) #@69 Convert the printable IMAGE rendition back to an image. (fn IMAGE) (defalias 'preview-import-image #[257 "\211;\203 \300\301\302#\207\211@\303=\203\207\211@A@\3048G\305W\203'\306 \202*\3078\303\310\311\312\2059\313BBBBBBB\207" [propertize face preview-face image 2 4 preview-get-heuristic-mask 3 :file :type :ascent (:mask (heuristic t))] 13 (#$ . 54866)]) (defvar preview-tb-icon-specs '((:type xpm :file "prvtex24.xpm") (:type xbm :file "prvtex24.xbm"))) (defvar preview-tb-icon nil) #@169 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. (fn FUN OV &rest REST) (defalias 'preview-add-urgentization #[642 "\300\301\"\211@\302=?\205\303\301\302BBBB#\207" [overlay-get display when overlay-put] 11 (#$ . 55378)]) #@156 Undo urgentization of OV by `preview-add-urgentization'. Returns the old arguments to `preview-add-urgentization' if there was any urgentization. (fn OV) (defalias 'preview-remove-urgentization #[257 "\300\301\"\211\242\302=\205\211A@\303\301AA#\210\207" [overlay-get display when overlay-put] 7 (#$ . 55713)]) (defvar preview-overlay nil) (byte-code "\300\301\302\303#\210\300\301\304\305#\210\300\301\306\307#\207" [put preview-overlay 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 (#$ . 56322)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable preview-dump-threshold funcall function #[0 "\300\207" [#1="^ *\\\\begin *{document}[ %]*$"] 1 #1#] "Regexp denoting end of preamble.\nThis is the location up to which preamble changes are considered\nto require redumping of a format." :group preview-latex :type string] 8) #@192 Hook function for change hooks on preamble. See info node `(elisp) Overlay Properties' for definition of OV, AFTER-CHANGE, BEG, END and LENGTH. (fn OV AFTER-CHANGE BEG END &optional LENGTH) (defalias 'preview-preamble-changed-function #[1284 "\300\301\"\302!\210\303!\210\211\304\241\207" [overlay-get format-cons preview-unwatch-preamble preview-format-kill t] 8 (#$ . 56774)]) #@245 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. (fn FILE COMMAND FORMAT-CONS) (defalias 'preview-watch-preamble #[771 "\301!\203\n\202 \302!\303\205Hrq\210\212\214~\210eb\210\304\303\305#\204-\306\307\"\210\310e`\"\262\311\312#\210\311\313\314#\210\311\315\316#\210+B\241\207" [preview-dump-threshold bufferp find-buffer-visiting nil re-search-forward t error "Can't find preamble of `%s'" make-overlay overlay-put format-cons insert-in-front-hooks (preview-preamble-changed-function) modification-hooks (preview-preamble-changed-function)] 11 (#$ . 57164)]) #@113 Stop watching a format on FORMAT-CONS. The watch has been set up by `preview-watch-preamble'. (fn FORMAT-CONS) (defalias 'preview-unwatch-preamble #[257 "\211A:\205\211AA\203\300AA!\210\211A\301\241\207" [delete-overlay nil] 3 (#$ . 57917)]) #@256 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. (fn OV) (defalias 'preview-register-change #[257 "\301\302\"?\2051\301\303\"\304=\203\305\302\306#\210\202,\305\302\214~\210\307\310!\311!\")#\210\211B\211\207" [preview-change-list overlay-get preview-prechange preview-state disabled overlay-put t buffer-substring-no-properties overlay-start overlay-end] 8 (#$ . 58172)]) #@118 Check whether the contents under the overlay have changed. Disable it if that is the case. Ignores text properties. (defalias 'preview-check-changes #[0 "\211\203c\211@\3011Ur\302!q\210\214~\210\303\304!\305!\")\211G\306U\203*\307!\202M\310\311\"\312=\206:\313\310\314\"\"?\205M\315\316\317#\210\315\320\317#\210\321!\262)0\210\202V\210\315\314\317#\210A\266\202\202\210\317\211\207" [preview-change-list (error) overlay-buffer buffer-substring-no-properties overlay-start overlay-end 0 preview-delete overlay-get preview-state disabled preview-relaxed-string= preview-prechange overlay-put insert-in-front-hooks nil insert-behind-hooks preview-disable] 8 (#$ . 58763)]) #@200 Hook function for `insert-in-front-hooks' property. See info node `(elisp) Overlay Properties' for definition of OV, AFTER-CHANGE, BEG, END and LENGTH. (fn OV AFTER-CHANGE BEG END &optional LENGTH) (defalias 'preview-handle-insert-in-front #[1284 "\203?\205\301\302\"\303=\205\304\305!#\207\306!\207" [undo-in-progress overlay-get preview-state active move-overlay overlay-end preview-register-change] 10 (#$ . 59466)]) #@281 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. (fn OV AFTER-CHANGE BEG END &optional LENGTH) (defalias 'preview-handle-insert-behind #[1284 "\203?\205\301\302\"\303=\205\304\305!#\207\306!\207" [undo-in-progress overlay-get preview-state active move-overlay overlay-start preview-register-change] 9 (#$ . 59908)]) #@197 Hook function for `modification-hooks' property. See info node `(elisp) Overlay Properties' for definition of OV, AFTER-CHANGE, BEG, END and LENGTH. (fn OV AFTER-CHANGE BEG END &optional LENGTH) (defalias 'preview-handle-modification #[1284 "?\205\300!\207" [preview-register-change] 7 (#$ . 60430)]) #@377 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. (fn OV &optional ARG EVENT) (defalias 'preview-toggle #[769 "\300!\301=\203\302\303\"\304=?\202\203\304\202\305\302\306\"\302\303\"\307=\204\274\310\303#\210\304=\203\202\310\311\312#\210\313!\314!=\203U\310\315@#\210\202x\316\211\203p\211@\310\317\320@##\210A\266\202\202V\210\310\315\321#\210\310\322\321#\210\202\263\323\211\203\227\211@\310\321#\210A\266\202\202\203\210\310\322\324#\210\211A\204\253\211\325!\241\210\310\315A#\210\203\274\326\327\"\210\266\211\205\326\330\331!\203\316\202\325\332!\211@\262\"\207" [preview-remove-urgentization toggle overlay-get preview-state active inactive strings disabled overlay-put category preview-overlay overlay-start overlay-end before-string (display keymap mouse-face help-echo) get-text-property 0 nil face (display keymap mouse-face help-echo) preview-face preview-inactive-string apply preview-add-urgentization preview-restore-position windowp event-start] 15 (#$ . 60743)]) #@32 Marker for fake intangibility. (defvar preview-marker (make-marker) (#$ . 62100)) (defvar preview-temporary-opened nil) #@56 Restored cursor position marker for reopened previews. (defvar preview-last-location nil (#$ . 62226)) (make-variable-buffer-local 'preview-last-location) #@39 Mark position for fake intangibility. (defalias 'preview-mark-point #[0 "\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 (#$ . 62387)]) #@300 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. (fn OV WINDOW) (defalias 'preview-restore-position #[514 "\301!\302!=\205Nr\301!q\210\303\304\"\305=\203)\206\306 \307!\310\223\211\202M\311!\205M\301!\312!=\205M\313!W\205M\314!V\205M\315\")\207" [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] 5 (#$ . 62685)]) #@42 Move point out of fake-intangible areas. (defalias 'preview-move-point #[0 "\305 \210\306`\307!\306\211\203L\211@\310!\203E\311\312\"\313=\203E\310!p=\203?\314!X\2047\315!Y\203?\316\317\"\210\202E\211B\262A\266\202\202\n\262\205\263 \204r\n\204r\320 \321\f!p=\205k\322\f!Z\211\262\"\203v\323!\207\203\261\311@\312\"\324=\203\252\314@!V\203\252\307\203\237\325W\203\237\314@!\202\243\315@!\211\262!\202\254A\262\202vb\207" [preview-temporary-opened disable-point-adjustment global-disable-point-adjustment preview-auto-reveal preview-marker 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] 9 (#$ . 63394)]) #@93 Open all previews in LIST, optionally restricted to enclosing POS. (fn LIST &optional POS) (defalias 'preview-open-overlays #[513 "\211\2053\211@\301\302\"\303=\203,\203$\304!V\203,\305!W\203,\306!\210\211BA\266\202\202\207" [preview-temporary-opened overlay-get preview-state active overlay-start overlay-end preview-toggle] 7 (#$ . 64226)]) (byte-code "\300\301!\204 \302\303\304\305\306$\210\306\207" [fboundp advice-add ad-add-advice replace-highlight (preview nil t (advice lambda nil (preview--open-for-replace (ad-get-arg 0) (ad-get-arg 1)))) before nil] 5) #@84 Make `query-replace' open preview text about to be replaced. (fn BEG END &rest _) (defalias 'preview--open-for-replace #[642 "\300\301\"!\207" [preview-open-overlays overlays-in] 7 (#$ . 64817)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315\316\317& \207" [custom-declare-variable preview-query-replace-reveal funcall function #[0 "\300\207" [t] 1] "Make `query-replace' autoreveal previews." :group preview-appearance :type boolean :require preview :set #[514 "\300\"\210\301\302!\203\211\203\302\303\304\305#\207\306\303\305\"\207\211\203'\307\303\310\311#\210\202-\312\303\310\311#\210\313\303!\207" [set-default fboundp advice-add replace-highlight :before preview--open-for-replace advice-remove ad-enable-advice before preview ad-disable-advice ad-activate] 6 "\n\n(fn SYMBOL VALUE)"] :initialize custom-initialize-reset] 14) #@210 Check for functional equality of arguments. The arguments ARGS are checked for equality by using `preview-equality-transforms' on them until it is exhausted or one transform returns equality. (fn &rest ARGS) (defalias 'preview-relaxed-string= #[128 "\211\203\301\302\303@\"\"\204\211A\262\202\207" [preview-equality-transforms apply string= mapcar] 7 (#$ . 65693)]) #@118 Convert ARG into canonical form. Removes comments and collapses white space, except for multiple newlines. (fn ARG) (defalias 'preview-canonical-spaces #[257 "\300\301\302#\211\262\203\303\304\305\211\306%\262\202\301\307#\211\262\203<\303\310\224\203-\311\202.\312\305\211\306%\262\211T\262\202\301\313#\211\262\203g\314\306\"\312\230\203`\303\311\305\211\306%\262\211T\262\202<\306\225\262\202<\210\207" [nil string-match "\\s<.*[\n ][ ]*" replace-match "" t 0 "[ ]*\\(\\([ ]\\)\\|[\n ][ ]*\\)" 2 " " "\n" "\n+" match-string] 8 (#$ . 66077)]) #@64 Pass the modified region in OVR again through LaTeX. (fn OVR) (defalias 'preview-regenerate #[257 "\300!\301!r\302!q\210\303!\210\304\")\207" [overlay-start overlay-end overlay-buffer preview-delete preview-region] 6 (#$ . 66665)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable preview-inner-environments funcall function #[0 "\300\207" [("Bmatrix" "Vmatrix" "aligned" "array" "bmatrix" "cases" "gathered" "matrix" "pmatrix" "smallmatrix" "split" "subarray" "vmatrix")] 1] "Environments not to be previewed on their own." :group preview-latex :type (repeat string)] 8) #@124 Search for the next interesting border for `preview-at-point'. Searches backwards if BACKWARDS is non-nil. (fn BACKWARDS) (defalias 'preview-next-border #[257 "\300\211`\3012^\203*\302\303\"\211\262eV\203\304S\303\"\202E\305\301\206&e\"\202E\306\303\"\211\262dW\203=\304\303\"\202E\305\301\206Dd\"\211\262\307>\204X?\205S\211\262\202\206]\2110\207" [nil exit previous-single-char-property-change preview-state get-char-property throw next-single-char-property-change (active inactive)] 7 (#$ . 67289)]) #@416 Do the appropriate preview thing at point. If point is positioned on or inside of an unmodified preview area, its visibility is toggled. If not, the surroundings are run through preview. The surroundings don't extend into unmodified previews or past contiguous previews invalidated by modifications. Overriding any other action, if a region is active (`transient-mark-mode'), it is run through `preview-region'. (defalias 'preview-at-point #[0 "\300 \203\f\301\302 \303 \"\207\3042L\305e`S]d`T^\"\211\203B\211@\306\307\"\211\203:\211\310=\204:\311\312\313 #\210\314\304\315\"\210\210A\266\202\202\210\301\316\315!\316\317!\"0\207" [TeX-active-mark preview-region region-beginning region-end exit overlays-in overlay-get preview-state disabled preview-toggle toggle selected-window throw t preview-next-border nil] 7 (#$ . 67828) nil]) #@68 Generate a before-string for disabled preview overlay OV. (fn OV) (defalias 'preview-disabled-string #[257 "\302\303\"\304\305\306\"#\210\307\310\311 \312\313\314\315\316 & \262r\317!q\210\212\214~\210\320!b\210n\2034\321\2025\322+P\207" [preview-button-1 preview-icon overlay-get preview-map define-key make-closure #[0 "\301\300!\207" [V0 preview-regenerate] 2 nil nil] propertize "x" display mouse-face highlight help-echo "[mouse-2] regenerates preview\n[mouse-3] more options" keymap overlay-buffer overlay-start "\n" ""] 12 (#$ . 68682)]) #@63 Change overlay behaviour of OVR after source edits. (fn OVR) (defalias 'preview-disable #[257 "\300\301\302#\210\303!\210\300\304\302#\210\300\305\302#\210\306\307\"\310!\241\210\311!\210\300\312\313#\210\306\314\"\211\205M\211@\3151?\316!0\210\202@\210\300\314\302#\210A\266\202\202-\207" [overlay-put queued nil preview-remove-urgentization preview-image timestamp overlay-get strings preview-disabled-string preview-toggle preview-state disabled filenames (file-error) preview-delete-file] 7 (#$ . 69245)]) #@170 Delete preview overlay OVR, taking any associated file along. IGNORED arguments are ignored, making this function usable as a hook in some cases (fn OVR &rest IGNORED) (defalias 'preview-delete #[385 "\300\301\"\302\301\303#\210\304!\210\211\211\205)\211@\3051!\306!0\210\202\"\210A\266\202\202\207" [overlay-get filenames overlay-put nil delete-overlay (file-error) preview-delete-file] 7 (#$ . 69779)]) #@345 Clear out all previews in the current region. When called interactively, the current region is used. Non-interactively, the region between START and END is affected. Those two values default to the borders of the entire buffer. If TIMESTAMP is non-nil, previews with a `timestamp' property of it are kept. (fn &optional START END TIMESTAMP) (defalias 'preview-clearout #[768 "\300\206e\206 d\"\211\2051\211@\301\302\"\203*\203&\301\303\"\232\204*\304!\210A\266\202\202\f\207" [overlays-in overlay-get preview-state timestamp preview-delete] 9 (#$ . 70202) "r"]) #@78 Clearout BUFFER from previews, current buffer if nil. (fn &optional BUFFER) (defalias 'preview-clearout-buffer #[256 "\211\203\fr\211q\210\300 )\207\300 \207" [preview-clearout] 2 (#$ . 70789) nil]) #@39 Clearout previews from LaTeX section. (defalias 'preview-clearout-section #[0 "\212\300 \210\301\302 \303 \")\207" [LaTeX-mark-section preview-clearout region-beginning region-end] 3 (#$ . 70996) nil]) #@32 Clearout any preview at point. (defalias 'preview-clearout-at-point #[0 "\300e`S]d`T^\"\207" [preview-clearout] 4 (#$ . 71204) nil]) #@186 Cycle through all buffers belonging to current document. Each buffer having the same master file as the current file has FUNC called with its current buffer being set to it. (fn FUNC) (defalias 'preview-walk-document #[257 "\302 \303\304\305!!p\306!D\205Ar\211A\262\242q\210p>\204:\307>\203= ;\2040 \305=\203=\303\304\305!!\230\203= \210)\202\f\207" [major-mode TeX-master buffer-list expand-file-name TeX-master-file t find-buffer-visiting (plain-tex-mode latex-mode)] 7 (#$ . 71344)]) #@188 Clear out all previews in current document. The document consists of all buffers that have the same master file as the current buffer. This makes the current document lose all previews. (defalias 'preview-clearout-document #[0 "\300\301!\207" [preview-walk-document preview-clearout-buffer] 2 (#$ . 71854) nil]) #@223 This is a cleanup function just for use in hooks. Cleans BUF or current buffer. The difference to `preview-clearout-buffer' is that previews associated with the last buffer modification time are kept. (fn &optional BUF) (defalias 'preview-kill-buffer-cleanup #[256 "r\211\206pq\210\214~\210\300ed\301 #*\207" [preview-clearout visited-file-modtime] 5 (#$ . 72174)]) (byte-code "\300\301\302\"\210\300\303\302\"\207" [add-hook kill-buffer-hook preview-kill-buffer-cleanup before-revert-hook] 3) #@27 Last counter information. (defvar preview-last-counter nil (#$ . 72678)) #@12 (fn CTR) (defalias 'preview-extract-counters #[257 "\301!\211\203\211@\302\"\262A\266\202\202\210\303\304\"\207" [preview-last-counter copy-sequence delete apply concat] 7 (#$ . 72757)]) #@83 Hook function that extracts previews for persistent sessions. (fn &rest IGNORED) (defalias 'desktop-buffer-preview-misc-data #[128 "\301 ?\205P\302\214~\210\302\303 \304\305ed\"\306\"\211\203B\211@\307\310\"\311>\203;\307\312\"\204;\307\313\"A\203;\314\"B\262A\266\202\202\210\205M\315\237BB\266\202)\207" [preview-last-counter buffer-modified-p nil visited-file-modtime sort overlays-in #[514 "\300!\300!W\207" [overlay-start] 5 "\n\n(fn X Y)"] overlay-get preview-state (active inactive) queued preview-image preview-dissect preview] 8 (#$ . 72964)]) (eval-after-load "desktop" #[0 "\300\301\302\"\207" [add-hook desktop-buffer-misc-functions desktop-buffer-preview-misc-data] 3]) #@138 List of top level temporary directories in use from preview. Any directory not in this list will be cleared out by preview on first use. (defvar preview-temp-dirs nil (#$ . 73677)) #@74 Extract all persistent data from OV and TIMESTAMP it. (fn OV TIMESTAMP) (defalias 'preview-dissect #[514 "\300\301\302\"@!\303\304#\210\305!\306!\301\307\"A\301\310\"\211\205+\311@!\311A!B\262\257\207" [butlast overlay-get filenames overlay-put timestamp overlay-start overlay-end preview-image preview-counters preview-extract-counters] 11 (#$ . 73864)]) #@98 Restore previews from BUFFER-MISC if proper. Remove them if they have expired. (fn BUFFER-MISC) (defalias 'preview-buffer-restore-internal #[257 "\301 \302\211\211\211A\262\242\303=\205\205\304 \210\211A\262\242\232\2037\211\2056\211@\305\306$\262A\266\202\202 \207\211\203g\211@\3078\262\3101P\311@!0\210\202Q\210A@\235\204`A@B\262A\266\202\2028\210\211\205\203\211@\3121{\313!0\210\202|\210A\266\202\202i\262\207" [preview-parsed-counters visited-file-modtime nil preview preview-get-geometry apply preview-reinstate-preview 3 (file-error) delete-file (file-error) delete-directory] 11 (#$ . 74241)]) #@221 At end of desktop load, reinstate previews. This delay is so that minor modes changing buffer positions (like `x-symbol-mode' does) will not wreak havoc. BUFFER-MISC is the appropriate data to be used. (fn BUFFER-MISC) (defalias 'preview-buffer-restore #[257 "\300\301p\302\303#\262\"\207" [add-hook desktop-delay-hook make-closure #[0 "r\301q\210\302\300!)\207" [V0 V1 preview-buffer-restore-internal] 2]] 8 (#$ . 74892)]) #@97 Hook function for restoring persistent previews into a buffer. (fn FILE-NAME BUFFER-NAME MISC) (defalias 'desktop-buffer-preview #[771 "\205$\300!\205$\301!@\302=\203!r\211q\210\303!\210)\211\202\"\211\262\207" [file-readable-p find-file-noselect preview preview-buffer-restore] 6 (#$ . 75326)]) (byte-code "\300\301\302\"\210\303\304\305\306\307DD\310\311\312\313\314&\207" [eval-after-load "desktop" #[0 "\300\301!\203 \302\301\303\"\207\304\305\306\"\207" [boundp desktop-buffer-mode-handlers add-to-list (latex-mode . desktop-buffer-preview) add-hook desktop-buffer-handlers #[0 "\303 \n#\207" [desktop-buffer-file-name desktop-buffer-name desktop-buffer-misc desktop-buffer-preview] 4]] 3] custom-declare-variable preview-auto-cache-preamble funcall function #[0 "\300\207" [ask] 1] "Whether to generate a preamble cache format automatically.\nPossible values are nil, t, and `ask'." :group preview-latex :type (choice (const :tag "Cache" t) (const :tag "Don't cache" nil) (const :tag "Ask" ask))] 8) #@532 Alist of dumped masters. The elements are (NAME . ASSOC). NAME is the master file name (without extension), ASSOC is what to do with regard to this format. Possible values: NIL means no format is available and none should be generated. T means no format is available, it should be generated on demand. If the value is a cons cell, the CAR of the cons cell is the command with which the format has been generated, and the CDR is some Emacs-flavor specific value used for maintaining a watch on possible changes of the preamble. (defvar preview-dumped-alist nil (#$ . 76353)) #@108 Clean out all directories and files with non-persistent data. This is called as a hook when exiting Emacs. (defalias 'preview-cleanout-tempfiles #[0 "\301\302\303 \"\210\301\304\"\207" [preview-dumped-alist mapc preview-kill-buffer-cleanup buffer-list preview-format-kill] 3 (#$ . 76938)]) #@229 Generate before-string for an inactive preview overlay OV. This is for overlays where the source text has been clicked visible. For efficiency reasons it is expected that the buffer is already selected and unnarrowed. (fn OV) (defalias 'preview-inactive-string #[257 "\301\302\"\303\304\305\306\307\310\311\312 & \262r\313!q\210\212\214~\210\314!b\210n\203*\315\202+\316+P\207" [preview-icon overlay-get preview-map propertize "x" display mouse-face highlight help-echo "[mouse-2] redisplays preview\n[mouse-3] more options" keymap overlay-buffer overlay-start "\n" ""] 12 (#$ . 77236)]) #@82 Place all images dvipng has created, if any. Deletes the dvi file when finished. (defalias 'preview-dvipng-place-all #[0 "\306\211\211\211\306\211\203\201\211@\307\310\"\211\262\203z\307\310\"\311H\211\262\203z\312\313\314 #\n\"\211\262\203z\315@!\203k\316\317C#\210\211\320@ \321 \322H! \311H$\307\323\"\211@@A\241\210\211A\241\266\316\310\306#\210\202zB\262\316\317\306#\210\211BA\266\202\202\210\237\211\203\325\324\f!\210\325\211\203\270\211@\307\310\"\311H\262\316\317\312\206\254\313\326\"\n\"C#\210A\266\202\202\220\210\211A\262\242\211\262\205\356\3271\321\330!0\210\202\271\210\202\271\3311\354\332rq\210@\333\334\")!\2620\207\210\306\207" [preview-gs-queue preview-dvipng-image-type TeX-active-tempdir preview-colors preview-fast-conversion TeX-sentinel-function nil overlay-get queued 2 preview-make-filename format "prev%03d.%s" file-exists-p overlay-put filenames preview-create-icon preview-ascent-from-bb 0 preview-image preview-start-dvips #[514 "\300\301#\207" [preview-gs-dvips-sentinel t] 6 "\n\n(fn PROCESS COMMAND)"] "preview.%03d" (file-error) preview-delete-file (file-error) delete-file "dvi" t preview-ps-file preview-gs-file TeX-command-buffer] 13 (#$ . 77840)]) #@62 Generate before-string for active image overlay OV. (fn OV) (defalias 'preview-active-string #[257 "\300\301\"\302\303\304\300\305\"@\306\307\310\311\312 & \207" [overlay-get preview-map propertize "x" display preview-image mouse-face highlight help-echo "[mouse-2] opens text\n[mouse-3] more options" keymap] 12 (#$ . 79104)]) #@402 Generate a preview filename from FILE and TEMPDIR. Filenames consist of a CONS-cell with absolute file name as CAR and TEMPDIR as CDR. TEMPDIR is a copy of `TeX-active-tempdir' with the directory name, the reference count and its top directory name elements. If FILE is already in that form, the file name itself gets converted into a CONS-cell with a name and a reference count. (fn FILE TEMPDIR) (defalias 'preview-make-filename #[514 ":\203@:\203@@AT\241\210\202\211@\300B\240\210\207\211AA\3018T\240\210\302@\"B\207" [1 2 expand-file-name] 5 (#$ . 79443)]) #@71 Attaches the absolute file name ATTACHED to FILE. (fn ATTACHED FILE) (defalias 'preview-attach-filename #[514 "\211@@<\203\211@@@B\240\210\207\211@@@D\240\210\207" [] 5 (#$ . 80029)]) #@173 Delete a preview FILE. See `preview-make-filename' for a description of the data structure. If the containing directory becomes empty, it gets deleted as well. (fn FILE) (defalias 'preview-delete-file #[257 "\211@:\203\211@@AS\241\300U\205\211@@\202\211@\211\205C\301\302\"\216\211<\203?\211\211\205:\211@\303!\210A\266\202\202)\262\202B\303!)\207" [0 make-closure #[0 "\300A\211\205\3018\302V\203\211AA\3018S\240\207\300\303\241\210\304@!\207" [V0 2 1 nil delete-directory] 4] delete-file] 6 (#$ . 80227)]) (defvar preview-buffer-has-counters nil) (make-variable-buffer-local 'preview-buffer-has-counters) #@617 Generate and place an overlay preview image. This generates the filename for the preview snippet SNIPPET in the current buffer, and uses it for the region between START and END. BOX is an optional preparsed TeX bounding BOX passed on to the `place' hook. COUNTERS is the info about saved counter structures. TEMPDIR is a copy of `TeX-active-tempdir'. PLACE-OPTS are additional arguments passed into `preview-parse-messages'. Returns a list with additional info from the placement hook. Those lists get concatenated together and get passed to the close hook. (fn SNIPPET START END BOX COUNTERS TEMPDIR PLACE-OPTS) (defalias 'preview-place-preview #[1799 "\303#\210\304\305\211\211%\306\307\310\n\n\"#\210\306\311\312 \313\314\315 \"#\210\313 \314\316 \"#\210\211\262#\210\306\317#\210A\203N\306\320#\210\321\322\323\324  &\306\325\326!C#\210\327\321\"\210\207" [preview-button-1 preview-button-2 preview-buffer-has-counters preview-clearout make-overlay nil overlay-put priority TeX-overlay-prioritize preview-map make-sparse-keymap define-key make-closure #[257 "\301\300\302#\207" [V0 preview-toggle toggle] 5 "\n\n(fn EVENT)" "e"] #[257 "\301\300\"\207" [V0 preview-context-menu] 4 "\n\n(fn EVENT)" "e"] timestamp preview-counters t apply preview-call-hook place strings preview-active-string preview-toggle] 18 (#$ . 80867)]) #@150 Fetch the next preceding or next preview-counters property. Factored out because of compatibility macros XEmacs would not use in advice. (fn BEGIN) (defalias 'preview-counter-find #[257 "\300\301\"@\206)\300eS]\301\"A\206)\300e\302\301\"S]\301\"A\206)\300\303\301\"\301\"@\207" [get-char-property preview-counters previous-single-char-property-change next-single-char-property-change] 6 (#$ . 82244)]) #@309 Return repeated \setcounter declaration based on point BEGIN. If `preview-buffer-has-counters' is non-nil, return string to insert into region tex file containing as many \setcounter{COUNTER}{VALUE} as possible built from `preview-counters' property near the point BEGIN. Otherwise, return nil. (fn BEGIN) (defalias 'preview--counter-information #[257 "\205 \301\302\303\304!B\305#\207" [preview-buffer-has-counters mapconcat identity "" preview-counter-find "\\setcounter"] 6 (#$ . 82661)]) #@566 Reinstate a single preview. This gets passed TEMPDIRLIST, a list consisting of the kind of entries used in `TeX-active-tempdir', and TIMESTAMP, the time stamp under which the file got read in. It returns an augmented list. START and END give the buffer location where the preview is to be situated, IMAGE the image to place there, and FILENAME the file to use: a triple consisting of filename, its temp directory and the corresponding topdir. COUNTERS is saved counter information, if any. (fn TEMPDIRLIST TIMESTAMP START END IMAGE FILENAME &optional COUNTERS) (defalias 'preview-reinstate-preview #[1798 "\203 \306@!\203\353\203[A@@\232\204J\307A@\"\206/\310A\311C\"B\211\262@\211AA@ \235\206G\312\313\314\315#\210A@ B\211@\240\210AA\3168T\240\210\241\210C\262\317\320\211\211%\321\322\323  \"#\210\321\324\325 \326\n\327\330 \"#\210\326 \327\331 \"#\210\211\262#\210\203\303\321\332\333\334@\335\230\203\240\f\202\247\336@!\211\"\333\334A\335\230\203\266\f\202\275\336A!\211\"B#\210\315\321\337#\210\321\340\341!B#\210\321\342\343!C#\210\321\344 #\210\345\315\"\266\207" [TeX-active-tempdir preview-temp-dirs preview-button-1 preview-button-2 preview-parsed-counters preview-buffer-has-counters file-readable-p assoc append 0 add-hook kill-emacs-hook preview-cleanout-tempfiles t 2 make-overlay nil overlay-put priority TeX-overlay-prioritize preview-map make-sparse-keymap define-key make-closure #[257 "\301\300\302#\207" [V0 preview-toggle toggle] 5 "\n\n(fn EVENT)" "e"] #[257 "\301\300\"\207" [V0 preview-context-menu] 4 "\n\n(fn EVENT)" "e"] preview-counters mapcar cdr "" preview-parse-counters filenames preview-image preview-import-image strings preview-active-string timestamp preview-toggle] 19 (#$ . 83165)]) #@151 Move backward a TeX token. If NOCOMPLEX is set, only basic tokens and no argument sequences will be skipped over backwards. (fn &optional NOCOMPLEX) (defalias 'preview-back-command #[256 "`\300\30118\302\303\304 \305#\2066\2066`Sfz\306=\2034`\262\307 \210\211`=?\2056\300fz\310=\2056\202\311u0\207\210b\207" [nil (error) search-backward-regexp "\\(\\$\\$?\\|\\\\[^a-zA-Z@]\\|\\\\[a-zA-Z@]+\\|\\\\begin[ ]*{[^}]+}\\)\\=" line-beginning-position t 41 backward-sexp 40 -1] 7 (#$ . 84973)]) (byte-code "\301\302\303\304\305DD\306\307\310\311&\210\301\312\303\304\313DD\314\307\310\311\315&\210\301\316\303\304\317DD\320\307\310\311\321&\210\301\322\303\304\323DD\324\307\310\311&\210\301\325\303\304\326DD\327\307\310\311&\207" [preview-expandable-string custom-declare-variable preview-required-option-list funcall function #[0 "\300\207" [("active" "tightpage" "auctex" (preview-preserve-counters "counters"))] 1] "Specifies required options passed to the preview package.\nThese are passed regardless of whether there is an explicit\n\\usepackage of that package present." :group preview-latex :type preview-preserve-counters #[0 "\300\207" [nil] 1] "Try preserving counters for partial runs if set." boolean preview-default-option-list #[0 "\300\207" [("displaymath" "floats" "graphics" "textmath" "sections" "footnotes")] 1] "Specifies default options to pass to preview package.\nThese options are only used when the LaTeX document in question does\nnot itself load the preview package, namely when you use preview\non a document not configured for preview. \"auctex\", \"active\",\n\"dvips\" and \"delayed\" need not be specified here." (list (set :inline t :tag "Options known to work" :format "%t:\n%v%h" :doc "The above options are all the useful ones\nat the time of the release of this package.\nYou should not need \"Other options\" unless you\nupgraded to a fancier version of just the LaTeX style.\nPlease also note that `psfixbb' fails to have an effect if\n`preview-fast-conversion' or `preview-prefer-TeX-bb'\nare selected." (const "displaymath") (const "floats") (const "graphics") (const "textmath") (const "sections") (const "footnotes") (const "showlabels") (const "psfixbb")) (set :tag "Expert options" :inline t :format "%t:\n%v%h" :doc "Expert options should not be enabled permanently." (const "noconfig") (const "showbox") (const "tracingall")) (repeat :inline t :tag "Other options" (string))) preview-default-preamble #[0 "\300\207" [("\\RequirePackage[" ("," . preview-default-option-list) "]{preview}[2004/11/05]")] 1] "Specifies default preamble code to add to a LaTeX document.\nIf the document does not itself load the preview package, that is,\nwhen you use preview on a document not configured for preview, this\nlist of LaTeX commands is inserted just before \\begin{document}." preview-LaTeX-command #[0 "\300\207" [("%`%l \"\\nonstopmode\\nofiles\\PassOptionsToPackage{" ("," . preview-required-option-list) "}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined" preview-default-preamble "\\fi}\"%' \"\\detokenize{\" %(t-filename-only) \"}\"")] 1] "Command used for starting a preview.\nSee description of `TeX-command-list' for details."] 8) #@58 Read documentation for preview-latex in the info system. (defalias 'preview-goto-info-page #[0 "\300\301!\207" [info "(preview-latex)"] 2 (#$ . 88182) nil]) (eval-after-load 'info #[0 "\300\301\302\"\207" [add-to-list Info-file-list-for-emacs ("preview" . "preview-latex")] 3]) (defvar preview-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\327#\210\301\330\331#\210\301\332\333#\210\301\334\335#\210\301\336\337#\210\207" [make-sparse-keymap define-key "" preview-at-point "" preview-region "" preview-buffer "" preview-document "" preview-cache-preamble "" preview-cache-preamble-off " " preview-goto-info-page "" preview-environment "" preview-section "" preview-copy-region-as-mml "" preview-clearout-at-point "" preview-clearout "" preview-clearout-section "" preview-clearout-buffer "" preview-clearout-document] 5)) #@52 Copy the text of OV into the kill buffer. (fn OV) (defalias 'preview-copy-text #[257 "r\300!q\210\301\302!\303!\")\207" [overlay-buffer copy-region-as-kill overlay-start overlay-end] 5 (#$ . 89199)]) #@142 Copy an MML representation of OV into the kill buffer. This can be used to send inline images in mail and news when using MML mode. (fn OV) (defalias 'preview-copy-mml #[257 "\3022*\303!@\211\203#\304=\203\305\306\"\266\202(\307!\266\202(\310\311!\266\3060\2053\306\312!)\207" [last-command preview-transparent-border badcolor preview-format-mml kill-region kill-append nil kill-new error "No image file available" preview-regenerate] 5 (#$ . 89410)]) #@18 (fn START END) (defalias 'preview-copy-region-as-mml #[514 "\3022\215\303\211\211\304\"\211\203L\211@\305\"\211\262\203EA\262\306!Y\203E\307!X\203E\306!Z\307!Z@EB\262A\266\202\202 \210{\262\310\311\"\237\211\203v\211@\312@O\3138A@\303OQ\262A\266\202\202W\210\314=\203\206\315\303\"\266\202\213\316!\266\3030\205\227\303\317\")\207" [last-command preview-transparent-border badcolor nil overlays-in preview-format-mml overlay-start overlay-end sort car-less-than-car 0 2 kill-region kill-append kill-new preview-region] 12 (#$ . 89885) "r"]) (autoload 'mailcap-extension-to-mime "mailcap") #@404 Return an MML representation of OV as string. This can be used to send inline images in mail and news when using MML mode. If there is nothing current available, NIL is returned. If the image has a colored border and the user wants it removed when asked (unless DONT-ASK is set), 'badcolor is thrown a t. The MML is returned in the car of the result, DONT-ASK in the cdr. (fn OV &optional DONT-ASK) (defalias 'preview-format-mml #[513 "\300\301\"\302>\205\223\300\303\"?\205\223r\304!q\210\305!\306!{)\300\307\"A\310\211:\203\211\204F\3118\203F\312\313!\203C\314\315\316\"\210\202F\316\262\317\300\320\"!@@\262\321\322!!\262\323\324\203e\323\325\"\202f\326\327\330\"\203r\331\202t\327\332\"\203\204\333\333Q\202\205$B\207;\205\221B\266\204\207" [overlay-get preview-state (active inactive) queued overlay-buffer overlay-start overlay-end preview-image nil 3 y-or-n-p "Replace colored borders? " throw badcolor t last filenames mailcap-extension-to-mime file-name-extension format "<#part %s\ndescription=\"%s\"\nfilename=%s>\n<#/part>" "type=\"%s\" disposition=inline" "disposition=attachment" string-match "[\n\"]" "preview-latex image" "[ \n<>]" "\""] 13 (#$ . 90538)]) #@66 Check whether we have a valid image associated with OV. (fn OV) (defalias 'preview-active-contents #[257 "\300\301\"\302>\205\n\303\207" [overlay-get preview-state (active inactive) t] 4 (#$ . 91764)]) #@50 Pop up a menu for OV at position EV. (fn OV EV) (defalias 'preview-context-menu #[514 "\300\301\302\303\304\305\306DF\307D#\302\310\311D\"\302\312\313D\"\302\314\315 D\"\302\316\317\nD\307 D#\257\"\207" [popup-menu "Preview" vector "Toggle" preview-toggle 'toggle quote preview-active-contents "Regenerate" preview-regenerate "Remove" preview-delete "Copy text" preview-copy-text "Copy MIME" preview-copy-mml] 13 (#$ . 91975)]) #@165 Return `preview-TeX-style-dir' in cooked form. This will be fine for prepending to a `TEXINPUTS' style environment variable, including an initial `.' at the front. (defalias 'preview-TeX-style-cooked #[0 "G\302U\204\303\304O\305\235\203\207 ;\203 \2023\306\307\310!\203'\202*\311!\"\2032\312\2023\313\314R\207" [preview-TeX-style-dir TeX-kpathsea-path-delimiter 0 -1 nil (";" ":") string-match "\\`.[:]" file-name-absolute-p expand-file-name ";" ":" "."] 5 (#$ . 92426)]) #@126 Add `preview-TeX-style-dir' into `TEXINPUTS' variables. With prefix argument REMOVE, remove it again. (fn &optional REMOVE) (defalias 'preview-set-texinputs #[256 "\303\304 \303\203P\305\306!P\262\307\n!\211\205K\211@\310\"\203D\311\312\313\"\314\224\314\225W\2048\315\225GW\205B\312\314\"\315\225\303OP\"\210A\266\202\202\262\202\205\306!\262\316\307\n!B\211\205\203\211@\310\317\"\203|\310\"\204|\311\312\313\"\315\225\303OP\"\210A\266\202\202Z\262*\207" [preview-TeX-style-dir case-fold-search process-environment nil preview-TeX-style-cooked "\\`\\(TEXINPUTS[^=]*\\)=\\(.*\\)" regexp-quote copy-sequence string-match setenv match-string 1 2 0 "TEXINPUTS=" "\\`\\(TEXINPUTS[^=]*\\)="] 12 (#$ . 92925) "P"]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable preview-TeX-style-dir funcall function #[0 "\300\207" [nil] 1] "This variable contains the location of uninstalled TeX styles.\nIf this is nil, the preview styles are considered to be part of\nthe installed TeX system.\n\nOtherwise, it can either just specify an absolute directory, or\nit can be a complete TEXINPUTS specification. If it is the\nlatter, it has to be followed by the character with which\nkpathsea separates path components, either `:' on Unix-like\nsystems, or `;' on Windows-like systems. And it should be\npreceded with .: or .; accordingly in order to have . first in\nthe search path.\n\nThe `TEXINPUTS' environment type variables will get this prepended\nat load time calling \\[preview-set-texinputs] to reflect this.\nYou can permanently install the style files using\n\\[preview-install-styles].\n\nDon't set this variable other than with customize so that its\nchanges get properly reflected in the environment." :group preview-latex :set #[514 "\300!\203J\203\301\302!\210L\210J\205\301 \207" [boundp preview-set-texinputs t] 4 "\n\n(fn VAR VALUE)"] :type (choice (const :tag "Installed" nil) (string :tag "Style directory or TEXINPUTS path"))] 10) #@482 Installs the TeX style files into a permanent location. This must be in the TeX search path. If FORCE-OVERWRITE is greater than 1, files will get overwritten without query, if it is less than 1 or nil, the operation will fail. The default of 1 for interactive use will query. Similarly FORCE-SAVE can be used for saving `preview-TeX-style-dir' to record the fact that the uninstalled files are no longer needed in the search path. (fn DIR &optional FORCE-OVERWRITE FORCE-SAVE) (defalias 'preview-install-styles #[769 "\204\301\302!\210\3031\304\305\306\"\210\307\310\"\311\312#0\202!\210\202$\206'\301\313!\211\203T\211@\314\315=\203<\315\202K\247\203I\315V\202K#\210A\266\202\202'\210\211\315=\203a\316\317!\202m\211\247\203l\211\315V\202m\211\203u\320\300\321\"\207\322\300\321\"\207" [preview-TeX-style-dir error "Styles are already installed" (error) directory-files string-match "\\`\\(\\.[:;]\\)?\\(.*?\\)\\([:;]\\)?\\'" match-string 2 t "\\.\\(sty\\|def\\|cfg\\)\\'" "Can't find files to install" copy-file 1 y-or-n-p "Stop using non-installed styles permanently " customize-save-variable nil customize-set-variable] 10 (#$ . 94965) "DPermanent location for preview TeX styles\npp"]) #@54 Setup proper buffer hooks and behavior for previews. (defalias 'preview-mode-setup #[0 "\306\300!\210\307\310\311\312\313\314$\210\310\315\316\313\314$\210 \204\317\n! \2030\320 \321\322\323\324\325 \326BBBBB#\210\f\205c\327\f!\313\330\331 \332Q\"\203I\333\211\224O\262\334\"\262\211A:\205a\335!\210\336pA@#\266\202\207" [desktop-save-buffer preview-tb-icon preview-tb-icon-specs LaTeX-mode-map buffer-file-name TeX-default-extension make-local-variable desktop-buffer-preview-misc-data add-hook pre-command-hook preview-mark-point nil t post-command-hook preview-move-point 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 preview-dumped-alist] 9 (#$ . 96199)]) #@161 Hook function for embedding the preview package into AUCTeX. This is called by `LaTeX-mode-hook' and changes AUCTeX variables to add the preview functionality. (defalias 'LaTeX-preview-setup #[0 "\305\300!\205 \306>?\205:\307\300\310\"\210\311\300\306\"\210\312 \313\n#\210\314\315!\210\316\317 \320\321$\210 \322=\2031\306 \210\305\304!\205:\323\f!\207" [LaTeX-mode-hook LaTeX-mode-map preview-map major-mode desktop-buffer-misc boundp preview-mode-setup remove-hook LaTeX-preview-setup add-hook define-key "" (lambda (def-tmp-var) (defvar preview-menu def-tmp-var #1="This is the menu for preview-latex.")) nil easy-menu-do-define preview-menu #1# ("Preview" "Generate previews" ["(or toggle) at point" preview-at-point] ["for environment" preview-environment] ["for section" preview-section] ["for region" preview-region mark-active] ["for buffer" preview-buffer] ["for document" preview-document] "---" "Remove previews" ["at point" preview-clearout-at-point] ["from section" preview-clearout-section] ["from region" preview-clearout mark-active] ["from buffer" preview-clearout-buffer] ["from document" preview-clearout-document] "---" "Turn preamble cache" ["on" preview-cache-preamble] ["off" preview-cache-preamble-off] "---" ("Customize" ["Browse options" (customize-group 'preview)] ["Extend this menu" (easy-menu-add-item nil '("Preview") (customize-menu-create 'preview))]) ["Read documentation" preview-goto-info-page] ["Report Bug" preview-report-bug]) latex-mode preview-buffer-restore] 5 (#$ . 97074)]) #@64 Cleans out a temporary DIR with preview image files. (fn DIR) (defalias 'preview-clean-subdir #[257 "\3001\301\302\303\304\305\304$\"\210\306!0\207\307\310\311!#\207" [(error) mapc delete-file directory-files t "\\`pr" delete-directory message "Deletion of `%s' failed: %s" error-message-string] 8 (#$ . 98606)]) #@179 Cleans out TOPDIR from temporary directories. This does not erase the directory itself since its permissions might be needed for colloborative work on common files. (fn TOPDIR) (defalias 'preview-clean-topdir #[257 "\300\301\3021\303\304\305\304$0\202\210\306\"\207" [mapc preview-clean-subdir (file-error) directory-files t "\\`tmp" nil] 8 (#$ . 98933)]) #@491 Create a temporary subdir for the current TeX process. If necessary, generates a fitting top directory or cleans out an existing one (if not yet visited in this session), then returns the name of the created subdirectory relative to the master directory, in shell-quoted form. `TeX-active-tempdir' is set to the corresponding TEMPDIR descriptor as described in `preview-make-filename'. The directory is registered in `preview-temp-dirs' in order not to be cleaned out later while in use. (defalias 'preview-create-subdirectory #[0 "\302\303\304!!\305!\203\211\235\204*\306!\210\211B\202*\307!\210\211\235\204*\211B\310\311\312\313#\210\314\302\315\316!\"\313\"\317E\320\316\303\304\313\"!\321 @!P!\207" [preview-temp-dirs TeX-active-tempdir expand-file-name TeX-active-master "prv" file-directory-p preview-clean-topdir make-directory add-hook kill-emacs-hook preview-cleanout-tempfiles t make-temp-file "tmp" file-name-as-directory 0 shell-quote-argument file-name-nondirectory] 6 (#$ . 99302)]) #@55 Extract counter information from STRING. (fn STRING) (defalias 'preview-parse-counters #[257 "\301\211\302\303#=\203.\304\305\306\"\"\206!\305\306\"CB\211\262@\305\307\"\241\210\307\225\262\202\207" [preview-parsed-counters 0 string-match " *\\({\\([^{}]+\\)}{[-0-9]+}\\)" assoc match-string 2 1] 8 (#$ . 100324)]) #@50 Build tightpage vector from STRING, (fn STRING) (defalias 'preview-parse-tightpage #[257 "\300\301\302Q!\207" [read "[" "]"] 5 (#$ . 100661)]) (defvar preview-parse-variables '(("Fontsize" preview-parsed-font-size "\\` *\\([0-9.]+\\)pt\\'" 1 string-to-number) ("Magnification" preview-parsed-magnification "\\` *\\([0-9]+\\)\\'" 1 string-to-number) ("PDFoutput" preview-parsed-pdfoutput "" 0 stringp) ("Counters" preview-parsed-counters ".*" 0 preview-parse-counters) ("Tightpage" preview-parsed-tightpage "\\` *\\(-?[0-9]+ *\\)\\{4\\}\\'" 0 preview-parse-tightpage))) #@231 Turn STRING with potential ^^ sequences into a regexp. To preserve sanity, additional ^ prefixes are matched literally, so the character represented by ^^^ preceding extended characters will not get matched, usually. (fn STRING) (defalias 'preview-error-quote #[257 "\302\211\303 \"\262\304\305\"\203@\211\306\307\310\224\311ZO!\312\306\310\224\311Z\307\225O!\313\314\315\310\224H\316\"!\317\260Q\262\307\225\302O\262\202 \211\306!P\262)\207" [case-fold-search buffer-file-coding-system nil preview--decode-^^ab string-match "\\^\\{2,\\}\\([@-_?]\\)" regexp-quote 0 1 2 "\\(?:" "\\|" char-to-string logxor 64 "\\)"] 11 (#$ . 101239)]) #@164 Decode ^^ sequences in STRING with CODING-SYSTEM. Sequences of control characters such as ^^I are left untouched. Return a new string. (fn STRING CODING-SYSTEM) (defalias 'preview--decode-^^ab #[514 "\300\301\302\"\2033\211\303\211\224O\304 \305\306\"\216\307\310\303\"!)\262\311\"\262Q\262\303\225\312O\262\202\211P\207" ["" string-match "[^[:multibyte:]]+" 0 match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] preview--convert-^^ab match-string decode-coding-string nil] 10 (#$ . 101898)]) #@144 Convert ^^ sequences in STRING to raw 8bit. Sequences of control characters such as ^^I are left untouched. Return a new string. (fn STRING) (defalias 'preview--convert-^^ab #[257 "\300\301\302\"\203+\211\303\211\224O\304\303\224\305\\\303\225O\306\"\307!\262Q\262\303\225\310O\262\202\211P\207" ["" string-match "\\^\\^[8-9a-f][0-9a-f]" 0 string-to-number 2 16 byte-to-string nil] 8 (#$ . 102447)]) #@348 Turn all preview snippets into overlays. This parses the pseudo error messages from the preview document style for LaTeX. OPEN-CLOSURE is called once it is certain that we have a valid output file, and it has to return in its CAR the PROCESS parameter for the CLOSE call, and in its CDR the final stuff for the placement hook. (fn OPEN-CLOSURE) (defalias 'preview-parse-messages #[257 "\306\307C\310\311#\216\211\312 \240\210\313\314\306\"\210\307\211\211C\307C\307C\307C\307C\315C\307C\316C\307C\307C\307C\307C\307C\307C\307\211C\307p\307C\307C\307C\307C\307\211\211\211\211\211\2116789:\211\203n\211@\211A@\307L\210A\266\202\202[\210eb\210\310\317&\216\320\321\307\322#\203\333\323\324!\240\210\325\224\2032\326\327!\203#\242\203\3379\204\322\3079B9\3078B88@\204\3379\242\240\210\330\331\325!!\240\210\331\324!\332\230?\205\n\331\333!\203 \334\335\331\333!\331\336!\331\337!E\"\202\n\322\240\210\334\340;\"\240\210`\240\210\307\210\320\341\307\322#\205,\330\331\325!!\240\210 \242\2059\331\342!\240\210\n\242\205N\333\224\342\225\315\224Z\\\333\225{\240\2108@\206W\315\262\n9@\240\210\242;\203\241\242\343\230\204w\344\242!\203\241\242\204\305\212 )\240\210<\240\210=<\203\225=\202\230=C\211\203\304\211@\2119\205\246\211\345N\211\203\266\211\242C\244\240\266\202\275C\244\262\210A\266\202\202\230\210\2426\242  \242\3461\344\212\347\350\")0\210\202\352\351\352\"\2666\240\210 \240\210 \262\n \240\210\353\242\242 \\\242\242\242\242\242&\n\242B\240\210\202\241\307y\210\320\354\307\322#\210\324y\210\202\241\342\224\203L\323\342!9B9\3078B8\342\225b\210\202\241\333\224\203k9G\325V\203c9A98A8\315\224Tb\210\202\241\336\224\203{\330\331\336!!C8\202\241\337\224\203\211\323\337!C9\202\241\355\224\203\241\356\323\355!:\"\315\224\357\224Z\323\357!\211GZ\360U\203\271\361\362!\210\211G[\262\211\323\325!P\262\202\235\203\326\363\3248\"\203\326A@\3338\323\3428\"!L\210\266\202\241\242?\205\345\364\365!.\n\266\232)\207" [default-directory TeX-translate-location-string TeX-translate-location-context TeX-translate-location-offset TeX-translate-location-error TeX-translate-location-line "locating previews..." nil make-closure #[0 "\300\205\301\242\203\302\303\301\242\"\207\302\304!\207" [V0 V1 message #1="%s" nil] 3] current-message message #1# 0 "" #[0 "\325\326\322\323#\216\212\316\211\242\237\240\210\32710\324\242\211\205)\211@\316\212\316\242!)\240\210A\266\202\202\2620\210\2026\330\331\"\266\300\332\240\210\316\242\211\205\377\211@\305\300\242\240\210\303\332H\240\210\304\333H\240\210\314\334H\240\210\315\335H\240\210\300\336H\240\210\301\337H\240\210\302\340H\240\210\307\242\303\242\230\204\230\303\242\341\230\203\212r\317q\210<)\202\221\342\343\303\242\320\"!q\210\307\303\242\240\210\212\214~\210\344\314\242!\203\273\314\242b\210\312\344\315\242!\203\264\315\242\202\266\345 \240\210\202xp\311\242=\203\365\310\242\304\242X\203\365\312\242b\210\310\242\304\242U\204\375=\346=\203\353\347\350\351\352\304\242\310\242Z$\210\202\375\304\242\310\242Zy\210\202\375eb\210\304\242Sy\210\312`\240\210\353\314\242\315\242P\354 \346#\203\315\242G\206\333[u\210\202x\355\356\314\357\314\242!\240\360\315\357\315\242!\240R\354 \346#\2039\333\225b\210\202x\355\356\361\362\314\242\"\203N\314\211\242\332\225\351O\240\202P\314\242\360\361\363\315\242\"\205a\315\211\242\332\211\224O\240R\354 \346#\203p\333\225b\210\202x\355\314\242\354 \346#\210\310\304\242\240\210\311p\240\210\301\242\203\325\306\242\203\276\300\242\305\242U\203\276\322\364\300\242\212\365`\306\242b\210\306\242U!\210`)`\366\301\242!\313\242\302\242B\321\242\323\242A&\322\242\244\240\210\202\316r\317q\210\330\367\370\371\300\242\"D\372\"\210)\306\351\240\210\202\367\306`\240\210\313\302\242\240\210\300\242\305\242TY\204\367r\317q\210\330\367\370\373\300\242\"D\372\"\210)*A\266\202\202<\262*\207" [V0 V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 make-closure #[0 "\302\303\301\242@\300\242#\207" [V0 V1 preview-call-hook close] 4] (error) preview-log-error "Fast translation hook" 0 1 2 3 4 5 6 "" find-file-noselect expand-file-name number-or-marker-p line-beginning-position t re-search-forward "[\n ]" nil end search-forward line-end-position search-forward-regexp "\\(" preview-error-quote "\\)" string-match "^[^-]\\{1,6\\}" "[^-]\\{1,6\\}$" preview-place-preview preview-back-command preview-TeX-bb error format "End of Preview snippet %d unexpected" "Parser" "Preview snippet %d out of sequence" TeX-command-buffer selective-display] 11] re-search-forward "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|(\\(/*\\(?:\\.+[^() \n{} /]*\\|[^() \n{} ./]+\\(?: [^() \n{} ./]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)\\(?:/+\\(?:\\.+[^() \n{} /]*\\|[^() \n{} ./]+\\(?: [^() \n{} ./]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)?\\)*\\))*\\(?: \\| ?$\\)\\|\\()+\\)\\| !\\(?:offset(\\([---0-9]+\\))\\|name(\\([^)]+\\))\\)\\|^Preview: \\([a-zA-Z]+\\) \\([^\n ]*\\) ?$" t match-string-no-properties 2 1 looking-at "\\(?:Preview\\|Package Preview Error\\): Snippet \\([---0-9]+\\) \\(started\\|ended\\(\\.? *(\\([---0-9]+\\)\\+\\([---0-9]+\\)x\\([---0-9]+\\))\\)?\\)\\." string-to-number match-string "started" 4 mapcar #[257 "\300 \301!_\207" [preview-get-magnification string-to-number] 4 "\n\n(fn X)"] 5 6 cdr "^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\(?:\\^*\\(?:[89a-f][0-9a-f]\\|[]@-\\_?]\\)\\|[0-9a-f]?\\)\\)?\\([^\n ]*?\\) ?\n\\([^\n ]*?\\)\\(\\(?:\\^+[89a-f]?\\)?\\.\\.\\.\\)? ?$" 3 "" TeX-match-extension TeX-translate-via-list (error) mapc funcall preview-log-error "Translation hook" vector "^l\\.[0-9]" 7 assoc 8 79 search-forward-regexp "^\\([^\n ]*\\) ?$" string-match error "LaTeX found no preview images" TeX-translate-location-file case-fold-search TeX-error-offset TeX-error-file preview-parse-variables preview-parsed-counters TeX-active-tempdir TeX-translate-location-hook] 52 (#$ . 102868)]) (defalias 'preview-get-dpi #[0 "\300\301!\203(\301 \302\236A\211@A@\303\236AAA\211@A@\304_\245\304_\245B\207\304\305 _\306 \245\304\307 _\310 \245B\207" [fboundp frame-monitor-attributes mm-size geometry 25.4 display-pixel-width display-mm-width display-pixel-height display-mm-height] 10]) #@146 Transfer display geometry parameters from current display. Returns list of scale, resolution and colors. Calculation is done in current buffer. (defalias 'preview-get-geometry #[0 "\3051+\306!\307 \310 E\211A@A\311\312\313\314#\315\245_\316\317!\316\320!\316\321!)\211\2620\207\322\323\324!\"\207" [preview-scale-function preview-min-spec preview-icon preview-error-icon preview-nonready-icon (error) preview-hook-enquiry preview-get-dpi preview-get-colors preview-inherited-face-attribute preview-reference-face :height default 720.0 preview-make-image preview-icon-specs preview-error-icon-specs preview-nonready-icon-specs error "Display geometry unavailable: %s" error-message-string] 6 (#$ . 109256)]) #@145 Set geometry variables from GEOMETRY. Buffer-local `preview-scale', `preview-resolution', and `preview-colors' are set as given. (fn GEOMETRY) (defalias 'preview-set-geometry #[257 "\211@\211A@\3038\211\207" [preview-scale preview-resolution preview-colors 2] 3 (#$ . 109979)]) #@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 #[0 "\301\302\303\304\305#!\301\302\303\306\305#!\307 \310\232\203\311\262\312\232\203\"\311\262\247\2032\211:\2032\211@\250\2045\311\262\313$\207" [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] 8 (#$ . 110269)]) #@26 Start a DviPNG process.. (defalias 'preview-start-dvipng #[0 "\306@\307 !_\310 \245\311\312\"\313\n\"r q\210\314\f!\315R \262)db\210\316\317\320\321\322%\210\320 \323!\"\203l\324\320p#$%%\203L%!\210\325!\210\326\327\"\210\330\331\"\210\332!d\306\223\210\211&B&\333\334!\210\207\335'\336 \210\337#\306p\306$&\207" [preview-resolution preview-scale preview-colors TeX-command-buffer preview-dvipng-command TeX-active-tempdir nil preview-hook-enquiry preview-get-magnification format " -D%d " preview-dvipng-color-string TeX-command-expand " " insert-before-markers "Running `" "Preview-DviPNG" "' with ``" "''\n" #[514 "\300\301\"\207" [message "%s: done."] 5 "\n\n(fn PROCESS NAME)"] start-process TeX-command-mode-line set-process-filter TeX-command-filter set-process-sentinel TeX-command-sentinel process-mark sit-for 0 ": run" force-mode-line-update call-process mode-name TeX-sentinel-function TeX-process-asynchronous TeX-shell TeX-shell-command-option TeX-after-start-process-function compilation-in-progress mode-line-process] 12 (#$ . 110929)]) #@83 Start a DviPS process. If FAST is set, do a fast conversion. (fn &optional FAST) (defalias 'preview-start-dvips #[256 "\306rq\210\307\203 \202\n! \262)\205!\310\211\311\"\"db\210\312\313\314\315\316%\210\314\317\203j\320\314p% \203J !\210\321!\210\322\323\"\210\324\325\"\210\326!d\306\223\210\211!B!\327\330!\210\207\331\"\332 \210\333\306p\306&\207" [TeX-command-buffer preview-fast-dvips-command preview-dvips-command TeX-active-tempdir preview-ps-file mode-name nil TeX-command-expand preview-make-filename "preview.ps" insert-before-markers "Running `" "Preview-DviPS" "' with ``" "''\n" #[514 "\300\301\"\207" [message "%s: done."] 5 "\n\n(fn PROCESS NAME)"] start-process TeX-command-mode-line set-process-filter TeX-command-filter set-process-sentinel TeX-command-sentinel process-mark sit-for 0 ": run" force-mode-line-update call-process TeX-sentinel-function TeX-process-asynchronous TeX-shell TeX-shell-command-option TeX-after-start-process-function compilation-in-progress mode-line-process] 10 (#$ . 112021)]) #@26 Start a PDF2DSC process. (defalias 'preview-start-pdf2dsc #[0 "\306\211r q\210\307\n! \262@\310\311\"\262)\312\313\211\314\"\"\"db\210\315\316\317\320\321%\210\317\322 \203l\323\317p!\"%#\203L#!\210\324!\210\325\326\"\210\327\330\"\210\331!d\306\223\210\211$B$\332\333!\210\207\334%\335 \210\336!\306p\306\"&\207" [preview-gs-file TeX-command-buffer preview-pdf2dsc-command TeX-active-tempdir preview-ps-file mode-name nil TeX-command-expand "pdf" t preview-attach-filename preview-make-filename "preview.dsc" insert-before-markers "Running `" "Preview-PDF2DSC" "' with ``" "''\n" #[514 "\300\301\"\207" [message "%s: done."] 5 "\n\n(fn PROCESS NAME)"] start-process TeX-command-mode-line set-process-filter TeX-command-filter set-process-sentinel TeX-command-sentinel process-mark sit-for 0 ": run" force-mode-line-update call-process TeX-sentinel-function TeX-process-asynchronous TeX-shell TeX-shell-command-option TeX-after-start-process-function compilation-in-progress mode-line-process] 11 (#$ . 113098)]) #@142 Sentinel function for preview. See `TeX-sentinel-function' and `set-process-sentinel' for definition of PROCESS and NAME. (fn PROCESS NAME) (defalias 'preview-TeX-inline-sentinel #[514 "\203\300!\210\301!\211\302>\203\303!\210\211\304=\205V\212db\210\305y\210\306\307\310\311#\2033\312\313\311\211#\210\202>\306\314\310\311#\203>\315c\210)\3161K\317\320!0\210\202S\321\322#\266\323!\207" [TeX-format-mode-line process-status (signal exit) delete-process exit -1 search-forward "abnormally with code 1" nil t replace-match "as expected with code 1" "finished" " with nothing to show" (error) preview-call-hook open preview-log-error "LaTeX" preview-reraise-error] 8 (#$ . 114156)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable preview-format-extensions funcall function #[0 "\300\207" [(".fmt" ".efmt")] 1] "Possible extensions for format files.\nThose are just needed for cleanup." :group preview-latex :type (repeat string)] 8) #@152 Kill a cached format. FORMAT-CONS is intended to be an element of `preview-dumped-alist'. Tries through `preview-format-extensions'. (fn FORMAT-CONS) (defalias 'preview-format-kill #[257 "\211\205 \211@\3011\302\303@P!!0\210\202\210A\266\202\202\207" [preview-format-extensions (file-error) delete-file preview-dump-file-name] 7 (#$ . 115154)]) #@61 Make a file name suitable for dumping from FILE. (fn FILE) (defalias 'preview-dump-file-name #[257 "\211\203#\300!\301\302!\262\303\304\"\203 \305\306\307\211$\262\202 Q\207\310\207" [file-name-directory "prv_" file-name-nondirectory string-match " " replace-match "_" t "prv_texput"] 8 (#$ . 115517)]) #@314 Perform replacements in string. STRING is the input string, REPLACEMENTS is a list of replacements. A replacement is a cons-cell, where the car is the match string, and the cdr is a list of strings or symbols. Symbols get dereferenced, and strings get evaluated as replacement strings. (fn STRING REPLACEMENTS) (defalias 'preview-do-replacements #[514 "C\301\211\203:\211A\262\242\262\2119\203\"\302\242J\"\240\210\202\303@\242\"\203\304\305\306\"A\307#\240\210\202)\210\211\242\207" [case-fold-search nil preview-do-replacements string-match mapconcat make-closure #[257 "\2119\203\211J\207\301\302\303\300\242$\207" [V0 replace-match t nil] 6 "\n\n(fn X)"] ""] 9 (#$ . 115839)]) #@97 This replacement places `"\pdfoutput=0 "' after the options of any command starting with `pdf'. (defconst preview-LaTeX-disable-pdfoutput '(("\\`\\(pdf[^ ]*\\)\\(\\( +[-&]\\([^ \"]\\|\"[^\"]*\"\\)*\\| +\"[-&][^\"]*\"\\)*\\)\\(.*\\)\\'" "\\1\\2 \"\\\\pdfoutput=0 \" \\5")) (#$ . 116553)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable preview-LaTeX-command-replacements funcall function #[0 "\300\207" [nil] 1] "Replacement for `preview-LaTeX-command'.\nThis is passed through `preview-do-replacements'." :group preview-latex :type (repeat (choice (symbol :tag "Named replacement" :value preview-LaTeX-disable-pdfoutput) (cons (string :tag "Matched string") (repeat :tag "Concatenated elements for replacement" (choice (symbol :tag "Variable with literal string") (string :tag "non-literal regexp replacement"))))))] 8) #@43 Format name when enabling preamble cache. (defvar preview-format-name nil (#$ . 117418)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\207" [custom-declare-variable preview-dump-replacements funcall function #[0 "\300\207" [(preview-LaTeX-command-replacements ("\\`\\([^ ]+\\)\\(?: +\\(?:\\(--?kanji[= ][^ ]+\\)\\|\\(--?output-directory[= ][^ ]+\\)\\|-\\(?:[^ \\\"]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*\\(.*\\)\\'" "\\1 -ini \\2 \\3 -interaction=nonstopmode \"&\\1\" " preview-format-name ".ini \\4"))] 1] "Generate a dump command from the usual preview command." :group preview-latex :type (repeat (choice (symbol :tag "Named replacement") (cons string (repeat (choice symbol string))))) preview-undump-replacements #[0 "\300\207" [(("\\`\\([^ ]+\\)\\(?: +\\(?:\\(--?kanji[= ][^ ]+\\)\\|\\(--?output-directory[= ][^ ]+\\)\\|-\\(?:[^ \\\"]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*.* \"\\\\input\" \"\\\\detokenize{\" \\(.*\\) \"}\"\\'" "\\1 \\2 \\3 -interaction=nonstopmode -file-line-error " preview-format-name " \"/AUCTEXINPUT{\" \\4 \"}\""))] 1] "Use a dumped format for reading preamble." (repeat (choice (symbol :tag "Named replacement") (cons string (repeat (choice symbol string)))))] 8) #@291 Dump a pregenerated format file. For the rest of the session, this file is used when running on the same master file. Returns the process for dumping, nil if there is still a valid format available. If FORMAT-CONS is non-nil, a previous format may get reused. (fn &optional FORMAT-CONS) (defalias 'preview-cache-preamble #[256 "\211C\306\307\310\311\312!!!\311 \307!\313\310\314!!!\307\311\315!!\316\317\320\n!! \"\306\242A:\2055\211\242A@\230?\205\242\204E\321 \"\240\210\242\203S\322\242!\210\202]C\240\210\242 B\323\324\306#\210\325\311!\210\326\"\327\330\331\315#\210\332\333%*\207" [TeX-current-process-region-p preview-format-name preview-LaTeX-command preview-dump-replacements preview-auto-cache-preamble preview-dumped-alist nil expand-file-name preview-dump-file-name TeX-master-file "ini" shell-quote-argument file-name-nondirectory t preview-do-replacements TeX-command-expand preview-string-expand assoc preview-cache-preamble-off write-region "\\let\\PREVIEWdump\\dump\\def\\dump{%\n\\edef\\next{{\\ifx\\pdfoutput\\undefined\\else\\pdfoutput=\\the\\pdfoutput\\relax\\fi\\the\\everyjob}}\\everyjob\\next\\catcode`\\ 10 %\n\\catcode`/ 0 %\n\\def\\AUCTEXINPUT##1{\\catcode`/ 12\\relax\\catcode`\\ 9\\relax\\input\\detokenize{##1}\\relax}%\n\\let\\dump\\PREVIEWdump\\dump}\\input mylatex.ltx \\relax%\n" TeX-save-document preview-generate-preview add-hook kill-emacs-hook preview-cleanout-tempfiles make-closure #[514 "\3041+\305!\306=\203\307!\310U\203\311\302\303\300\242#\210\202#\312\300\242!\210\313\301!0\210\2022\314\315#\266\316!\207" [V0 V1 V2 V3 (error) process-status exit process-exit-status 0 preview-watch-preamble preview-format-kill delete-file preview-log-error "Dumping" preview-reraise-error] 7 "\n\n(fn PROCESS STATUS)"] TeX-sentinel-function] 14 (#$ . 118666) nil]) #@190 Clear the pregenerated format file. The use of the format file is discontinued. OLD-FORMAT may already contain a format-cons as stored in `preview-dumped-alist'. (fn &optional OLD-FORMAT) (defalias 'preview-cache-preamble-off #[256 "\211\204\301\302 !\303\"\206\211CB\211@\262\262\304!\210\305!\210\211\306\241\207" [preview-dumped-alist expand-file-name TeX-master-file assoc preview-unwatch-preamble preview-format-kill nil] 5 (#$ . 120524) nil]) #@62 Run preview on region between BEGIN and END. (fn BEGIN END) (defalias 'preview-region #[514 "\306!P\307\310 !\311\"\n\203\312\n!\202\313\314!$\210)\315\316\310 \317\320\321\f!! \"\"\207" [TeX-region-extra TeX-default-extension buffer-file-name TeX-current-process-region-p preview-LaTeX-command preview-LaTeX-command-replacements preview--counter-information TeX-region-create TeX-region-file buffer-substring-no-properties file-name-nondirectory "" TeX-current-offset t preview-generate-preview preview-do-replacements TeX-command-expand preview-string-expand] 8 (#$ . 120992) "r"]) #@32 Run preview on current buffer. (defalias 'preview-buffer #[0 "\300ed\"\207" [preview-region] 3 (#$ . 121601) nil]) #@405 Skip preamble for the sake of predumped formats. Helper function of `TeX-region-create'. If REGION-TEXT doesn't contain preamble, it returns nil. Otherwise, it returns cons (ALTERED-TEXT . ALTERED-OFFSET) where ALTERED-TEXT is REGION-TEXT without the preamble part and ALTERED-OFFSET is REGION-OFFSET increased by the number of lines of the preamble part of REGION-TEXT. (fn REGION-TEXT REGION-OFFSET) (defalias 'preview--skip-preamble-region #[514 "\301\"\205(\302\225\303O\304\305\306\"r\211q\210\307\310\"\216\302\211\225Oc\210\311 \\*\262B\207" [TeX-header-end string-match 0 nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] TeX-current-offset] 7 (#$ . 121723)]) #@33 Run preview on master document. (defalias 'preview-document #[0 "\303\304!\210\305\306\304 \307\310\311 !!\n\"\"\207" [TeX-current-process-region-p preview-LaTeX-command preview-LaTeX-command-replacements TeX-save-document TeX-master-file nil preview-generate-preview preview-do-replacements TeX-command-expand preview-string-expand] 6 (#$ . 122473) nil]) #@253 Run preview on LaTeX environment. This avoids running environments through preview that are indicated in `preview-inner-environments'. If you use a prefix argument COUNT, the corresponding level of outward nested environments is selected. (fn COUNT) (defalias 'preview-environment #[257 "\212\301S\302\211W\203%\301\303 \262\304\230\203\305\306!\210\307 \266\211T\262\202\266\303 \211\262\235\2037\307 \210\202'\211\304\230\203A\305\306!\210\310\212\307 \210`)\212\311 \210`)\"\262)\207" [preview-inner-environments nil 0 LaTeX-current-environment "document" error "No enclosing outer environment found" LaTeX-find-matching-begin preview-region LaTeX-find-matching-end] 7 (#$ . 122837) "p"]) #@31 Run preview on LaTeX section. (defalias 'preview-section #[0 "\212\300 \210\301\302 \303 \")\207" [LaTeX-mark-section preview-region region-beginning region-end] 3 (#$ . 123555) nil]) #@147 Generate a preview. FILE the file (without default extension), COMMAND is the command to use. It returns the started process. (fn FILE COMMAND) (defalias 'preview-generate-preview #[514 "\304 p\305\306!B\307 \310!\311\"C\312\242\204, \313=\203&\314\315!\202' B\240B\242A\203W\312\316\242!\262\211\203V \317\320      \n & \262)\211\206m\321\n \242  &\207" [preview-dumped-alist preview-auto-cache-preamble TeX-current-process-region-p TeX-sentinel-function preview-get-geometry TeX-active-master file-name-nondirectory TeX-master-file expand-file-name assoc nil ask y-or-n-p "Cache preamble? " preview-cache-preamble make-closure #[514 "\307\"\210\310\301\300\304\303\306\242\305\302\311 &\207" [V0 V1 V2 V3 V4 V5 V6 V7 TeX-inline-preview-internal buffer-string] 11 "\n\n(fn PROCESS STRING)"] TeX-inline-preview-internal] 20 (#$ . 123746)]) #@361 Internal stuff for previewing. COMMAND and FILE should be explained in `TeX-command-list'. PR-FILE is the target file name in the form for `preview-gs-file'. COMMANDBUFF, DUMPED-CONS, MASTER, and GEOMETRY are internal parameters, STR may be a log to insert into the current log. (fn COMMAND FILE PR-FILE COMMANDBUFF DUMPED-CONS MASTER GEOMETRY &optional STR) (defalias 'TeX-inline-preview-internal #[2055 "q\210\306\307\310\311\312\313\314\"!!P!\315 !\316\317\320\"\210\321\322A:\203)\323\n\n\"\202+  #\3241n\203M\212eb\210c\210\325!eU\203L\325!`\326\223\210)\327!\210\330\331 \210\332 \203d\211\202j\333\322 #0\202}\334\335#\210\336!\210\337!\262*\207" [preview-format-name process-environment preview-undump-replacements preview-gs-file TeX-sentinel-function TeX-parse-function shell-quote-argument "&" preview-dump-file-name file-name-sans-extension TeX-master-file "prv" t copy-sequence setenv "max_print_line" "1000" TeX-run-command "Preview-LaTeX" preview-do-replacements (error) process-mark nil preview-set-geometry preview-TeX-inline-sentinel TeX-parse-reset TeX-parse-TeX TeX-synchronous-sentinel preview-log-error "Preview" delete-process preview-reraise-error TeX-process-asynchronous] 15 (#$ . 124638)]) #@73 Preview version. If not a regular release, the date of the last change. (defconst preview-version AUCTeX-version (#$ . 125895)) #@61 Preview release date using the ISO 8601 format, yyyy-mm-dd. (defconst preview-release-date AUCTeX-date (#$ . 126029)) #@15 (fn BUFFER) (defalias 'preview-dump-state #[257 "\3001E\301\302p\"\204r\211q\210\303 )\262\304!\205C\305c\210\306!\307W\203,\310!\210\202A\310\311\312#\210\313c\210\310\306!\312Z\306!#\210\314c0\207\210\315\207" [(error) local-variable-p TeX-command-buffer TeX-active-buffer bufferp "\nRun buffer contents:\n\n" buffer-size 5000 insert-buffer-substring 1 2500 "...\n\n[...]\n\n ..." "\n" nil] 6 (#$ . 126153)]) #@44 Report a bug in the preview-latex package. (defalias 'preview-report-bug #[0 "\302\303\304 \305p\306\307\"\262\310\311&)\207" [reporter-prompt-for-summary-p preview-version "Bug report subject: " reporter-submit-bug-report "bug-auctex@gnu.org" (AUCTeX-version LaTeX-command-style image-types preview-image-type preview-image-creators preview-dvipng-image-type preview-dvipng-command preview-pdf2dsc-command preview-gs-command preview-gs-options preview-gs-image-type-alist preview-fast-conversion preview-prefer-TeX-bb preview-dvips-command preview-fast-dvips-command preview-scale-function preview-LaTeX-command preview-required-option-list preview-preserve-counters preview-default-option-list preview-default-preamble preview-LaTeX-command-replacements preview-dump-replacements preview-undump-replacements preview-auto-cache-preamble preview-TeX-style-dir) make-closure #[0 "\301\300!\207" [V0 preview-dump-state] 2] #[0 "\301\302\"c\210\303\304\305\304\306%\210\307c\207" [preview-gs-command format "\nOutput from running `%s -h':\n" call-process nil t "-h" "\n"] 6] "Remember to cover the basics. Including a minimal LaTeX example\nfile exhibiting the problem might help."] 8 (#$ . 126586) nil]) (provide 'preview)