;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\207" [require smie cl-lib custom-declare-group gle-mode nil "Major mode for GLE (Graphics Layout Engine) files." :group tools] 6) (defvar gle-mode-syntax-table (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\307#\210\301\311\312#\210\211\207" [make-syntax-table modify-syntax-entry 33 "<" 10 ">" 34 "\"" 39 92 "."] 5)) (defconst gle-syntax-propertize #[514 "b\210`W\205\300\301\302#\205\303\224\203N\304\305!\211A\306\233\241\210\307!\266\310\224\310\225\212\311\312\310\224!8)\2038\313\202>\310\224Tb\210\314\211\203I\315\316$\210\266\202\317\224\203\304\305!\211A\306\233\241\210\307!\266\303\224\303\225\314\211\203r\315\316$\210\315\303\224\303\225\320\302$\266\202\207" [re-search-forward "\\(\"\"\\|''\\)\\|\\(?:begin\\|end\\)[ ]+\\(\\sw+\\)" t 1 match-data ints 4 set-match-data 0 3 syntax-ppss (1) nil put-text-property syntax-table 2 gle-block-name] 10 "\n\n(fn START END)"]) (defvar gle--bloc-names '("box" "clip" "config" "contour" "fitz" "graph" "key" "length" "letz" "name" "object" "origin" "path" "rotate" "scale" "surface" "table" "tex" "texpreamble" "text" "translate")) (defvar gle-smie-grammar '((:smie-closer-alist (#1="begin" . "end ") (#2="if bloc" . "end ") (#3="sub" . #8="end ") (#4="for" . #9="next ") (#5="until" . "next") (#6="while" . #10="next") (#7="gsave" . #11="grestore")) ("step" 39 40) ("to" 5 4) ("=" 41 42) (#1# (43) 3) (#2# (44) 3) (#3# (45) 3) (#4# (46) 2) (#5# (47) 1) (#6# (48) 1) (#7# (49) 0) (";" 28 28) (#8# 3 (50)) (#9# 2 (51)) (#10# 1 (52)) ("else bloc" 17 16) (#11# 0 (53)))) #@39 Expects point to be right after `if`. (defalias 'gle-smie--disambiguate-if #[0 "\212\300 \301\211`X\203-\211\262\302d!\210`\303\304!\305V\204&\303\306!\305V\204&\307u\210`{\262\202\310\232\2037\311\2028\312\266\203)\207" [line-end-position nil forward-comment skip-syntax-forward "w_" 0 "." 1 "then" "if bloc" "if line"] 6 (#$ . 2089)]) (defalias 'gle-smie-forward-token #[0 "`\300d!\210\211\206\n`Sf\301=\204\"\211\302 W\203\"\211b\210\303y\210\304\202\273\212\305\306x\210`Sf\307>)\211\204V\310\306w\311U\204=\312\202\271m\203E\313\202\271\314\304!\204O\315\316!\210\303u\210\304\202\271`\310\306w\210`{\314\317!\203g\320\202\267\211\321\232\203\314\322!\203{\311\225b\210\323\202\267\211\202\267\211\324\232\203\227\314\322!\203\223\311\225b\210\325\202\267\211\202\267\211\326\232\203\242\327 \202\267\211\330\232\203\266\314\331!\203\262\332\202\267\333\202\267\211\262\262\207" [forward-comment 10 line-beginning-position 1 ";" " " nil (nil 10 59) "^ \n;!" 0 "" "" looking-at cl--assertion-failed (looking-at ";") "[ ]*=" "" "end" "[ ]+\\w+" "end " "next" "next " "if" gle-smie--disambiguate-if "else" "[ ]+if" "else line" "else bloc"] 5]) (defalias 'gle-smie-backward-token #[0 "`\300`[!\210\211\301 V\203\302\202\252`\303\304!\305\306x\210`{\212\307\306x\210`Sf\310>)\211\203L\311\232\203Lo\2039\202\250`Sf\312=\204E\313\314!\210\315u\210\302\202\250\203T\316\202\250\211\203\200\317\232\203h\212\320u\210\321 )\202\250\322\232\203|\303\323!\203x\324\202\250\325\202\250\202\250\212\307\306x\210`Sf\326>\205\222\327\330\331 \")\203\247\332\224b\210\320\224\203\243\333\202\250\334\202\250\335\266\204\207" [forward-comment line-end-position ";" looking-at "[ ]*=" "^ \n;" nil " " (nil 10 59) "" 59 cl--assertion-failed (eq (char-before) 59) -1 "" "if" 2 gle-smie--disambiguate-if "else" "else[ ]+if" "else line" "else bloc" (100 116) looking-back "^[ ]*\\(end\\|nex\\(t\\)\\)" line-beginning-position 1 "next " "end " ""] 8]) #@19 (fn KIND TOKEN) (defalias 'gle-smie-rules #[514 "B\211:\205F\211@\211\301=\203-A\211\302\232\205(\303\304\305\306\307\310\311\312&\205(\313!\262\202D\211\314=\203CA\211\315\232\205>\313\316!\262\202D\317\262\207" [smie-indent-basic :after ";" smie-rule-parent-p "for" "while" "until" "sub" "begin" "gsave" "if bloc" smie-rule-parent :before "else bloc" 0 nil] 13 (#$ . 4155)]) (defvar gle-font-lock-keywords (byte-code "\301\302\303\304\305\306\307\310BB!\311Q\312B\313\306!\311Q\314B\315BBBBBB\207" [gle--bloc-names ("^[ ]*\\(\\(?:\\sw\\|\\s_\\)+\\)[ ]*=" (1 font-lock-variable-name-face)) ("^[ ]*if[ ][^!\n;]*[ ]\\(then\\)\\_>" (1 font-lock-keyword-face)) ("^[ ]*for[ ][^!\n;]*[ ]\\(to\\)\\_>\\(?:[^!\n;]*[ ]\\(step\\)\\_>\\)?" (1 font-lock-keyword-face) (2 font-lock-keyword-face nil t)) ("^[ ]*else[ ]+\\(if\\)[ ][^!\n;]*[ ]\\(then\\)\\_>" (1 font-lock-keyword-face) (2 font-lock-keyword-face)) "^[ ]*end[ ]+\\(" regexp-opt "if" "sub" "\\_>\\)" ((1 font-lock-keyword-face)) "^[ ]*begin[ ]+\\(" ((1 font-lock-keyword-face)) (("^[ ]*sub[ ]*\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-function-name-face)) ("^[ ]*\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-keyword-face)))] 9)) (byte-code "\300\301\302\303\304DD\305\306\307%\207" [custom-declare-variable gle-program-name funcall function #[0 "\300\207" [#1="gle"] 1 #1#] "Name of the `gle' program." :type string] 6) (defvar gle--flymake-proc nil nil) (make-variable-buffer-local 'gle--flymake-proc) #@120 GLE backend for Flymake. See `flymake-diagnostic-functions' for documentation of REPORT-FN. (fn REPORT-FN &rest ARGS) (defalias 'gle--flymake #[385 "\302!\204\n\303\304!\210\305 !\203\306 !\210p\214~\210\307\310\311\312\313\314\315\316\317\320!\321\322\323E\324\325\326\327\330\331\"\332\"\333\334%&\f\335 ed#\210\336 !)\207" [gle-program-name gle--flymake-proc executable-find error "Cannot find `gle' executable" process-live-p delete-process make-process :name "gle-flymake" :noquery t :connection-type pipe :buffer generate-new-buffer " *gle-flymake*" :command "-nosave" "-" :sentinel make-byte-code 514 "\303!\304=\205\214\305\306\307\310\311\312!\313\"\314$\216r\301q\210\n)=\204)\315\316\"\210\202\206r\317!q\210eb\210\320\321\305\322#\203\205\323\324\325!!\324\326!\327\330\331\324\314!\227\"!\324\332!r\301q\210\212eb\210Sy\210\333\334 \322#\203o\335\301\307\224\307\225%\202{\336\305w\210\335\301`\334 %B\262*\266\2022))\300!\262\207" vconcat vector [gle--flymake-proc process-status exit nil make-byte-code 0 "\301\302\300!!\207" vconcat vector [kill-buffer process-buffer] 3 message "Skipping obsolete check for %s" process-buffer search-forward-regexp "^>> .*? (\\([0-9]+\\)) |\\(.*\\)|\n>>.*\n>> *\\(\\w+\\): *\\(.*\\)" t string-to-number match-string 1 2 intern format ":%s" 4 search-forward line-end-position flymake-make-diagnostic " "] 13 "\n\n(fn PROC EVENT)" process-send-region process-send-eof] 22 (#$ . 5650)]) (defvar gle-imenu-generic-expression '(("Funs" "^[ ]*sub[ ]+\\(\\(?:\\s_\\|\\sw\\)+\\)" 1) ("Vars" "^[ ]*\\(\\(?:\\s_\\|\\sw\\)+\\)[ ]*=" 1))) (defalias 'gle--capf-data #[0 "\212\301\302x\210\303\304\305 \"\205`\301\302w\210`E\266\202)\207" [gle--bloc-names "a-z" nil looking-back "^[ ]*\\(?:begin\\|end\\)[ ]+" line-beginning-position] 5]) #@16 (fn BEG END) (defalias 'gle--before-change-function #[514 "\303\304\"\205\255\3051\247\3061\244\307 \310\211\310\311\312\313\314\315!\316\"\317$\216\320\321T\304\"\322\304\"\323#\210\324\325\"\206J\324T\325\"\206J\212b\210\326\327\330 \")??\205\236\312\224\331\225\317\224\212\312\225b\210\332\333!\205\233\312\225Y\205\233\312\225\204~\211b\210\334\335!\210\336\337w\210\340\337w\210\202\211b\210\334\331!\210\336\337x\210\332\341{!!\205\231\342\343\344$\262)\266\203,\26200\2070\337\207\345\346\"\262\207" [buffer-undo-list inhibit-read-only inhibit-modification-hooks get-text-property gle-block-name (error) (scan-error) buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 remove-text-properties previous-single-property-change next-single-property-change (gle-block-name) get-char-property text-clones looking-back "^[ ]*\\(?:begi\\(n\\)\\|end\\)[ ]*\\([[:alnum:]]*\\)" line-beginning-position 1 looking-at "[[:alnum:]]" forward-sexp -1 "[:alnum:]" nil " " regexp-quote text-clone-create spread "[[:alnum:]]*" message "Error in gle--before-change-function %S"] 13 (#$ . 7478)]) (defvar gle--begend-default "graph") (put 'gle-insert-begin-end 'no-self-insert t) #@555 Insert a begin...end bloc. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'gle-insert-begin-end #[512 "\300\301#\207" [skeleton-proxy-new ((if (consp gle--begend-default) (car gle--begend-default) (let ((choice (completing-read (format "GLE begin name [%s]: " gle--begend-default) gle--bloc-names nil nil nil nil gle--begend-default))) (setq gle--begend-default choice) choice)) n "begin " str > n > _ n "end " str > n)] 6 (#$ . 8749) "*P\nP"]) (put 'gle-insert-sub 'no-self-insert t) #@553 Insert a sub...end bloc. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'gle-insert-sub #[512 "\300\301#\207" [skeleton-proxy-new (nil n "sub " > n > _ n "end sub" > n)] 6 (#$ . 9733) "*P\nP"]) (put 'gle-insert-if 'no-self-insert t) #@552 Insert a if...end bloc. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'gle-insert-if #[512 "\300\301#\207" [skeleton-proxy-new (nil n "if " @ " then" > n > _ n "else" > n > n "end if" > n)] 6 (#$ . 10465) "*P\nP"]) (put 'gle-insert-for 'no-self-insert t) #@554 Insert a for...next bloc. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'gle-insert-for #[512 "\300\301#\207" [skeleton-proxy-new ("GLE var name: " n "for " str " = " @ " to " @ " step 1" > n > _ n "next " str > n)] 6 (#$ . 11220) "*P\nP"]) (put 'gle-insert-while 'no-self-insert t) #@556 Insert a while...next bloc. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'gle-insert-while #[512 "\300\301#\207" [skeleton-proxy-new (nil n "while " > n > _ n "next" > n)] 6 (#$ . 12003) "*P\nP"]) (put 'gle-insert-until 'no-self-insert t) #@556 Insert a until...next bloc. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'gle-insert-until #[512 "\300\301#\207" [skeleton-proxy-new (nil n "until " > n > _ n "next" > n)] 6 (#$ . 12743) "*P\nP"]) (defvar gle--bloc-default "graph") #@109 Insert some bloc (begin..end, while...next, sub...end, ...). NAME is the kind of bloc to insert. (fn NAME) (defalias 'gle-insert-bloc #[257 "\211\301\232\203\n\302\303!\207\211\304\232\203\302\305!\207\211\306\232\203\302\307!\207\211\310\232\203(\302\311!\207\211\312\232\2032\302\313!\207\211C\302\314!)\207" [gle--begend-default "for" call-interactively gle-insert-for "if" gle-insert-if "until" gle-insert-until "sub" gle-insert-sub "while" gle-insert-while gle-insert-begin-end] 3 (#$ . 13476) (byte-code "\302\303\304\"\305\306\307\310\311 BBBBB\312\211\211\211&\211\211\262C\207" [gle--bloc-default gle--bloc-names completing-read format "GLE bloc name [%s]: " "for" "if" "until" "sub" "while" nil] 8)]) (put 'gle-insert-close 'no-self-insert t) #@589 Insert an end or next instruction to close the current bloc. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'gle-insert-close #[512 "\300\301#\207" [skeleton-proxy-new ((save-excursion (with-demoted-errors "Beginning not found!" (let* ((options (mapcar (lambda (tok) (assoc tok smie-grammar)) '("next" "next " "end "))) (closer (caar (sort options (lambda (o1 o2) (>= (cadr o1) (cadr o2)))))) (opener (smie-backward-sexp closer))) (pcase opener (`(,_ ,_ ,(or "while" "until")) "next") (`(,_ ,_ "if bloc") "end if") (`(,_ ,_ "sub") "end sub") (`(,_ ,_ "for") (looking-at "[[:alnum:]]*") (concat "next " (match-string 0))) (`(,_ ,_ "begin") (if (looking-at "begin[ ]+\\([[:alnum:]]+\\)") (concat "end " (match-string 1)) (message "Can't find bloc name after `begin'!"))) (_ (error "Unexpected beginning!")))))) n str > n)] 6 (#$ . 14250) "*P\nP"]) (defvar gle-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\211\207" [make-sparse-keymap define-key [3 5] gle-insert-close [3 15] gle-insert-bloc] 5)) (add-to-list 'auto-mode-alist '("\\.gle\\'" . gle-mode)) (defvar gle-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [gle-mode-hook variable-documentation put "Hook run after entering GLE mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp gle-mode-map definition-name gle-mode] 4) (defvar gle-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" [gle-mode-abbrev-table gle-mode-map variable-documentation put purecopy "Keymap for `gle-mode'." boundp gle-mode-syntax-table definition-name gle-mode (lambda (#1=#:def-tmp-var) (defvar gle-mode-syntax-table #1#)) make-syntax-table "Syntax table for `gle-mode'." (lambda (#1#) (defvar gle-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `gle-mode'." derived-mode-parent prog-mode] 5) #@234 Major mode to edit Graphics Layout Engine files. In addition to any hooks its parent mode `prog-mode' might have run, this mode runs the hook `gle-mode-hook', as the final or penultimate step during initialization. \{gle-mode-map} (defalias 'gle-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R 0=\204R\326 \3250C#\210\327 !\210\330\f!\210 0\306\331!\210\332\306\333!\2101\3342\335\336\337\340\341&\210\306\342!\210\343\"\306\344!\2103$\345\346\347\350\351$\210\345\352\353\350\351$\210\345\354\355\350\351$\210)\356\357!\207" [delay-mode-hooks major-mode mode-name gle-mode-map gle-mode-syntax-table gle-mode-abbrev-table make-local-variable t prog-mode gle-mode "GLE" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table comment-start "!" syntax-propertize-function smie-setup gle-smie-rules :forward-token gle-smie-forward-token :backward-token gle-smie-backward-token font-lock-defaults (gle-font-lock-keywords) imenu-generic-expression add-hook flymake-diagnostic-functions gle--flymake nil local completion-at-point-functions gle--capf-data before-change-functions gle--before-change-function run-mode-hooks gle-mode-hook local-abbrev-table gle-syntax-propertize gle-smie-grammar gle-imenu-generic-expression] 7 (#$ . 16924) nil]) (provide 'gle-mode)