;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@361 Return the character position at various buffer positions. Optional POSITION can be one of the following symbols: `bol' == beginning of line `boi' == beginning of indentation `eol' == end of line [default] `bonl' == beginning of next line `bopl' == beginning of previous line Optional COL-P non-nil returns `current-column' instead of character position. (defalias 'regi-pos #[(&optional position col-p) "\212\302\267\202\303 \210\202\"\304 \210\202\"\305y\210\202\"\306y\210\202\"\307\210 \203*i\202+`)\207" [position col-p #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (bol 7 boi 13 bonl 19 bopl 25)) beginning-of-line back-to-indentation 1 -1 nil] 2 (#$ . 409)]) #@204 Build a regi frame where each element of PREDLIST appears exactly once. The frame contains elements where each member of PREDLIST is associated with FUNC, and optionally NEGATE-P and CASE-FOLD-SEARCH-P. (defalias 'regi-mapcar #[(predlist func &optional negate-p case-fold-search-p) "\306\211\n\204\f \203\nC \203\307 C\"\f\203<\f@ D\203.\307\"\307 C\"\fA)\202 *\207" [tail frame negate-p case-fold-search-p predlist func nil append element] 3 (#$ . 1136)]) #@3344 Interpret the regi frame FRAME. If optional START and END are supplied, they indicate the region of interest, and the buffer is narrowed to the beginning of the line containing START, and beginning of the line after the line containing END. Otherwise, point and mark are not set and processing continues until your FUNC returns the `abort' symbol (see below). Beware! Not supplying a START or END could put you in an infinite loop. A regi frame is a list of entries of the form: (PRED FUNC [NEGATE-P [CASE-FOLD-SEARCH]]) PRED is a predicate against which each line in the region is tested, and if a match occurs, FUNC is `eval'd. Point is then moved to the beginning of the next line, the frame is reset and checking continues. If a match doesn't occur, the next entry is checked against the current line until all entries in the frame are checked. At this point, if no match occurred, the frame is reset and point is moved to the next line. Checking continues until every line in the region is checked. Optional NEGATE-P inverts the result of PRED before FUNC is called and `case-fold-search' is bound to the optional value of CASE-FOLD-SEARCH for the PRED check. PRED can be a string, variable, function or one of the following symbols: t, nil, `begin', `end', and `every'. If PRED is a string, or a variable or list that evaluates to a string, it is interpreted as a regular expression and is matched against the current line (from the beginning) using `looking-at'. If PRED does not evaluate to a string, it is interpreted as a binary value (nil or non-nil). PRED can also be one of the following symbols: t -- always produces a true outcome `begin' -- always executes before anything else `end' -- always executes after everything else `every' -- execute after frame is matched on a line Note that NEGATE-P and CASE-FOLD-SEARCH are meaningless if PRED is one of these special symbols. Only the first occurrence of each symbol in a frame entry is used, the rest are ignored. Your FUNC can return values which control regi processing. If a list is returned from your function, it can contain any combination of the following elements: the symbol `continue' Tells regi to continue processing frame-entries after a match, instead of resetting to the first entry and advancing to the next line, as is the default behavior. When returning this symbol, you must take care not to enter an infinite loop. the symbol `abort' Tells regi to terminate processing this frame. any end frame-entry is still processed. the list `(frame . NEWFRAME)' Tells regi to use NEWFRAME as its current frame. In other words, your FUNC can modify the executing regi frame on the fly. the list `(step . STEP)' Tells regi to move STEP number of lines forward during normal processing. By default, regi moves forward 1 line. STEP can be negative, but be careful of infinite loops. You should usually take care to explicitly return nil from your function if no action is to take place. Your FUNC will always be `eval'ed. The following variables will be temporarily bound to some useful information: `curline' the current line in the buffer, as a string `curframe' the full, current frame being executed `curentry' the current frame entry being executed. (defalias 'regi-interpret #[(frame &optional start end) "\212\214\306\211\211\211\211\211\2039\2039^\211]\211b\210\307\310!b\210\307\311!}\210+\312\313\"\210\314 !\210 \204m\204\n@\211@A@\3158\3168 \306!\3172\366\n\204 \320y\210\321\317\322\"\210\202\220\314!\211!;\203\220\323!!!\203\232!?!!\203\361\307\311!\307\324!{\"\n#$\314!%\325%\236A\206\276\320\326%\236\203\315\326%\236A\327%>\203\332\nA\202\340y\210 \330%>\205\355\322\321\317\322\"-\202\365\nA\2110\210.\314 !\210\202E\314\f!.\207" [donep working-frame current-frame every-tag end-tag begin-tag nil regi-pos bonl bol mapc #[(entry) "@A@\211\306\267\202 \211\202( \211\202( \211\202(\307C\"\211*\207" [entry func pred begin-tag end-tag every-tag #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (begin 13 end 19 every 25)) append working-frame] 4] eval 2 3 regi-throw-top 1 throw t looking-at eol step frame continue abort start end tstart entry pred func negate-p case-fold-search match-p curline curframe curentry result] 7 (#$ . 1627)]) (provide 'regi)