MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/progmodes/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/progmodes/cc-guess.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:20 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/progmodes/cc-guess.el
;;; in Emacs version 24.3.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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(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 (#$ . 1311))
#@33 Currently guessed basic-offset.
(defvar c-guess-guessed-basic-offset nil (#$ . 1405))
(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\206d^	#\207" [c-guess-region-max accumulate c-guess-region] 4 (#$ . 1781) "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\206d^	#\207" [c-guess-region-max accumulate c-guess-region-no-install] 4 (#$ . 2225) "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 (#$ . 2626) "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 (#$ . 3036) "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 (#$ . 3403) "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 (#$ . 4034) "r\nP"])
(defalias 'c-guess-examine #[(start end accumulator) "\306\307!\205\307\310	#\212b\210`	W\203e\311 \312 =\204A\313\314\315 \316\211\316\317\211\317\211\317\320\216\321 .\n\"\210\n\203_\n`\247\203X\n@Y\205]\322\n\"*\210\323y\210\202)\n\203n\324\n!\210)\325!\207" [start end reporter 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 ((byte-code "\204
\301 \203
\302\303!\210\303\207" [modified buffer-modified-p set-buffer-modified-p nil] 2)) c-guess-basic-syntax progress-reporter-do-update 1 progress-reporter-done c-guess-sort-accumulator inhibit-point-motion-hooks before-change-functions after-change-functions deactivate-mark buffer-file-name buffer-file-truename value accumulator] 5])
(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) "@\211A@)\n\247\205\"\306\n!\307\f!
W\205!\310	\f#)*\207" [syntax-element x relpos symbol offset c-guess-offset-threshold c-guess-current-offset abs c-guess-accumulate-offset accumulator] 5])
(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\nA\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\n\306_=\203$\307\202I	\n\306_=\2030\310\202I\306_\n=\203<\311\202I	\306_\n=\203H\305\202I)\207" [int aint basic-offset abs + - 2 ++ -- *] 3])
(defalias 'c-guess-style-name #[nil "\300\301\302 \"\207" [format "*c-guess*:%s" buffer-file-name] 3])
(defalias 'c-guess-make-style #[(basic-offset offsets-alist) "\205\303	\n\"\304B\302	)BD\207" [basic-offset offsets-alist c-offsets-alist c-guess-merge-offsets-alists c-basic-offset] 3])
#@363 Install the latest guessed style into the current buffer.
(This guessed style is a combination of `c-guess-guessed-basic-offset',
`c-guess-guessed-offsets-alist' and `c-offsets-alist'.)

The style is entered into CC Mode's style system by
`c-add-style'.  Its name is either STYLE-NAME, or a name based on
the absolute file name of the file if STYLE-NAME is nil.
(defalias 'c-guess-install #[(&optional style-name) "\304	\"\211\203$\305\232\204\206\306 \307\n\310#\210\311\312\")\202'\313\314!)\207" [c-guess-guessed-basic-offset c-guess-guessed-offsets-alist style style-name c-guess-make-style "" c-guess-style-name c-add-style t message "Style \"%s\" is installed" error "Not yet guessed"] 5 (#$ . 8869) "sNew style name (empty for default name): "])
#@29 Show `c-guess-accumulator'.
(defalias 'c-guess-dump-accumulator #[nil "r\306\307!q\210p\310 \210	\311\211\312\211\312\313 \210\314\315!\210+\211\316!\317!\210+\207" [default-directory #1=#:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks get-buffer-create "*Accumulated Examined Indent Information*" kill-all-local-variables nil t erase-buffer run-hooks temp-buffer-setup-hook pp internal-temp-output-buffer-show inhibit-read-only #2=#:buf standard-output c-guess-accumulator] 4 (#$ . 9641) nil])
#@30 Reset `c-guess-accumulator'.
(defalias 'c-guess-reset-accumulator #[nil "\301\211\207" [c-guess-accumulator nil] 2 (#$ . 10198) nil])
#@74 Show `c-guess-guessed-basic-offset' and `c-guess-guessed-offsets-alist'.
(defalias 'c-guess-dump-guessed-values #[nil "r\306\307!q\210p\310 \210	\311\211\312\211\312\313 \210\314\315!\210+\211\316\317!\210\320!\210\316\321!\210\316\322!\210\320!\323!\210+\207" [default-directory #1=#:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks get-buffer-create "*Guessed Values*" kill-all-local-variables nil t erase-buffer run-hooks temp-buffer-setup-hook princ "basic-offset: \n	" pp "\n\n" "offsets-alist: \n" internal-temp-output-buffer-show inhibit-read-only #2=#:buf standard-output c-guess-guessed-basic-offset c-guess-guessed-offsets-alist] 4 (#$ . 10339) nil])
#@183 Show the guessed style.
`pp' is used to print the style but if PRINTER is given,
PRINTER is used instead. If PRINTER is not `nil', it
is called with one argument, the guessed style.
(defalias 'c-guess-dump-guessed-style #[(&optional printer) "\306	\"\211\203Hr\307\310!q\210p\311 \210\f\312\211\313\211\313\314 \210\315\316!\210+\211\203<\202=\317\n!\320!\210+\202K\321\322!)\207" [c-guess-guessed-basic-offset c-guess-guessed-offsets-alist style default-directory #1=#:old-dir buffer-read-only c-guess-make-style get-buffer-create "*Guessed Style*" kill-all-local-variables nil t erase-buffer run-hooks temp-buffer-setup-hook pp internal-temp-output-buffer-show error "Not yet guessed" buffer-file-name buffer-undo-list inhibit-modification-hooks inhibit-read-only #2=#:buf standard-output printer] 4 (#$ . 11063) nil])
(defalias 'c-guess-guessed-syntactic-symbols #[nil "\305\211\203@A\n@\f\236\204\n@	B\202	+\207" [c-guess-guessed-offsets-alist symbols elt alist c-guess-conversions nil] 3])
(defalias 'c-guess-view-reorder-offsets-alist-in-style #[(style guessed-syntactic-symbols) "\303!\304\236\305 \211\306\nA\307\"\241\210*\207" [style guessed-syntactic-symbols offsets-alist-cell copy-tree c-offsets-alist c-guess-guessed-syntactic-symbols sort #[(a b) "@	>\n@	>\211\203\204\f\204&\204&\305@!\305\n@!\231\2023\f\203.\306\2023\2053\307*\207" [a guessed-syntactic-symbols b b-guessed\? a-guessed\? symbol-name t nil] 4]] 5])
(defalias 'c-guess-view-mark-guessed-entries #[(guessed-syntactic-symbols) "\302B\211\205,eb\210\303\304\305	@!\306Q\307\310#\203$\311\312!\210\313\307!\210\314c\210	A\211\204\307)\207" [guessed-syntactic-symbols needs-markers c-basic-offset search-forward "(" symbol-name " " nil t move-end-of-line 1 comment-dwim " Guessed value"] 5])
#@388 Emit emacs lisp code which defines the last guessed style.
So you can put the code into .emacs if you prefer the
guessed code.
"STYLE NAME HERE" is used as the name for the style in the
emitted code. If WITH-NAME is given, it is used instead.
WITH-NAME is expected as a string but if this function
called interactively with prefix argument, the value for
WITH-NAME is asked to the user.
(defalias 'c-guess-view #[(&optional with-name) ";\203	\202\203\306\307!\202\310\311 \n\f\230\203(\312

\"\202)\f\313\314!,\207" [with-name temporary-style-name guessed-style-name c-indentation-style current-style-name major-mode read-from-minibuffer "New style name: " "STYLE NAME HERE" c-guess-style-name cc-choose-style-for-mode c-guess-dump-guessed-style #[(style) "\305 \306\307	\310\n\311\"BDE!\210r\fq\210\312 \210\313!\210\314 *\207" [guessed-syntactic-symbols temporary-style-name parent-style-name style standard-output c-guess-guessed-syntactic-symbols pp c-add-style quote c-guess-view-reorder-offsets-alist-in-style lisp-interaction-mode c-guess-view-mark-guessed-entries buffer-enable-undo] 8] c-default-style parent-style-name] 3 (#$ . 12913) "P"])
(provide 'cc-guess)

MMCT - 2023