]> git.eshelyaron.com Git - emacs.git/commitdiff
all-completions: Drop support for obsolete calling convention
authorStefan Kangas <stefankangas@gmail.com>
Mon, 16 Dec 2024 21:21:37 +0000 (22:21 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:10:20 +0000 (16:10 +0100)
* src/minibuf.c (Fall_completions):
* lisp/subr.el (all-completions): Drop support for old calling
convention, obsolete since 23.1.
* src/minibuf.c (Finternal_complete_buffer): Update caller.

(cherry picked from commit 80dc431b5a453c8200260969c8e2904e2d353b1e)

etc/NEWS
lisp/subr.el
src/minibuf.c

index 31711e0d0c112cbf671a3c3fa9e4f0b4c53bee61..85a202ee87c755c755d668247391e3c7e3633c8e 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -877,6 +877,9 @@ only continue the active repeating sequence.
 ** New function 'completion-table-with-metadata'.
 It offers a more concise way to create a completion table with metadata.
 
++++
+** 'all-completions' no longer supports the old calling convention.
+
 \f
 * Changes in Emacs 31.1 on Non-Free Operating Systems
 
index 51ecf8a910da1b5ba43108bfbabff3618275a201..db05f1d6880c908f2ca876440f5c31243addba2c 100644 (file)
@@ -1977,8 +1977,6 @@ be a list of the form returned by `event-start' and `event-end'."
            (side-effect-free t) (obsolete log "24.4"))
   (log x 10))
 
-(set-advertised-calling-convention
- 'all-completions '(string collection &optional predicate) "23.1")
 (set-advertised-calling-convention 'unintern '(name obarray) "23.3")
 (set-advertised-calling-convention 'indirect-function '(object) "25.1")
 (set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) "24.3")
index 2f77dbecc071860e753f3a3f2ddab91c7591f8fe..404fdcca9c2b33a5ebb71c6022f6f6a99a0aa2f7 100644 (file)
@@ -1725,7 +1725,7 @@ or from one of the possible completions.  */)
   return Fsubstring (bestmatch, zero, end);
 }
 \f
-DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0,
+DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 3, 0,
        doc: /* Search for partial matches of STRING in COLLECTION.
 
 Test each possible completion specified by COLLECTION
@@ -1754,12 +1754,8 @@ A possible completion is accepted only if PREDICATE returns non-nil.
 The argument given to PREDICATE is either a string or a cons cell (whose
 car is a string) from the alist, or a symbol from the obarray.
 If COLLECTION is a hash-table, PREDICATE is called with two arguments:
-the string key and the associated value.
-
-An obsolete optional fourth argument HIDE-SPACES is still accepted for
-backward compatibility.  If non-nil, strings in COLLECTION that start
-with a space are ignored unless STRING itself starts with a space.  */)
-  (Lisp_Object string, Lisp_Object collection, Lisp_Object predicate, Lisp_Object hide_spaces)
+the string key and the associated value.  */)
+  (Lisp_Object string, Lisp_Object collection, Lisp_Object predicate)
 {
   Lisp_Object tail, elt, eltstring;
   Lisp_Object allmatches;
@@ -1827,12 +1823,6 @@ with a space are ignored unless STRING itself starts with a space.  */)
 
       if (STRINGP (eltstring)
          && SCHARS (string) <= SCHARS (eltstring)
-         /* If HIDE_SPACES, reject alternatives that start with space
-            unless the input starts with space.  */
-         && (NILP (hide_spaces)
-             || (SBYTES (string) > 0
-                 && SREF (string, 0) == ' ')
-             || SREF (eltstring, 0) != ' ')
          && (tem = Fcompare_strings (eltstring, zero,
                                      make_fixnum (SCHARS (string)),
                                      string, zero,