%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/textmodes/ |
Current File : //usr/local/share/emacs/27.2/lisp/textmodes/tildify.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\304\316\306\301\317\320\321\322&\210\310\323\312\313\324DD\325\306\301\317\326&\210\327\323\311\316#\210\310\330\312\313\331DD\332\304\316\306\301\317\333\321\322&\210\310\334\312\313\335DD\336\306\301\317\337&\210\327\334\330\316#\210\310\340\312\313\341DD\342\304\316\306\301\317\313& \210\310\343\312\313\344DD\345\306\301\317\346&\210\327\343\340\316#\207" [custom-declare-group tildify nil "Add hard spaces or other text fragments to text buffers." :version "21.1" :group text custom-declare-variable tildify-pattern funcall function #[0 "\300\207" [#1="\\(?:[,:;(][ ]*[a]\\|\\<[AIKOSUVZikosuvz]\\)\\([ ]+\\|[ ]*\n[ ]*\\)\\(?:\\w\\|[([{\\]\\|<[a-zA-Z]\\)"] 1 #1#] "A pattern specifying where to insert hard spaces.\n\n`tildify-buffer' function will replace first capturing group of the regexp with\na hard space (as defined by `tildify-space-string' variable). (Hint: \\(…\\)\nnon-capturing groups can be used for grouping prior to the part of the regexp\nmatching the white space). The pattern is matched case-sensitive regardless of\nthe value of `case-fold-search' setting." "25.1" :type string :safe t tildify-pattern-alist #[0 "\300\207" [nil] 1] "Alist specifying where to insert hard spaces.\n\nEach alist item is of the form (MAJOR-MODE REGEXP NUMBER) or\n(MAJOR-MODE . SYMBOL).\n\nMAJOR-MODE defines major mode, for which the item applies. It can be either:\n- a symbol equal to the major mode of the buffer to be fixed\n- t for default item, this applies to all major modes not defined in another\n alist item\n\nREGEXP is a regular expression matching the part of a text, where a hard space\nis missing. The regexp is always case sensitive, regardless of the current\n`case-fold-search' setting.\n\nNUMBER defines the number of the REGEXP subexpression which should be replaced\nby the hard space character.\n\nThe form (MAJOR-MODE . SYMBOL) defines alias item for MAJOR-MODE. For this\nmode, the item for the mode SYMBOL is looked up in the alist instead." (repeat (cons :tag "Entry for major mode" (choice (const :tag "Default" t) (symbol :tag "Major mode")) (choice (list :tag "Regexp" regexp (integer :tag "Group ")) (symbol :tag "Like other")))) make-obsolete-variable tildify-space-string #[0 "\300\207" [#2=" "] 1 #2#] "Representation of a hard (a.k.a. no-break) space in current major mode.\n\nUsed by `tildify-buffer' in places where space is required but line\ncannot be broken. For example \"~\" for TeX or \" \" for SGML,\nHTML and XML modes. A no-break space Unicode character (\"\\u00A0\")\nmight be used for other modes if compatible encoding is used.\n\nIf nil, current major mode has no way to represent a hard space." (choice (const :tag "Space character (no hard-space representation)" " ") (const :tag "No-break space (U+00A0)" " ") (string :tag "Custom string")) tildify-string-alist #[0 "\300\207" [nil] 1] "Alist specifying what is a hard space in the current major mode.\n\nEach alist item is of the form (MAJOR-MODE . STRING) or\n(MAJOR-MODE . SYMBOL).\n\nMAJOR-MODE defines major mode, for which the item applies. It can be either:\n- a symbol equal to the major mode of the buffer to be fixed\n- t for default item, this applies to all major modes not defined in another\n alist item\n\nSTRING defines the hard space, which is inserted at places defined by\n`tildify-pattern'. For example it can be \"~\" for TeX or \" \" for SGML.\n\nThe form (MAJOR-MODE . SYMBOL) defines alias item for MAJOR-MODE. For this\nmode, the item for the mode SYMBOL is looked up in the alist instead." (repeat (cons :tag "Entry for major mode" (choice (const :tag "Default" t) (symbol :tag "Major mode")) (choice (const :tag "No-break space (U+00A0)" " ") (string :tag "String ") (symbol :tag "Like other")))) tildify-foreach-region-function #[0 "\300\207" [tildify--deprecated-ignore-evironments] 1] "A function calling a callback on portions of the buffer to tildify.\n\nThe function is called from `tildify-buffer' function with three arguments: FUNC\nBEG END. FUNC is a callback accepting two arguments -- REG-BEG REG-END --\nspecifying a portion of buffer to operate on.\n\nThe BEG and END arguments may be used to limit portion of the buffer being\nscanned, but the `tildify-foreach-region-function' is not required to make use\nof them. IT must, however, terminate as soon as FUNC returns nil.\n\nFor example, if `tildify-buffer' function should operate on the whole buffer,\na simple pass through function could be used:\n (setq-local tildify-foreach-region-function\n (lambda (cb beg end) (funcall cb beg end)))\nor better still:\n (setq-local tildify-foreach-region-function \\='funcall)\nSee `tildify-foreach-ignore-environments' function for other ways to use the\nvariable." tildify-ignored-environments-alist #[0 "\300\207" [nil] 1] "Alist specifying ignored structured text environments.\nParts of text defined in this alist are skipped without performing hard space\ninsertion on them. These setting allow skipping text parts like verbatim or\nmath environments in TeX or preformatted text in SGML.\n\nEach list element is of the form\n (MAJOR-MODE (BEG-REGEX . END-REGEX) (BEG-REGEX . END-REGEX) ... )\n\nMAJOR-MODE defines major mode, for which the item applies. It can be either:\n- a symbol equal to the major mode of the buffer to be fixed\n- t for default item, this applies to all major modes not defined in another\n alist item\n\nSee `tildify-foreach-ignore-environments' function for description of BEG-REGEX\nand END-REGEX." (repeat (cons :tag "Entry for major mode" (choice (const :tag "Default" t) (symbol :tag "Major mode")) (choice (const :tag "None") (repeat :tag "Environments" (cons :tag "Regexp pair" (regexp :tag "Open ") (choice :tag "Close" (regexp :tag "Regexp") (list :tag "Regexp and groups (concatenated)" (choice (regexp :tag "Regexp") (integer :tag "Group ")))))) (symbol :tag "Like other"))))] 12) #@416 Add hard spaces in the region between BEG and END. See variables `tildify-pattern', `tildify-space-string', and `tildify-ignored-environments-alist' for information about configuration parameters. This function performs no refilling of the changed text. If DONT-ASK is set, or called interactively with prefix argument, user won't be prompted for confirmation of each substitution. (fn BEG END &optional DONT-ASK) (defalias 'tildify-region #[770 "\301\302C?C\303\304\305\306\307\310\"\311\"\312\313%#\210\314\315\242\")\207" [case-fold-search nil 0 tildify--foreach-region make-byte-code 514 "\302\301\242#\300\211\242@\\\240\210\211A\303=\204 \211A\202 \301\304\240\210\305\207" vconcat vector [tildify-tildify force nil t] 6 "\n\n(fn BEG END)" message "%d spaces replaced."] 14 (#$ . 6418) "*rP"]) #@396 Add hard spaces in the current buffer. See variables `tildify-pattern', `tildify-space-string', and `tildify-ignored-environments-alist' for information about configuration parameters. This function performs no refilling of the changed text. If DONT-ASK is set, or called interactively with prefix argument, user won't be prompted for confirmation of each substitution. (fn &optional DONT-ASK) (defalias 'tildify-buffer #[256 "\300ed#\207" [tildify-region] 5 (#$ . 7243) "*P"]) #@97 Return alist item for the MODE-ALIST in the current major MODE. (fn MODE-ALIST &optional MODE) (defalias 'tildify--pick-alist-entry #[513 "\301\206 \"\206 \301\302\"A\211\203 \2119\203 \303\"\202! \211\207" [major-mode assoc t tildify--pick-alist-entry] 6 (#$ . 7729)]) (make-obsolete 'tildify--pick-alist-entry "it should not be used in new code." "25.1") #@354 Call CALLBACK on regions between BEG and END. Call CALLBACK on each region outside of environment to ignore. Stop scanning the region as soon as CALLBACK returns nil. Environments to ignore are defined by deprecated `tildify-ignored-environments-alist'. CALLBACK may be called on portions of the buffer outside of [BEG END). (fn CALLBACK BEG END) (defalias 'tildify--deprecated-ignore-evironments #[771 "\301!\211\203 \302$\202 \"\207" [tildify-ignored-environments-alist tildify--pick-alist-entry tildify-foreach-ignore-environments] 9 (#$ . 8104)]) (make-obsolete 'tildify--deprecated-ignore-evironments "it should not be used in new code." "25.1") #@1234 Outside of environments defined by PAIRS call CALLBACK. PAIRS is a list of (BEG-REGEX . END-REGEX) cons. BEG-REGEX is a regexp matching beginning of a text part to be skipped. END-REGEX defines end of the corresponding text part and can be either: - a regexp matching the end of the skipped text part - a list of regexps and numbers, which will compose the ending regexp by concatenating themselves, while replacing the numbers with corresponding subexpressions of BEG-REGEX (this is used to solve cases like \\verb<character> in TeX). CALLBACK is a function accepting two arguments -- REG-BEG and REG-END -- that will be called for portions of the buffer outside of the environments defined by PAIRS regexps. The function will return as soon as CALLBACK returns nil or point goes past END. CALLBACK may be called on portions of the buffer outside of [BEG END); in fact BEG argument is ignored. This function is meant to be used to set `tildify-foreach-region-function' variable. For example, for an XML file one might use: (setq-local tildify-foreach-region-function (apply-partially \='tildify-foreach-ignore-environments \='(("<! *--" . "-- *>") ("<" . ">")))) (fn PAIRS CALLBACK BEG END) (defalias 'tildify-foreach-ignore-environments #[1028 "\300\301\302\303#\304Q\305\211\212\214~\210eb\210`\211\262W\205H \306\"\211\262\203<