diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-03-25 19:42:34 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-03-25 19:42:34 +0000 |
commit | a10cca6c90b3366f3000b06ce1fa226277da0ea4 (patch) | |
tree | eb4a9bd5afea8697a16a2eeaf15333639687fbc0 /lisp | |
parent | d7b10f4c2efd05dfeb9526686cb76e1df70527bb (diff) | |
download | emacs-a10cca6c90b3366f3000b06ce1fa226277da0ea4.tar.gz emacs-a10cca6c90b3366f3000b06ce1fa226277da0ea4.tar.bz2 emacs-a10cca6c90b3366f3000b06ce1fa226277da0ea4.zip |
* subr.el (map-keymap-sorted): Rename from map-keymap-internal.
Remove `sort-first' argument.
* keymap.c (Fmap_keymap): Use `map-keymap-sorted.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/subr.el | 32 |
2 files changed, 18 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b052448c6ab..8ffa1c9d92c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-03-25 Stefan Monnier <monnier@iro.umontreal.ca> + * subr.el (map-keymap-sorted): Rename from map-keymap-internal. + Remove `sort-first' argument. + * subr.el (redisplay-end-trigger-functions) (window-redisplay-end-trigger, set-window-redisplay-end-trigger) (process-filter-multibyte-p, set-process-filter-multibyte): diff --git a/lisp/subr.el b/lisp/subr.el index 1a6f2a9dc74..b23ca358060 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -532,25 +532,23 @@ The order of bindings in a keymap matters when it is used as a menu." (setq inserted t))) (setq tail (cdr tail))))) -(defun map-keymap-internal (function keymap &optional sort-first) +(defun map-keymap-sorted (function keymap) "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< also accepts symbols. - (string< a b)))))) - (dolist (p list) - (funcall function (car p) (cdr p)))) - (map-keymap function keymap))) + (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))))) (put 'keyboard-translate-table 'char-table-extra-slots 0) |