aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Naggum1996-01-09 00:33:22 +0000
committerErik Naggum1996-01-09 00:33:22 +0000
commit7efd36fc63127dd436988e89c7d4136e6c421584 (patch)
treea05b4f15e675b078a8f9f8246b05571d7ce0d782 /src
parent9be191c94f5f8756680949d010f0735113ff0dae (diff)
downloademacs-7efd36fc63127dd436988e89c7d4136e6c421584.tar.gz
emacs-7efd36fc63127dd436988e89c7d4136e6c421584.zip
(Ftry_completion, Fall_completions, Fcompleting_read): Harmonize arguments
with documentation.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index c2a11a1d62a..75ea52d71e9 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -651,8 +651,8 @@ it is used to test each possible match.\n\
651The match is a candidate only if PREDICATE returns non-nil.\n\ 651The match is a candidate only if PREDICATE returns non-nil.\n\
652The argument given to PREDICATE is the alist element\n\ 652The argument given to PREDICATE is the alist element\n\
653or the symbol from the obarray.") 653or the symbol from the obarray.")
654 (string, alist, pred) 654 (string, alist, predicate)
655 Lisp_Object string, alist, pred; 655 Lisp_Object string, alist, predicate;
656{ 656{
657 Lisp_Object bestmatch, tail, elt, eltstring; 657 Lisp_Object bestmatch, tail, elt, eltstring;
658 int bestmatchsize; 658 int bestmatchsize;
@@ -665,7 +665,7 @@ or the symbol from the obarray.")
665 665
666 CHECK_STRING (string, 0); 666 CHECK_STRING (string, 0);
667 if (!list && !VECTORP (alist)) 667 if (!list && !VECTORP (alist))
668 return call3 (alist, string, pred, Qnil); 668 return call3 (alist, string, predicate, Qnil);
669 669
670 bestmatch = Qnil; 670 bestmatch = Qnil;
671 671
@@ -739,14 +739,14 @@ or the symbol from the obarray.")
739 /* Ignore this element if there is a predicate 739 /* Ignore this element if there is a predicate
740 and the predicate doesn't like it. */ 740 and the predicate doesn't like it. */
741 741
742 if (!NILP (pred)) 742 if (!NILP (predicate))
743 { 743 {
744 if (EQ (pred, Qcommandp)) 744 if (EQ (predicate, Qcommandp))
745 tem = Fcommandp (elt); 745 tem = Fcommandp (elt);
746 else 746 else
747 { 747 {
748 GCPRO4 (tail, string, eltstring, bestmatch); 748 GCPRO4 (tail, string, eltstring, bestmatch);
749 tem = call1 (pred, elt); 749 tem = call1 (predicate, elt);
750 UNGCPRO; 750 UNGCPRO;
751 } 751 }
752 if (NILP (tem)) continue; 752 if (NILP (tem)) continue;
@@ -864,8 +864,8 @@ or the symbol from the obarray.\n\
864If the optional fourth argument HIDE-SPACES is non-nil,\n\ 864If the optional fourth argument HIDE-SPACES is non-nil,\n\
865strings in ALIST that start with a space\n\ 865strings in ALIST that start with a space\n\
866are ignored unless STRING itself starts with a space.") 866are ignored unless STRING itself starts with a space.")
867 (string, alist, pred, hide_spaces) 867 (string, alist, predicate, hide_spaces)
868 Lisp_Object string, alist, pred, hide_spaces; 868 Lisp_Object string, alist, predicate, hide_spaces;
869{ 869{
870 Lisp_Object tail, elt, eltstring; 870 Lisp_Object tail, elt, eltstring;
871 Lisp_Object allmatches; 871 Lisp_Object allmatches;
@@ -877,7 +877,7 @@ are ignored unless STRING itself starts with a space.")
877 CHECK_STRING (string, 0); 877 CHECK_STRING (string, 0);
878 if (!list && !VECTORP (alist)) 878 if (!list && !VECTORP (alist))
879 { 879 {
880 return call3 (alist, string, pred, Qt); 880 return call3 (alist, string, predicate, Qt);
881 } 881 }
882 allmatches = Qnil; 882 allmatches = Qnil;
883 883
@@ -956,14 +956,14 @@ are ignored unless STRING itself starts with a space.")
956 /* Ignore this element if there is a predicate 956 /* Ignore this element if there is a predicate
957 and the predicate doesn't like it. */ 957 and the predicate doesn't like it. */
958 958
959 if (!NILP (pred)) 959 if (!NILP (predicate))
960 { 960 {
961 if (EQ (pred, Qcommandp)) 961 if (EQ (predicate, Qcommandp))
962 tem = Fcommandp (elt); 962 tem = Fcommandp (elt);
963 else 963 else
964 { 964 {
965 GCPRO4 (tail, eltstring, allmatches, string); 965 GCPRO4 (tail, eltstring, allmatches, string);
966 tem = call1 (pred, elt); 966 tem = call1 (predicate, elt);
967 UNGCPRO; 967 UNGCPRO;
968 } 968 }
969 if (NILP (tem)) continue; 969 if (NILP (tem)) continue;
@@ -986,7 +986,6 @@ Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm;
986 986
987DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 6, 0, 987DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 6, 0,
988 "Read a string in the minibuffer, with completion.\n\ 988 "Read a string in the minibuffer, with completion.\n\
989Args: PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST.\n\
990PROMPT is a string to prompt with; normally it ends in a colon and a space.\n\ 989PROMPT is a string to prompt with; normally it ends in a colon and a space.\n\
991TABLE is an alist whose elements' cars are strings, or an obarray.\n\ 990TABLE is an alist whose elements' cars are strings, or an obarray.\n\
992PREDICATE limits completion to a subset of TABLE.\n\ 991PREDICATE limits completion to a subset of TABLE.\n\
@@ -1015,14 +1014,14 @@ Completion ignores case if the ambient value of\n\
1015*/ 1014*/
1016DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 6, 0, 1015DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 6, 0,
1017 0 /* See immediately above */) 1016 0 /* See immediately above */)
1018 (prompt, table, pred, require_match, init, hist) 1017 (prompt, table, predicate, require_match, init, hist)
1019 Lisp_Object prompt, table, pred, require_match, init, hist; 1018 Lisp_Object prompt, table, predicate, require_match, init, hist;
1020{ 1019{
1021 Lisp_Object val, histvar, histpos, position; 1020 Lisp_Object val, histvar, histpos, position;
1022 int pos = 0; 1021 int pos = 0;
1023 int count = specpdl_ptr - specpdl; 1022 int count = specpdl_ptr - specpdl;
1024 specbind (Qminibuffer_completion_table, table); 1023 specbind (Qminibuffer_completion_table, table);
1025 specbind (Qminibuffer_completion_predicate, pred); 1024 specbind (Qminibuffer_completion_predicate, predicate);
1026 specbind (Qminibuffer_completion_confirm, 1025 specbind (Qminibuffer_completion_confirm,
1027 EQ (require_match, Qt) ? Qnil : Qt); 1026 EQ (require_match, Qt) ? Qnil : Qt);
1028 last_exact_completion = Qnil; 1027 last_exact_completion = Qnil;