mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* lisp/emacs-lisp/map.el: Add keyword-only pattern abbreviation
* lisp/emacs-lisp/map.el: Update version to 2.1. ((pcase-defmacro map)): Update docstring. (map--make-pcase-bindings): Match keyword pattern. * test/lisp/emacs-lisp/map-tests.el (test-map-plist-pcase): Add test.
This commit is contained in:
parent
b641c178ce
commit
e287da5a81
3 changed files with 23 additions and 6 deletions
|
|
@ -376,5 +376,11 @@ Evaluate BODY for each created map.
|
|||
'((1 . 1) (2 . 5) (3 . 0)))
|
||||
'((3 . 0) (2 . 9) (1 . 6)))))
|
||||
|
||||
(ert-deftest test-map-plist-pcase ()
|
||||
(let ((plist '(:one 1 :two 2)))
|
||||
(should (equal (pcase-let (((map :one (:two two)) plist))
|
||||
(list one two))
|
||||
'(1 2)))))
|
||||
|
||||
(provide 'map-tests)
|
||||
;;; map-tests.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue