%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/elec-pair.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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\302\303\304\305\306DD\307\310\311\312\313\314\315& \210\302\316\304\305\317DD\320\310\321\312\313\314\322& \210\302\323\304\305\324DD\325\310\311\312\313\314\326& \210\302\327\304\305\330DD\331\310\321\312\313\314\332& \210\302\333\304\305\334DD\335\310\321\312\313\314\336& \210\302\337\304\305\340DD\341\310\321\312\313\314\342& \210\302\343\304\305\344DD\345\310\321\312\313\314\346& \210\302\347\304\305\350DD\351\310\321\312\313\314\352& \210\302\353\304\305\354DD\355\310\321\312\313\314\356& \207" [require electric custom-declare-variable electric-pair-pairs funcall function #[0 "\301@A@B\3028\3038BE\207" [electric-quote-chars (34 . 34) 2 3] 5] "Alist of pairs that should be used regardless of major mode.\n\nPairs of delimiters in this list are a fallback in case they have\nno syntax relevant to `electric-pair-mode' in the mode's syntax\ntable.\n\nSee also the variable `electric-pair-text-pairs'." :version "24.1" :group electricity :type (repeat (cons character character)) electric-pair-text-pairs #[0 "\301@A@B\3028\3038BE\207" [electric-quote-chars (34 . 34) 2 3] 5] "Alist of pairs that should always be used in comments and strings.\n\nPairs of delimiters in this list are a fallback in case they have\nno syntax relevant to `electric-pair-mode' in the syntax table\ndefined in `electric-pair-text-syntax-table'." "24.4" (repeat (cons character character)) electric-pair-skip-self #[0 "\300\207" [electric-pair-default-skip-self] 1] "If non-nil, skip char instead of inserting a second closing paren.\n\nWhen inserting a closing paren character right before the same character,\njust skip that character instead, so that hitting ( followed by ) results\nin \"()\" rather than \"())\".\n\nThis can be convenient for people who find it easier to hit ) than C-f.\n\nCan also be a function of one argument (the closer char just\ninserted), in which case that function's return value is\nconsidered instead." (choice (const :tag "Never skip" nil) (const :tag "Help balance" electric-pair-default-skip-self) (const :tag "Always skip" t) function) electric-pair-inhibit-predicate #[0 "\300\207" [electric-pair-default-inhibit] 1] "Predicate to prevent insertion of a matching pair.\n\nThe function is called with a single char (the opening char just inserted).\nIf it returns non-nil, then `electric-pair-mode' will not insert a matching\ncloser." (choice (const :tag "Conservative" electric-pair-conservative-inhibit) (const :tag "Help balance" electric-pair-default-inhibit) (const :tag "Always pair" ignore) function) electric-pair-preserve-balance #[0 "\300\207" [t] 1] "Non-nil if default pairing and skipping should help balance parentheses.\n\nThe default values of `electric-pair-inhibit-predicate' and\n`electric-pair-skip-self' check this variable before delegating to other\npredicates responsible for making decisions on whether to pair/skip some\ncharacters based on the actual state of the buffer's parentheses and\nquotes." boolean electric-pair-delete-adjacent-pairs #[0 "\300\207" [t] 1] "If non-nil, backspacing an open paren also deletes adjacent closer.\n\nCan also be a function of no arguments, in which case that function's\nreturn value is considered instead." (choice (const :tag "Yes" t) (const :tag "No" nil) function) electric-pair-open-newline-between-pairs #[0 "\300\207" [t] 1] "If non-nil, a newline between adjacent parentheses opens an extra one.\n\nCan also be a function of no arguments, in which case that function's\nreturn value is considered instead." (choice (const :tag "Yes" t) (const :tag "No" nil) function) electric-pair-skip-whitespace #[0 "\300\207" [t] 1] "If non-nil skip whitespace when skipping over closing parens.\n\nThe specific kind of whitespace skipped is given by the variable\n`electric-pair-skip-whitespace-chars'.\n\nThe symbol `chomp' specifies that the skipped-over whitespace\nshould be deleted.\n\nCan also be a function of no arguments, in which case that function's\nreturn value is considered instead." (choice (const :tag "Yes, jump over whitespace" t) (const :tag "Yes, and delete whitespace" chomp) (const :tag "No, no whitespace skipping" nil) function) electric-pair-skip-whitespace-chars #[0 "\300\301\302E\207" [9 32 10] 3] "Whitespace characters considered by `electric-pair-skip-whitespace'." (choice (set (const :tag "Space" 32) (const :tag "Tab" 9) (const :tag "Newline" 10)) (list character))] 10) #@232 Function to use to skip whitespace forward. Before attempting a skip, if `electric-pair-skip-whitespace' is non-nil, this function is called. It move point to a new buffer position, presumably skipping only whitespace in between. (defvar electric-pair-skip-whitespace-function 'electric-pair--skip-whitespace (#$ . 4836)) (make-variable-buffer-local 'electric-pair-skip-whitespace-function) #@69 Skip whitespace forward, not crossing comment or string boundaries. (defalias 'electric-pair--skip-whitespace #[0 "`\301\302 8\303\304\"\305w\210\211\301\302 8=?\205 b\207" [electric-pair-skip-whitespace-chars 8 syntax-ppss apply string nil] 5 (#$ . 5234)]) #@227 Syntax table used when pairing inside comments and strings. `electric-pair-mode' considers this syntax table only when point in inside quotes or comments. If lookup fails here, `electric-pair-text-pairs' will be considered. (defvar electric-pair-text-syntax-table prog-mode-syntax-table (#$ . 5502)) #@13 (fn CHAR) (defalias 'electric-pair-conservative-inhibit #[257 "\211\300f=\206 \211`Sf=\203 \211`S\206 `Sf=\206 gz\301=\207" [nil 119] 3 (#$ . 5810)]) #@363 Calculate a list (SYNTAX PAIR UNCONDITIONAL STRING-OR-COMMENT-START). SYNTAX is COMMAND-EVENT's syntax character. PAIR is COMMAND-EVENT's pair. UNCONDITIONAL indicates the variables `electric-pair-pairs' or `electric-pair-text-pairs' were used to lookup syntax. STRING-OR-COMMENT-START indicates that point is inside a comment or string. (fn COMMAND-EVENT) (defalias 'electric-pair-syntax-info #[257 "o\206\f \303\212\304`S!)8\303\304`!8\211\205 \211\203 \202 \305 \305 p\306\307\310\311\312\"\313\"\314$\216\315!\210z\316!\206B )D\266\202\203Q \317 \n\"\202R \n\236\320\"@\321>\203l \317\322D\"\202\227 \203\214 @A=\203\202 \323 \324F\202\227 \325A\324F\202\227 \211\205\227 \326@\324F\207" [electric-pair-text-syntax-table electric-pair-text-pairs electric-pair-pairs 8 syntax-ppss syntax-table make-byte-code 0 "r\301q\210\302\300!)\207" vconcat vector [set-syntax-table] 2 set-syntax-table matching-paren append rassq (34 40 41 36) nil 34 t 40 41] 14 (#$ . 5973)]) #@13 (fn CHAR) (defalias 'electric-pair--insert #[257 "\211\304\211\305\306\307!,\207" [electric-layout-allow-duplicate-newlines electric-pair-mode blink-matching-paren last-command-event nil t self-insert-command 1] 5 (#$ . 6992)]) #@421 Like `with-syntax-table', but flush the syntax-ppss cache afterwards. Use this instead of (with-syntax-table TABLE BODY) when BODY contains code which may update the syntax-ppss cache. This includes calling `parse-partial-sexp' and any sexp-based movement functions when `parse-sexp-lookup-properties' is non-nil. The cache is flushed from position START, defaulting to point. (fn (TABLE &optional START) &rest BODY) (defalias 'electric-pair--with-uncached-syntax '(macro . #[128 "\211\203 \211A\262\242\202 \300\301\302GD\"\211\203! \211A\262\242\202( \300\301\302GD\"\211A\262\242\203= \300\301\302\303G\\D\"\210\304\305!\306\307\206H \310DD\311\312 BB\313DEE\262\207" [signal wrong-number-of-arguments electric-pair--with-uncached-syntax 2 make-symbol "start" let (syntax-propertize-function #'ignore) (point) unwind-protect with-syntax-table syntax-ppss-flush-cache] 11 (#$ . 7233)])) (byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put electric-pair--with-uncached-syntax edebug-form-spec ((form &optional form) body) function-put lisp-indent-function 1] 4) #@200 Like `syntax-ppss', but sometimes fallback to `parse-partial-sexp'. WHERE is a list defaulting to '(string comment) and indicates when to fallback to `parse-partial-sexp'. (fn &optional POS WHERE) (defalias 'electric-pair--syntax-ppss #[512 "\206 `\206\n \303\304!\3058\205 \306>\3078\205 \310>\203* \3118T\202= \211\205= \3118b\210\312d[!\210\313\314!\210`\211\203u \315\316\317\320\321\322!\323\"\324$\216\325 p\316\317\326\321\322\"\327\"\324$\216\330 !\210\331\")\266\202*\266\202\202\204 \n\332>\203\203 \331e\"\202\204 \207" [syntax-propertize-function electric-pair-text-syntax-table major-mode (string comment) syntax-ppss 3 string 4 comment 8 forward-comment skip-syntax-forward " >!" ignore make-byte-code 0 "\301\300!\207" vconcat vector [syntax-ppss-flush-cache] 2 syntax-table "r\301q\210\302\300!)\207" [set-syntax-table] set-syntax-table parse-partial-sexp (c-mode c++ mode)] 19 (#$ . 8339)]) #@512 Examine lists forward or backward according to DIRECTION's sign. STRING-OR-COMMENT is info suitable for running `parse-partial-sexp'. Return a cons of two descriptions (MATCHED-P . PAIR) for the innermost and outermost lists that enclose point. The outermost list enclosing point is either the first top-level or first mismatched list found by listing up. If the outermost list is matched, don't rely on its PAIR. If point is not enclosed by any lists, return ((t) . (t)). (fn DIRECTION STRING-OR-COMMENT) (defalias 'electric-pair--balance-info #[514 "\302C\302C\203\f \202 \303 \304\305\212\242\204\225 \3061b \307`\310\311\312\313\314!\315\"\316$\216\303 p\310\311\317\313\314\"\320\"\316$\216\321!\210\322`\f\311V\203N d\202P d[\"\210 \")\266\202*\266\2020\202\221 \323\324A@\"\203w \203\200 \325\326 8\204\200 \"\202\217 \3278b\210$\262\210\202 )\242\242B\207" [electric-pair-text-syntax-table syntax-propertize-function nil syntax-table #[514 "\211\300C\240\210\242?\205 \300C\240\207" [t] 4 "\n\n(fn INNERMOST OUTERMOST)"] #[1028 "`\212\301W\203Q \3021L \211f\303`\304\301\305\306\307!\310\"\311$\216\312 p\304\301\313\306\307\"\314\"\311$\216\315!\210\316\317`\320\"\206>