;ELC   
;;; Compiled
;;; in Emacs version 29.3
;;; with all optimizations.



(require 'cl-lib)
(custom-declare-face 'company-template-field '((((background dark)) (:background "yellow" :foreground "black")) (((background light)) (:background "orange" :foreground "black"))) "Face used for editable text in template fields." :group 'company-faces)
(defvar company-template-forward-field-item '(menu-item "" company-template-forward-field :filter company-template--keymap-filter))
(defvar company-template-nav-map (byte-code "\301 \302\303#\210\302\304#\210\207" [company-template-forward-field-item make-sparse-keymap define-key [tab] "	"] 5))
(defvar company-template-clear-field-item '(menu-item "" company-template-clear-field :filter company-template--keymap-filter))
(defvar company-template-field-map (byte-code "\302 \303\"\210\304\305	#\210\207" [company-template-nav-map company-template-clear-field-item make-sparse-keymap set-keymap-parent define-key ""] 5))
(defvar company-template--buffer-templates nil nil)
(make-variable-buffer-local 'company-template--buffer-templates)#@12 

(fn POS)
(defalias 'company-template-templates-at #[257 "\301\302!\211\203 \211@\211>\203 \211B\262A\266\202\202 \210\207" [company-template--buffer-templates nil overlays-at] 6 (#$ . 1100)])#@14 

(fn TEMPL)
(defalias 'company-template-move-to-first #[257 "\300!b\210\301 \207" [overlay-start company-template-forward-field] 3 (#$ . 1307) nil])
(defalias 'company-template-forward-field #[0 "`\300 \301 \210\211b\210\302\303!!\207" [company-template-find-next-field push-mark company-template-remove-field company-template-field-at] 5 nil nil])#@27 Clear the field at point.
(defalias 'company-template-clear-field #[0 "\300`!\211\205 \301\302\"\210\303\304\"\305!\205 \211 \262\207" [company-template-field-at company-template-remove-field t overlay-get company-template-after-clear functionp] 4 (#$ . 1664) nil])#@12 

(fn CMD)
(defalias 'company-template--keymap-filter #[257 "\300\301!?\205 \211\207" [run-hook-with-args-until-success yas-keymap-disable-hook] 3 (#$ . 1941)])#@309 Function that can be called after deleting a field of a c-like template.
For c-like templates it is set as `after-post-fn' property on fields in
`company-template-add-field'.  If there is a next field, delete everything
from point to it.  If there is no field after point, remove preceding comma
if present.
(defalias 'company-template--after-clear-c-like-field #[0 "`\300 \301!?\211\204 W\203 \302\303\304\"\"\203 |\207\211\205/ \305\306\307 \"\205/ \310\224|\207" [company-template-find-next-field company-template-field-at string-match "^[ ]*,+[ ]*$" buffer-substring-no-properties looking-back ",+[ ]*" line-beginning-position 0] 8 (#$ . 2109)])
(defalias 'company-template-find-next-field #[0 "`\300!\301\302\303\304\"\"\305\211:\203( @\262\306\307\310\"!\244\262A\262\202 \211\237\266\203\303\311\"\211\203Q \211@\211\203J \211V\203J \211W\203J \211\262A\266\202\2020 \207" [company-template-templates-at apply max mapcar overlay-end nil reverse overlay-get company-template-fields overlay-start] 10])#@24 

(fn &optional POINT)
(defalias 'company-template-field-at #[256 "\300\206 `!\301\211\211:\203/ @\262\302\303\"\203$ \262\301\211\262\202% \304\203/ A\262\202\n \207" [overlays-at nil overlay-get company-template-parent t] 8 (#$ . 3152)])#@16 

(fn BEG END)
(defalias 'company-template-declare-template #[514 "\302\"\303\304#\210\303\305\306#\210\303\307\310#\210\211	B\311\312\313\314\310$\210\207" [company-template-nav-map company-template--buffer-templates make-overlay overlay-put keymap priority 101 evaporate t add-hook post-command-hook company-template-post-command nil] 8 (#$ . 3408)])#@14 

(fn TEMPL)
(defalias 'company-template-remove-template #[257 "\301\302\303\304\"\"\210\305\"\306!\207" [company-template--buffer-templates mapc company-template-remove-field overlay-get company-template-fields delq delete-overlay] 6 (#$ . 3773)])#@348 Add new field to template TEMPL spanning from BEG to END.
When DISPLAY is non-nil, set the respective property on the overlay.
Leave point at the end of the field.
AFTER-CLEAR-FN is a function that can be used to apply custom behavior
after deleting a field in `company-template-remove-field'.

(fn TEMPL BEG END &optional DISPLAY AFTER-CLEAR-FN)
(defalias 'company-template-add-field #[1283 "\204 \301\302!\210\303!V\203 \304\305!#\210\306\"\307\310\"\311\312\313#\210\311\314\315#\210\203: \311\316#\210\311\317	#\210\311\320\321#\210\203Q \311\322#\210\311\323#\210\311\324\325#\210B\262\311\310#\207" [company-template-field-map cl--assertion-failed templ overlay-end move-overlay overlay-start make-overlay overlay-get company-template-fields overlay-put intangible t face company-template-field display company-template-parent insert-in-front-hooks (company-template-insert-hook) company-template-after-clear keymap priority 101] 11 (#$ . 4033)])#@28 

(fn OVL &optional CLEAR)
(defalias 'company-template-remove-field #[513 "\300!\2051 \301!\203 \211\203 \302!\303!|\210\304!\210\305\306\"\305\307\"\310\"\262\311\307#\266\202\207" [overlayp overlay-buffer overlay-start overlay-end delete-overlay overlay-get company-template-parent company-template-fields delq overlay-put] 8 (#$ . 5026)])#@68 Clean up all templates that don't contain POS.

(fn &optional POS)
(defalias 'company-template-clean-up #[256 "\301\206 `!\211\205 \211@\211>\204 \302!\210A\266\202\202 \207" [company-template--buffer-templates overlays-at company-template-remove-template] 6 (#$ . 5387)])#@80 Called when a snippet input prompt is modified.

(fn OVL AFTER-P &rest IGNORE)
(defalias 'company-template-insert-hook #[642 "?\205	 \300\301\"\207" [company-template-remove-field t] 6 (#$ . 5674)])
(defalias 'company-template-post-command #[0 "\301 \210?\205 \302\303\304\305#\207" [company-template--buffer-templates company-template-clean-up remove-hook post-command-hook company-template-post-command t] 4])#@13 

(fn CALL)
(defalias 'company-template-c-like-templatify #[257 "\301 `GZ\302\"\303\211\303\304 p\305\306#\216\307\310\304 !!\210\311\312\313\"\210\311\314\315\"\210\316\315\317#\203G \301 \262\320u\210`|\210\321 \210\320u\210\301 \262\316\322\317#\203b \301 \320u\210\321 \210\303u\210\323\"\266\324\325\326 \"\203p \320\224\320\225|\210\203| b\210\323\"\210)\266\327\330\"\203\214 \331!\202\222 \332!\210b)\207" [forward-sexp-function point-marker company-template-declare-template nil syntax-table make-closure #[0 "r\300q\210\302\301!)\207" [V0 V1 set-syntax-table] 2] set-syntax-table make-syntax-table modify-syntax-entry 60 "(" 62 ")" search-backward t 1 backward-sexp ">" company-template--c-like-args looking-back "\\((\\*)\\)(" line-beginning-position overlay-get company-template-fields company-template-move-to-first company-template-remove-template] 13 (#$ . 6095)])#@18 

(fn TEMPL END)
(defalias 'company-template--c-like-args #[514 "`\300\301\302#\205& \303`\"@\304U\203 \305\306\225\307\310%\210\311\307w\210`\262\202 \207" [re-search-forward "\\([^,]+\\),?" move parse-partial-sexp 0 company-template-add-field 1 nil company-template--after-clear-c-like-field " "] 9 (#$ . 7007)])#@17 

(fn SELECTOR)
(defalias 'company-template-objc-templatify #[257 "\300 `GZS\301\"\302\212b\210\3032T \304\305\306#\205S \307\310!\203, \311`\312\225#\210\202E \311`\313\314\"c\210`#\210`W\203A \315c\210\211T\262`Y\203 \316\303\306\"\210\202 0)\210\317!\207" [point-marker company-template-declare-template 0 stop search-forward ":" t looking-at "\\(([^)]*)\\) ?" company-template-add-field 1 format "arg%d" " " throw company-template-move-to-first] 11 (#$ . 7334)])
(provide 'company-template)
