]> git.eshelyaron.com Git - emacs.git/commitdiff
(iswitchb-global-map): Use command-remapping if available.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 3 Jan 2007 03:37:15 +0000 (03:37 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 3 Jan 2007 03:37:15 +0000 (03:37 +0000)
lisp/ChangeLog
lisp/iswitchb.el

index f8aff251989926137eac4694190ffa0bb7c7f74f..c6e4cfc1c7ad41016bdebeb582e97a181025a72c 100644 (file)
@@ -1,3 +1,7 @@
+2007-01-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * iswitchb.el (iswitchb-global-map): Use command-remapping if available.
+
 2007-01-02  Juanma Barranquero  <lekktu@gmail.com>
 
        * emulation/viper.el (viper-custom-file-name, viper-mode):
@@ -19,7 +23,7 @@
        * progmodes/cfengine.el (cfengine-font-lock-syntactic-keywords):
        Fix format of value.
 
-       * cus-edit.el (customize-unsaved): Renamed from customize-customized.
+       * cus-edit.el (customize-unsaved): Rename from customize-customized.
        Change messages accordingly.
        (customize-customized): Now alias.
 
@@ -29,8 +33,8 @@
 
 2007-01-01  Alan Mackenzie  <acm@muc.de>
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax, case 5N): Check
-       the format of c-state-cache is valid for an optimisation before
+       * progmodes/cc-engine.el (c-guess-basic-syntax, case 5N):
+       Check the format of c-state-cache is valid for an optimisation before
        using it.
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): New case 5Q "we
@@ -68,8 +72,8 @@
        * progmodes/cc-mode.el: Bind C-M-a and C-M-e to
        c-\(beginning\|end\)-of-defun by default.
 
-       * progmodes/cc-align.el (c-lineup-gnu-DEFUN-intro-cont): New
-       line-up function, for the DEFUN macro in the Emacs C sources.
+       * progmodes/cc-align.el (c-lineup-gnu-DEFUN-intro-cont):
+       New line-up function, for the DEFUN macro in the Emacs C sources.
        Only used in "gnu" style.
 
        * progmodes/cc-styles.el (c-style-alist): Use this new function in
@@ -95,8 +99,8 @@
        (c-beginning-of-decl-1): Whilst searching for "=" as evidence of a
        stmt boundary, check for "operator=", etc.
 
-       * progmodes/cc-mode.el (c-postprocess-file-styles): Bind
-       inhibit-read-only to t, around the call to
+       * progmodes/cc-mode.el (c-postprocess-file-styles):
+       Bind inhibit-read-only to t, around the call to
        c-remove-any-local-eval-or-mode-variables, so that it works on a
        RO file.
 
 
 2006-12-25  Michael R. Mauger  <mmaug@yahoo.com>
 
-       * progmodes/sql.el (sql-mode-abbrev-table): Corrected initialization.
+       * progmodes/sql.el (sql-mode-abbrev-table): Correct initialization.
        (sql-mode-syntax-table): Disable double quoted strings.
-       (sql-mode-font-lock-object-name): Added TYPE and TYPE BODY.
+       (sql-mode-font-lock-object-name): Add TYPE and TYPE BODY.
 
 2006-12-25  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
index 93d4755cf3a0d8fe473b1ded236693ce93a19141..98fad7bf824b080a7993a3552da6454775b6b950 100644 (file)
@@ -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 <stephen@gnu.org>
 ;; Maintainer: Stephen Eglen <stephen@gnu.org>
@@ -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'.")