;ELC ;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:37:37 2003 ;;; from file /home/pot/gnu/emacs-pretest.new/lisp/completion.el ;;; in Emacs version 21.3 ;;; with bytecomp version 2.85.4.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`completion.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'completion nil "Dynamic word-completion code." :group 'matching :group 'convenience) #@134 *Non-nil means enable recording and saving of completions. If nil, no new words are added to the database or saved to the init file. (custom-declare-variable 'enable-completion 't '(#$ . -731) :type 'boolean :group 'completion) #@107 *Non-nil means save most-used completions when exiting Emacs. See also `save-completions-retention-time'. (custom-declare-variable 'save-completions-flag 't '(#$ . -966) :type 'boolean :group 'completion) #@39 *The filename to save completions to. (custom-declare-variable 'save-completions-file-name '(convert-standard-filename "~/.completions") '(#$ . -1177) :type 'file :group 'completion) #@187 *Discard a completion if unused for this many hours. (1 day = 24, 1 week = 168). If this is 0, non-permanent completions will not be saved unless these are used. Default is two weeks. (custom-declare-variable 'save-completions-retention-time '336 '(#$ . -1367) :type 'integer :group 'completion) #@116 *Non-nil means separator characters mark previous word as used. This means the word will be saved as a completion. (custom-declare-variable 'completion-on-separator-character 'nil '(#$ . -1672) :type 'boolean :group 'completion) #@61 *Number of versions to keep for the saved completions file. (custom-declare-variable 'completions-file-versions-kept 'kept-new-versions '(#$ . -1907) :type 'integer :group 'completion) #@70 *Minimum output speed at which to display next potential completion. (custom-declare-variable 'completion-prompt-speed-threshold '4800 '(#$ . -2098) :type 'integer :group 'completion) #@93 *If non-nil, the next completion prompt does a cdabbrev search. This can be time consuming. (custom-declare-variable 'completion-cdabbrev-prompt-flag 'nil '(#$ . -2288) :type 'boolean :group 'completion) #@123 *How far to search in the buffer when looking for completions. In number of characters. If nil, search the whole buffer. (custom-declare-variable 'completion-search-distance '15000 '(#$ . -2499) :type 'integer :group 'completion) #@173 *List of modes {`c' or `lisp'} for automatic completions merging. Definitions from visited files which have these modes are automatically added to the completion database. (custom-declare-variable 'completions-merging-modes ''(lisp c) '(#$ . -2737) :type '(set (const lisp) (const c)) :group 'completion) #@105 *The minimum length of a stored completion. DON'T CHANGE WITHOUT RECOMPILING ! This is used by macros. (defconst completion-min-length nil (#$ . -3049)) #@105 *The maximum length of a stored completion. DON'T CHANGE WITHOUT RECOMPILING ! This is used by macros. (defconst completion-max-length nil (#$ . -3210)) #@111 The minimum length of a completion search string. DON'T CHANGE WITHOUT RECOMPILING ! This is used by macros. (defconst completion-prefix-min-length nil (#$ . 3371)) (defalias 'eval-when-compile-load-eval '(macro . #[(&rest body) "\301\302\"\210\303B\207" [body mapcar eval progn] 3])) (defalias 'completion-eval-when #[nil "\303\304\305\211\207" [completion-min-length completion-max-length completion-prefix-min-length 6 200 3] 2]) (completion-eval-when) #@110 Set to t when the completion system is initialized. Indicates that the old completion file has been read in. (defvar cmpl-initialized-p nil (#$ . 3840)) #@105 Set to t as soon as the first completion has been accepted. Used to decide whether to save completions. (defvar cmpl-completions-accepted-p nil (#$ . 4000)) (byte-code "\301B\302B\301\207" [current-load-list cmpl-preceding-syntax completion-string] 2) #@48 True iff the current window is the minibuffer. (defalias 'minibuffer-window-selected-p #[nil "\300\301 !\207" [window-minibuffer-p selected-window] 2 (#$ . 4262)]) (defalias 'cmpl-read-time-eval '(macro . #[(form) "\207" [form] 1])) #@74 Return :capitalized, :up, :down, :mixed, or :neither for case of STRING. (defalias 'cmpl-string-case-type #[(string) "\302\303\304 \"\203+\303\305 \"\203' G\306V\203#\303\305 \306#\204#\307\2027\310\2027\311\2027\303\305 \"\2036\312\2027\313)\207" [case-fold-search string nil string-match "[[:lower:]]" "[[:upper:]]" 1 :capitalized :mixed :down :up :neither] 4 (#$ . 4502)]) (defalias 'cmpl-coerce-string-case #[(string case-type) "\302=\203 \227\207\303=\203 \226\207\304=\203' \227\211\305\306 \305H\307\"I\210 \207 \207" [case-type string :down :up :capitalized 0 logand 223] 6]) (defalias 'cmpl-merge-string-cases #[(string-to-coerce given-string) "\303!\211\304>\203\305\303\n!\"\202)\207" [string-to-coerce string-case-type given-string cmpl-string-case-type (:down :up :capitalized) cmpl-coerce-string-case] 5]) (defalias 'cmpl-hours-since-origin #[nil "\301 \302\303@_A@\\\304\")\207" [time current-time floor 65536.0 3600] 3]) (defalias 'cmpl-make-standard-completion-syntax-table #[nil "\306 \307\310\310\311W\203\312\313 #\210T\211\202\310\310\314W\2039\312\315\\\316 #\210\312\317\\\316 #\210T\211\202\310\310\320W\203P\312\321\\\316 #\210T\211\202<\322\323\211\307\211\203l @\312\f\316 #\210 A\211\204\\*\n\307\211\203\211@\312\f\324 #\210A\211\204v, *\207" [i table symbol-chars-ignore symbol-chars char #1=#:--dolist-temp--97269 make-syntax-table nil 0 256 modify-syntax-entry " " 26 97 "_" 65 10 48 (64 47 92 42 43 126 36 60 62 37) (95 45 58 46) "w" #2=#:--dolist-temp--97270] 6]) (byte-code "\301B\302 \301\207" [current-load-list cmpl-standard-syntax-table cmpl-make-standard-completion-syntax-table] 2) (defalias 'cmpl-make-lisp-completion-syntax-table #[nil "\305!\306 \307\211\203\f@\310 \311\n#\210\fA\211\204*\n*\207" [cmpl-standard-syntax-table symbol-chars table char #1=#:--dolist-temp--97271 copy-syntax-table (33 38 63 61 94) nil modify-syntax-entry "_"] 5]) (defalias 'cmpl-make-c-completion-syntax-table #[nil "\305!\306 \307\211\203\f@\310 \311\n#\210\fA\211\204*\n*\207" [cmpl-standard-syntax-table separator-chars table char #1=#:--dolist-temp--97272 copy-syntax-table (43 42 47 58 37) nil modify-syntax-entry " "] 5]) (defalias 'cmpl-make-fortran-completion-syntax-table #[nil "\305!\306 \307\211\203\f@\310 \311\n#\210\fA\211\204*\n*\207" [cmpl-standard-syntax-table separator-chars table char #1=#:--dolist-temp--97273 copy-syntax-table (43 45 42 47 58) nil modify-syntax-entry " "] 5]) (byte-code "\301B\304 \302B\305 \303B\306 \301\207" [current-load-list cmpl-lisp-syntax-table cmpl-c-syntax-table cmpl-fortran-syntax-table cmpl-make-lisp-completion-syntax-table cmpl-make-c-completion-syntax-table cmpl-make-fortran-completion-syntax-table] 2) #@58 This variable holds the current completion syntax table. (defvar cmpl-syntax-table cmpl-standard-syntax-table (#$ . 7312)) (make-variable-buffer-local 'cmpl-syntax-table) #@72 Holds first character of symbol, after any completion symbol function. (defvar cmpl-symbol-start nil (#$ . 7489)) #@71 Holds last character of symbol, after any completion symbol function. (defvar cmpl-symbol-end nil (#$ . 7609)) (byte-code "\301B\303\301!\204\f\304\302B\303\302!\204\304\304\207" [current-load-list cmpl-saved-syntax cmpl-saved-point boundp nil] 2) #@107 Returns the symbol that the point is currently on. But only if it is longer than `completion-min-length'. (defalias 'symbol-under-point #[nil "\306 \307\216\310 !\210gz\311>\205X`\312\nT\313\"\312\n\314\" fz\315U\2030 b\210\314v\210`\nb\210\fSfz\315U\203D\fb\210\313v\210`\nb\210 \f ZX\205X\f ZX\205X \f{)\207" [cmpl-saved-syntax cmpl-syntax-table cmpl-saved-point cmpl-symbol-start cmpl-symbol-end completion-min-length syntax-table ((set-syntax-table cmpl-saved-syntax)) set-syntax-table (119 95) scan-sexps -1 1 119 completion-max-length] 3 (#$ . 7873)]) #@126 Returns a string of the symbol immediately before point. Returns nil if there isn't one longer than `completion-min-length'. (defalias 'symbol-before-point #[nil "\306 \307\216\310 !\210hz\211\311U\203:`\312 \313\"\211fz\314U\203,\fb\210\315v\210` b\210 \f \\Y\205v\f {\202v\n\314U\205v`\312\313\"\313v\210`\ffz\314U\203^\fb\210\315v\210`b\210 \fZX\205v \fZX\205v\f {)\207" [cmpl-saved-syntax cmpl-syntax-table cmpl-preceding-syntax cmpl-symbol-end cmpl-symbol-start completion-min-length syntax-table ((set-syntax-table cmpl-saved-syntax)) set-syntax-table 95 scan-sexps -1 119 1 cmpl-saved-point completion-max-length] 4 (#$ . 8451)]) (defalias 'symbol-under-or-before-point #[nil "\302 \303\216\304 !\210gz)\305>\203\306 \207\307 \207" [cmpl-saved-syntax cmpl-syntax-table syntax-table ((set-syntax-table cmpl-saved-syntax)) set-syntax-table (119 95) symbol-under-point symbol-before-point] 2]) (defalias 'symbol-before-point-for-complete #[nil "\306 \307\216\310 !\210hz\211\311>\205@`\312 \313\"\211fz\314U\203,\fb\210\315v\210` b\210 \fZX\205@ \fZX\205@\f {)\207" [cmpl-saved-syntax cmpl-syntax-table cmpl-preceding-syntax cmpl-symbol-end cmpl-symbol-start completion-prefix-min-length syntax-table ((set-syntax-table cmpl-saved-syntax)) set-syntax-table (95 119) scan-sexps -1 119 1 completion-max-length] 4]) (defalias 'cmpl-statistics-block '(macro . #[(&rest body) "\300\207" [nil] 1])) (byte-code "\301B\306\302B\307\303B\310\304B\311\305B\312\313B\314 \315B\316 \317B\320\321B\322\321!\204@ \323B\322\323!\204M\324\325B\322\325!\204Z\306\326B\322\326!\204g\324\327B\322\327!\204t\324\330B\322\330!\204\201\331\332B\322\332!\204\216\306\333B\324\207" [current-load-list cmpl-source-unknown cmpl-source-init-file cmpl-source-file-parsing cmpl-source-separator cmpl-source-cursor-moves 0 1 2 3 4 cmpl-source-interactive 5 cmpl-source-cdabbrev 6 num-cmpl-sources 7 current-completion-source boundp cdabbrev-completions-tried nil cdabbrev-current-point cdabbrev-current-window cdabbrev-wrapped-p cdabbrev-abbrev-string "" cdabbrev-start-point cdabbrev-stop-point] 2) #@143 Resets the cdabbrev search to search for abbrev-string. INITIAL-COMPLETIONS-TRIED is a list of downcased strings to ignore during the search. (defalias 'reset-cdabbrev #[(abbrev-string &optional initial-completions-tried) "\227\nB\304\305!\207" [abbrev-string cdabbrev-abbrev-string initial-completions-tried cdabbrev-completions-tried reset-cdabbrev-window t] 2 (#$ . 10634)]) (defalias 'set-cdabbrev-buffer #[nil "\301=\203 \302 \202\303!q\207" [cdabbrev-current-window t other-buffer window-buffer] 2]) #@57 Resets the cdabbrev search to search for abbrev-string. (defalias 'reset-cdabbrev-window #[(&optional initializep) "\203\n\306 \202& \307=\203\310\202& \203&\311 !\211\306 =\203&\307 \205E\212\312 \210`\211\f\203>e \fZ]\202?e\310\211 )\207" [initializep cdabbrev-current-window cdabbrev-current-point cdabbrev-start-point completion-search-distance cdabbrev-stop-point selected-window t nil next-window set-cdabbrev-buffer cdabbrev-wrapped-p] 4 (#$ . 11155)]) #@159 Return the next possible cdabbrev expansion or nil if there isn't one. `reset-cdabbrev' must've been called already. This is sensitive to `case-fold-search'. (defalias 'next-cdabbrev #[nil "\205\272\306\211\211\211\211\211\211\212\307\216\310 \210`\311 \312!\210b\210\313\314#\203\200hz\211\315U\204R\n\316U\205|`\317v\210hz\315U b\210\205|\320 \211\205| \227 \203q\f @\230\204q A\211\204c \203{\306\211\202|\314?\202\236\204\241\203\224d\\^\202\225d\211b\210\314\211\204* \203\256\fB`* \206\270\321 \210\322 .\207" [cdabbrev-current-window saved-point-2 syntax tried-list downcase-expansion expansion nil ((byte-code "\302!\210 b\207" [saved-syntax saved-point set-syntax-table] 2)) set-cdabbrev-buffer syntax-table set-syntax-table search-backward t 32 119 -1 symbol-under-point reset-cdabbrev-window next-cdabbrev saved-syntax saved-point cmpl-syntax-table cdabbrev-current-point cdabbrev-abbrev-string cdabbrev-stop-point cdabbrev-completions-tried cdabbrev-wrapped-p completion-search-distance cdabbrev-start-point] 8 (#$ . 11641)]) (byte-code "\301B\302\301\207" [current-load-list cmpl-obarray-length 511] 2) #@115 An obarray used to store the downcased completion prefixes. Each symbol is bound to a list of completion entries. (defvar cmpl-prefix-obarray (make-vector cmpl-obarray-length 0) (#$ . 12836)) #@104 An obarray used to store the downcased completions. Each symbol is bound to a single completion entry. (defvar cmpl-obarray (make-vector cmpl-obarray-length 0) (#$ . 13035)) (defalias 'completion-string '(macro . #[(completion-entry) "\301D\207" [completion-entry car] 2])) (defalias 'completion-num-uses '(macro . #[(completion-entry) "\301\302DD\207" [completion-entry car cdr] 3])) (defalias 'completion-last-use-time '(macro . #[(completion-entry) "\301\302E\207" [completion-entry nth 2] 3])) (defalias 'completion-source '(macro . #[(completion-entry) "\301\302E\207" [completion-entry nth 3] 3])) (defalias 'set-completion-string '(macro . #[(completion-entry string) "\302 E\207" [completion-entry string setcar] 3])) (defalias 'set-completion-num-uses '(macro . #[(completion-entry num-uses) "\302\303D E\207" [completion-entry num-uses setcar cdr] 3])) (defalias 'set-completion-last-use-time '(macro . #[(completion-entry last-use-time) "\302\303\211DD E\207" [completion-entry last-use-time setcar cdr] 4])) #@39 Returns a list of a completion entry. (defalias 'make-completion #[(string) "\302\303 FC\207" [string current-completion-source 0 nil] 4 (#$ . 14068)]) (defalias 'cmpl-prefix-entry-head '(macro . #[(prefix-entry) "\301D\207" [prefix-entry car] 2])) (defalias 'cmpl-prefix-entry-tail '(macro . #[(prefix-entry) "\301D\207" [prefix-entry cdr] 2])) (defalias 'set-cmpl-prefix-entry-head '(macro . #[(prefix-entry new-head) "\302 E\207" [prefix-entry new-head setcar] 3])) (defalias 'set-cmpl-prefix-entry-tail '(macro . #[(prefix-entry new-tail) "\302 E\207" [prefix-entry new-tail setcdr] 3])) #@60 Makes a new prefix entry containing only completion-entry. (defalias 'make-cmpl-prefix-entry #[(completion-entry-list) "\211B\207" [completion-entry-list] 2 (#$ . 14671)]) #@72 Initialize the completion storage. All existing completions are lost. (defalias 'clear-all-completions #[nil "\303\304\"\303\304\"\305\207" [cmpl-obarray-length cmpl-prefix-obarray cmpl-obarray make-vector 0 nil] 3 (#$ . 14850) nil]) (byte-code "\301B\301\207" [current-load-list completions-list-return-value] 2) #@52 Return a list of all the known completion entries. (defalias 'list-all-completions #[nil "\302\303\304 \"\210)\207" [completions-list-return-value cmpl-prefix-obarray nil mapatoms list-all-completions-1] 3 (#$ . 15177)]) (defalias 'list-all-completions-1 #[(prefix-symbol) "\302!\205\303J@ \"\211\207" [prefix-symbol completions-list-return-value boundp append] 3]) #@77 Return list of lists of known completion entries, organized by hash bucket. (defalias 'list-all-completions-by-hash-bucket #[nil "\302\303\304 \"\210)\207" [completions-list-return-value cmpl-prefix-obarray nil mapatoms list-all-completions-by-hash-bucket-1] 3 (#$ . 15556)]) (defalias 'list-all-completions-by-hash-bucket-1 #[(prefix-symbol) "\302!\205 J@ B\211\207" [prefix-symbol completions-list-return-value boundp] 2]) (byte-code "\301B\306\301!\204\f\307\302B\306\302!\204\307\303B\306\303!\204$\307\304B\306\304!\2040\307\305B\306\305!\204<\307\307\207" [current-load-list completion-to-accept cmpl-db-downcase-string cmpl-db-symbol cmpl-db-prefix-symbol cmpl-db-entry boundp nil] 2) #@45 Set to T if you want to debug the database. (defvar cmpl-db-debug-p nil (#$ . 16281)) #@104 Return the completion entry for STRING or nil. Sets up `cmpl-db-downcase-string' and `cmpl-db-symbol'. (defalias 'find-exact-completion #[(string) "\304\305\227\211\n\"\211!\205 J\207" [string cmpl-db-downcase-string cmpl-obarray cmpl-db-symbol boundp intern] 4 (#$ . 16374)]) #@182 Return the prefix entry for string. Sets `cmpl-db-prefix-symbol'. Prefix-string must be exactly `completion-prefix-min-length' long and downcased. Sets up `cmpl-db-prefix-symbol'. (defalias 'find-cmpl-prefix-entry #[(prefix-string) "\303\304 \"\211!\205 \nJ\207" [prefix-string cmpl-prefix-obarray cmpl-db-prefix-symbol boundp intern] 4 (#$ . 16663)]) (byte-code "\301B\302\301!\204\f\303\303\207" [current-load-list inside-locate-completion-entry boundp nil] 2) #@184 Locate the completion entry. Returns a pointer to the element before the completion entry or nil if the completion entry is at the head. Must be called after `find-exact-completion'. (defalias 'locate-completion-entry #[(completion-entry prefix-entry) "@\306\211@ =?\205B\n\203! \nA\211@=\204! \211\204\n\206B\f\2030\307\310 \"\202B \203:\311 \202B\f\306L\210\312 !*\207" [prefix-entry next-prefix-list prefix-list completion-entry cmpl-db-debug-p completion-string nil error "Completion entry exists but not on prefix list - %s" locate-completion-db-error locate-completion-entry-retry inside-locate-completion-entry cmpl-db-symbol] 4 (#$ . 17141)]) (defalias 'locate-completion-entry-retry #[(old-entry) "\306\307 @ A@\310 8#\210\311 @!\211\205\312 \313\fO!\n\203, \203,\314\n \"\202.\315 +\207" [inside-locate-completion-entry old-entry cmpl-entry cmpl-db-downcase-string completion-prefix-min-length pref-entry t add-completion 2 find-exact-completion find-cmpl-prefix-entry 0 locate-completion-entry locate-completion-db-error] 6]) (defalias 'locate-completion-db-error #[nil "\300\301!\207" [error "Completion database corrupted. Try M-x clear-all-completions. Send bug report"] 2]) #@303 If STRING is not in the database add it to appropriate prefix list. STRING is added to the end of the appropriate prefix list with num-uses = 0. The database is unchanged if it is there. STRING must be longer than `completion-prefix-min-length'. This must be very fast. Returns the completion entry. (defalias 'add-completion-to-tail-if-new #[(string) "\306!\206-\307!\310 \311\nO! \203! A\f\241\210 \f\241\210\202' \312\f!L\210 \f@L*\207" [string cmpl-db-downcase-string completion-prefix-min-length prefix-entry entry cmpl-db-prefix-symbol find-exact-completion make-completion find-cmpl-prefix-entry 0 make-cmpl-prefix-entry cmpl-db-symbol] 5 (#$ . 18364)]) #@344 If COMPLETION-STRING is not in the database, add it to prefix list. We add COMPLETION-STRING to the head of the appropriate prefix list, or it to the head of the list. COMPLETION-STRING must be longer than `completion-prefix-min-length'. Updates the saved string with the supplied string. This must be very fast. Returns the completion entry. (defalias 'add-completion-to-head #[(completion-string) "\203\306 \210\307 !\211\203E\310 \311\fO!\312\n \"\211 A\n \240\210 \203B A\241\2047  \241\210 @\241\210 \240\210\n+\207\313 !\310 \311\fO! \203c @\241\210 \240\210\202k\314!L\210@L*\207" [completion-to-accept completion-string cmpl-db-entry cmpl-db-downcase-string completion-prefix-min-length prefix-entry accept-completion find-exact-completion find-cmpl-prefix-entry 0 locate-completion-entry make-completion make-cmpl-prefix-entry splice-ptr cmpl-ptr entry cmpl-db-prefix-symbol cmpl-db-symbol] 6 (#$ . 19042)]) #@101 Delete the completion from the database. String must be longer than `completion-prefix-min-length'. (defalias 'delete-completion #[(completion-string) "\203\306 \210\307 !\211\203G\310 \311\fO!\312\n \"\313L\210\2037\211AA\241\204D \241\210\202D \211@A\240\204D\313L\210*\313\207\314\315 \"\207" [completion-to-accept completion-string cmpl-db-entry cmpl-db-downcase-string completion-prefix-min-length prefix-entry accept-completion find-exact-completion find-cmpl-prefix-entry 0 locate-completion-entry nil error "Unknown completion `%s'" splice-ptr cmpl-db-symbol cmpl-db-prefix-symbol] 4 (#$ . 20003)]) (defalias 'interactive-completion-string-reader #[(prompt) "\305 \211\203\306\307 #\202\306\310 \"\311\n \"\312\fG!\203&\206%\313\f+C\207" [default prompt new-prompt cmpl-obarray read symbol-under-or-before-point format "%s: (default: %s) " "%s: " completing-read zerop ""] 5]) (defalias 'check-completion-length #[(string) "G W\203\f\302\303\"\207C\207" [string completion-min-length error "The string `%s' is too short to be saved as a completion"] 3]) #@148 Add STRING to completion list, or move it to head of list. The completion is altered appropriately if num-uses and/or last-use-time is specified. (defalias 'add-completion #[(string &optional num-uses last-use-time) "\306!\210t\203\f \202 \n\307!\f\203 A\f\240\210 \205$ AA \240*\207" [string cmpl-source-interactive current-completion-source entry num-uses last-use-time check-completion-length add-completion-to-head] 2 (#$ . 21110) (interactive-completion-string-reader "Completion to add")]) #@63 Add STRING if it isn't already listed, and mark it permanent. (defalias 'add-permanent-completion #[(string) "t\203\202 \303\n\304\305#)\207" [cmpl-source-interactive current-completion-source string add-completion nil t] 4 (#$ . 21622) (interactive-completion-string-reader "Completion to add permanently")]) (defalias 'kill-completion #[(string) "\301!\210\302!\207" [string check-completion-length delete-completion] 2 nil (interactive-completion-string-reader "Completion to kill")]) #@148 Accepts the pending completion in `completion-to-accept'. This bumps num-uses. Called by `add-completion-to-head' and `completion-search-reset'. (defalias 'accept-completion #[nil " \306\306\307\f!\211A\nA@T\240\210\310\211+\207" [completion-to-accept cmpl-source-cdabbrev entry current-completion-source string cmpl-completions-accepted-p nil add-completion-to-head t] 4 (#$ . 22125)]) #@76 Add the completion symbol underneath the point into the completion buffer. (defalias 'use-completion-under-point #[nil "\205\304 \211\205\305 !*\207" [enable-completion cmpl-source-cursor-moves current-completion-source string symbol-under-point add-completion-to-head] 3 (#$ . 22527)]) #@68 Add the completion symbol before point into the completion buffer. (defalias 'use-completion-before-point #[nil "\205\304 \211\205\305 !*\207" [enable-completion cmpl-source-cursor-moves current-completion-source string symbol-before-point add-completion-to-head] 3 (#$ . 22828)]) #@68 Add the completion symbol before point into the completion buffer. (defalias 'use-completion-under-or-before-point #[nil "\205\304 \211\205\305 !*\207" [enable-completion cmpl-source-cursor-moves current-completion-source string symbol-under-or-before-point add-completion-to-head] 3 (#$ . 23123)]) #@174 Add the completion symbol before point into the completion buffer. Completions added this way will automatically be saved if `completion-on-separator-character' is non-nil. (defalias 'use-completion-before-separator #[nil "\205\306 \307\211\205(\310\f! \205(\311\nA@!\205(\nA\312\240\210\313\211\f+\207" [enable-completion cmpl-source-separator entry current-completion-source string completion-on-separator-character symbol-before-point nil add-completion-to-head zerop 1 t cmpl-completions-accepted-p] 4 (#$ . 23437)]) (byte-code "\301B\306\301!\204\f\307\302B\306\302!\204\307\303B\306\303!\204$\310\304B\306\304!\2040\311\305B\306\305!\204<\311\312B\306\312!\204I\311\n\313B\306\313!\204V\311 \314B\306\314!\204c\311\f\311\207" [current-load-list cmpl-test-string cmpl-test-regexp cmpl-last-index cmpl-cdabbrev-reset-p cmpl-next-possibilities boundp "" 0 nil cmpl-starting-possibilities cmpl-next-possibility cmpl-tried-list] 2) #@108 Set up the for completion searching for STRING. STRING must be longer than `completion-prefix-min-length'. (defalias 'completion-search-reset #[(string) "\203\306 \210\307 \310\nO\227!@ \311 !\312P\313 \207" [completion-to-accept string completion-prefix-min-length cmpl-starting-possibilities cmpl-test-string cmpl-test-regexp accept-completion find-cmpl-prefix-entry 0 regexp-quote "." completion-search-reset-1] 4 (#$ . 24422)]) (defalias 'completion-search-reset-1 #[nil "\306\306\307\306\211\207" [cmpl-starting-possibilities cmpl-next-possibilities cmpl-next-possibility cmpl-cdabbrev-reset-p cmpl-last-index cmpl-tried-list nil -1] 2]) #@164 Return the next completion entry. If INDEX is out of sequence, reset and start from the top. If there are no more entries, try cdabbrev and returns only a string. (defalias 'completion-search-next #[(index) " T\211U\203\305\306!\210\202f\307W\203M\310 \210\311\n!\305\312!\2033T\211\307W\2033\312\202 \203f \313U\203B\n\202f\nG GZ\n\233\202f\310 \210\305\306!\203fS\211\307W\204f\312\202R\f\312\207" [index cmpl-last-index cmpl-starting-possibilities cmpl-next-possibilities cmpl-next-possibility completion-search-peek t 0 completion-search-reset-1 reverse nil -1] 3 (#$ . 25084)]) #@278 Returns the next completion entry without actually moving the pointers. Calling this again or calling `completion-search-next' results in the same string being returned. Depends on `case-fold-search'. If there are no more entries, try cdabbrev and then return only a string. (defalias 'completion-search-peek #[(use-cdabbrev) "\206@ \203,\306\n @@\"\307=\204 A\211\204 \203, @\211@\227 B A\207\f\205@ \204<\310 \"\210\311\312 \211\207" [cmpl-next-possibility cmpl-next-possibilities cmpl-test-regexp cmpl-tried-list use-cdabbrev cmpl-cdabbrev-reset-p string-match 0 reset-cdabbrev t next-cdabbrev cmpl-test-string] 4 (#$ . 25706)]) #@68 Toggle whether or not to add new words to the completion database. (defalias 'completion-mode #[nil "?\301\302\203 \303\202\304\"\207" [enable-completion message "Completion mode is now %s." "ON" "OFF"] 3 (#$ . 26365) nil]) (byte-code "\301B\305\301!\204\f\306\302B\305\302!\204\307\303B\305\303!\204$\310\304B\305\304!\2040\307\307\207" [current-load-list cmpl-current-index cmpl-original-string cmpl-last-insert-location cmpl-leave-point-at-start boundp 0 nil -1] 2) #@437 Fill out a completion of the word before point. Point is left at end. Consecutive calls rotate through all possibilities. Prefix args :: control-u :: leave the point at the beginning of the completion rather than at the end. a number :: rotate through the possible completions by that amount `-' :: same as -1 (insert previous completion) {See the comments at the top of `completion.el' for more info.} (defalias 'complete #[(&optional arg) " =\203\n`|\210 \f\206\306\\\202S \204\307 \210:\203*\310\311\202-\312\313 \211\204=\314\315\316\"\210\203F\f\202G\310\317!\210|\210 !Y\205^\320 ?\"`#\321 !$\312%$\203\325$;\203{$\202~$@%\322%\"\211%c\210%&\203\235`#b\210\202\240#\"\205\371\323\310!\205\371\324'!\211$\205\371$;\203\300$\202\303$@%\322%\"%\325\326%\"\202\371c\210\312&\"\203\366\323\310!\203\366\325\327 =\203\363\330\202\364\331\"\210\314\211,\207" [last-command this-command cmpl-last-insert-location cmpl-current-index arg cmpl-initialized-p 1 initialize-completions 0 t nil symbol-before-point-for-complete failed-complete error "To complete, point must be after a symbol at least %d character long" completion-search-reset minibuffer-window-selected-p completion-search-next cmpl-merge-string-cases sit-for completion-search-peek message "Next completion: %s" "No %scompletions." "more " "" current-prefix-arg cmpl-leave-point-at-start cmpl-original-string completion-prefix-min-length cmpl-symbol-start cmpl-symbol-end baud-rate completion-prompt-speed-threshold print-status-p insert-point entry string completion-to-accept completion-cdabbrev-prompt-flag] 5 (#$ . 26864) "*p"]) #@67 Parse possible completions from a FILE and add them to data base. (defalias 'add-completions-from-file #[(file) "\304!\305!\211\211\204\306\307!)\310\216\212 q\210\311 ,\207" [file buffer buffer-already-there-p completions-merging-modes expand-file-name get-file-buffer nil find-file-noselect ((byte-code "\204\302 !\210\302\207" [buffer-already-there-p buffer kill-buffer] 2)) add-completions-from-buffer] 3 (#$ . 28589) "fFile: "]) (defalias 'add-completions-from-buffer #[nil "\305\211\f\306>\203\307 \210\310\202'\f\311>\203\"\312 \210\313\202'\314\315\f\"\210+\305\207" [cmpl-source-file-parsing mode start-num current-completion-source major-mode nil (emacs-lisp-mode lisp-mode) add-completions-from-lisp-buffer lisp (c-mode) add-completions-from-c-buffer c error "Cannot parse completions in %s buffers"] 3 nil nil]) (defalias 'cmpl-find-file-hook #[nil "\205! \303>\203\304\n>\203\305 \207 \306>\205!\307\n>\205!\305 \207" [enable-completion major-mode completions-merging-modes (emacs-lisp-mode lisp-mode) lisp add-completions-from-buffer (c-mode) c] 2]) #@46 Add completions from the current tags table. (defalias 'add-completions-from-tags-table #[nil "\301 \210\212eb\210\302\303\304\305\217*\207" [string visit-tags-table-buffer nil e (byte-code "\301\302!\210\303u\210\304 \211\203\305!\210\306u\210\202" [string search-forward "" -3 symbol-under-point add-completion-to-tail-if-new 3] 2) ((search-failed))] 3 (#$ . 29691) nil]) #@50 A regexp that searches for Lisp definition form. (defconst *lisp-def-regexp* "\n(\\(\\w*:\\)?def\\(\\w\\|\\s_\\)*\\s +(*" (#$ . 30079)) (defalias 'add-completions-from-lisp-buffer #[nil "\301\212eb\210\302\303\304\217*\207" [string nil e (byte-code "\302!\210\303 \211\203\304 !\210\202" [*lisp-def-regexp* string re-search-forward symbol-under-point add-completion-to-tail-if-new] 2) ((search-failed))] 3]) (defalias 'cmpl-make-c-def-completion-syntax-table #[nil "\306 \307\310\311\312\312\313W\203\314\315 #\210T\211\202\f\n\311\211\2036 @\314\f\316 #\210 A\211\204&* \311\211\203S@\314\f\317 #\210A\211\204@*\314\320\321 #\210\314\322\323 #\210\314\324\325 #\210\314\326\327 #\210 ,\207" [i separator-chars whitespace-chars table char #1=#:--dolist-temp--97274 make-syntax-table (32 10 9 12 11 13) (44 42 61 40 59) nil 0 256 modify-syntax-entry "w" "_" " " 91 "(]" 123 "(}" 93 ")[" 125 "){" #2=#:--dolist-temp--97275] 6]) (byte-code "\301B\302 \301\207" [current-load-list cmpl-c-def-syntax-table cmpl-make-c-def-completion-syntax-table] 2) #@47 A regexp that searches for a definition form. (defconst *c-def-regexp* "\n[_a-zA-Z#]" (#$ . 31169)) (defalias 'add-completions-from-c-buffer #[nil "\304\211\211\305 \212eb\210\306\307\215-\207" [saved-syntax char next-point string nil syntax-table finish-add-completions (byte-code "\301\216\302!\210\303\304\305\217\210\202" [cmpl-c-def-syntax-table ((set-syntax-table saved-syntax)) set-syntax-table e (byte-code "\304!\210h\305U\203/``\306\\{\211\307\230\204 \310\230\203\311v\203\312 \211\203\313 !\210\202`\n\203\314\n\315\"\211\203\nb\210g\211\316U\203T\314`\315\"\211b\210\202A\317v\210\320 \211\203e\313 !\210\202y\321\322!\203y\317v\210\320 \211\203y\313 !\210\nb\210 z\323U\203\226 z\323U\2031\314\n\315\"\211f\211\202\204 \324U\2041\325\211\2022" [*c-def-regexp* string next-point char re-search-forward 35 6 "define" "ifdef " 2 symbol-before-point add-completion-to-tail-if-new scan-sexps 1 42 -1 symbol-under-point looking-at "_AP" 40 44 nil] 4) ((search-failed (byte-code "\300\301\302\"\207" [throw finish-add-completions t] 3)) (error (byte-code "A@\301\230\204A@\302\230\203\303y\210\202\304\305!\210\306\307\310\"\210\303\207" [e "Containing expression ends prematurely" "Unbalanced parentheses" 1 message "Error parsing C buffer for completions--please send bug report" throw finish-add-completions t] 3)))] 3)] 4]) (defalias 'kill-emacs-save-completions #[nil "\205 \205\n\205 \204\304\305!\207\306 \207" [save-completions-flag enable-completion cmpl-initialized-p cmpl-completions-accepted-p message "Completions database has not changed - not writing." save-completions-to-file] 2]) (byte-code "\301B\303\302B\304\301\207" [current-load-list completion-version saved-cmpl-file-header "11" ";;; Completion Initialization file.\n;; Version = %s\n;; Format is ( . )\n;; is the completion\n;; is the time the completion was last used\n;; If it is t, the completion will never be pruned from the file.\n;; Otherwise it is in hours since origin.\n\n"] 2) (defalias 'completion-backup-filename #[(filename) "\301P\207" [filename ".BAK"] 2]) #@106 Save completions in init file FILENAME. If file name is not specified, use `save-completions-file-name'. (defalias 'save-completions-to-file #[(&optional filename) "\306\206 !\307!\205\331\n\204\310 \210\311\312\"\210\313\314  \315!\316 \"\314#\314$\314%\317!&\212\320\321!\210\321q\210'\322p!\204U\311\323!\210\324\313\"\210\311\325\"\210\326 \210\327 \210\330()\"c\210\331 \315*\211+\203\315+@*#T#\332*8\211!\313=\203\215$T\211$\204\263*A@\314V\203\236\"\211!\202\260!\203\304,\203\263\"!Z,W\203\304%T%\333*@!B!\334\261\210+A\211+\204n*\335\336\337\217\210\315-.\n\315\207" [filename save-completions-file-name cmpl-initialized-p delete-old-versions kept-old-versions completions-file-versions-kept expand-file-name file-writable-p initialize-completions message "Saving completions to file %s" t 0 nil cmpl-hours-since-origin completion-backup-filename get-buffer-create " *completion-save-buffer*" verify-visited-file-modtime "Completion file has changed. Merging. . ." load-completions-from-file "Merging finished. Saving completions to file %s" clear-visited-file-modtime erase-buffer format list-all-completions 2 prin1-to-string "\n" e (byte-code "\301!\211\203\301\n!\204\303\n\"\210\304\n\305#\210\306 \210 \203$\307\n!\210)\301\207" [filename file-exists-p backup-filename rename-file copy-file t save-buffer delete-file] 5) ((error (byte-code "\301\302!\210\303\304\"\207" [filename set-buffer-modified-p nil message "Couldn't save completion file `%s'"] 3))) kept-new-versions last-use-time current-time total-in-db total-perm total-saved backup-filename buffer-file-name saved-cmpl-file-header completion-version completion #1=#:--dolist-temp--97276 save-completions-retention-time cmpl-completions-accepted-p] 4 (#$ . 33357) nil]) #@104 Load a completion init file FILENAME. If file is not specified, then use `save-completions-file-name'. (defalias 'load-completions-from-file #[(&optional filename no-message-p) "\306\206 !\307!\310\n!\211\203\n\310!\205|\f\204.\311\312 \203*\313\202+\314#\210\212\315\316!\210\316q\210\317 \210\320 \210\321p\322 \321\211\211\211\211\211\321\323\211 !\"#$%&\324\325\326\217\210&\203yeb\210\324\327\330\217\210.\321*\207" [filename save-completions-file-name backup-filename backup-readable-p no-message-p buffer-file-name expand-file-name completion-backup-filename file-readable-p message "Loading completions from %sfile %s . . ." "backup " "" get-buffer-create " *completion-save-buffer*" clear-visited-file-modtime erase-buffer nil cmpl-hours-since-origin 0 e (byte-code "\302\303\"\210\303\302\207" [filename insert-okay-p insert-file-contents t] 3) ((file-error (message "File error trying to load completion file %s." filename))) (byte-code "\306!\nT :\203k @\211;\203k A\211\307=\203& T\310\211\2025\f\310=\2033 T\211\2025\f\250\203k\311\312 !\2118\f\310=\204a\f\313V\203\310=\204\203a\fV\203AA\f\240\210\202\314\315\316 !\"\210\317\320!\210\202" [buffer entry total-in-file string last-use-time total-perm read T t 2 add-completion-to-tail-if-new 1000 message "Error: invalid saved completion - %s" prin1-to-string search-forward "\n(" cmpl-entry cmpl-last-use-time] 4) ((search-failed (message "End of file while reading completions.")) (end-of-file (byte-code "`dU\203\204\302\303 \"\210\202\302\304!\210\302\207" [no-message-p filename message "Loading completions from file %s . . . Done." "End of file while reading completions."] 3))) cmpl-source-init-file total-perm total-in-file start-num current-completion-source cmpl-last-use-time cmpl-entry last-use-time entry num-uses string current-time buffer insert-okay-p] 14 (#$ . 35183) nil]) #@105 Load the default completions file. Also sets up so that exiting emacs will automatically save the file. (defalias 'initialize-completions #[nil "\204\301 \210\302\211\207" [cmpl-initialized-p load-completions-from-file t] 2 (#$ . 37136) nil]) #@620 Kill between point and mark. The text is deleted but saved in the kill ring. The command \[yank] can retrieve it from there. /(If you want to kill and then yank immediately, use \[copy-region-as-kill].) This is the primitive for programs to kill text (as opposed to deleting it). Supply two arguments, character numbers indicating the stretch of text to be killed. Any command that calls this function is a "kill command". If the previous command was also a kill command, the text killed this time appends to the text killed last time to make one entry in the kill ring. Patched to remove the most recent completion. (defalias 'completion-kill-region #[(&optional beg end) "\306=\203` |\210\nc\210\307\307\207\310\f \"\207" [last-command cmpl-last-insert-location cmpl-original-string completion-to-accept beg end complete nil kill-region] 3 (#$ . 37390) "r"]) (defalias 'completion-separator-self-insert-command #[(arg) "\301 \210\302!\207" [arg use-completion-before-separator self-insert-command] 2 nil "p"]) (defalias 'completion-separator-self-insert-autofilling #[(arg) "\302 \210\303!\210 \205 \207" [arg auto-fill-function use-completion-before-separator self-insert-command] 2 nil "p"]) #@145 Add a call to update the completion database before function execution. TYPE is the type of the wrapper to be added. Can be :before or :under. (defalias 'def-completion-wrapper '(macro . #[(function-name type &optional new-name) "\302=\203\303\304 D\305\306F\207\307=\203\303\304 D\310\311F\207\312=\203*\303\304 D\313\314F\207\315=\2038\303\304 D\316\317F\207\320=\203F\303\304 D\321\322F\207\323=\203T\303\304 D\324\325F\207\326=\205a\303\304 D\327\330F\207" [type function-name :separator put quote 'completion-function 'use-completion-before-separator :before 'completion-function 'use-completion-before-point :backward-under 'completion-function 'use-completion-backward-under :backward 'completion-function 'use-completion-backward :under 'completion-function 'use-completion-under-point :under-or-before 'completion-function 'use-completion-under-or-before-point :minibuffer-separator 'completion-function 'use-completion-minibuffer-separator] 4 (#$ . 38604)])) (defalias 'use-completion-minibuffer-separator #[nil "\302 )\207" [cmpl-standard-syntax-table cmpl-syntax-table use-completion-before-separator] 1]) (defalias 'use-completion-backward-under #[nil "\301 \210\210\302\207" [last-command use-completion-under-point nil] 1]) (defalias 'use-completion-backward #[nil "\210\301\207" [last-command nil] 1]) (defalias 'completion-before-command #[nil "9\203 \301N\206\f\302 \207" [this-command completion-function use-completion-under-or-before-point] 2]) (defalias 'completion-c-mode-hook #[nil "\301\302\303\304#\210\305\306\307#\210\305\310\307#\210\305\311\307#\207" [c-mode-map put electric-c-semi completion-function use-completion-before-separator define-key "+" completion-separator-self-insert-command "*" "/"] 4]) (byte-code "\300\301!\203\f\302 \210\202\303\304\302\"\210\300\207" [featurep cc-mode completion-c-mode-hook add-hook c-mode-hook] 3) (defalias 'completion-setup-fortran-mode #[nil "\301\302\303#\210\301\304\303#\210\301\305\303#\210\301\306\303#\207" [fortran-mode-map define-key "+" completion-separator-self-insert-command "-" "*" "/"] 4]) #@33 Enable dynamic word-completion. (defalias 'dynamic-completion-mode #[nil "\303\304\305\"\210\303\306\307\"\210\303\310\311\"\210\303\312\313\"\210\303\314\315\"\210\316\317\320\"\210\316\321\320\"\210\322\323\324#\210\303\325\326\"\210\327\330\331 #\210\316\332\333\"\210\316\334\335\"\210\316\336\335\"\210\316\337\335\"\210\316\340\335\"\210\316\341\335\"\210\316\342\335\"\210\316\343\335\"\210\316\344\335\"\210\316\345\335\"\210\316\346\335\"\210\316\347\335\"\210\316\350\335\"\210\316\351\335\"\210\316\352\335\"\210\316\353\335\"\210\316\354\335\"\210\316\355\335\"\210\316\356\335\"\210\316\357\335\"\210\316\360\335\"\210\316\361\335\"\210\322\n\334\362#\210\322\n\340\362#\210\322\n\336\362#\210\322\n\357\362#\210\322\n\343\362#\210\322\n\337\362#\210\363\364\365\366#\210\363\367\365\366#\210\363\370\365\366#\210\363\371\365\372#\210\363\373\365\366#\210\363\374\365\366#\210\363\375\365\376#\210\363\377\365\376#\210\363\201@\365\376#\210\363\201A\365\376#\210\363\201B\365\376#\210\363\201C\365\376#\210\363\201D\365\376#\210\363\201E\365\376#\210\363\201F\365\376#\210\363\201G\365\201H#\210\363\201I\365\201H#\210\363\201J\365\201H#\210\363\201K\365\201L#\210\363\201M\365\201L#\210\201N \207" [function-key-map global-map lisp-mode-map add-hook find-file-hooks cmpl-find-file-hook pre-command-hook completion-before-command lisp-mode-hook #[nil "\211\207" [cmpl-lisp-syntax-table cmpl-syntax-table] 2] c-mode-hook #[nil "\211\207" [cmpl-c-syntax-table cmpl-syntax-table] 2] fortran-mode-hook #[nil "\302 \207" [cmpl-fortran-syntax-table cmpl-syntax-table completion-setup-fortran-mode] 1] global-set-key "\215" complete [67108877] define-key [C-return] [67108877] kill-emacs-hook #[nil "\300 \210\301\207" [kill-emacs-save-completions nil] 1] substitute-key-definition kill-region completion-kill-region " " completion-separator-self-insert-autofilling "!" completion-separator-self-insert-command "%" "^" "&" "(" ")" "=" "`" "|" "{" "}" "[" "]" ";" "\"" "'" "#" "," "?" "." ":" self-insert-command put newline completion-function use-completion-before-separator newline-and-indent comint-send-input exit-minibuffer use-completion-minibuffer-separator eval-print-last-sexp eval-last-sexp next-line use-completion-under-or-before-point previous-line beginning-of-buffer end-of-buffer beginning-of-line end-of-line forward-char forward-word forward-sexp backward-char use-completion-backward-under backward-word backward-sexp delete-backward-char use-completion-backward delete-backward-char-untabify initialize-completions] 4 (#$ . 40722) nil]) (byte-code "\300\301\302\"\210\303\304!\207" [mapc #[(x) "\301\302\"\207" [x add-to-list debug-ignored-errors] 3] ("^To complete, the point must be after a symbol at least [0-9]* character long\\.$" "^The string \".*\" is too short to be saved as a completion\\.$") provide completion] 3)