changeset 14083:3ac9d27214e4

(Ftry_completion, Fall_completions, Fcompleting_read): Harmonize arguments with documentation.
author Erik Naggum <erik@naggum.no>
date Tue, 09 Jan 1996 00:33:22 +0000
parents c6a1708f37d4
children 8765a56417ac
files src/minibuf.c
diffstat 1 files changed, 15 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Tue Jan 09 00:33:13 1996 +0000
+++ b/src/minibuf.c	Tue Jan 09 00:33:22 1996 +0000
@@ -651,8 +651,8 @@
 The match is a candidate only if PREDICATE returns non-nil.\n\
 The argument given to PREDICATE is the alist element\n\
 or the symbol from the obarray.")
-  (string, alist, pred)
-     Lisp_Object string, alist, pred;
+  (string, alist, predicate)
+     Lisp_Object string, alist, predicate;
 {
   Lisp_Object bestmatch, tail, elt, eltstring;
   int bestmatchsize;
@@ -665,7 +665,7 @@
 
   CHECK_STRING (string, 0);
   if (!list && !VECTORP (alist))
-    return call3 (alist, string, pred, Qnil);
+    return call3 (alist, string, predicate, Qnil);
 
   bestmatch = Qnil;
 
@@ -739,14 +739,14 @@
 	  /* Ignore this element if there is a predicate
 	     and the predicate doesn't like it. */
 
-	  if (!NILP (pred))
+	  if (!NILP (predicate))
 	    {
-	      if (EQ (pred, Qcommandp))
+	      if (EQ (predicate, Qcommandp))
 		tem = Fcommandp (elt);
 	      else
 		{
 		  GCPRO4 (tail, string, eltstring, bestmatch);
-		  tem = call1 (pred, elt);
+		  tem = call1 (predicate, elt);
 		  UNGCPRO;
 		}
 	      if (NILP (tem)) continue;
@@ -864,8 +864,8 @@
 If the optional fourth argument HIDE-SPACES is non-nil,\n\
 strings in ALIST that start with a space\n\
 are ignored unless STRING itself starts with a space.")
-  (string, alist, pred, hide_spaces)
-     Lisp_Object string, alist, pred, hide_spaces;
+  (string, alist, predicate, hide_spaces)
+     Lisp_Object string, alist, predicate, hide_spaces;
 {
   Lisp_Object tail, elt, eltstring;
   Lisp_Object allmatches;
@@ -877,7 +877,7 @@
   CHECK_STRING (string, 0);
   if (!list && !VECTORP (alist))
     {
-      return call3 (alist, string, pred, Qt);
+      return call3 (alist, string, predicate, Qt);
     }
   allmatches = Qnil;
 
@@ -956,14 +956,14 @@
 	  /* Ignore this element if there is a predicate
 	     and the predicate doesn't like it. */
 
-	  if (!NILP (pred))
+	  if (!NILP (predicate))
 	    {
-	      if (EQ (pred, Qcommandp))
+	      if (EQ (predicate, Qcommandp))
 		tem = Fcommandp (elt);
 	      else
 		{
 		  GCPRO4 (tail, eltstring, allmatches, string);
-		  tem = call1 (pred, elt);
+		  tem = call1 (predicate, elt);
 		  UNGCPRO;
 		}
 	      if (NILP (tem)) continue;
@@ -986,7 +986,6 @@
 
 DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 6, 0,
   "Read a string in the minibuffer, with completion.\n\
-Args: PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST.\n\
 PROMPT is a string to prompt with; normally it ends in a colon and a space.\n\
 TABLE is an alist whose elements' cars are strings, or an obarray.\n\
 PREDICATE limits completion to a subset of TABLE.\n\
@@ -1015,14 +1014,14 @@
 */
 DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 6, 0,
   0 /* See immediately above */)
-  (prompt, table, pred, require_match, init, hist)
-     Lisp_Object prompt, table, pred, require_match, init, hist;
+  (prompt, table, predicate, require_match, init, hist)
+     Lisp_Object prompt, table, predicate, require_match, init, hist;
 {
   Lisp_Object val, histvar, histpos, position;
   int pos = 0;
   int count = specpdl_ptr - specpdl;
   specbind (Qminibuffer_completion_table, table);
-  specbind (Qminibuffer_completion_predicate, pred);
+  specbind (Qminibuffer_completion_predicate, predicate);
   specbind (Qminibuffer_completion_confirm,
 	    EQ (require_match, Qt) ? Qnil : Qt);
   last_exact_completion = Qnil;