Current File : //proc/thread-self/root/kunden/usr/share/emacs/27.2/lisp/progmodes/cc-guess.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\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313\314\315& \210\304\316\317\320\310\311\312\313\314\315& \207" [require cc-defs cc-engine cc-styles custom-declare-variable c-guess-offset-threshold 10 "Threshold of acceptable offsets when examining indent information.\nDiscard an examined offset if its absolute value is greater than this.\n\nThe offset of a line included in the indent information returned by\n`c-guess-basic-syntax'." :version "24.1" :type integer :group c c-guess-region-max 50000 "The maximum region size for examining indent information with `c-guess'.\nIt takes a long time to examine indent information from a large region;\nthis option helps you limit that time. nil means no limit."] 10)
#@34 Currently guessed offsets-alist.
(defvar c-guess-guessed-offsets-alist nil (#$ . 1156))
#@33 Currently guessed basic-offset.
(defvar c-guess-guessed-basic-offset nil (#$ . 1250))
(defvar c-guess-accumulator nil)
(defconst c-guess-conversions '((c . c-lineup-C-comments) (inher-cont . c-lineup-multi-inher) (string . -1000) (comment-intro . c-lineup-comment) (arglist-cont-nonempty . c-lineup-arglist) (arglist-close . c-lineup-close-paren) (cpp-macro . -1000)))
#@303 Guess the style in the region up to `c-guess-region-max', and install it.
The style is given a name based on the file's absolute file name.
If given a prefix argument (or if the optional argument ACCUMULATE is
non-nil) then the previous guess is extended, otherwise a new guess is
made from scratch.
(defalias 'c-guess #[(&optional accumulate) "\302ed\206 d^ #\207" [c-guess-region-max accumulate c-guess-region] 4 (#$ . 1626) "P"])
#@238 Guess the style in the region up to `c-guess-region-max'; don't install it.
If given a prefix argument (or if the optional argument ACCUMULATE is
non-nil) then the previous guess is extended, otherwise a new guess is
made from scratch.
(defalias 'c-guess-no-install #[(&optional accumulate) "\302ed\206 d^ #\207" [c-guess-region-max accumulate c-guess-region-no-install] 4 (#$ . 2070) "P"])
#@290 Guess the style on the whole current buffer, and install it.
The style is given a name based on the file's absolute file name.
If given a prefix argument (or if the optional argument ACCUMULATE is
non-nil) then the previous guess is extended, otherwise a new guess is
made from scratch.
(defalias 'c-guess-buffer #[(&optional accumulate) "\301ed#\207" [accumulate c-guess-region] 4 (#$ . 2471) "P"])
#@225 Guess the style on the whole current buffer; don't install it.
If given a prefix argument (or if the optional argument ACCUMULATE is
non-nil) then the previous guess is extended, otherwise a new guess is
made from scratch.
(defalias 'c-guess-buffer-no-install #[(&optional accumulate) "\301ed#\207" [accumulate c-guess-region-no-install] 4 (#$ . 2881) "P"])
#@275 Guess the style on the region and install it.
The style is given a name based on the file's absolute file name.
If given a prefix argument (or if the optional argument ACCUMULATE is
non-nil) then the previous guess is extended, otherwise a new guess is
made from scratch.
(defalias 'c-guess-region #[(start end &optional accumulate) "\303 \n#\210\304 \207" [start end accumulate c-guess-region-no-install c-guess-install] 4 (#$ . 3248) "r\nP"])
(defalias 'c-guess-empty-line-p #[nil "\300 \301 =\207" [line-beginning-position line-end-position] 2])
(put 'c-guess-empty-line-p 'byte-optimizer 'byte-compile-inline-expand)
#@794 Guess the style on the region; don't install it.
Every line of code in the region is examined and values for the following two
variables are guessed:
* `c-basic-offset', and
* the indentation values of the various syntactic symbols in
`c-offsets-alist'.
The guessed values are put into `c-guess-guessed-basic-offset' and
`c-guess-guessed-offsets-alist'.
Frequencies of use are taken into account when guessing, so minor
inconsistencies in the indentation style shouldn't produce wrong guesses.
If given a prefix argument (or if the optional argument ACCUMULATE is
non-nil) then the previous examination is extended, otherwise a new
guess is made from scratch.
Note that the larger the region to guess in, the slower the guessing.
So you can limit the region with `c-guess-region-max'.
(defalias 'c-guess-region-no-install #[(start end &optional accumulate) "\205 \306\f\n#\307 !\211@
A\211 *\207" [accumulate c-guess-accumulator accumulator start end pair c-guess-examine c-guess-guess c-guess-guessed-basic-offset c-guess-guessed-offsets-alist] 5 (#$ . 3879) "r\nP"])
(defalias 'c-guess-examine #[(start end accumulator) "\306\307!\205 \307\310 #\212b\210` W\203Q \311 \312 =\2041 \313\314\315 \316\211\316\317\216\320 -\"\210\n\203K \n`\321\247\203D @Y\205I \322#\266\323y\210\202 )\n\203Z \324\n!\210)\325!\207" [start end reporter #1=#:modified buffer-undo-list inhibit-read-only fboundp make-progress-reporter "Examining Indentation " line-beginning-position line-end-position mapc #[(s) "\302 \"\206 \211\207" [accumulator s c-guess-accumulate] 3] buffer-modified-p t #[nil "?\205 \301\302!\207" [#1# restore-buffer-modified-p nil] 2] c-guess-basic-syntax nil progress-reporter-do-update 1 progress-reporter-done c-guess-sort-accumulator inhibit-modification-hooks accumulator] 8])
(defalias 'c-guess-guess #[(accumulator) "\306!\307!\310\n \"\311\312\f!\"
,B\207" [accumulator basic-offset typical-offsets-alist symbolic-offsets-alist c-guess-conversions merged-offsets-alist c-guess-make-basic-offset c-guess-make-offsets-alist c-guess-symbolize-offsets-alist c-guess-merge-offsets-alists copy-tree] 3])
(defalias 'c-guess-current-offset #[(relpos) "\301 \210i\212b\210i)Z\207" [relpos back-to-indentation] 2])
(defalias 'c-guess-accumulate #[(accumulator syntax-element) "@A@ \247\205 \306 !\307!\fW\205 \310
\n#)*\207" [syntax-element relpos symbol offset c-guess-offset-threshold accumulator c-guess-current-offset abs c-guess-accumulate-offset] 4])
(defalias 'c-guess-accumulate-offset #[(accumulator symbol offset) "\306 \"\211A\307\n\203. \306
\"\211\203 \f\211AT\241\210\202*
\310BB\n\241\210 \2027
\310B\307BB B+\207" [symbol accumulator entry counters counter offset assoc nil 1] 4])
(defalias 'c-guess-sort-accumulator #[(accumulator) "\301\302\"\207" [accumulator mapcar #[(entry) "@A\211\303 \304\"*B\207" [entry counters symbol sort #[(a b) "A AV\203\n \302\207A A=\205 @ @W\207" [a b t] 2]] 5]] 3])
(defalias 'c-guess-make-offsets-alist #[(accumulator) "\301\302\"\207" [accumulator mapcar #[(entry) "@A@@B\207" [entry] 2]] 3])
(defalias 'c-guess-merge-offsets-alists #[(strong weak) "\302\303\"\210 \207" [weak strong mapc #[(weak-elt) "\302@ \"?\205 B\211\207" [weak-elt strong assoc] 3]] 3])
(defalias 'c-guess-make-basic-offset #[(accumulator) "\305\306\307!\"\310\311\312\313\"\"\314\315\316\312\317 \"!\"\312\320\n\"\321\2037 \fA@AW\2030 @A\211\204$ \f@-\207" [accumulator alist offset-list summed majority assq-delete-all c copy-tree apply append mapcar #[(elts) "\301\302A\"\207" [elts mapcar #[(elt) "\301@!AB\207" [elt abs] 2]] 3] delete 0 delete-dups #[(elt) "@\207" [elt] 1] #[(offset) "\302\303\304\305 \"\"B\207" [offset alist apply + mapcar #[(a) "@ =\203\n A\207\302\207" [a offset 0] 2]] 6] (nil . 0)] 7])
(defalias 'c-guess-symbolize-offsets-alist #[(offsets-alist basic-offset) "\301\302\"\207" [offsets-alist mapcar #[(elt) "@A \250\203 \n\304 \"B\202 *\207" [elt v s basic-offset c-guess-symbolize-integer] 4]] 3])
(defalias 'c-guess-symbolize-integer #[(int basic-offset) "\303!\n=\203 \304\202I \n=\203 \305\202I \306\n_=\203$ \307\202I \306\n_=\2030 \310\202I \306_\n=\203<