diff options
| author | Noam Postavsky | 2016-11-27 14:41:02 -0500 |
|---|---|---|
| committer | Noam Postavsky | 2016-12-06 22:20:23 -0500 |
| commit | 2a3420d94206a97f094580e06c25af91d5949516 (patch) | |
| tree | 725cd913267ceb1cf4dbc0f32671b44876b24f0b /test/src | |
| parent | 60fe63015165a03a765852f60367e548c1617f89 (diff) | |
| download | emacs-2a3420d94206a97f094580e06c25af91d5949516.tar.gz emacs-2a3420d94206a97f094580e06c25af91d5949516.zip | |
Give test-completion's PREDICATE the hashtable key
For hashtable entries with symbol keys, `test-completion' would convert
the key to a string before calling PREDICATE, unlike `try-completion'
and `all-completions'.
* src/minibuf.c (Ftest_completion): Pass original key from hashtable.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/minibuf-tests.el | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/src/minibuf-tests.el b/test/src/minibuf-tests.el index 98b8614ddff..82ac0373cb4 100644 --- a/test/src/minibuf-tests.el +++ b/test/src/minibuf-tests.el | |||
| @@ -394,10 +394,7 @@ | |||
| 394 | (ert-deftest test-completion-symbol-hashtable-predicate () | 394 | (ert-deftest test-completion-symbol-hashtable-predicate () |
| 395 | (minibuf-tests--test-completion-pred | 395 | (minibuf-tests--test-completion-pred |
| 396 | #'minibuf-tests--strings-to-symbol-hashtable | 396 | #'minibuf-tests--strings-to-symbol-hashtable |
| 397 | ;; The predicate recieves a string as the key in this case. | 397 | #'minibuf-tests--part-of-hashtable)) |
| 398 | (lambda (table) | ||
| 399 | (let ((in-table (minibuf-tests--part-of-hashtable table))) | ||
| 400 | (lambda (k v) (funcall in-table (intern k) v)))))) | ||
| 401 | (ert-deftest test-completion-symbol-hashtable-completion-regexp () | 398 | (ert-deftest test-completion-symbol-hashtable-completion-regexp () |
| 402 | (minibuf-tests--test-completion-regexp | 399 | (minibuf-tests--test-completion-regexp |
| 403 | #'minibuf-tests--strings-to-symbol-hashtable)) | 400 | #'minibuf-tests--strings-to-symbol-hashtable)) |