diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2020-01-19 00:17:42 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2020-02-04 02:04:20 +0100 |
commit | 330228d5c71981d3e2d39387d5222c3670c467c6 (patch) | |
tree | 3945f976b7d292ad9a441d8033ac8a77756f7e67 /test | |
parent | 557b790e0a3fcb2cd4196a3119da3e92647f8def (diff) | |
download | emacs-330228d5c71981d3e2d39387d5222c3670c467c6.tar.gz |
Provide default for describe-keymap prompt
* lisp/help-fns.el (describe-keymap): Provide a reasonable
default for prompt. (Bug#30660)
(help-fns-find-keymap-name)
(help-fns--most-relevant-active-keymap): New functions.
* test/lisp/help-fns-tests.el
(help-fns-test-find-keymap-name): New test.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/help-fns-tests.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el index 1d6c062979f..d2dc3d24aec 100644 --- a/test/lisp/help-fns-tests.el +++ b/test/lisp/help-fns-tests.el @@ -125,6 +125,15 @@ Return first line of the output of (describe-function-1 FUNC)." ;;; Tests for describe-keymap +(ert-deftest help-fns-test-find-keymap-name () + (should (equal (help-fns-find-keymap-name lisp-mode-map) 'lisp-mode-map)) + ;; Follow aliasing. + (unwind-protect + (progn + (defvaralias 'foo-test-map 'lisp-mode-map) + (should (equal (help-fns-find-keymap-name foo-test-map) 'lisp-mode-map))) + (makunbound 'foo-test-map))) + (ert-deftest help-fns-test-describe-keymap/symbol () (describe-keymap 'minibuffer-local-must-match-map) (with-current-buffer "*Help*" |