aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/iswitchb.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2007-01-03 03:37:15 +0000
committerStefan Monnier <[email protected]>2007-01-03 03:37:15 +0000
commit51443e4f0d2efc290eec39805eda84769a2226d7 (patch)
treefb0c10f0b47df8fa45074fa302eb1caca0e67512 /lisp/iswitchb.el
parent33c053f464bb45f7fc760b659bb109fbf180ba92 (diff)
(iswitchb-global-map): Use command-remapping if available.
Diffstat (limited to 'lisp/iswitchb.el')
-rw-r--r--lisp/iswitchb.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 93d4755cf3..98fad7bf82 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -1,7 +1,7 @@
;;; iswitchb.el --- switch between buffers using substrings
;; Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Stephen Eglen <[email protected]>
;; Maintainer: Stephen Eglen <[email protected]>
@@ -495,14 +495,13 @@ interfere with other minibuffer usage.")
(defvar iswitchb-global-map
(let ((map (make-sparse-keymap)))
- (substitute-key-definition 'switch-to-buffer ; normally C-x b
- 'iswitchb-buffer map global-map)
- (substitute-key-definition 'switch-to-buffer-other-window ; C-x 4 b
- 'iswitchb-buffer-other-window map global-map)
- (substitute-key-definition 'switch-to-buffer-other-frame ; C-x 5 b
- 'iswitchb-buffer-other-frame map global-map)
- (substitute-key-definition 'display-buffer ; C-x 4 C-o
- 'iswitchb-display-buffer map global-map)
+ (dolist (b '((switch-to-buffer . iswitchb-buffer)
+ (switch-to-buffer-other-window . iswitchb-buffer-other-window)
+ (switch-to-buffer-other-frame . iswitchb-buffer-other-frame)
+ (display-buffer . iswitchb-display-buffer)))
+ (if (fboundp 'command-remapping)
+ (define-key map (vector 'remap (car b)) (cdr b))
+ (substitute-key-definition (car b) (cdr b) map global-map)))
map)
"Global keymap for `iswitchb-mode'.")