[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el [emacs-unicode-2] |
Date: |
Fri, 19 Nov 2004 02:16:33 -0500 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.360.2.16 emacs/lisp/subr.el:1.360.2.17
*** emacs/lisp/subr.el:1.360.2.16 Fri Nov 12 02:52:46 2004
--- emacs/lisp/subr.el Fri Nov 19 06:55:03 2004
***************
*** 484,489 ****
--- 484,507 ----
(setq inserted t)))
(setq tail (cdr tail)))))
+ (defun map-keymap-internal (function keymap &optional sort-first)
+ "Implement `map-keymap' with sorting.
+ Don't call this function; it is for internal use only."
+ (if sort-first
+ (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< a b))))))
+ (dolist (p list)
+ (funcall function (car p) (cdr p))))
+ (map-keymap function keymap)))
(defmacro kbd (keys)
"Convert KEYS to the internal Emacs key representation.