diff options
| author | Philipp Stephani | 2019-01-17 23:39:19 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2019-01-20 00:04:19 +0100 |
| commit | 551051596fe51d6e232315eeda8a0a79eb43bfdf (patch) | |
| tree | dd2b179cb2dbe29fbea8d26fdd73ca8a29dae154 /src | |
| parent | 3e1255172334f3c0645d37eb92c05a628fa3d548 (diff) | |
| download | emacs-551051596fe51d6e232315eeda8a0a79eb43bfdf.tar.gz emacs-551051596fe51d6e232315eeda8a0a79eb43bfdf.zip | |
Improve error data when passing a wrong type to 'sort' (Bug#34104)
* src/fns.c (Fsort): Use 'list-or-vector-p' for error message.
(syms_of_fns): Define 'list-or-vector-p'.
* test/src/fns-tests.el (fns-tests-sort): Extend unit test.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -2084,7 +2084,7 @@ the second. */) | |||
| 2084 | else if (VECTORP (seq)) | 2084 | else if (VECTORP (seq)) |
| 2085 | sort_vector (seq, predicate); | 2085 | sort_vector (seq, predicate); |
| 2086 | else if (!NILP (seq)) | 2086 | else if (!NILP (seq)) |
| 2087 | wrong_type_argument (Qsequencep, seq); | 2087 | wrong_type_argument (Qlist_or_vector_p, seq); |
| 2088 | return seq; | 2088 | return seq; |
| 2089 | } | 2089 | } |
| 2090 | 2090 | ||
| @@ -5358,6 +5358,7 @@ Used by `featurep' and `require', and altered by `provide'. */); | |||
| 5358 | DEFSYM (Qsubfeatures, "subfeatures"); | 5358 | DEFSYM (Qsubfeatures, "subfeatures"); |
| 5359 | DEFSYM (Qfuncall, "funcall"); | 5359 | DEFSYM (Qfuncall, "funcall"); |
| 5360 | DEFSYM (Qplistp, "plistp"); | 5360 | DEFSYM (Qplistp, "plistp"); |
| 5361 | DEFSYM (Qlist_or_vector_p, "list-or-vector-p"); | ||
| 5361 | 5362 | ||
| 5362 | #ifdef HAVE_LANGINFO_CODESET | 5363 | #ifdef HAVE_LANGINFO_CODESET |
| 5363 | DEFSYM (Qcodeset, "codeset"); | 5364 | DEFSYM (Qcodeset, "codeset"); |