/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.307.2.29 by miles, Fri Nov 12 04:21:11 2004 UTC revision 1.307.2.30 by miles, Wed Dec 8 23:31:41 2004 UTC
# Line 490  The order of bindings in a keymap matter Line 490  The order of bindings in a keymap matter
490              (setq inserted t)))              (setq inserted t)))
491        (setq tail (cdr tail)))))        (setq tail (cdr tail)))))
492    
493    (defun map-keymap-internal (function keymap &optional sort-first)
494      "Implement `map-keymap' with sorting.
495    Don't call this function; it is for internal use only."
496      (if sort-first
497          (let (list)
498            (map-keymap (lambda (a b) (push (cons a b) list))
499                        keymap)
500            (setq list (sort list
501                             (lambda (a b)
502                               (setq a (car a) b (car b))
503                               (if (integerp a)
504                                   (if (integerp b) (< a b)
505                                     t)
506                                 (if (integerp b) t
507                                   (string< a b))))))
508            (dolist (p list)
509              (funcall function (car p) (cdr p))))
510        (map-keymap function keymap)))
511    
512  (defmacro kbd (keys)  (defmacro kbd (keys)
513    "Convert KEYS to the internal Emacs key representation.    "Convert KEYS to the internal Emacs key representation.

Legend:
Removed from v.1.307.2.29  
changed lines
  Added in v.1.307.2.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26