diff options
| author | Mattias EngdegÄrd | 2022-07-11 17:31:38 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-07-11 17:35:01 +0200 |
| commit | 871db806e686236d76e8ddbf3b11dc4bbdc0b91e (patch) | |
| tree | 08bf90d5b92351b6a25fdbfc96895871d3bb1595 | |
| parent | ac0027f6a5480bd4739fdf71413a19012f400483 (diff) | |
| download | emacs-871db806e686236d76e8ddbf3b11dc4bbdc0b91e.tar.gz emacs-871db806e686236d76e8ddbf3b11dc4bbdc0b91e.zip | |
Remove obsolete uses of obsolete functions
* src/minibuf.c (minibuf_conform_representation): Remove.
(Ftry_completion): Don't call it.
(Ftest_completion): Don't use the obsolete Fstring_make_unibyte or
Fstring_make_multibyte; they don't serve any useful purpose here.
We don't try to equate unibyte and multibyte raw bytes in symbol
lookups elsewhere and there is no reason to do it here.
| -rw-r--r-- | src/minibuf.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 0fba334b22b..bedc5644807 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1545,18 +1545,6 @@ function, instead of the usual behavior. */) | |||
| 1545 | return unbind_to (count, result); | 1545 | return unbind_to (count, result); |
| 1546 | } | 1546 | } |
| 1547 | 1547 | ||
| 1548 | static Lisp_Object | ||
| 1549 | minibuf_conform_representation (Lisp_Object string, Lisp_Object basis) | ||
| 1550 | { | ||
| 1551 | if (STRING_MULTIBYTE (string) == STRING_MULTIBYTE (basis)) | ||
| 1552 | return string; | ||
| 1553 | |||
| 1554 | if (STRING_MULTIBYTE (string)) | ||
| 1555 | return Fstring_make_unibyte (string); | ||
| 1556 | else | ||
| 1557 | return Fstring_make_multibyte (string); | ||
| 1558 | } | ||
| 1559 | |||
| 1560 | static bool | 1548 | static bool |
| 1561 | match_regexps (Lisp_Object string, Lisp_Object regexps, | 1549 | match_regexps (Lisp_Object string, Lisp_Object regexps, |
| 1562 | bool ignore_case) | 1550 | bool ignore_case) |
| @@ -1817,7 +1805,7 @@ or from one of the possible completions. */) | |||
| 1817 | don't change the case of what the user typed. */ | 1805 | don't change the case of what the user typed. */ |
| 1818 | if (completion_ignore_case && bestmatchsize == SCHARS (string) | 1806 | if (completion_ignore_case && bestmatchsize == SCHARS (string) |
| 1819 | && SCHARS (bestmatch) > bestmatchsize) | 1807 | && SCHARS (bestmatch) > bestmatchsize) |
| 1820 | return minibuf_conform_representation (string, bestmatch); | 1808 | return string; |
| 1821 | 1809 | ||
| 1822 | /* Return t if the supplied string is an exact match (counting case); | 1810 | /* Return t if the supplied string is an exact match (counting case); |
| 1823 | it does not require any change to be made. */ | 1811 | it does not require any change to be made. */ |
| @@ -2090,19 +2078,6 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 2090 | SSDATA (string), | 2078 | SSDATA (string), |
| 2091 | SCHARS (string), | 2079 | SCHARS (string), |
| 2092 | SBYTES (string)); | 2080 | SBYTES (string)); |
| 2093 | if (!SYMBOLP (tem)) | ||
| 2094 | { | ||
| 2095 | if (STRING_MULTIBYTE (string)) | ||
| 2096 | string = Fstring_make_unibyte (string); | ||
| 2097 | else | ||
| 2098 | string = Fstring_make_multibyte (string); | ||
| 2099 | |||
| 2100 | tem = oblookup (collection, | ||
| 2101 | SSDATA (string), | ||
| 2102 | SCHARS (string), | ||
| 2103 | SBYTES (string)); | ||
| 2104 | } | ||
| 2105 | |||
| 2106 | if (completion_ignore_case && !SYMBOLP (tem)) | 2081 | if (completion_ignore_case && !SYMBOLP (tem)) |
| 2107 | { | 2082 | { |
| 2108 | for (i = ASIZE (collection) - 1; i >= 0; i--) | 2083 | for (i = ASIZE (collection) - 1; i >= 0; i--) |