| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/progmodes/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(defconst ps-mode-version "1.1i, 17 May 2008")
(defconst ps-mode-maintainer-address "Peter Kleiweg <p.c.j.kleiweg@rug.nl>, bug-gnu-emacs@gnu.org")
(byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\303\311\305\312\313\314\315\316\307\304& \210\303\317\305\320\315\321\307\304&\210\322\323\324\325#\210\326\327\330\331\332DD\333\307\311\334\335&\210\326\336\330\331\337DD\340\307\311\334\341&\210\326\342\330\331\343DD\344\307\311\334\331&\210\326\345\330\331\346DD\347\307\317\334\350&\210\326\351\330\331\352DD\353\307\317\334\354&\210\326\355\330\331\356DD\357\307\317\334\360&\210\326\361\330\331\362DD\363\307\317\334\364&\210\326\365\330\331\366DD\367\307\317\334\370&\210\326\371\330\331\372DD\373\307\317\334\374&\210\326\375\330\331\376DD\377\307\317\334\201@ &\207" [require comint smie custom-declare-group PostScript nil "PostScript mode for Emacs." :group languages PostScript-edit "PostScript editing." :link (custom-group-link :tag "Font Lock Faces group" font-lock-faces) :prefix "ps-mode-" PostScript-interaction "PostScript interaction." "ps-run-" make-obsolete-variable ps-mode-auto-indent electric-indent-mode "25.1" custom-declare-variable ps-mode-tab funcall function #[0 "\300\207" [4] 1 #1=""] "Number of spaces to use when indenting." :type integer ps-mode-paper-size #[0 "\300\207" [(595 842)] 1 #1#] "Default paper size.\n\nWhen inserting an EPSF template these values are used\nto set the boundingbox to include the whole page.\nWhen the figure is finished these values should be replaced." (choice (const :tag "letter" (612 792)) (const :tag "legal" (612 1008)) (const :tag "a0" (2380 3368)) (const :tag "a1" (1684 2380)) (const :tag "a2" (1190 1684)) (const :tag "a3" (842 1190)) (const :tag "a4" (595 842)) (const :tag "a5" (421 595)) (const :tag "a6" (297 421)) (const :tag "a7" (210 297)) (const :tag "a8" (148 210)) (const :tag "a9" (105 148)) (const :tag "a10" (74 105)) (const :tag "b0" (2836 4008)) (const :tag "b1" (2004 2836)) (const :tag "b2" (1418 2004)) (const :tag "b3" (1002 1418)) (const :tag "b4" (709 1002)) (const :tag "b5" (501 709)) (const :tag "archE" (2592 3456)) (const :tag "archD" (1728 2592)) (const :tag "archC" (1296 1728)) (const :tag "archB" (864 1296)) (const :tag "archA" (648 864)) (const :tag "flsa" (612 936)) (const :tag "flse" (612 936)) (const :tag "halfletter" (396 612)) (const :tag "11x17" (792 1224)) (const :tag "tabloid" (792 1224)) (const :tag "ledger" (1224 792)) (const :tag "csheet" (1224 1584)) (const :tag "dsheet" (1584 2448)) (const :tag "esheet" (2448 3168))) ps-mode-print-function #[0 "\300\207" [#[0 "\303\304>\203 \305\202\f \306\307 *\207" [system-type lpr-command lpr-switches nil (usg-unix-v hpux) "lp" "lpr" lpr-buffer] 3]] 1 #1#] "Lisp function to print current buffer as PostScript." ps-run-prompt #[0 "\300\207" ["\\(GS\\(<[0-9]+\\)?>\\)+"] 1 #1#] "Regexp to match prompt in interactive PostScript." regexp ps-run-font-lock-keywords-2 #[0 "\301\302\230?\205 \303!\304U\203 \202 \305P\306DC\307\"\207" [ps-run-prompt append #1# string-to-char 94 "^" (0 font-lock-function-name-face nil nil) ((">>showpage, press <return> to continue<<" (0 font-lock-keyword-face nil nil)) ("^\\(Error\\|Can't\\).*" (0 font-lock-warning-face nil nil)) ("^\\(Current file position is\\) \\([0-9]+\\)" (1 font-lock-comment-face nil nil) (2 font-lock-warning-face nil nil)))] 3 #1#] "Medium level highlighting of messages from the PostScript interpreter.\n\nSee documentation on font-lock for details." (repeat (list :tag "Expression with one or more highlighters" :value (#1# (0 default nil t)) (regexp :tag "Expression") (repeat :tag "Highlighters" :inline regexp (list :tag "Highlighter" (integer :tag "Subexp") face (boolean :tag "Override") (boolean :tag "Laxmatch" :value t))))) ps-run-x #[0 "\300\207" [("gs" "-r72" "-sPAPERSIZE=a4")] 1 #1#] "Command as list to run PostScript with graphic display." (repeat string) ps-run-dumb #[0 "\300\207" [("gs" "-dNODISPLAY")] 1 #1#] "Command as list to run PostScript without graphic display." (repeat string) ps-run-init #[0 "\300\207" [nil] 1 #1#] "String of commands to send to PostScript to start interactive.\n\nExample: \"executive\"\n\nYou won't need to set this option for Ghostscript." (choice (const nil) string) ps-run-error-line-numbers #[0 "\300\207" [nil] 1 #1#] "What values are used by the PostScript interpreter in error messages?" (choice (const :tag "line numbers" t) (const :tag "byte counts" nil)) ps-run-tmp-dir #[0 "\300\207" [nil] 1 #1#] "Name of directory to place temporary file.\nIf nil, use `temporary-file-directory'." (choice (const nil) directory)] 10)
#@56 Regexp of PostScript operators that will be fontified.
(defconst ps-mode-operators (byte-code "\300\301\302\303\"\304Q\207" [("clear" "mark" "cleartomark" "counttomark" "forall" "dict" "begin" "end" "def" "true" "false" "exec" "if" "ifelse" "for" "repeat" "loop" "exit" "stop" "stopped" "countexecstack" "execstack" "quit" "start" "save" "restore" "bind" "null" "gsave" "grestore" "grestoreall" "showpage") "\\_<" regexp-opt t "\\_>"] 5) (#$ . 4725))
#@49 Subdued level highlighting for PostScript mode.
(defconst ps-mode-font-lock-keywords-1 '(("\\`%!PS.*" (0 font-lock-constant-face t)) ("^%%BoundingBox:[ ]+-?[0-9]+[ ]+-?[0-9]+[ ]+-?[0-9]+[ ]+-?[0-9]+[ ]*$" (0 font-lock-constant-face t)) ("[\200-\377]+" (0 font-lock-warning-face prepend nil))) (#$ . 5183))
#@48 Medium level highlighting for PostScript mode.
(defconst ps-mode-font-lock-keywords-2 (byte-code "\302\303 P\304BC\"\207" [ps-mode-font-lock-keywords-1 ps-mode-operators append "\\(^\\|[^/\n]\\)" (2 font-lock-keyword-face)] 4) (#$ . 5500))
#@46 High level highlighting for PostScript mode.
(defconst ps-mode-font-lock-keywords-3 (byte-code "\302\303\304\305B\306 \307BF\"\207" [ps-mode-font-lock-keywords-1 ps-mode-operators append ("//\\(?:\\sw\\|\\s_\\)+" . font-lock-type-face) "^\\(/\\(?:\\sw\\|\\s_\\)+\\)\\_>\\([[ ]*\\(%.*\\)?
?$\\|[ ]*\\({\\|<<\\)\\|[ ]+[0-9]+[ ]+dict\\_>\\|.*\\_<def\\_>\\)" (1 font-lock-function-name-face) ("/\\(?:\\sw\\|\\s_\\)+" . font-lock-variable-name-face) font-lock-keyword-face] 7) (#$ . 5747))
#@54 Default expressions to highlight in PostScript mode.
(defconst ps-mode-font-lock-keywords ps-mode-font-lock-keywords-1 (#$ . 6243))
#@53 Subdued level highlighting for PostScript run mode.
(defconst ps-run-font-lock-keywords-1 (byte-code "\301\230?\205 \302!\303U\203 \202 \304P\305BC\207" [ps-run-prompt "" string-to-char 94 "^" font-lock-function-name-face] 2) (#$ . 6381))
#@58 Default expressions to highlight in PostScript run mode.
(defconst ps-run-font-lock-keywords ps-run-font-lock-keywords-1 (#$ . 6633))
#@41 Local keymap to use in PostScript mode.
(defvar ps-mode-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\207" [make-sparse-keymap define-key "" ps-run-boundingbox "" ps-mode-uncomment-region "" ps-mode-epsf-rich "" ps-run-start "" ps-run-region "" ps-run-quit "" ps-mode-print-buffer "" ps-mode-comment-out-region "" ps-run-kill "\n" ps-mode-other-newline "\f" ps-run-clear "" ps-run-buffer "" ps-mode-backward-delete-char] 5) (#$ . 6773))
#@45 Syntax table used while in PostScript mode.
(defvar ps-mode-syntax-table (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\305#\210\301\307\305#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\315#\210\301\317\315#\210\301\320\315#\210\301\321\315#\210\301\322\315#\210\301\323\315#\210\301\324\315#\210\301\325\315#\210\301\326\315#\210\301\327\315#\210\301\330\315#\210\301\331\315#\210\301\332\315#\210\301\333\315#\210\301\334\315#\210\301\335\336#\210\301\337\315#\210\301\340\315#\210\301\341\315#\210\301\342\315#\210\301\343\315#\210\207" [make-syntax-table modify-syntax-entry 37 "< " 10 "> " 13 12 60 "(>" 62 ")<" 33 "_ " 34 35 36 38 39 42 43 44 45 46 58 59 61 63 64 92 "\\" 94 95 96 124 126] 5) (#$ . 7449))
#@45 Local keymap to use in PostScript run mode.
(defvar ps-run-mode-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\207" [comint-mode-map make-sparse-keymap set-keymap-parent define-key "" ps-run-quit "" ps-run-kill "" ps-run-goto-error [mouse-2] ps-run-mouse-goto-error] 5) (#$ . 8227))
#@42 Name of temporary file, set by `ps-run'.
(defvar ps-mode-tmp-file nil (#$ . 8581))
#@66 Mark to start of region that was sent to PostScript interpreter.
(defvar ps-run-mark nil (#$ . 8670))
#@42 Parent window of interactive PostScript.
(defvar ps-run-parent nil (#$ . 8778))
(defconst ps-mode-menu-main '("PostScript" ["EPSF Template, Sparse" ps-mode-epsf-sparse t] ["EPSF Template, Rich" ps-mode-epsf-rich t] "---" ("Cookbook" ["RE" ps-mode-RE t] ["ISOLatin1Extended" ps-mode-latin-extended t] ["center" ps-mode-center t] ["right" ps-mode-right t] ["Heapsort" ps-mode-heapsort t]) ("Fonts (1)" ["Times-Roman" (insert "/Times-Roman ") t] ["Times-Bold" (insert "/Times-Bold ") t] ["Times-Italic" (insert "/Times-Italic ") t] ["Times-BoldItalic" (insert "/Times-BoldItalic ") t] ["Helvetica" (insert "/Helvetica ") t] ["Helvetica-Bold" (insert "/Helvetica-Bold ") t] ["Helvetica-Oblique" (insert "/Helvetica-Oblique ") t] ["Helvetica-BoldOblique" (insert "/Helvetica-BoldOblique ") t] ["Courier" (insert "/Courier ") t] ["Courier-Bold" (insert "/Courier-Bold ") t] ["Courier-Oblique" (insert "/Courier-Oblique ") t] ["Courier-BoldOblique" (insert "/Courier-BoldOblique ") t] ["Symbol" (insert "/Symbol") t]) ("Fonts (2)" ["AvantGarde-Book" (insert "/AvantGarde-Book ") t] ["AvantGarde-Demi" (insert "/AvantGarde-Demi ") t] ["AvantGarde-BookOblique" (insert "/AvantGarde-BookOblique ") t] ["AvantGarde-DemiOblique" (insert "/AvantGarde-DemiOblique ") t] ["Bookman-Light" (insert "/Bookman-Light ") t] ["Bookman-Demi" (insert "/Bookman-Demi ") t] ["Bookman-LightItalic" (insert "/Bookman-LightItalic ") t] ["Bookman-DemiItalic" (insert "/Bookman-DemiItalic ") t] ["Helvetica-Narrow" (insert "/Helvetica-Narrow ") t] ["Helvetica-Narrow-Bold" (insert "/Helvetica-Narrow-Bold ") t] ["Helvetica-Narrow-Oblique" (insert "/Helvetica-Narrow-Oblique ") t] ["Helvetica-Narrow-BoldOblique" (insert "/Helvetica-Narrow-BoldOblique ") t] ["NewCenturySchlbk-Roman" (insert "/NewCenturySchlbk-Roman ") t] ["NewCenturySchlbk-Bold" (insert "/NewCenturySchlbk-Bold ") t] ["NewCenturySchlbk-Italic" (insert "/NewCenturySchlbk-Italic ") t] ["NewCenturySchlbk-BoldItalic" (insert "/NewCenturySchlbk-BoldItalic ") t] ["Palatino-Roman" (insert "/Palatino-Roman ") t] ["Palatino-Bold" (insert "/Palatino-Bold ") t] ["Palatino-Italic" (insert "/Palatino-Italic ") t] ["Palatino-BoldItalic" (insert "/Palatino-BoldItalic ") t] ["ZapfChancery-MediumItalic" (insert "/ZapfChancery-MediumItalic ") t] ["ZapfDingbats" (insert "/ZapfDingbats ") t]) "---" ["Comment Out Region" ps-mode-comment-out-region (mark t)] ["Uncomment Region" ps-mode-uncomment-region (mark t)] "---" ["8-bit to Octal Buffer" ps-mode-octal-buffer t] ["8-bit to Octal Region" ps-mode-octal-region (mark t)] "---" ["Start PostScript" ps-run-start t] ["Quit PostScript" ps-run-quit (process-status "ps-run")] ["Kill PostScript" ps-run-kill (process-status "ps-run")] ["Send Buffer to Interpreter" ps-run-buffer (process-status "ps-run")] ["Send Region to Interpreter" ps-run-region (and (mark t) (process-status "ps-run"))] ["Send Newline to Interpreter" ps-mode-other-newline (process-status "ps-run")] ["View BoundingBox" ps-run-boundingbox (process-status "ps-run")] ["Clear/Reset PostScript Graphics" ps-run-clear (process-status "ps-run")] "---" ["Print Buffer as PostScript" ps-mode-print-buffer t] ["Print Region as PostScript" ps-mode-print-region (mark t)] "---" ["Customize for PostScript" (customize-group "PostScript") t] "---" ["Submit Bug Report" ps-mode-submit-bug-report t]))
#@18 PostScript Menu.
(defvar ps-mode-main nil (#$ . 12117))
(easy-menu-do-define 'ps-mode-main ps-mode-map "PostScript Menu." ps-mode-menu-main)
#@19
(fn KIND TOKEN)
(defalias 'ps-mode-smie-rules #[514 "B\211\301\267\202 \302\303!\205% \304\207\207\305\207\211:\205% \211\242\211\306=\205# \305\262\207" [ps-mode-tab #s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ((:after . "<") 9 (:elem . basic) 17 (:close-all . ">") 19)) smie-rule-next-p "<" 0 t :list-intro] 6 (#$ . 12264)])
(defvar ps-mode-hook nil)
(byte-code "\300\301N\204\f \302\300\301\303#\210\304\305!\204 \302\305\306\307#\210\300\207" [ps-mode-hook variable-documentation put "Hook run after entering PostScript mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp ps-mode-map definition-name ps-mode] 4)
(defvar ps-mode-map (make-sparse-keymap))
(byte-code "\301\302N\204 \303\301\302\304\305!#\210\306\307!\204 \303\307\310\311#\210\312\313 !\210\307\302N\204- \303\307\302\304\314!#\210\306\300!\204B \303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P \303\300\302\304\320!#\210\303\311\321\322#\207" [ps-mode-abbrev-table ps-mode-map variable-documentation put purecopy "Keymap for `ps-mode'." boundp ps-mode-syntax-table definition-name ps-mode (lambda (#1=#:def-tmp-var) (defvar ps-mode-syntax-table #1#)) make-syntax-table "Syntax table for `ps-mode'." (lambda (#1#) (defvar ps-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `ps-mode'." derived-mode-parent prog-mode] 5)
#@1027 Major mode for editing PostScript with GNU Emacs.
Entry to this mode calls `ps-mode-hook'.
The following variables hold user options, and can
be set through the `customize' command:
`ps-mode-tab'
`ps-mode-paper-size'
`ps-mode-print-function'
`ps-run-prompt'
`ps-run-font-lock-keywords-2'
`ps-run-x'
`ps-run-dumb'
`ps-run-init'
`ps-run-error-line-numbers'
`ps-run-tmp-dir'
Type \[describe-variable] for documentation on these options.
\{ps-mode-map}
When starting an interactive PostScript process with \[ps-run-start],
a second window will be displayed, and `ps-run-mode-hook' will be called.
The keymap for this second window is:
\{ps-run-mode-map}
When Ghostscript encounters an error it displays an error message
with a file position. Clicking mouse-2 on this number will bring
point to the corresponding spot in the PostScript window, if input
to the interpreter was sent from that window.
Typing \<ps-run-mode-map>\[ps-run-goto-error] when the cursor is at the number has the same effect.
(defalias 'ps-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204'