aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuc Teirlinck2004-02-06 04:54:28 +0000
committerLuc Teirlinck2004-02-06 04:54:28 +0000
commitb0c138ce590417bf70988a0897d77bd48a8f10b3 (patch)
treedfd80f3c15e2450bbd20307b1b5c19f9aa55a01c /src
parent9676f5adc5525807ea2af7ff59d33d86fd6ef67a (diff)
downloademacs-b0c138ce590417bf70988a0897d77bd48a8f10b3.tar.gz
emacs-b0c138ce590417bf70988a0897d77bd48a8f10b3.zip
(Fminibufferp, Fread_from_minibuffer)
(Fread_minibuffer, Feval_minibuffer) (Fread_string, Fread_no_blanks_input) (Fcompleting_read): Doc fixes. (syms_of_minibuf): Doc fixes for minibuffer-completion-table and completion-regexp-list. Define Qcase_fold_search and staticpro it. (read_minibuf): Fix initial comment. (Ftry_completion, Fall_completions, Ftest_completion): Bind case-fold-serach to the value of completion-ignore-case when checking completion-regexp-list. (Fdisplay_completion_list): Make it handle arguments that are symbols. Doc fix.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog17
-rw-r--r--src/minibuf.c210
2 files changed, 151 insertions, 76 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b9ac9cad16a..88fb2566f65 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,10 +1,25 @@
12004-02-05 Luc Teirlinck <teirllm@auburn.edu>
2
3 * minibuf.c (Fminibufferp, Fread_from_minibuffer)
4 (Fread_minibuffer, Feval_minibuffer)
5 (Fread_string, Fread_no_blanks_input)
6 (Fcompleting_read): Doc fixes.
7 (syms_of_minibuf): Doc fixes for minibuffer-completion-table and
8 completion-regexp-list. Define Qcase_fold_search and staticpro it.
9 (read_minibuf): Fix initial comment.
10 (Ftry_completion, Fall_completions, Ftest_completion): Bind
11 case-fold-serach to the value of completion-ignore-case when
12 checking completion-regexp-list.
13 (Fdisplay_completion_list): Make it handle arguments that are
14 symbols. Doc fix.
15
12004-02-05 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 162004-02-05 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 17
3 * xterm.h: Add declaration of free_frame_menubar. 18 * xterm.h: Add declaration of free_frame_menubar.
4 19
5 * xfns.c (x_create_bitmap_mask): Removed unused variable depth. 20 * xfns.c (x_create_bitmap_mask): Removed unused variable depth.
6 (x_set_menu_bar_lines): Added ! defined USE_GTK for olines. 21 (x_set_menu_bar_lines): Added ! defined USE_GTK for olines.
7 (Fx_change_window_property): Add declaration of parameters type and 22 (Fx_change_window_property): Add declaration of parameters type and
8 format. Remove unused variable cons. 23 format. Remove unused variable cons.
9 24
10 * xselect.c: Include stdio,h. 25 * xselect.c: Include stdio,h.
diff --git a/src/minibuf.c b/src/minibuf.c
index 9a05a4d1ce0..b91a4a4fc2a 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -131,6 +131,8 @@ Lisp_Object Qminibuffer_default;
131 131
132Lisp_Object Qcurrent_input_method, Qactivate_input_method; 132Lisp_Object Qcurrent_input_method, Qactivate_input_method;
133 133
134Lisp_Object Qcase_fold_search;
135
134extern Lisp_Object Qmouse_face; 136extern Lisp_Object Qmouse_face;
135 137
136extern Lisp_Object Qfield; 138extern Lisp_Object Qfield;
@@ -321,7 +323,8 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag,
321DEFUN ("minibufferp", Fminibufferp, 323DEFUN ("minibufferp", Fminibufferp,
322 Sminibufferp, 0, 1, 0, 324 Sminibufferp, 0, 1, 0,
323 doc: /* Return t if BUFFER is a minibuffer. 325 doc: /* Return t if BUFFER is a minibuffer.
324No argument or nil as argument means use current buffer as BUFFER.*/) 326No argument or nil as argument means use current buffer as BUFFER.
327BUFFER can be a buffer or a buffer name. */)
325 (buffer) 328 (buffer)
326 Lisp_Object buffer; 329 Lisp_Object buffer;
327{ 330{
@@ -410,9 +413,9 @@ minibuffer_completion_contents ()
410 with initial position HISTPOS. INITIAL should be a string or a 413 with initial position HISTPOS. INITIAL should be a string or a
411 cons of a string and an integer. BACKUP_N should be <= 0, or 414 cons of a string and an integer. BACKUP_N should be <= 0, or
412 Qnil, which is equivalent to 0. If INITIAL is a cons, BACKUP_N is 415 Qnil, which is equivalent to 0. If INITIAL is a cons, BACKUP_N is
413 ignored and replaced with an integer that puts point N characters 416 ignored and replaced with an integer that puts point at one-indexed
414 from the beginning of INITIAL, where N is the CDR of INITIAL, or at 417 position N in INITIAL, where N is the CDR of INITIAL, or at the
415 the beginning of INITIAL if N <= 0. 418 beginning of INITIAL if N <= 0.
416 419
417 Normally return the result as a string (the text that was read), 420 Normally return the result as a string (the text that was read),
418 but if EXPFLAG is nonzero, read it and return the object read. 421 but if EXPFLAG is nonzero, read it and return the object read.
@@ -893,23 +896,22 @@ read_minibuf_unwind (data)
893 896
894DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, 897DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0,
895 doc: /* Read a string from the minibuffer, prompting with string PROMPT. 898 doc: /* Read a string from the minibuffer, prompting with string PROMPT.
896If optional second arg INITIAL-CONTENTS is non-nil, it is a string 899The optional second arg INITIAL-CONTENTS is an obsolete alternative to
897 to be inserted into the minibuffer before reading input. 900 DEFAULT-VALUE. It normally should be nil in new code, except when
898 If INITIAL-CONTENTS is (STRING . POSITION), the initial input 901 HIST is a cons. It is discussed in more detail below.
899 is STRING, but point is placed at position POSITION in the minibuffer.
900Third arg KEYMAP is a keymap to use whilst reading; 902Third arg KEYMAP is a keymap to use whilst reading;
901 if omitted or nil, the default is `minibuffer-local-map'. 903 if omitted or nil, the default is `minibuffer-local-map'.
902If fourth arg READ is non-nil, then interpret the result as a Lisp object 904If fourth arg READ is non-nil, then interpret the result as a Lisp object
903 and return that object: 905 and return that object:
904 in other words, do `(car (read-from-string INPUT-STRING))' 906 in other words, do `(car (read-from-string INPUT-STRING))'
905Fifth arg HIST, if non-nil, specifies a history list 907Fifth arg HIST, if non-nil, specifies a history list and optionally
906 and optionally the initial position in the list. 908 the initial position in the list. It can be a symbol, which is the
907 It can be a symbol, which is the history list variable to use, 909 history list variable to use, or it can be a cons cell
908 or it can be a cons cell (HISTVAR . HISTPOS). 910 (HISTVAR . HISTPOS). In that case, HISTVAR is the history list variable
909 In that case, HISTVAR is the history list variable to use, 911 to use, and HISTPOS is the initial position for use by the minibuffer
910 and HISTPOS is the initial position (the position in the list 912 history commands. For consistency, you should also specify that
911 which INITIAL-CONTENTS corresponds to). 913 element of the history as the value of INITIAL-CONTENTS. Positions
912 Positions are counted starting from 1 at the beginning of the list. 914 are counted starting from 1 at the beginning of the list.
913Sixth arg DEFAULT-VALUE is the default value. If non-nil, it is available 915Sixth arg DEFAULT-VALUE is the default value. If non-nil, it is available
914 for history commands; but, unless READ is non-nil, `read-from-minibuffer' 916 for history commands; but, unless READ is non-nil, `read-from-minibuffer'
915 does NOT return DEFAULT-VALUE if the user enters empty input! It returns 917 does NOT return DEFAULT-VALUE if the user enters empty input! It returns
@@ -918,7 +920,19 @@ Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
918 the current input method and the setting of `enable-multibyte-characters'. 920 the current input method and the setting of `enable-multibyte-characters'.
919If the variable `minibuffer-allow-text-properties' is non-nil, 921If the variable `minibuffer-allow-text-properties' is non-nil,
920 then the string which is returned includes whatever text properties 922 then the string which is returned includes whatever text properties
921 were present in the minibuffer. Otherwise the value has no text properties. */) 923 were present in the minibuffer. Otherwise the value has no text properties.
924
925The remainder of this documentation string describes the
926INITIAL-CONTENTS argument in more detail. It is only relevant when
927studying existing code, or when HIST is a cons. If non-nil,
928INITIAL-CONTENTS is a string to be inserted into the minibuffer before
929reading input. Normally, point is put at the end of that string.
930However, if INITIAL-CONTENTS is \(STRING . POSITION), the initial
931input is STRING, but point is placed at _one-indexed_ position
932POSITION in the minibuffer. Any integer value less than or equal to
933one puts point at the beginning of the string. *Note* that this
934behavior differs from the way such arguments are used in `completing-read'
935and some related functions, which use zero-indexing for POSITION. */)
922 (prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method) 936 (prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method)
923 Lisp_Object prompt, initial_contents, keymap, read, hist, default_value; 937 Lisp_Object prompt, initial_contents, keymap, read, hist, default_value;
924 Lisp_Object inherit_input_method; 938 Lisp_Object inherit_input_method;
@@ -958,9 +972,11 @@ If the variable `minibuffer-allow-text-properties' is non-nil,
958} 972}
959 973
960DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, 974DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0,
961 doc: /* Return a Lisp object read using the minibuffer. 975 doc: /* Return a Lisp object read using the minibuffer, unevaluated.
962Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS 976Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
963is a string to insert in the minibuffer before reading. */) 977is a string to insert in the minibuffer before reading.
978\(INITIAL-CONTENTS can also be a cons of a string and an integer. Such
979arguments are used as in `read-from-minibuffer') */)
964 (prompt, initial_contents) 980 (prompt, initial_contents)
965 Lisp_Object prompt, initial_contents; 981 Lisp_Object prompt, initial_contents;
966{ 982{
@@ -973,7 +989,9 @@ is a string to insert in the minibuffer before reading. */)
973DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, 989DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0,
974 doc: /* Return value of Lisp expression read using the minibuffer. 990 doc: /* Return value of Lisp expression read using the minibuffer.
975Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS 991Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
976is a string to insert in the minibuffer before reading. */) 992is a string to insert in the minibuffer before reading.
993\(INITIAL-CONTENTS can also be a cons of a string and an integer. Such
994arguments are used as in `read-from-minibuffer') */)
977 (prompt, initial_contents) 995 (prompt, initial_contents)
978 Lisp_Object prompt, initial_contents; 996 Lisp_Object prompt, initial_contents;
979{ 997{
@@ -985,6 +1003,9 @@ is a string to insert in the minibuffer before reading. */)
985DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, 1003DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0,
986 doc: /* Read a string from the minibuffer, prompting with string PROMPT. 1004 doc: /* Read a string from the minibuffer, prompting with string PROMPT.
987If non-nil, second arg INITIAL-INPUT is a string to insert before reading. 1005If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
1006 This argument has been superseded by DEFAULT-VALUE and should normally
1007 be nil in new code. It behaves as in `read-from-minibuffer'. See the
1008 documentation string of that function for details.
988The third arg HISTORY, if non-nil, specifies a history list 1009The third arg HISTORY, if non-nil, specifies a history list
989 and optionally the initial position in the list. 1010 and optionally the initial position in the list.
990See `read-from-minibuffer' for details of HISTORY argument. 1011See `read-from-minibuffer' for details of HISTORY argument.
@@ -1008,9 +1029,14 @@ Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
1008 1029
1009DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0, 1030DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0,
1010 doc: /* Read a string from the terminal, not allowing blanks. 1031 doc: /* Read a string from the terminal, not allowing blanks.
1011Prompt with PROMPT, and provide INITIAL as an initial value of the input string. 1032Prompt with PROMPT. Whitespace terminates the input. If INITIAL is
1033non-nil, it should be a string, which is used as initial input, with
1034point positioned at the end, so that SPACE will accept the input.
1035\(Actually, INITIAL can also be a cons of a string and an integer.
1036Such values are treated as in `read-from-minibuffer', but are normally
1037not useful in this function.)
1012Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits 1038Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
1013the current input method and the setting of `enable-multibyte-characters'. */) 1039the current input method and the setting of`enable-multibyte-characters'. */)
1014 (prompt, initial, inherit_input_method) 1040 (prompt, initial, inherit_input_method)
1015 Lisp_Object prompt, initial, inherit_input_method; 1041 Lisp_Object prompt, initial, inherit_input_method;
1016{ 1042{
@@ -1238,7 +1264,7 @@ is used to further constrain the set of candidates. */)
1238 && (tem = Fcompare_strings (eltstring, make_number (0), 1264 && (tem = Fcompare_strings (eltstring, make_number (0),
1239 make_number (SCHARS (string)), 1265 make_number (SCHARS (string)),
1240 string, make_number (0), Qnil, 1266 string, make_number (0), Qnil,
1241 completion_ignore_case ?Qt : Qnil), 1267 completion_ignore_case ? Qt : Qnil),
1242 EQ (Qt, tem))) 1268 EQ (Qt, tem)))
1243 { 1269 {
1244 /* Yes. */ 1270 /* Yes. */
@@ -1247,15 +1273,20 @@ is used to further constrain the set of candidates. */)
1247 XSETFASTINT (zero, 0); 1273 XSETFASTINT (zero, 0);
1248 1274
1249 /* Ignore this element if it fails to match all the regexps. */ 1275 /* Ignore this element if it fails to match all the regexps. */
1250 for (regexps = Vcompletion_regexp_list; CONSP (regexps); 1276 {
1251 regexps = XCDR (regexps)) 1277 int count = SPECPDL_INDEX ();
1252 { 1278 specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil);
1253 tem = Fstring_match (XCAR (regexps), eltstring, zero); 1279 for (regexps = Vcompletion_regexp_list; CONSP (regexps);
1254 if (NILP (tem)) 1280 regexps = XCDR (regexps))
1255 break; 1281 {
1256 } 1282 tem = Fstring_match (XCAR (regexps), eltstring, zero);
1257 if (CONSP (regexps)) 1283 if (NILP (tem))
1258 continue; 1284 break;
1285 }
1286 unbind_to (count, Qnil);
1287 if (CONSP (regexps))
1288 continue;
1289 }
1259 1290
1260 /* Ignore this element if there is a predicate 1291 /* Ignore this element if there is a predicate
1261 and the predicate doesn't like it. */ 1292 and the predicate doesn't like it. */
@@ -1493,15 +1524,20 @@ are ignored unless STRING itself starts with a space. */)
1493 XSETFASTINT (zero, 0); 1524 XSETFASTINT (zero, 0);
1494 1525
1495 /* Ignore this element if it fails to match all the regexps. */ 1526 /* Ignore this element if it fails to match all the regexps. */
1496 for (regexps = Vcompletion_regexp_list; CONSP (regexps); 1527 {
1497 regexps = XCDR (regexps)) 1528 int count = SPECPDL_INDEX ();
1498 { 1529 specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil);
1499 tem = Fstring_match (XCAR (regexps), eltstring, zero); 1530 for (regexps = Vcompletion_regexp_list; CONSP (regexps);
1500 if (NILP (tem)) 1531 regexps = XCDR (regexps))
1501 break; 1532 {
1502 } 1533 tem = Fstring_match (XCAR (regexps), eltstring, zero);
1503 if (CONSP (regexps)) 1534 if (NILP (tem))
1504 continue; 1535 break;
1536 }
1537 unbind_to (count, Qnil);
1538 if (CONSP (regexps))
1539 continue;
1540 }
1505 1541
1506 /* Ignore this element if there is a predicate 1542 /* Ignore this element if there is a predicate
1507 and the predicate doesn't like it. */ 1543 and the predicate doesn't like it. */
@@ -1537,7 +1573,7 @@ Lisp_Object Vminibuffer_completing_file_name;
1537DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, 1573DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0,
1538 doc: /* Read a string in the minibuffer, with completion. 1574 doc: /* Read a string in the minibuffer, with completion.
1539PROMPT is a string to prompt with; normally it ends in a colon and a space. 1575PROMPT is a string to prompt with; normally it ends in a colon and a space.
1540TABLE is an alist whose elements' cars are strings, or an obarray. 1576TABLE can be an list of strings, an alist, an obarray or a hash table.
1541TABLE can also be a function to do the completion itself. 1577TABLE can also be a function to do the completion itself.
1542PREDICATE limits completion to a subset of TABLE. 1578PREDICATE limits completion to a subset of TABLE.
1543See `try-completion' and `all-completions' for more details 1579See `try-completion' and `all-completions' for more details
@@ -1546,26 +1582,30 @@ See `try-completion' and `all-completions' for more details
1546If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless 1582If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless
1547 the input is (or completes to) an element of TABLE or is null. 1583 the input is (or completes to) an element of TABLE or is null.
1548 If it is also not t, typing RET does not exit if it does non-null completion. 1584 If it is also not t, typing RET does not exit if it does non-null completion.
1549If the input is null, `completing-read' returns an empty string, 1585If the input is null, `completing-read' returns DEF, or an empty string
1550 regardless of the value of REQUIRE-MATCH. 1586 if DEF is nil, regardless of the value of REQUIRE-MATCH.
1551 1587
1552If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. 1588If INITIAL-INPUT is non-nil, insert it in the minibuffer initially,
1553 If it is (STRING . POSITION), the initial input 1589 with point positioned at the end.
1554 is STRING, but point is placed POSITION characters into the string. 1590 If it is (STRING . POSITION), the initial input is STRING, but point
1555 This feature is deprecated--it is best to pass nil for INITIAL-INPUT 1591 is placed at _zero-indexed_ position POSITION in STRING. (*Note*
1556 and supply the default value DEF instead. The user can yank the 1592 that this is different from `read-from-minibuffer' and related
1557 default value into the minibuffer easily using \\[next-history-element]. 1593 functions, which use one-indexing for POSITION.) This feature is
1558 1594 deprecated--it is best to pass nil for INITIAL-INPUT and supply the
1559HIST, if non-nil, specifies a history list 1595 default value DEF instead. The user can yank the default value into
1560 and optionally the initial position in the list. 1596 the minibuffer easily using \\[next-history-element].
1561 It can be a symbol, which is the history list variable to use, 1597
1562 or it can be a cons cell (HISTVAR . HISTPOS). 1598HIST, if non-nil, specifies a history list and optionally the initial
1563 In that case, HISTVAR is the history list variable to use, 1599 position in the list. It can be a symbol, which is the history list
1564 and HISTPOS is the initial position (the position in the list 1600 variable to use, or it can be a cons cell (HISTVAR . HISTPOS). In
1565 which INITIAL-INPUT corresponds to). 1601 that case, HISTVAR is the history list variable to use, and HISTPOS
1566 Positions are counted starting from 1 at the beginning of the list. 1602 is the initial position (the position in the list used by the
1567 The variable `history-length' controls the maximum length of a 1603 minibuffer history commands). For consistency, you should also
1568 history list. 1604 specify that element of the history as the value of
1605 INITIAL-CONTENTS. (This is the only case in which you should use
1606 INITIAL-INPUT instead of DEF.) Positions are counted starting from
1607 1 at the beginning of the list. The variable `history-length'
1608 controls the maximum length of a history list.
1569 1609
1570DEF, if non-nil, is the default value. 1610DEF, if non-nil, is the default value.
1571 1611
@@ -1732,20 +1772,27 @@ the values STRING, PREDICATE and `lambda'. */)
1732 return call3 (alist, string, predicate, Qlambda); 1772 return call3 (alist, string, predicate, Qlambda);
1733 1773
1734 /* Reject this element if it fails to match all the regexps. */ 1774 /* Reject this element if it fails to match all the regexps. */
1735 for (regexps = Vcompletion_regexp_list; CONSP (regexps); 1775 {
1736 regexps = XCDR (regexps)) 1776 int count = SPECPDL_INDEX ();
1737 { 1777 specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil);
1738 if (NILP (Fstring_match (XCAR (regexps), 1778 for (regexps = Vcompletion_regexp_list; CONSP (regexps);
1739 SYMBOLP (tem) ? string : tem, 1779 regexps = XCDR (regexps))
1740 Qnil))) 1780 {
1741 return Qnil; 1781 if (NILP (Fstring_match (XCAR (regexps),
1742 } 1782 SYMBOLP (tem) ? string : tem,
1783 Qnil)))
1784 return unbind_to (count, Qnil);
1785 }
1786 unbind_to (count, Qnil);
1787 }
1743 1788
1744 /* Finally, check the predicate. */ 1789 /* Finally, check the predicate. */
1745 if (!NILP (predicate)) 1790 if (!NILP (predicate))
1746 return HASH_TABLE_P (alist) 1791 {
1747 ? call2 (predicate, tem, HASH_VALUE (XHASH_TABLE (alist), i)) 1792 return HASH_TABLE_P (alist)
1748 : call1 (predicate, tem); 1793 ? call2 (predicate, tem, HASH_VALUE (XHASH_TABLE (alist), i))
1794 : call1 (predicate, tem);
1795 }
1749 else 1796 else
1750 return Qt; 1797 return Qt;
1751} 1798}
@@ -2207,6 +2254,8 @@ DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_
2207 doc: /* Display the list of completions, COMPLETIONS, using `standard-output'. 2254 doc: /* Display the list of completions, COMPLETIONS, using `standard-output'.
2208Each element may be just a symbol or string 2255Each element may be just a symbol or string
2209or may be a list of two strings to be printed as if concatenated. 2256or may be a list of two strings to be printed as if concatenated.
2257If it is a list of two strings, the first is the actual completion
2258alternative, the second serves as annotation.
2210`standard-output' must be a buffer. 2259`standard-output' must be a buffer.
2211The actual completion alternatives, as inserted, are given `mouse-face' 2260The actual completion alternatives, as inserted, are given `mouse-face'
2212properties of `highlight'. 2261properties of `highlight'.
@@ -2247,6 +2296,8 @@ It can find the completion buffer in `standard-output'. */)
2247 startpos = Qnil; 2296 startpos = Qnil;
2248 2297
2249 elt = Fcar (tail); 2298 elt = Fcar (tail);
2299 if (SYMBOLP (elt))
2300 elt = SYMBOL_NAME (elt);
2250 /* Compute the length of this element. */ 2301 /* Compute the length of this element. */
2251 if (CONSP (elt)) 2302 if (CONSP (elt))
2252 { 2303 {
@@ -2558,6 +2609,9 @@ syms_of_minibuf ()
2558 Qactivate_input_method = intern ("activate-input-method"); 2609 Qactivate_input_method = intern ("activate-input-method");
2559 staticpro (&Qactivate_input_method); 2610 staticpro (&Qactivate_input_method);
2560 2611
2612 Qcase_fold_search = intern ("case-fold-search");
2613 staticpro (&Qcase_fold_search);
2614
2561 DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function, 2615 DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function,
2562 doc: /* If this is non-nil, `read-buffer' does its work by calling this function. */); 2616 doc: /* If this is non-nil, `read-buffer' does its work by calling this function. */);
2563 Vread_buffer_function = Qnil; 2617 Vread_buffer_function = Qnil;
@@ -2592,7 +2646,8 @@ This variable makes a difference whenever the minibuffer window is active. */);
2592 2646
2593 DEFVAR_LISP ("minibuffer-completion-table", &Vminibuffer_completion_table, 2647 DEFVAR_LISP ("minibuffer-completion-table", &Vminibuffer_completion_table,
2594 doc: /* Alist or obarray used for completion in the minibuffer. 2648 doc: /* Alist or obarray used for completion in the minibuffer.
2595This becomes the ALIST argument to `try-completion' and `all-completion'. 2649This becomes the ALIST argument to `try-completion' and `all-completions'.
2650The value can also be a list of strings or a hash table.
2596 2651
2597The value may alternatively be a function, which is given three arguments: 2652The value may alternatively be a function, which is given three arguments:
2598 STRING, the current buffer contents; 2653 STRING, the current buffer contents;
@@ -2639,7 +2694,12 @@ Some uses of the echo area also raise that frame (since they use it too). */);
2639 minibuffer_auto_raise = 0; 2694 minibuffer_auto_raise = 0;
2640 2695
2641 DEFVAR_LISP ("completion-regexp-list", &Vcompletion_regexp_list, 2696 DEFVAR_LISP ("completion-regexp-list", &Vcompletion_regexp_list,
2642 doc: /* List of regexps that should restrict possible completions. */); 2697 doc: /* List of regexps that should restrict possible completions.
2698The basic completion functions only consider a completion acceptable
2699if it matches all regular expressions in this list, with
2700`case-fold-search' bound to the value of `completion-ignore-case'.
2701See Info node `(elisp)Basic Completion', for a description of these
2702functions. */);
2643 Vcompletion_regexp_list = Qnil; 2703 Vcompletion_regexp_list = Qnil;
2644 2704
2645 DEFVAR_BOOL ("minibuffer-allow-text-properties", 2705 DEFVAR_BOOL ("minibuffer-allow-text-properties",