;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:39:05 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/emacs-lisp/crm.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 "`crm.el' was compiled for Emacs 19.29 or later"))

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


#@51 Default separator for `completing-read-multiple'.
(defconst crm-default-separator "," (#$ . 619))
#@273 Separator used for separating strings in `completing-read-multiple'.
It should be a single character string that doesn't appear in the list of
completion candidates.  Modify this value to make `completing-read-multiple'
use a separator other than `crm-default-separator'.
(defvar crm-separator crm-default-separator (#$ . 724))
#@106 Local keymap for minibuffer multiple input with completion.
Analog of `minibuffer-local-completion-map'.
(defvar crm-local-completion-map nil (#$ . 1059))
#@126 Local keymap for minibuffer multiple input with exact match completion.
Analog of `minibuffer-local-must-match-map' for crm.
(defvar crm-local-must-match-map nil (#$ . 1221))
#@155 An alist whose elements' cars are strings, or an obarray.
This is a table used for completion by `completing-read-multiple' and its
supporting functions.
(defvar crm-completion-table nil (#$ . 1403))
#@72 Completion string if last attempt reported "Complete, but not unique".
(defvar crm-last-exact-completion nil (#$ . 1609))
#@44 String to the left of the current element.
(defvar crm-left-of-element nil (#$ . 1737))
#@22 The current element.
(defvar crm-current-element nil (#$ . 1831))
#@45 String to the right of the current element.
(defvar crm-right-of-element nil (#$ . 1903))
#@68 Buffer position representing the beginning of the current element.
(defvar crm-beginning-of-element nil (#$ . 1999))
#@62 Buffer position representing the end of the current element.
(defvar crm-end-of-element nil (#$ . 2122))
#@109 Temporarily display MESSAGE-STRING in echo area.
After user-input or 2 seconds, erase the displayed string.
(defalias 'crm-temp-echo-area-glyphs #[(message-string) "\212db\210c\210\301\302!\210\303G!\210\304G!)\207" [message-string sit-for 2 backward-char delete-char] 2 (#$ . 2234)])
#@569 Function used by `completing-read-multiple' to compute completion values.
The value of STRING is the string to be completed.

The value of PREDICATE is a function to filter possible matches, or
nil if none.

The value of FLAG is used to specify the type of completion operation.
A value of nil specifies `try-completion'.  A value of t specifies
`all-completions'.  A value of lambda specifes a test for an exact match.

For more information on STRING, PREDICATE, and FLAG, see the Elisp
Reference sections on 'Programmed Completion' and 'Basic Completion
Functions'.
(defalias 'crm-collection-fn #[(string predicate flag) "\306\307\310	P\n\"\203 \n\311\211\225O\n\311\225\312O\313=\203- \314\n\f#\211;\204, \210)\2039 \315\n\f#\202O \314\n\f#\211;\203L P\202N ))\207" [lead crm-separator string flag crm-completion-table predicate "" string-match ".*" 0 nil lambda try-completion all-completions result] 5 (#$ . 2529)])
#@514 Parse the minibuffer to find the current element.
If no element can be found, return nil.

If an element is found, bind:

  -the variable `crm-current-element' to the current element,

  -the variables `crm-left-of-element' and `crm-right-of-element' to
   the strings to the left and right of the current element,
   respectively, and

  -the variables `crm-beginning-of-element' and `crm-end-of-element' to
   the buffer positions of the beginning and end of the current element
   respectively,

and return t.
(defalias 'crm-find-current-element #[nil "\306 \307\310`S#\206 dS\311	O\307\312\313R\n\"\206& \307\314\313Q\n\"\211\247\205F \315\224	\n\311\315\224O\316\315\n\"	\317O\320,\207" [minibuffer-string end-index target-string crm-separator index crm-beginning-of-element buffer-string string-match "," 0 "\\([^" "]*\\)$" "^\\([^" 1 match-string nil t crm-end-of-element crm-left-of-element crm-current-element crm-right-of-element] 6 (#$ . 3477)])
#@65 Return t if CANDIDATE is an exact match for a valid completion.
(defalias 'crm-test-completion #[(candidate) "\304	\n#\235\205 \305)\207" [candidate crm-completion-table minibuffer-completion-predicate completions all-completions t] 4 (#$ . 4460)])
#@75 Display a list of possible completions of the current minibuffer element.
(defalias 'crm-minibuffer-completion-help #[nil "\304\305!\210\306 \203) \307	\n#\304\310!\210\204 \311\312!\210\202( \313\220\314\315\316\"!\221\210)\310\207" [crm-current-element minibuffer-completion-table minibuffer-completion-predicate completions message "Making completion list..." crm-find-current-element all-completions nil crm-temp-echo-area-glyphs " [No completions]" "*Completions*" display-completion-list sort string-lessp] 5 (#$ . 4720) nil])
#@581 This is the internal completion engine.
This function updates the text in the minibuffer
to complete the current string, and returns a number between 0 and 6.
The meanings of the return values are:

    0 - the string has no possible completion
    1 - the string is already a valid and unique match
    2 - not used
    3 - the string is already a valid match (but longer matches exist too)
    4 - the string was completed to a valid match
    5 - some completion has been done, but the result is not a match
    6 - no completion was done, and the string is not an exact match
(defalias 'crm-do-completion #[nil "\306 \205 \307\211\211\310\f#\307\311\312\215+\207" [completedp completion last crm-current-element minibuffer-completion-table minibuffer-completion-predicate crm-find-current-element nil try-completion crm-exit (byte-code "\204 \306\307!\210\310\311\312\"\210\313=\203 \310\311\314\"\210	\230?\211\2033 \315 \210\261\210\fc\210\316\fG!\210\317	!\204[ \n\203E \310\311\320\"\210\202S \203O \321 \210\202S \306\322!\210\310\311\323\"\210\202d \n\203d \310\311\324\"\210\203v 	\232\203v \321 \210\310\311\325\"\207" [completion crm-current-element completedp crm-left-of-element crm-right-of-element completion-auto-help crm-temp-echo-area-glyphs " [No match]" throw crm-exit 0 t 1 erase-buffer backward-char crm-test-completion 5 crm-minibuffer-completion-help " [Next char not unique]" 6 4 3 crm-last-exact-completion last] 4) crm-last-exact-completion] 4 (#$ . 5265)])
#@183 Complete the current element.
If no characters can be completed, display a list of possible completions.

Return t if the current element is now a valid match; otherwise return nil.
(defalias 'crm-minibuffer-complete #[nil "	=\204 \306\n\211\2036 \307!\2036 \306\307!q\210\310d\"\211\203- \311e\306#\210\2021 \312\306!\210)\306\202u \313 \211\314=\203C \306\202t \315=\203] `=\204U Tb\210\316\317!\210\320\202t \321=\205t `=\204o Tb\210\316\322!\210\320))\207" [last-command this-command minibuffer-scroll-window window tem result nil window-buffer pos-visible-in-window-p set-window-start scroll-other-window crm-do-completion 0 1 crm-temp-echo-area-glyphs " [Sole completion]" t 3 " [Complete, but not unique]" crm-end-of-element] 5 (#$ . 6790) nil])
#@762 Determine the longest completable (left-anchored) substring of STRING.
The description "left-anchored" means the positions of the characters
in the substring must be the same as those of the corresponding characters
in STRING.  Anchoring is what `^' does in a regular expression.

The table and predicate used for completion are
`minibuffer-completion-table' and `minibuffer-completion-predicate',
respectively.

A non-nil return value means that there is some substring which is
completable.  A return value of t means that STRING itself is
completable.  If a string value is returned it is the longest
completable proper substring of STRING.  If nil is returned, STRING
does not have any non-empty completable substrings.

Remember: "left-anchored" substring
(defalias 'crm-find-longest-completable-substring #[(string) "G\211	\306V?\205 \307\307\310\310\n\204U \311\306\nO\f#\211\n\203@ \307\n\307=\203; \f\203; \307\202@ \306\nO\nS\f\203I \310\n\306X\203 \307\211\203 .\207" [string length-of-string index done first goal-string 0 t nil try-completion result minibuffer-completion-table minibuffer-completion-predicate] 5 (#$ . 7571)])
#@274 Verify that strings in SEPARATED-STRING are completed strings.
A return value of t means that all strings were verified.  A number is
returned if verification was unsuccessful.  This number represents the
position in SEPARATED-STRING up to where completion was successful.
(defalias 'crm-strings-completed-p #[(separated-string) "\306	\"\307\310\211\211\203x \n\204x @\311\f#\211\312=\2038 A\fG\\\307\\\202 ;\203g \313#\235\203\\ A\fG\\\307\\\202c \312\fG\\)\202 \314\f!\312G\\)\202 \204\201 \312\202\202 -\207" [separated-string crm-separator done result current-string current-position split-string 1 nil try-completion t all-completions crm-find-longest-completable-substring strings minibuffer-completion-table minibuffer-completion-predicate string-list completable-substring] 6 (#$ . 8744)])
#@272 If all of the minibuffer elements are valid completions then exit.
All elements in the minibuffer must match.  If there is a mismatch, move point
to the location of mismatch and do not exit.

This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c
(defalias 'crm-minibuffer-complete-and-exit #[nil "\302 \205M \303\304\305\215\211\205L \306\232\203< \307\310 !\211\311=\203' \312\313\303\"\2028 	\247\2035 	b\210\314\315!\2028 \316\317!)\202L \311=\203I \312\313\303\"\202L \316\317!)\207" [result check-strings crm-find-current-element nil crm-exit (byte-code "ed=\203 \303\304\305\"\210\306!\203 \303\304\307\"\210\310 \211\311=\204% 	\312=\203, \303\304\307\"\202B 	\313=\205B \n\203> \314\315!\210\316\202B \303\304\307\")\207" [crm-current-element result minibuffer-completion-confirm throw crm-exit t crm-test-completion "check" crm-do-completion 1 3 4 crm-temp-echo-area-glyphs " [Confirm]" nil] 4) "check" crm-strings-completed-p buffer-string t throw exit crm-temp-echo-area-glyphs " [An element did not match]" message "Unexpected error"] 4 (#$ . 9605) nil])
#@688 Initialize the keymaps used by `completing-read-multiple'.
Two keymaps are used depending on the value of the REQUIRE-MATCH
argument of the function `completing-read-multiple'.

If REQUIRE-MATCH is nil, the keymap `crm-local-completion-map' is used.
This keymap inherits from the keymap named `minibuffer-local-completion-map'.
The only difference is that TAB is bound to `crm-minibuffer-complete' in
the inheriting keymap.

If REQUIRE-MACTH is non-nil, the keymap `crm-local-must-match-map' is used.
This keymap inherits from the keymap named `minibuffer-local-must-match-map'.
The inheriting keymap binds RET to `crm-minibuffer-complete-and-exit'
and TAB to `crm-minibuffer-complete'.
(defalias 'crm-init-keymaps #[nil "\204 \304 \305	\"\210\306\307\310#\210\n?\205* \304 \305\n\"\210\306\n\311\312#\210\306\n\307\310#\207" [crm-local-completion-map minibuffer-local-completion-map crm-local-must-match-map minibuffer-local-must-match-map make-sparse-keymap set-keymap-parent define-key "	" crm-minibuffer-complete "" crm-minibuffer-complete-and-exit] 4 (#$ . 10713)])
(crm-init-keymaps)
#@1177 Read multiple strings in the minibuffer, with completion.
By using this functionality, a user may specify multiple strings at a
single prompt, optionally using completion.

Multiple strings are specified by separating each of the strings with
a prespecified separator character.  For example, if the separator
character is a comma, the strings 'alice', 'bob', and 'eve' would be
specified as 'alice,bob,eve'.

The default value for the separator character is the value of
`crm-default-separator' (comma).  The separator character may be
changed by modifying the value of `crm-separator'.

Continguous strings of non-separator-characters are referred to as
'elements'.  In the aforementioned example, the elements are: 'alice',
'bob', and 'eve'.

Completion is available on a per-element basis.  For example, if the
contents of the minibuffer are 'alice,bob,eve' and point is between
'l' and 'i', pressing TAB operates on the element 'alice'.

The return value of this function is a list of the read strings.

See the documentation for `completing-read' for details on the arguments:
PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and
INHERIT-INPUT-METHOD.
(defalias 'completing-read-multiple #[(prompt table &optional predicate require-match initial-input hist def inherit-input-method) "\306	\307=?\205\n \307\n\310\211\211\211\211\211\211\f	\203/ \2022 \311\312\310&\".\207" [predicate require-match table map crm-end-of-element crm-beginning-of-element crm-collection-fn t nil split-string read-from-minibuffer crm-right-of-element crm-left-of-element crm-current-element crm-last-exact-completion crm-completion-table minibuffer-completion-confirm minibuffer-completion-predicate minibuffer-completion-table crm-local-must-match-map minibuffer-local-completion-map prompt initial-input hist def inherit-input-method crm-separator] 11 (#$ . 11819)])
(provide 'crm)
