aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love <[email protected]>2000-09-17 19:44:42 +0000
committerDave Love <[email protected]>2000-09-17 19:44:42 +0000
commite07436e1c6334ccf39e383698f43a90b2895456d (patch)
tree21935554d5a7fa02a2c7c2ea4e965dbf7173d4df
parent2249360b6332d17993a963ef63c72c8f3de33160 (diff)
Replace mapcar with mapc in several places.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/tmm.el53
2 files changed, 31 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 492ef6015e..8e79b387ab 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2000-09-17 Dave Love <[email protected]>
+ * tmm.el: Replace mapcar with mapc in several places.
+
+ * loadhist.el (unload-feature): Maybe call elp-restore-list and
+ ad-unadvise.
+
* international/latin1-disp.el: New file.
* calendar/cal-move.el (scroll-calendar-left)
diff --git a/lisp/tmm.el b/lisp/tmm.el
index cd674ce4b8..1db524ff22 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -164,10 +164,10 @@ Its value should be an event that has a binding in MENU."
;; tmm-km-list is an alist of (STRING . MEANING).
;; It has no other elements.
;; The order of elements in tmm-km-list is the order of the menu bar.
- (mapcar (function (lambda (elt)
- (if (stringp elt)
- (setq gl-str elt)
- (and (listp elt) (tmm-get-keymap elt not-menu)))))
+ (mapc (lambda (elt)
+ (if (stringp elt)
+ (setq gl-str elt)
+ (and (listp elt) (tmm-get-keymap elt not-menu))))
menu)
;; Choose an element of tmm-km-list; put it in choice.
(if (and not-menu (= 1 (length tmm-km-list)))
@@ -299,15 +299,14 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(defun tmm-define-keys (minibuffer)
(let ((map (make-sparse-keymap)))
(suppress-keymap map t)
- (mapcar
- (function
- (lambda (c)
- (if (listp tmm-shortcut-style)
- (define-key map (char-to-string c) 'tmm-shortcut)
- ;; only one kind of letters are shortcuts, so map both upcase and
- ;; downcase input to the same
- (define-key map (char-to-string (downcase c)) 'tmm-shortcut)
- (define-key map (char-to-string (upcase c)) 'tmm-shortcut))))
+ (mapc
+ (lambda (c)
+ (if (listp tmm-shortcut-style)
+ (define-key map (char-to-string c) 'tmm-shortcut)
+ ;; only one kind of letters are shortcuts, so map both upcase and
+ ;; downcase input to the same
+ (define-key map (char-to-string (downcase c)) 'tmm-shortcut)
+ (define-key map (char-to-string (upcase c)) 'tmm-shortcut)))
tmm-short-cuts)
(if minibuffer
(progn
@@ -375,13 +374,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(choose-completion))
;; In minibuffer
(delete-region (minibuffer-prompt-end) (point-max))
- (mapcar (lambda (elt)
- (if (string=
- (substring (car elt) 0
- (min (1+ (length tmm-mid-prompt))
- (length (car elt))))
- (concat (char-to-string c) tmm-mid-prompt))
- (setq s (car elt))))
+ (mapc (lambda (elt)
+ (if (string=
+ (substring (car elt) 0
+ (min (1+ (length tmm-mid-prompt))
+ (length (car elt))))
+ (concat (char-to-string c) tmm-mid-prompt))
+ (setq s (car elt))))
tmm-km-list)
(insert s)
(exit-minibuffer)))))
@@ -489,13 +488,13 @@ of `menu-bar-final-items'."
(setq allbind (cons (local-key-binding keyseq) allbind))
(setq allbind (cons (global-key-binding keyseq) allbind))
;; Merge all the elements of ALLBIND into one keymap.
- (mapcar (lambda (in)
- (if (and (symbolp in) (keymapp in))
- (setq in (symbol-function in)))
- (and in (keymapp in)
- (if (keymapp bind)
- (setq bind (nconc bind (copy-sequence (cdr in))))
- (setq bind (copy-sequence in)))))
+ (mapc (lambda (in)
+ (if (and (symbolp in) (keymapp in))
+ (setq in (symbol-function in)))
+ (and in (keymapp in)
+ (if (keymapp bind)
+ (setq bind (nconc bind (copy-sequence (cdr in))))
+ (setq bind (copy-sequence in)))))
allbind)
;; Return that keymap.
bind))))