diff options
Diffstat (limited to 'lisp/emacs-lisp/map.el')
-rw-r--r-- | lisp/emacs-lisp/map.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el index 4e7d3b91b16..ea56efefe97 100644 --- a/lisp/emacs-lisp/map.el +++ b/lisp/emacs-lisp/map.el @@ -262,8 +262,9 @@ MAP can be a list, hash-table or array." MAP can be a list, hash-table or array." (catch 'map--break (map-apply (lambda (key value) - (when (funcall pred key value) - (throw 'map--break (cons key value)))) + (let ((result (funcall pred key value))) + (when result + (throw 'map--break result)))) map) nil)) |