diff options
| author | Stefan Kangas | 2024-12-16 22:21:37 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2024-12-16 23:04:18 +0100 |
| commit | 80dc431b5a453c8200260969c8e2904e2d353b1e (patch) | |
| tree | 8abfbd0efe0e875748628e96c645081bb321321e /src | |
| parent | 16eb038d472b5765beb3b18e1058846efbdf97af (diff) | |
| download | emacs-80dc431b5a453c8200260969c8e2904e2d353b1e.tar.gz emacs-80dc431b5a453c8200260969c8e2904e2d353b1e.zip | |
all-completions: Drop support for obsolete calling convention
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 1f94e0e650e..9fd5c236f0b 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1826,7 +1826,7 @@ or from one of the possible completions. */) | |||
| 1826 | return Fsubstring (bestmatch, zero, end); | 1826 | return Fsubstring (bestmatch, zero, end); |
| 1827 | } | 1827 | } |
| 1828 | 1828 | ||
| 1829 | DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0, | 1829 | DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 3, 0, |
| 1830 | doc: /* Search for partial matches of STRING in COLLECTION. | 1830 | doc: /* Search for partial matches of STRING in COLLECTION. |
| 1831 | 1831 | ||
| 1832 | Test each possible completion specified by COLLECTION | 1832 | Test each possible completion specified by COLLECTION |
| @@ -1859,12 +1859,8 @@ the string key and the associated value. | |||
| 1859 | 1859 | ||
| 1860 | To be acceptable, a possible completion must also match all the regexps | 1860 | To be acceptable, a possible completion must also match all the regexps |
| 1861 | in `completion-regexp-list' (unless COLLECTION is a function, in | 1861 | in `completion-regexp-list' (unless COLLECTION is a function, in |
| 1862 | which case that function should itself handle `completion-regexp-list'). | 1862 | which case that function should itself handle `completion-regexp-list'). */) |
| 1863 | 1863 | (Lisp_Object string, Lisp_Object collection, Lisp_Object predicate) | |
| 1864 | An obsolete optional fourth argument HIDE-SPACES is still accepted for | ||
| 1865 | backward compatibility. If non-nil, strings in COLLECTION that start | ||
| 1866 | with a space are ignored unless STRING itself starts with a space. */) | ||
| 1867 | (Lisp_Object string, Lisp_Object collection, Lisp_Object predicate, Lisp_Object hide_spaces) | ||
| 1868 | { | 1864 | { |
| 1869 | Lisp_Object tail, elt, eltstring; | 1865 | Lisp_Object tail, elt, eltstring; |
| 1870 | Lisp_Object allmatches; | 1866 | Lisp_Object allmatches; |
| @@ -1932,12 +1928,6 @@ with a space are ignored unless STRING itself starts with a space. */) | |||
| 1932 | 1928 | ||
| 1933 | if (STRINGP (eltstring) | 1929 | if (STRINGP (eltstring) |
| 1934 | && SCHARS (string) <= SCHARS (eltstring) | 1930 | && SCHARS (string) <= SCHARS (eltstring) |
| 1935 | /* If HIDE_SPACES, reject alternatives that start with space | ||
| 1936 | unless the input starts with space. */ | ||
| 1937 | && (NILP (hide_spaces) | ||
| 1938 | || (SBYTES (string) > 0 | ||
| 1939 | && SREF (string, 0) == ' ') | ||
| 1940 | || SREF (eltstring, 0) != ' ') | ||
| 1941 | && (tem = Fcompare_strings (eltstring, zero, | 1931 | && (tem = Fcompare_strings (eltstring, zero, |
| 1942 | make_fixnum (SCHARS (string)), | 1932 | make_fixnum (SCHARS (string)), |
| 1943 | string, zero, | 1933 | string, zero, |
| @@ -2155,7 +2145,7 @@ If FLAG is nil, invoke `try-completion'; if it is t, invoke | |||
| 2155 | return Ftry_completion (string, Vbuffer_alist, predicate); | 2145 | return Ftry_completion (string, Vbuffer_alist, predicate); |
| 2156 | else if (EQ (flag, Qt)) | 2146 | else if (EQ (flag, Qt)) |
| 2157 | { | 2147 | { |
| 2158 | Lisp_Object res = Fall_completions (string, Vbuffer_alist, predicate, Qnil); | 2148 | Lisp_Object res = Fall_completions (string, Vbuffer_alist, predicate); |
| 2159 | if (SCHARS (string) > 0) | 2149 | if (SCHARS (string) > 0) |
| 2160 | return res; | 2150 | return res; |
| 2161 | else | 2151 | else |