From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: global-set-key has no effect for iswitchb-buffer Date: Fri, 09 Mar 2007 19:28:54 +0100 Message-ID: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173465069 23427 80.91.229.12 (9 Mar 2007 18:31:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2007 18:31:09 +0000 (UTC) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 09 19:31:04 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HPjrm-0000zN-Pz for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2007 19:30:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPjs6-0006PC-1n for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2007 13:31:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HPjrt-0006Mz-Sv for emacs-devel@gnu.org; Fri, 09 Mar 2007 13:31:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HPjrs-0006Ka-8a for emacs-devel@gnu.org; Fri, 09 Mar 2007 13:31:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPjrs-0006KX-4S for emacs-devel@gnu.org; Fri, 09 Mar 2007 13:31:04 -0500 Original-Received: from thales.mathematik.uni-ulm.de ([134.60.66.5]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HPjrV-0005IJ-Vq for emacs-devel@gnu.org; Fri, 09 Mar 2007 13:30:42 -0500 Original-Received: (qmail 26180 invoked by uid 1); 9 Mar 2007 18:30:40 -0000 Original-Received: from bridgekeeper.physik.uni-ulm.de(134.60.10.123) via SMTP by thales.mathematik.uni-ulm.de, id smtpdaRaqiZ; Fri Mar 9 18:30:33 2007 Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id F19011289D; Fri, 9 Mar 2007 19:30:32 +0100 (CET) X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T; w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv, vbL^XF1nIp\:F=$Ei2o&mEe:%N~, :3]vtQ~s9u$9izmX$IF@VgGl7/, ^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) X-detected-kernel: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67642 Archived-At: Hi, I have iswitchb-mode enabled. But occasionally I want to use the plain `switch-to-buffer' command which I have bound to `C-c b b'. Recently (well, I haven't updated from CVS for a while) this stopped to work: `C-c b b' also calls `iswitchb-buffer'. To reproduce: $ emacs -Q -eval ' (progn (iswitchb-mode 1) (global-set-key (kbd "C-c b b") (quote switch-to-buffer))) ' - C-c b b - Expected prompt: Switch to buffer (...) Actual prompt: iswitch {*Messages*,*scratch*} Reverting Stephan's patch (see below) fixed the problem. But I'm not sure if this change was installed fix some other bug. 2007-01-03 Stefan Monnier * iswitchb.el (iswitchb-global-map): Use command-remapping if available. --8<---------------cut here---------------start------------->8--- --- iswitchb.el 17 Mar 2006 21:29:33 -0000 1.67 +++ iswitchb.el 3 Jan 2007 03:37:15 -0000 1.68 @@ -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 ;; Maintainer: Stephen Eglen @@ -495,14 +495,13 @@ (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'.") --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/