From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mark Mynsted Newsgroups: gmane.emacs.help Subject: Re: M-TAB already used by KDE Date: 16 Dec 2002 15:32:53 -0600 Organization: Uncle John's Band Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3dfe3ea4.1245206@news.cis.dfn.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1040074878 27830 80.91.224.249 (16 Dec 2002 21:41:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 16 Dec 2002 21:41:18 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18O2zE-0007EZ-00 for ; Mon, 16 Dec 2002 22:41:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18O2tX-0004SL-00 for gnu-help-gnu-emacs@m.gmane.org; Mon, 16 Dec 2002 16:35:23 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-feed1.de1.concert.net!fu-berlin.de!uni-berlin.de!outbound.vha.COM!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 58 Original-NNTP-Posting-Host: outbound.vha.com (204.68.152.1) Original-X-Trace: fu-berlin.de 1040074381 370301 204.68.152.1 (16 [148877]) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu comp.emacs:76460 gnu.emacs.help:108189 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4719 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4719 >>>>> "Marcel" == Marcel Schmittfull writes: Marcel> Hi Marcel> I use KDE and therefore the keybinding M- is already used for Marcel> switching between windows. Hmm. To me M-Tab is "already" used by Emacs rather than the other way around, but then I prefer ratpoison to KDE anyway... The keybindings for ratpoison are more Emacs friendly. ratpoison is not ideal if you open any close many tiny windows, but if you are like me and have a small number of "fullscreen" windows, it is quite nice. http://ratpoison.sourceforge.net/ Marcel>Unfortunately there are several emacs modes Marcel> which try to use M- for completion (f.e. lisp-mode, AUCTeX, ...). Marcel> However, the KDE setting seems to be "stronger" than the emacs setting Marcel> and hence I can only switch between windows with M-. Marcel> Is it possible to tell emacs that whenever I type a certain Marcel> keybinding, f.e. C-x M- or so, emacs behaves as if I typed Marcel> M- ? Yes, by using key maps. Marcel>I.e. I don't want to change the M- keybinding for every Marcel> single mode, I just want to have a certain global keybinding which Marcel> replaces M- globally. Is this possible ? OK, I am not exactly clear about what you want. Do you want a global keybinding for all modes, or a keybinding for specific modes? (Maybe my nomenclature is imperfect here.) As I recall, to use a key map for a specific mode, you simply define a mode map, then make the mode map active when you start that mode. Here is some information from the info page regarding Local Keymaps. (See keys in the Emacs info documentation.) " For example, the command `texinfo-mode' to select Texinfo mode runs the hook `texinfo-mode-hook'. Here's how you can use the hook to add local bindings (not very useful, we admit) for `C-c n' and `C-c p' in Texinfo mode: (add-hook 'texinfo-mode-hook '(lambda () (define-key texinfo-mode-map "\C-cp" 'backward-paragraph) (define-key texinfo-mode-map "\C-cn" 'forward-paragraph))) " -- -MM I rarely read email from this address /"\ because of spam. \ / ASCII Ribbon Campaign I MAY see it if you put #NOTSPAM# X Against HTML Mail in the subject line. / \