Function: map-keymap-sorted
map-keymap-sorted is a byte-compiled function defined in subr.el.gz.
Signature
(map-keymap-sorted FUNCTION KEYMAP)
Documentation
Implement map-keymap with sorting.
Don't call this function; it is for internal use only.
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun map-keymap-sorted (function keymap)
"Implement `map-keymap' with sorting.
Don't call this function; it is for internal use only."
(let (list)
(map-keymap (lambda (a b) (push (cons a b) list))
keymap)
(setq list (sort list
(lambda (a b)
(setq a (car a) b (car b))
(if (integerp a)
(if (integerp b) (< a b)
t)
(if (integerp b) t
;; string< also accepts symbols.
(string< a b))))))
(dolist (p list)
(funcall function (car p) (cdr p)))))