;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 2 20:19:30 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/completion.el ;;; emacs version 19.28.90.69. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/completion.el' was compiled for Emacs 19")) #@130 *Non-nil means enable recording and saving of completions. If nil, no new words added to the database or saved to the init file. (defvar enable-completion t (#$ . -490)) #@108 *Non-nil means save most-used completions when exiting Emacs. See also `saved-completions-retention-time'. (defvar save-completions-flag t (#$ . -667)) #@39 *The filename to save completions to. (defvar save-completions-file-name "~/.completions" (#$ . -825)) #@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. (defvar save-completions-retention-time 336 (#$ . -935)) #@116 *Non-nil means separator characters mark previous word as used. This means the word will be saved as a completion. (defvar completion-on-separator-character nil (#$ . -1185)) #@61 *Number of versions to keep for the saved completions file. (defvar completions-file-versions-kept kept-new-versions (#$ . -1366)) #@70 *Minimum output speed at which to display next potential completion. (defvar completion-prompt-speed-threshold 4800 (#$ . -1503)) #@93 *If non-nil, the next completion prompt does a cdabbrev search. This can be time consuming. (defvar completion-cdabbrev-prompt-flag nil (#$ . -1639)) #@123 *How far to search in the buffer when looking for completions. In number of characters. If nil, search the whole buffer. (defvar completion-search-distance 15000 (#$ . -1796)) #@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. (defvar completions-merging-modes (quote (lisp c)) (#$ . -1980)) #@105 *The minimum length of a stored completion. DON'T CHANGE WITHOUT RECOMPILING ! This is used by macros. (defconst completion-min-length nil (#$ . -2224)) #@105 *The maximum length of a stored completion. DON'T CHANGE WITHOUT RECOMPILING ! This is used by macros. (defconst completion-max-length nil (#$ . -2385)) #@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 (#$ . 2546)) (defalias 'eval-when-compile-load-eval '(macro . #[(&rest body) "\n\"\nB" [mapcar eval body progn] 3])) #@186 (completion-dolist (VAR LIST [RESULT]) BODY...): loop over a list. Evaluate BODY with VAR bound to each `car' from LIST, in turn. Then evaluate RESULT to get return value, default nil. (defalias 'completion-dolist '(macro . #[(spec &rest body) "!\n A@D @D\n @\nDEE \n\nDEC#E AA6 @E AAB7\")" [completion-gensym "--dolist-temp--" temp append let spec while setq car body cdr nil (nil)] 10 (#$ . 2828)])) (defalias 'completion-eval-when #[nil "ĉ" [6 completion-min-length 200 completion-max-length 3 completion-prefix-min-length] 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 (#$ . 3416)) #@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 (#$ . 3576)) (byte-code " B B" [cmpl-preceding-syntax current-load-list completion-string] 2) #@48 True iff the current window is the minibuffer. (defalias 'minibuffer-window-selected-p #[nil " !" [window-minibuffer-p selected-window] 2 (#$ . 3826)]) (defalias 'cmpl-read-time-eval '(macro . #[(form) "" [form] 1])) #@56 Returns :capitalized, :up, :down, :mixed, or :neither. (defalias 'cmpl-string-case-type #[(string) "\f\"+\f\"'\fGV#\f##ǂ7Ȃ7ɂ7\f\"6ʂ7)" [nil case-fold-search string-match "[a-z]" string "[A-Z]" 1 :capitalized :mixed :down :up :neither] 4 (#$ . 4054)]) (defalias 'cmpl-coerce-string-case #[(string case-type) "= \n=\n='\n\nH\"I\n\n" [case-type :down string :up :capitalized 0 logand 223] 6]) (defalias 'cmpl-merge-string-cases #[(string-to-coerce given-string) " !> !\" )" [cmpl-string-case-type string-to-coerce string-case-type (:down :up :capitalized) cmpl-coerce-string-case given-string] 5]) (defalias 'cmpl-hours-since-origin #[nil "  @å\"_ 8ȥ\\!)" [current-time time truncate 3600.0 lsh 1 16 2 3600.0] 5]) (defalias 'cmpl-make-standard-completion-syntax-table #[nil "\"W&\f\\ #\f\\ #\fT\nW=\f\\ #\fT)b@ #AM*@ #An, *" [make-vector 256 0 nil i table 26 modify-syntax-entry 97 "_" 65 10 48 (64 47 92 42 43 126 36 60 62 37) (95 45 58 46) symbol-chars-ignore symbol-chars char --dolist-temp--0 --dolist-temp--1 "w"] 5]) (byte-code " \nB" [cmpl-make-standard-completion-syntax-table cmpl-standard-syntax-table current-load-list] 2) (defalias 'cmpl-make-lisp-completion-syntax-table #[nil " ! %@\f#A*\f*" [copy-syntax-table cmpl-standard-syntax-table (33 38 63 61 94) symbol-chars table nil char --dolist-temp--2 modify-syntax-entry "_"] 5]) (defalias 'cmpl-make-c-completion-syntax-table #[nil " ! %@\f#A*\f*" [copy-syntax-table cmpl-standard-syntax-table (43 42 47 58 37) separator-chars table nil char --dolist-temp--3 modify-syntax-entry " "] 5]) (defalias 'cmpl-make-fortran-completion-syntax-table #[nil " ! %@\f#A*\f*" [copy-syntax-table cmpl-standard-syntax-table (43 45 42 47 58) separator-chars table nil char --dolist-temp--4 modify-syntax-entry " "] 5]) (byte-code " \nB \nB \nB" [cmpl-make-lisp-completion-syntax-table cmpl-lisp-syntax-table current-load-list cmpl-make-c-completion-syntax-table cmpl-c-syntax-table cmpl-make-fortran-completion-syntax-table cmpl-fortran-syntax-table] 2) #@58 This variable holds the current completion syntax table. (defvar cmpl-syntax-table cmpl-standard-syntax-table (#$ . 6350)) (byte-code "!\"\"\"" [make-variable-buffer-local cmpl-syntax-table add-hook lisp-mode-hook (lambda nil (setq cmpl-syntax-table cmpl-lisp-syntax-table)) c-mode-hook (lambda nil (setq cmpl-syntax-table cmpl-c-syntax-table)) fortran-mode-hook (lambda nil (setq cmpl-syntax-table cmpl-fortran-syntax-table) (completion-setup-fortran-mode))] 3) #@72 Holds first character of symbol, after any completion symbol function. (defvar cmpl-symbol-start nil (#$ . 6834)) #@71 Holds last character of symbol, after any completion symbol function. (defvar cmpl-symbol-end nil (#$ . 6954)) (byte-code "! B! B‡" [boundp cmpl-saved-syntax nil current-load-list cmpl-saved-point] 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 "  !gz>j` T\" \"\nfzU3bv` b\nSfzUJ\nbv`\n b !\f\nZXi\nZ Xo\n{ !·" [syntax-table cmpl-saved-syntax set-syntax-table cmpl-syntax-table (119 95) cmpl-saved-point scan-sexps -1 cmpl-symbol-start 1 cmpl-symbol-end 119 completion-min-length completion-max-length nil] 3 (#$ . 7181)]) #@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 "  !hzUF`T\" fzU1 bv` b ! \f\\Y {\fU`  T\" v` fzUp bv`  b !\f ZX ZX { !χ" [syntax-table cmpl-saved-syntax set-syntax-table cmpl-syntax-table cmpl-preceding-syntax 95 cmpl-symbol-end scan-sexps -1 cmpl-symbol-start 119 1 completion-min-length cmpl-saved-point completion-max-length nil] 4 (#$ . 7667)]) (defalias 'symbol-under-or-before-point #[nil "  !gz> ! ! " [syntax-table cmpl-saved-syntax set-syntax-table cmpl-syntax-table (119 95) symbol-under-point symbol-before-point] 2]) (defalias 'symbol-before-point-for-complete #[nil "  !hz>Q`T\" fzU1 bv` b !\f ZXP Z XV { !·" [syntax-table cmpl-saved-syntax set-syntax-table cmpl-syntax-table cmpl-preceding-syntax (95 119) cmpl-symbol-end scan-sexps -1 cmpl-symbol-start 119 1 completion-prefix-min-length completion-max-length nil] 4]) (defalias 'cmpl-statistics-block '(macro . #[(&rest body) "" [nil] 1])) (byte-code "\nB\nB\nB\nB\n\nB\f\nB\nB\nB!? \nB!L\nB!Y\nB!f\nB!s\nB!\nB!\nB\nBԇ" [0 cmpl-source-unknown current-load-list 1 cmpl-source-init-file 2 cmpl-source-file-parsing 3 cmpl-source-separator 4 cmpl-source-cursor-moves 5 cmpl-source-interactive 6 cmpl-source-cdabbrev 7 num-cmpl-sources boundp current-completion-source 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) "\nB!" [abbrev-string cdabbrev-abbrev-string initial-completions-tried cdabbrev-completions-tried reset-cdabbrev-window t] 2 (#$ . 9447)]) (defalias 'set-cdabbrev-buffer #[nil "= !q" [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) "\n &\n=&\n&\n! =&\nK ` Ce Z]De\nĉ )" [initializep selected-window cdabbrev-current-window t nil next-window set-cdabbrev-buffer cdabbrev-current-point cdabbrev-start-point completion-search-distance cdabbrev-stop-point cdabbrev-wrapped-p] 4 (#$ . 9937)]) #@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 "Ɏ `  !b#hzUS U`vhzU\nb \ft \f@t\fAf\f?d\\^db҉+ B`* ." [cdabbrev-current-window nil saved-point-2 syntax tried-list downcase-expansion expansion saved-syntax saved-point ((byte-code " !\nb" [set-syntax-table saved-syntax saved-point] 2)) set-cdabbrev-buffer syntax-table set-syntax-table cmpl-syntax-table cdabbrev-current-point search-backward cdabbrev-abbrev-string cdabbrev-stop-point t 32 119 -1 symbol-under-point cdabbrev-completions-tried cdabbrev-wrapped-p completion-search-distance cdabbrev-start-point reset-cdabbrev-window next-cdabbrev] 8 (#$ . 10362)]) (byte-code "\nB" [511 cmpl-obarray-length current-load-list] 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) (#$ . 11345)) #@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) (#$ . 11544)) (defalias 'completion-string '(macro . #[(completion-entry) " D" [car completion-entry] 2])) (defalias 'completion-num-uses '(macro . #[(completion-entry) "\nDD" [car cdr completion-entry] 3])) (defalias 'completion-last-use-time '(macro . #[(completion-entry) "\nE" [nth 2 completion-entry] 3])) (defalias 'completion-source '(macro . #[(completion-entry) "\nE" [nth 3 completion-entry] 3])) (defalias 'set-completion-string '(macro . #[(completion-entry string) " \nE" [setcar completion-entry string] 3])) (defalias 'set-completion-num-uses '(macro . #[(completion-entry num-uses) "\nD E" [setcar cdr completion-entry num-uses] 3])) (defalias 'set-completion-last-use-time '(macro . #[(completion-entry last-use-time) "\nDD E" [setcar cdr completion-entry last-use-time] 4])) #@39 Returns a list of a completion entry. (defalias 'make-completion #[(string) " FC" [string 0 nil current-completion-source] 4 (#$ . 12523)]) (defalias 'cmpl-prefix-entry-head '(macro . #[(prefix-entry) " D" [car prefix-entry] 2])) (defalias 'cmpl-prefix-entry-tail '(macro . #[(prefix-entry) " D" [cdr prefix-entry] 2])) (defalias 'set-cmpl-prefix-entry-head '(macro . #[(prefix-entry new-head) " \nE" [setcar prefix-entry new-head] 3])) (defalias 'set-cmpl-prefix-entry-tail '(macro . #[(prefix-entry new-tail) " \nE" [setcdr prefix-entry new-tail] 3])) #@60 Makes a new prefix entry containing only completion-entry. (defalias 'make-cmpl-prefix-entry #[(completion-entry-list) "B" [completion-entry-list] 2 (#$ . 13095)]) #@73 Initializes the completion storage. All existing completions are lost. (defalias 'clear-all-completions #[nil " \" \"Ň" [make-vector cmpl-obarray-length 0 cmpl-prefix-obarray cmpl-obarray nil] 3 (#$ . 13268) nil]) (byte-code " B" [completions-list-return-value current-load-list] 2) #@53 Returns a list of all the known completion entries. (defalias 'list-all-completions #[nil "\f\" )" [nil completions-list-return-value mapatoms list-all-completions-1 cmpl-prefix-obarray] 3 (#$ . 13569)]) (defalias 'list-all-completions-1 #[(prefix-symbol) " ! J@ \"" [boundp prefix-symbol append completions-list-return-value] 3]) #@77 Return list of lists of known completion entries, organized by hash bucket. (defalias 'list-all-completions-by-hash-bucket #[nil "\f\" )" [nil completions-list-return-value mapatoms list-all-completions-by-hash-bucket-1 cmpl-prefix-obarray] 3 (#$ . 13920)]) (defalias 'list-all-completions-by-hash-bucket-1 #[(prefix-symbol) " ! J@\nB" [boundp prefix-symbol completions-list-return-value] 2]) (byte-code "! B! B!  B!- B!: B‡" [boundp completion-to-accept nil current-load-list cmpl-db-downcase-string cmpl-db-symbol cmpl-db-prefix-symbol cmpl-db-entry] 2) #@45 Set to T if you want to debug the database. (defvar cmpl-db-debug-p nil (#$ . 14540)) #@105 Returns the completion entry for string or nil. Sets up `cmpl-db-downcase-string' and `cmpl-db-symbol'. (defalias 'find-exact-completion #[(string) "\n\f\"! J" [boundp intern string cmpl-db-downcase-string cmpl-obarray cmpl-db-symbol] 4 (#$ . 14633)]) #@183 Returns 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) "\n \"! \fJ" [boundp intern prefix-string cmpl-prefix-obarray cmpl-db-prefix-symbol] 4 (#$ . 14903)]) (byte-code "! B‡" [boundp inside-locate-completion-entry nil current-load-list] 2) #@185 Locates 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) "@@\f=?C !\f A@=!\n C 1\"C ; C L\f!*" [prefix-entry nil next-prefix-list prefix-list completion-entry cmpl-db-debug-p error "Completion entry exists but not on prefix list - %s" completion-string inside-locate-completion-entry locate-completion-db-error cmpl-db-symbol locate-completion-entry-retry] 4 (#$ . 15346)]) (defalias 'locate-completion-entry-retry #[(old-entry) " @ A@ 8# @!\nO! 4 4 \"6 +" [t inside-locate-completion-entry add-completion old-entry 2 find-exact-completion cmpl-entry find-cmpl-prefix-entry cmpl-db-downcase-string 0 completion-prefix-min-length pref-entry locate-completion-entry locate-completion-db-error] 6]) (defalias 'locate-completion-db-error #[nil "!" [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) " !8 !\fO!)A1 !L @L*" [find-exact-completion string make-completion find-cmpl-prefix-entry cmpl-db-downcase-string 0 completion-prefix-min-length prefix-entry entry cmpl-db-prefix-symbol make-cmpl-prefix-entry cmpl-db-symbol] 5 (#$ . 16463)]) #@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) " !LO! \f \" A\f\f  I \fA<  \f @ \f\f+ !O!  p @ x!L@L*" [completion-to-accept accept-completion find-exact-completion completion-string cmpl-db-entry find-cmpl-prefix-entry cmpl-db-downcase-string 0 completion-prefix-min-length prefix-entry locate-completion-entry splice-ptr cmpl-ptr make-completion entry cmpl-db-prefix-symbol make-cmpl-prefix-entry cmpl-db-symbol] 6 (#$ . 17106)]) #@102 Deletes the completion from the database. String must be longer than `completion-prefix-min-length'. (defalias 'delete-completion #[(completion-string) " !MO! \f \" \fL < AAJ  J @AJL*͇ \"" [completion-to-accept accept-completion find-exact-completion completion-string cmpl-db-entry find-cmpl-prefix-entry cmpl-db-downcase-string 0 completion-prefix-min-length prefix-entry locate-completion-entry splice-ptr cmpl-db-symbol nil cmpl-db-prefix-symbol error "Unknown completion `%s'"] 4 (#$ . 17980)]) (defalias 'interactive-completion-string-reader #[(prompt) " \f #\f\"\" GU+ )  +C" [symbol-under-or-before-point default format "%s: (default: %s) " prompt "%s: " new-prompt completing-read cmpl-obarray read 0 ""] 5]) (defalias 'check-completion-length #[(string) "G W\f\"C" [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) " !t\f\n  ! A( AA*" [check-completion-length string cmpl-source-interactive current-completion-source add-completion-to-head entry num-uses last-use-time] 2 (#$ . 18954) (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  #)" [cmpl-source-interactive current-completion-source add-completion string nil t] 4 (#$ . 19435) (interactive-completion-string-reader "Completion to add permanently")]) (defalias 'kill-completion #[(string) " ! !" [check-completion-length string 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 "  !A A@Tlj+" [completion-to-accept cmpl-source-cdabbrev nil entry current-completion-source string add-completion-to-head t cmpl-completions-accepted-p] 4 (#$ . 19907)]) #@76 Add the completion symbol underneath the point into the completion buffer. (defalias 'use-completion-under-point #[nil " \n\f!*" [enable-completion symbol-under-point cmpl-source-cursor-moves current-completion-source string add-completion-to-head] 3 (#$ . 20281)]) #@68 Add the completion symbol before point into the completion buffer. (defalias 'use-completion-before-point #[nil " \n\f!*" [enable-completion symbol-before-point cmpl-source-cursor-moves current-completion-source string add-completion-to-head] 3 (#$ . 20566)]) #@68 Add the completion symbol before point into the completion buffer. (defalias 'use-completion-under-or-before-point #[nil " \n\f!*" [enable-completion symbol-under-or-before-point cmpl-source-cursor-moves current-completion-source string add-completion-to-head] 3 (#$ . 20845)]) #@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 " \n+!+\fA@U+\fAʠˉ\f+" [enable-completion symbol-before-point cmpl-source-separator nil entry current-completion-source string add-completion-to-head completion-on-separator-character 0 1 t cmpl-completions-accepted-p] 4 (#$ . 21143)]) (byte-code "! B! B!  B!- B!: B!G\n B!T B!a\f Bȇ" [boundp cmpl-test-string "" current-load-list cmpl-test-regexp cmpl-last-index 0 cmpl-cdabbrev-reset-p nil cmpl-next-possibilities 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) " O!@  !P\n " [completion-to-accept accept-completion find-cmpl-prefix-entry string 0 completion-prefix-min-length cmpl-starting-possibilities cmpl-test-string regexp-quote "." cmpl-test-regexp completion-search-reset-1] 4 (#$ . 21957)]) (defalias 'completion-search-reset-1 #[nil "‰" [cmpl-starting-possibilities cmpl-next-possibilities nil cmpl-next-possibility cmpl-cdabbrev-reset-p -1 cmpl-last-index cmpl-tried-list] 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) " TU!qWW !!6TW6\n!q UHqGGZq !qSWq\n\\\n\n" [index cmpl-last-index completion-search-peek t 0 completion-search-reset-1 reverse cmpl-starting-possibilities cmpl-next-possibilities nil cmpl-next-possibility -1] 3 (#$ . 22576)]) #@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) "C , @@\"= A , @@ B AC? \" " [cmpl-next-possibility cmpl-next-possibilities string-match cmpl-test-regexp 0 cmpl-tried-list use-cdabbrev cmpl-cdabbrev-reset-p reset-cdabbrev cmpl-test-string t next-cdabbrev] 4 (#$ . 23100)]) #@69 Toggles whether or not to add new words to the completion database. (defalias 'completion-mode #[nil "? Â\"" [enable-completion message "Completion mode is now %s." "ON" "OFF"] 3 (#$ . 23703) nil]) (byte-code "! B! B!! B!. BŇ" [boundp cmpl-current-index 0 current-load-list cmpl-original-string nil cmpl-last-insert-location -1 cmpl-leave-point-at-start] 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) " =\n`| \f\\T :+ . >\"G\fH!|Y_ ?` !;|@\"c `b!\"!;@\"\"c! =\"ω," [last-command this-command cmpl-last-insert-location cmpl-current-index arg 1 cmpl-initialized-p initialize-completions current-prefix-arg 0 t cmpl-leave-point-at-start nil symbol-before-point-for-complete cmpl-original-string failed-complete error "To complete, point must be after a symbol at least %d character long" completion-prefix-min-length completion-search-reset cmpl-symbol-start cmpl-symbol-end baud-rate completion-prompt-speed-threshold minibuffer-window-selected-p print-status-p insert-point completion-search-next entry string cmpl-merge-string-cases completion-to-accept sit-for completion-search-peek completion-cdabbrev-prompt-flag message "Next completion: %s" "No %scompletions." "more " ""] 5 (#$ . 24117) "*p"]) (byte-code "\"\" #" [global-set-key "" complete [67108877] define-key function-key-map [C-return] [67108877]] 4) #@67 Parse possible completions from a file and add them to data base. (defalias 'add-completions-from-file #[(file) " ! ! !)Ȏ q ," [expand-file-name file get-file-buffer buffer buffer-already-there-p nil completions-merging-modes find-file-noselect ((byte-code "\n!" [buffer-already-there-p kill-buffer buffer] 2)) add-completions-from-buffer] 3 (#$ . 25724) "fFile: "]) (defalias 'add-completions-from-buffer #[nil " > ' >\" ' \"+" [cmpl-source-file-parsing nil mode start-num current-completion-source major-mode (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 "! >\f> >!\f>! " [enable-completion major-mode (emacs-lisp-mode lisp-mode) lisp completions-merging-modes add-completions-from-buffer (c-mode) c] 2]) (add-hook (quote find-file-hooks) (quote cmpl-find-file-hook)) #@46 Add completions from the current tags table. (defalias 'add-completions-from-tags-table #[nil " ebŏ*" [visit-tags-table-buffer nil string e (byte-code "!!  !u" [search-forward "" backward-char 3 symbol-under-point string add-completion-to-tail-if-new] 2) ((search-failed))] 3 (#$ . 26738) nil]) #@50 A regexp that searches for lisp definition form. (defconst *lisp-def-regexp* "\n(\\(\\w*:\\)?def\\(\\w\\|\\s_\\)*\\s +(*" (#$ . 27069)) (defalias 'add-completions-from-lisp-buffer #[nil "ebď*" [nil string e (byte-code " !  !" [re-search-forward *lisp-def-regexp* symbol-under-point string add-completion-to-tail-if-new] 2) ((search-failed))] 3]) (defalias 'cmpl-make-c-def-completion-syntax-table #[nil "\" W) #T\f J @\f\f # A 4*\fl@\f\f #AV* # # # # ," [make-vector 256 0 (32 10 9 12 11 13) (44 42 61 40 59) nil i separator-chars whitespace-chars table modify-syntax-entry "w" char --dolist-temp--5 "_" --dolist-temp--6 " " 91 "(]" 123 "(}" 93 ")[" 125 "){"] 5]) (byte-code " \nB" [cmpl-make-c-def-completion-syntax-table cmpl-c-def-syntax-table current-load-list] 2) #@47 A regexp that searches for a definition form. (defconst *c-def-regexp* "\n[_a-zA-Z#]" (#$ . 27971)) (defalias 'add-completions-from-c-buffer #[nil " ebǍ-" [nil syntax-table saved-syntax char next-point string finish-add-completions (byte-code "\n!ŏ" [((set-syntax-table saved-syntax)) set-syntax-table cmpl-c-def-syntax-table e (byte-code " !hU/``\\{Ř\fƘv \f!`\n\n\n\"\n\nbg U[`\"\nbFv l\f!!v \f!\nb zU zU2\n\"\nf  U2Չ\n4" [re-search-forward *c-def-regexp* 35 6 string "define" "ifdef " 2 symbol-before-point add-completion-to-tail-if-new next-point scan-sexps 1 char 42 -1 symbol-under-point looking-at "_AP" 40 44 nil] 4) ((search-failed (byte-code "\"" [throw finish-add-completions t] 3)) (error (byte-code "A@A@˜y!\"Ç" [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 " \n ! " [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 "\nB\nB" ["11" completion-version current-load-list ";;; 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" saved-cmpl-file-header] 2) (defalias 'completion-backup-filename #[(filename) "P" [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) " \n! !\f \"  \f   !!q p!X! \" \" !\"\"c $%%@$T$8=T$A@V'Z'WT$@B!%A%q*쏈-.\n·" [expand-file-name filename save-completions-file-name file-writable-p cmpl-initialized-p initialize-completions message "Saving completions to file %s" t delete-old-versions 0 kept-old-versions completions-file-versions-kept kept-new-versions nil last-use-time cmpl-hours-since-origin current-time total-in-db total-perm total-saved completion-backup-filename backup-filename get-buffer-create " *completion-save-buffer*" buffer-file-name 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 saved-cmpl-file-header completion-version list-all-completions completion --dolist-temp--7 2 save-completions-retention-time prin1-to-string "\n" e (byte-code " !\n! \n\"\n # $\n!)" [file-exists-p filename backup-filename rename-file copy-file t save-buffer delete-file] 5) ((error (byte-code "!\f\"" [set-buffer-modified-p nil message "Couldn't save completion file `%s'" filename] 3))) cmpl-completions-accepted-p] 4 (#$ . 29808) nil]) #@105 Loads 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) " \n! !\f!\f !1-ʂ. #!q  p щԉ !䏈!}eb揈.*" [expand-file-name filename save-completions-file-name completion-backup-filename backup-filename file-readable-p backup-readable-p no-message-p message "Loading completions from %sfile %s . . ." "backup " "" get-buffer-create " *completion-save-buffer*" buffer-file-name clear-visited-file-modtime erase-buffer nil cmpl-hours-since-origin cmpl-source-init-file 0 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 e (byte-code " \"" [insert-file-contents filename t insert-okay-p] 3) ((file-error (message "File error trying to load completion file %s." filename))) (byte-code " ! T\n:o\n@;o\nA=(Tȉ9 =7T9 o\f! 8\f =e V\f=\fe \fV AA \n!\"!" [read buffer entry total-in-file string last-use-time T total-perm t 2 add-completion-to-tail-if-new cmpl-entry cmpl-last-use-time 1000 message "Error: invalid saved completion - %s" prin1-to-string search-forward "\n("] 4) ((search-failed (message "End of file while reading completions.")) (end-of-file (byte-code "`dU \"!" [no-message-p message "Loading completions from file %s . . . Done." filename "End of file while reading completions."] 3)))] 14 (#$ . 31317) nil]) #@105 Load the default completions file. Also sets up so that exiting emacs will automatically save the file. (defalias 'initialize-completions #[nil " ‰" [cmpl-initialized-p load-completions-from-file t] 2 (#$ . 32962) nil]) (add-hook (quote kill-emacs-hook) (quote (lambda nil (kill-emacs-save-completions) (cmpl-statistics-block (record-cmpl-kill-emacs))))) #@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) "=`\n| cć\"" [last-command complete cmpl-last-insert-location cmpl-original-string nil completion-to-accept kill-region beg end] 3 (#$ . 33333) "r"]) (global-set-key "" (quote completion-kill-region)) (defalias 'completion-separator-self-insert-command #[(arg) " \n!" [use-completion-before-separator self-insert-command arg] 2 nil "p"]) (defalias 'completion-separator-self-insert-autofilling #[(arg) " \n! " [use-completion-before-separator self-insert-command arg auto-fill-function] 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) "=\fDF=\fDF=*\fDF=8\fDF=F\fDF=T\fDF=a\fDF" [type :separator put quote function-name (quote completion-function) (quote use-completion-before-separator) :before (quote completion-function) (quote use-completion-before-point) :backward-under (quote completion-function) (quote use-completion-backward-under) :backward (quote completion-function) (quote use-completion-backward) :under (quote completion-function) (quote use-completion-under-point) :under-or-before (quote completion-function) (quote use-completion-under-or-before-point) :minibuffer-separator (quote completion-function) (quote use-completion-minibuffer-separator)] 4 (#$ . 34545)])) (defalias 'use-completion-minibuffer-separator #[nil " )" [cmpl-standard-syntax-table cmpl-syntax-table use-completion-before-separator] 1]) (defalias 'use-completion-backward-under #[nil " " [use-completion-under-point nil] 1]) (defalias 'use-completion-backward #[nil "" [nil] 1]) (defalias 'completion-before-command #[nil "9 N\f " [this-command completion-function use-completion-under-or-before-point] 2]) (byte-code "\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"#############" [add-hook pre-command-hook completion-before-command global-set-key " " completion-separator-self-insert-autofilling "!" completion-separator-self-insert-command "%" "^" "&" "(" ")" "=" "`" "|" "{" "}" "[" "]" ";" "\"" "'" "#" "," "?" "." ":" define-key lisp-mode-map self-insert-command put electric-c-semi completion-function use-completion-before-separator c-mode-map "+" "*" "/"] 4) (defalias 'completion-setup-fortran-mode #[nil " # # # #" [define-key fortran-mode-map "+" completion-separator-self-insert-command "-" "*" "/"] 4]) (byte-code "####################" [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] 4)