;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\302\303\304\305%\210\306\307\310\311\312DD\313\314\315%\210\306\316\310\311\317DD\320\314\321%\210\306\322\310\311\323DD\324\314\325%\210\306\326\310\311\327DD\330\314\325%\210\306\331\310\311\332DD\333\314\334%\210\306\335\310\311\336DD\337\314\340%\210\306\341\310\311\342DD\343\314\344%\210\306\345\310\311\346DD\347\314\350%\210\306\351\310\311\352DD\353\314\354%\210\306\355\310\311\356DD\357\314\360%\210\306\361\310\311\362DD\363\314\364%\210\306\365\310\311\366DD\367\314\370%\207" [custom-declare-group filladapt nil "Enhanced filling" :group fill custom-declare-variable filladapt-mode-line-string funcall function #[0 "\300\207" [#1=" Filladapt"] 1 #1#] "String to display in the modeline when Filladapt mode is active.\nSet this to nil if you don't want a modeline indicator for Filladapt." :type string filladapt-fill-column-tolerance #[0 "\300\207" [nil] 1] "Tolerate filled paragraph lines ending this far from the fill column.\nIf any lines other than the last paragraph line end at a column\nless than \"fill-column - filladapt-fill-column-tolerance\", `fill-column' will\nbe adjusted using the filladapt-fill-column-*-fuzz variables and\nthe paragraph will be re-filled until the tolerance is achieved\nor filladapt runs out of fuzz values to try.\n\nA nil value means behave normally, that is, don't try refilling\nparagraphs to make filled line lengths fit within any particular\nrange." (choice (const nil) integer) filladapt-fill-column-forward-fuzz #[0 "\300\207" [5] 1] "Try values from `fill-column' to \"fill-column + this variable\"\nwhen trying to make filled paragraph lines fall with the tolerance\nrange specified by `filladapt-fill-column-tolerance'." integer filladapt-fill-column-backward-fuzz #[0 "\300\207" [5] 1] "Try values from `fill-column' to \"fill-column - this variable\"\nwhen trying to make filled paragraph lines fall with the tolerance\nrange specified by `filladapt-fill-column-tolerance'." filladapt-token-table #[0 "\300\207" [(("^" beginning-of-line) (">+" citation->) ("\\(\\w\\|[0-9]\\)[^'`\"< \n]*>[ ]*" supercite-citation) (";+" lisp-comment) ("#+" sh-comment) ("%+" postscript-comment) ("///*" c++-comment) ("@c[ ]" texinfo-comment) ("@comment[ ]" texinfo-comment) ("\\\\item[ ]" bullet) ("[0-9]+\\.[ ]" bullet) ("[0-9]+\\(\\.[0-9]+\\)+[ ]" bullet) ("[A-Za-z]\\.[ ]" bullet) ("(?[0-9]+)[ ]" bullet) ("(?[A-Za-z])[ ]" bullet) ("[0-9]+[A-Za-z]\\.[ ]" bullet) ("(?[0-9]+[A-Za-z])[ ]" bullet) ("[-~*+]+[ ]" bullet) ("o[ ]" bullet) ("[ ]+" space) ("$" end-of-line))] 1] "Table of tokens filladapt knows about.\nFormat is\n\n ((REGEXP SYM) ...)\n\nfilladapt uses this table to build a tokenized representation of\nthe beginning of the current line. Each REGEXP is matched\nagainst the beginning of the line until a match is found.\nMatching is done case-sensitively. The corresponding SYM is\nadded to the list, point is moved to (match-end 0) and the\nprocess is repeated. The process ends when there is no REGEXP in\nthe table that matches what is at point." (repeat (list regexp symbol)) filladapt-not-token-table #[0 "\300\207" [("[Ee]\\.g\\.[ ,]" "[Ii]\\.e\\.[ ,]" "^$")] 1] "List of regexps that can never be a token.\nBefore trying the regular expressions in `filladapt-token-table',\nthe regexps in this list are tried. If any regexp in this list\nmatches what is at point then the token generator gives up and\ndoesn't try any of the regexps in `filladapt-token-table'.\n\nRegexp matching is done case-sensitively." (repeat regexp) filladapt-token-match-table #[0 "\300\207" [((citation-> citation->) (supercite-citation supercite-citation) (lisp-comment lisp-comment) (sh-comment sh-comment) (postscript-comment postscript-comment) (c++-comment c++-comment) (texinfo-comment texinfo-comment) (bullet) (space bullet space) (beginning-of-line beginning-of-line))] 1] "Table describing what tokens a certain token will match.\n\nTo decide whether a line belongs in the current paragraph,\nfilladapt creates a token list for the fill prefix of both lines.\nTokens and the columns where tokens end are compared. This table\nspecifies what a certain token will match.\n\nTable format is\n\n (SYM [SYM1 [SYM2 ...]])\n\nThe first symbol SYM is the token, subsequent symbols are the\ntokens that SYM will match." (repeat (repeat symbol)) filladapt-token-match-many-table #[0 "\300\207" [(space)] 1] "List of tokens that can match multiple tokens.\nIf one of these tokens appears in a token list, it will eat all\nmatching tokens in a token list being matched against it until it\nencounters a token that doesn't match or a token that ends on\na greater column number." (repeat symbol) filladapt-token-paragraph-start-table #[0 "\300\207" [(bullet)] 1] "List of tokens that indicate the start of a paragraph.\nIf parsing a line generates a token list containing one of\nthese tokens, then the line is considered to be the start of a\nparagraph." (repeat symbol) filladapt-token-conversion-table #[0 "\300\207" [((citation-> . exact) (supercite-citation . exact) (lisp-comment . exact) (sh-comment . exact) (postscript-comment . exact) (c++-comment . exact) (texinfo-comment . exact) (bullet . spaces) (space . exact) (end-of-line . exact))] 1] "Table that specifies how to convert a token into a fill prefix.\nTable format is\n\n ((SYM . HOWTO) ...)\n\nSYM is the symbol naming the token to be converted.\nHOWTO specifies how to do the conversion.\n `exact' means copy the token's string directly into the fill prefix.\n `spaces' means convert all characters in the token string that are\n not a TAB or a space into spaces and copy the resulting string into\n the fill prefix." (repeat (cons symbol (choice (const exact) (const spaces)))) filladapt-token-match-empty #[0 "\300\207" [(beginning-of-line end-of-line)] 1] "List of tokens that may match the empty string.\nNormally a token is ignored if it matches the empty string. This list\ncontains the tokens that should be excluded from that rule." (repeat symbol) filladapt-fill-paragraph-post-hook #[0 "\300\207" [nil] 1] "Hooks run after filladapt runs `fill-paragraph'." hook] 6) #@262 Non-nil if the filladapt version of a fill function executing. Currently this is only checked by the filladapt version of `fill-region-as-paragraph' to avoid this infinite recursion: fill-region-as-paragraph -> fill-paragraph -> fill-region-as-paragraph ... (defvar filladapt--inside-filladapt nil (#$ . 6558)) #@418 Non-nil means filladapt debugging is enabled. Use the `filladapt-debug' function to turn on debugging. With debugging enabled, filladapt will a. display the proposed indentation with the tokens highlighted using `filladapt-debug-indentation-face-1' and `filladapt-debug-indentation-face-2'. b. display the current paragraph using the face specified by `filladapt-debug-paragraph-face'. (defvar filladapt-debug nil (#$ . 6879)) #@65 Face used to display the indentation when debugging is enabled. (defvar filladapt-debug-indentation-face-1 'highlight (#$ . 7343)) #@73 Another face used to display the indentation when debugging is enabled. (defvar filladapt-debug-indentation-face-2 'secondary-selection (#$ . 7480)) #@71 Face used to display the current paragraph when debugging is enabled. (defvar filladapt-debug-paragraph-face 'bold (#$ . 7635)) (defvar filladapt-debug-indentation-extents nil) (make-variable-buffer-local 'filladapt-debug-indentation-extents) (defvar filladapt-debug-paragraph-extent nil) (byte-code "\300\301!\210\302\303\304\305#\207" [make-variable-buffer-local filladapt-debug-paragraph-extent advice-add do-auto-fill :around filladapt--do-auto-fill] 4) #@61 Overloading for `filladapt-mode'. (fn ORIG-FUN &rest ARGS) (defalias 'filladapt--do-auto-fill #[385 "\3062@\203; \204;\214\307\211\211\310\211\307\211\f\311\307\211\"\2036\312  \"\262\313\306\"\210.\266)\312\"0\207" [filladapt-mode fill-prefix filladapt--inside-filladapt comment-multi-line adaptive-fill-regexp adaptive-fill-mode done nil t filladapt-adapt apply throw paragraph-ignore-fill-prefix] 12 (#$ . 8099)]) #@75 Overloading for `filladapt-mode'. (fn ORIG-FUN &optional ARG &rest ARGS) (defalias 'filladapt--fill-paragraph #[641 "\306\3072\322 \203\314\n\204\314\214\310\211\211\306\310\211\311\306\310\"\203\310\203\265Z\\\211Z\310\312\313\204\233\314#\262\315 \203Z\316\262\202A\211T\262[\262_\\\211X\203\223W\204\200V\203\223\211T\262[\262_\\\202j\211V\262\202A\316=\204\257\314#\262))\266\202\277\314   #\262\317\320!\210\321\307\"\210-\266)\314#0)\207" [filladapt--inside-filladapt filladapt-mode fill-prefix comment-multi-line adaptive-fill-regexp adaptive-fill-mode t done nil filladapt-adapt 1 0 apply filladapt-paragraph-within-fill-tolerance success run-hooks filladapt-fill-paragraph-post-hook throw paragraph-ignore-fill-prefix filladapt-fill-column-tolerance fill-column filladapt-fill-column-backward-fuzz filladapt-fill-column-forward-fuzz] 20 (#$ . 8549)]) (byte-code "\300\301\302\303#\210\300\304\302\303#\210\300\305\302\306#\207" [advice-add fill-paragraph :around filladapt--fill-paragraph lisp-fill-paragraph fill-region-as-paragraph filladapt--fill-region-as-paragraph] 4) #@87 Overloading for `filladapt-mode'. (fn ORIG-FUN BEG END &optional JUSTIFY &rest ARGS) (defalias 'filladapt--fill-region-as-paragraph #[1155 "\203f \204f\214}\210\302\303\211b\210`f\304\232\203$\305\306!\210\202\303\210\303y\307U\203W\310\311 !@\211\262\203F`\262\312A@!\210`|\210`Sb\210\313c\210\305\306!\210\303\210\202'b\210\314!\210)\266db)\207\315%\207" [filladapt-mode filladapt--inside-filladapt t nil 10 delete-char 1 0 last filladapt-parse-prefixes move-to-column " " fill-paragraph apply] 11 (#$ . 9741)]) (advice-add 'fill-region :around 'filladapt--fill-region) #@87 Overloading for `filladapt-mode'. (fn ORIG-FUN BEG END &optional JUSTIFY &rest ARGS) (defalias 'filladapt--fill-region #[1155 "\203u \204u\214}\210\302\303b\210m?\205p`\262m\204+\304 \204+\305y\210\202\211`\232\204O\214\211`}\210\306\307`%\210db\210)n\204Om\204O\305y\210\304 \203\214\310\302\211\"\210\311!\210db\210)n\204m\204\305y\210\202)\266\202)\207\306%\207" [filladapt-mode filladapt--inside-filladapt t nil filladapt-parse-prefixes 1 apply fill-region filladapt-adapt fill-paragraph] 13 (#$ . 10350)]) #@97 Non-nil if Filladapt mode is enabled. Use the command `filladapt-mode' to change this variable. (defvar filladapt-mode nil (#$ . 10904)) (make-variable-buffer-local 'filladapt-mode) #@327 Toggle Filladapt minor mode. With arg, turn Filladapt mode on iff arg is positive. When Filladapt mode is enabled, auto-fill-mode and the fill-paragraph command are both smarter about guessing a proper fill-prefix and finding paragraph boundaries when bulleted and indented lines and paragraphs are used. (fn &optional ARG) (defalias 'filladapt-mode #[256 "\302 \303=\203 ?\202\304!\305V\306\307\310\203\311\202 \312\"\210\313\314!\203D\302 \2034\211\302 \232\203D\315\316\317\203?\320\202@\321#\266\210\322 \210\207" [filladapt-mode zmacs-region-stays current-message toggle prefix-numeric-value 0 t run-hooks filladapt-mode-hook filladapt-mode-on-hook filladapt-mode-off-hook called-interactively-p any " in current buffer" message "Filladapt mode %sabled%s" "en" "dis" force-mode-line-update] 7 (#$ . 11093) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar filladapt-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\311\211%\210\312\313\306\311#\210\314\313\306\315#\207" [filladapt-mode-map filladapt-mode-hook variable-documentation put "Hook run after entering or leaving `filladapt-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode filladapt-mode filladapt-mode-line-string boundp nil defalias turn-on-filladapt-mode make-obsolete ""] 6) #@64 Unconditionally turn off Filladapt mode in the current buffer. (defalias 'turn-off-filladapt-mode #[0 "\300\301!\207" [filladapt-mode -1] 2 (#$ . 12533)]) #@143 Return non-nil if LIST contains a paragraph starting token. LIST should be a token list as returned by `filladapt-parse-prefixes'. (fn LIST) (defalias 'filladapt-paragraph-start #[257 "\3012\211\205\211@@>\203\302\301\303\"\210\211A\262\2020\207" [filladapt-token-paragraph-start-table done throw t] 4 (#$ . 12695)]) #@327 Parse all the tokens after point and return a list of them. The tokens regular expressions are specified in `filladapt-token-table'. The list returned is of this form ((SYM COL STRING) ...) SYM is a token symbol as found in `filladapt-token-table'. COL is the column at which the token ended. STRING is the token's text. (defalias 'filladapt-parse-prefixes #[0 "\212\304\211`\304\211\211\211\3052\205?\205\204 \262\203-\306@!\203&\307\305\310\"\210A\262\202\n\262\310\262\203\306@@!\203P@A@ >\204W\311\224\311\225=\203WA\262\2023\311\225b\210@A@i\311\224\311\225{EB\262`=?\262\211?\205xA\262\211?\262`\262\20230\210\237)\266\207)\207" [case-fold-search filladapt-not-token-table filladapt-token-table filladapt-token-match-empty nil done looking-at throw t 0] 11 (#$ . 13030)]) #@855 Compare two token lists and return non-nil if they match, nil otherwise. The lists are walked through in lockstep, comparing tokens. When two tokens A and B are compared, they are considered to match if 1. A appears in B's list of matching tokens or B appears in A's list of matching tokens and 2. A and B both end at the same column or A can match multiple tokens and ends at a column > than B or B can match multiple tokens and ends at a column > than A In the case where the end columns differ the list pointer for the token with the greater end column is not moved forward, which allows its current token to be matched against the next token in the other list in the next iteration of the matching loop. All tokens must be matched in order for the lists to be considered matching. (fn LIST1 LIST2) (defalias 'filladapt-tokens-match-p #[514 "\302\303\211\204\363\203\363\203\363@@\211> \236A@A@@@\211> \236A @A@>\2068>\211\204E\303\262 \302\262\n\202\356\203w\203wU\203a\fA\262  A\262\f\202\356W\203o\fA\262 \202\356 A\262\f\202\356\203\246U\203\217\fA\262  A\262\f\202\356W\203\236\303\262 \302\262\n\202\356 A\262\f\202\356\203\325U\203\275\fA\262  A\262\f\202\356W\203\315\303\262 \302\262\n\202\356\fA\262 \202\356U\203\350\fA\262  A\262\f\202\356\303\262 \302\262\n\266 \202\205\376?\205\376?\207" [filladapt-token-match-many-table filladapt-token-match-table t nil] 15 (#$ . 13861)]) #@115 Build a `fill-prefix' for a token LIST. `filladapt-token-conversion-table' specifies how this is done. (fn LIST) (defalias 'filladapt-make-fill-prefix #[257 "\301\211\2036@@\236A\262\211\302=\203!\303\304@8!B\262\202/\211\305=\203/\304@8B\262A\262\202\306\307\237\"\207" [filladapt-token-conversion-table nil spaces filladapt-convert-to-spaces 2 exact apply concat] 6 (#$ . 15398)]) (defalias 'filladapt-paragraph-within-fill-tolerance #[0 "\3022/\212 Z\303eb\210m\204*\211\203\304\302\303\"\210\202\f\303\210iW\262\305y\210\202\f\306\266\202)0\207" [fill-column filladapt-fill-column-tolerance done nil throw 1 t] 5]) #@90 Return a copy of STRING, with all non-tabs and non-space changed to spaces. (fn STRING) (defalias 'filladapt-convert-to-spaces #[257 "\300\301\302!\262G\303\211W\203&\211H>\204I\210\210\211T\262\202\n\266\207" [(32 9) 32 copy-sequence 0] 9 (#$ . 16053)]) #@310 Set `fill-prefix' based on the contents of the current line. If the first arg PARAGRAPH is non-nil, also set a clipping region around the current paragraph. If the second arg DEBUGGING is non-nil, don't do the kludge that's necessary to make certain paragraph fills work properly. (fn PARAGRAPH DEBUGGING) (defalias 'filladapt-adapt #[514 "\212\302 \210\303 \304\211\205\322\305!\203\321\304\211\306!\203\"`\262\202a\212\304\262\204`\307y\310U\204:\311\262`\262\202&\312\303 \211\262\"\204Q\313y\210\311\262`\262\202&\306!\203&\311\262`\262\202&)\212\304\262\204\237\304\210\313y\310U\204|\311\262`\262\202e\312\303 \211\262\"\204\220\311\262`\262\202e\306!\203e\311\262`\262\202e)}\210\203\317\204\317\304\314!@A@\262eb\210\315!\210e`{e`|\210c\210\316\317\320\"\266\266\311\266\203)\207" [fill-prefix filladapt-old-line-prefix beginning-of-line filladapt-parse-prefixes nil filladapt-make-fill-prefix filladapt-paragraph-start -1 0 t filladapt-tokens-match-p 1 last move-to-column add-hook filladapt-fill-paragraph-post-hook filladapt-cleanup-kludge-at-point-min] 11 (#$ . 16333)]) #@59 Cleanup the paragraph fill kludge. See `filladapt-adapt'. (defalias 'filladapt-cleanup-kludge-at-point-min #[0 "\212eb\210c\210\302 G!\210\303\304\305\")\207" [filladapt-old-line-prefix fill-prefix delete-char remove-hook filladapt-fill-paragraph-post-hook filladapt-cleanup-kludge-at-point-min] 3 (#$ . 17487)]) (byte-code "\300\301\302\"\210\300\303\304\"\210\300\305\306\"\210\300\307\310\"\207" [defalias filladapt-delete-extent delete-overlay filladapt-make-extent make-overlay filladapt-set-extent-endpoints move-overlay filladapt-set-extent-property overlay-put] 3) #@58 Toggle filladapt debugging on/off in the current buffer. (defalias 'filladapt-debug #[0 "\303\300!\210?\211\204* \211\203\211@\304\305\211#\210A\266\202\202\f\210\n\203*\306\n!\210\307\310\311\312\"\207" [filladapt-debug filladapt-debug-indentation-extents filladapt-debug-paragraph-extent make-local-variable filladapt-set-extent-endpoints 1 filladapt-delete-extent nil add-hook post-command-hook filladapt-display-debug-info-maybe] 7 (#$ . 18067)]) (defalias 'filladapt-display-debug-info-maybe #[0 "\204\306\207 \203\f\306\207\n\204'\307\310\211\"\311\312\306#\210\311\313\306#\210\311\314 #\210\212\214\f\n \306\211\211\315\316\211\"\204Q\317\310\211#\210\205\314\317@\310\211#\210A\262\202>\317ed#\210\320 \210\321 \262\322\323\324\325\326#\"\210\203\271\203z@\262A\262\202\220\307\310\211\"\262\311\312\306#\210\311\313\306#\210\211\fB\311\314#\210\317`\327@A@!\210`#\210 =\203\257\202\260 \262A\262\202g\205\314\317@\310\211#\210A\262\202\271)\266\206*\207" [filladapt-debug fill-prefix filladapt-debug-paragraph-extent filladapt-debug-paragraph-face filladapt-debug-indentation-extents filladapt-debug-indentation-face-1 nil filladapt-make-extent 1 filladapt-set-extent-property detachable evaporate face filladapt-adapt t filladapt-set-extent-endpoints beginning-of-line filladapt-parse-prefixes message "(%s)" mapconcat #[257 "\300@!\207" [symbol-name] 3 "\n\n(fn Q)"] " " move-to-column filladapt-debug-indentation-face-2] 12]) (provide 'filladapt)