From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: TheFlyingDutchman Newsgroups: gmane.emacs.help Subject: Re: F2 Date: Wed, 2 Mar 2011 15:51:01 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <577f8a29-95e7-4168-abb6-0e2b1820bda1@r4g2000prm.googlegroups.com> <87d3mb1fdp.fsf@puma.rapttech.com.au> <3fd56383-ccea-439e-9604-83559decd153@z27g2000prz.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1299112870 25812 80.91.229.12 (3 Mar 2011 00:41:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2011 00:41:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 03 01:41:04 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PuwbH-0002Ea-N6 for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2011 01:41:03 +0100 Original-Received: from localhost ([127.0.0.1]:48895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PuwbH-0007pi-9F for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Mar 2011 19:41:03 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!k15g2000prk.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 57 Original-NNTP-Posting-Host: 75.36.149.131 Original-X-Trace: posting.google.com 1299109861 13861 127.0.0.1 (2 Mar 2011 23:51:01 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 2 Mar 2011 23:51:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k15g2000prk.googlegroups.com; posting-host=75.36.149.131; posting-account=9bWHAAoAAAAxSFC_2O_ssTETNW9NhMbW User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; AskTbBT5/5.9.1.14019),gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:185564 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:79717 Archived-At: On Mar 2, 2:43=A0pm, PJ Weisberg wrote: > On 3/1/11, TheFlyingDutchman wrote: > > > > > > > On Mar 1, 12:35 pm, PJ Weisberg wrote: > >> On 3/1/11, TheFlyingDutchman wrote: > > >> > Yes, thanks, that appears to be my problem. I am editing an html fil= e > >> > and I see bindings for F2 as: > > >> In general something like this should get rid of any local binding you > >> don't want to override your global binding: > > >> (define-key 'foo-mode-map "key" nil) > > >> -PJ > > > How would I determine the value of "foo-mode-map" to use. I tried > > 'html-mode and 'html-mode-map and 'c2-mode and 'c2-mode-map and define- > > key puts up a *Backtrace* window -> Debugger entered--Lisp error: > > (wrong-type-argument keymapp html-mode-map) > > I was hoping someone more knowledgable would pipe up with a better > answer, but here's my suggestion: =A0The variable "major-mode" has the > name of the current major mode, and "minor-mode-list" has all possible > minor modes. =A0A minor mode is active if a variable with that name is > defined and non-nill. =A0The map name should be the name of one of these > modes with "-map" at the end of it. =A0You might have to guess which one > is binding the key you don't like. > Thanks for the reply. One thing I just realized that it doesn't seem to want the symbol name in define-key, but it's value: (define-key foo-mode-map "key" nil) instead of (define-key 'foo-mode-map "key" nil) When I executed (define-key 2C-mode-map (kbd "") nil) or (define-key html-mode-map (kbd "") nil) I didn't get an error. But I don't know how to interactively execute that for the current buffer (as opposed to doing it the *scratch* buffer). Or how to turn off 2C mode. I ended up getting out of the html file, and when I reedited it, the 2C mode was off and my global setting for F2 was active. Someone posted about hitting F2 twice to turn on 2C mode and that must have been what I did, which gave it a local value, before I assigned it a global setting.