aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-11-16 17:06:56 +0000
committerRichard M. Stallman2004-11-16 17:06:56 +0000
commite7ea75456336aa6e4671829096b0264c54c2202a (patch)
tree69a165a128f77ea0066e14a2629b3f705454dcdc
parent14694a594bdd37507a8b3861fbf6387b60b742cb (diff)
downloademacs-e7ea75456336aa6e4671829096b0264c54c2202a.tar.gz
emacs-e7ea75456336aa6e4671829096b0264c54c2202a.zip
(map-keymap): Definition deleted.
(cl-map-keymap): Definition deleted.
-rw-r--r--lisp/emacs-lisp/lucid.el30
1 files changed, 0 insertions, 30 deletions
diff --git a/lisp/emacs-lisp/lucid.el b/lisp/emacs-lisp/lucid.el
index 80e5ef330d3..5d02091a981 100644
--- a/lisp/emacs-lisp/lucid.el
+++ b/lisp/emacs-lisp/lucid.el
@@ -31,36 +31,6 @@
31 31
32(defalias 'current-time-seconds 'current-time) 32(defalias 'current-time-seconds 'current-time)
33 33
34;; In case cl-map-keymap is an alias for map-keymap, avoid circular calls.
35(fset 'cl-map-keymap (indirect-function 'cl-map-keymap))
36
37(defun map-keymap (function keymap &optional sort-first)
38 "Call FUNCTION for every binding in KEYMAP.
39This does not include bindings inherited from a parent keymap.
40FUNCTION receives two arguments each time it is called:
41the character (more generally, the event type) that is bound,
42and the binding it has.
43
44Note that passing the event type directly to `define-key' does not work
45in Emacs 19. We do not emulate that particular feature of Lucid Emacs.
46If your code does that, modify it to make a vector containing the event
47type that you get. That will work in both versions of Emacs."
48 (if sort-first
49 (let (list)
50 (cl-map-keymap (lambda (a b) (push (cons a b) list))
51 keymap)
52 (setq list (sort list
53 (lambda (a b)
54 (setq a (car a) b (car b))
55 (if (integerp a)
56 (if (integerp b) (< a b)
57 t)
58 (if (integerp b) t
59 (string< a b))))))
60 (dolist (p list)
61 (funcall function (car p) (cdr p))))
62 (cl-map-keymap function keymap)))
63
64(defun read-number (prompt &optional integers-only) 34(defun read-number (prompt &optional integers-only)
65 "Read a number from the minibuffer. 35 "Read a number from the minibuffer.
66Keep reentering the minibuffer until we get suitable input. 36Keep reentering the minibuffer until we get suitable input.