From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.help Subject: Re: Toggling the same key combination between two options Date: Sat, 13 Sep 2008 10:51:03 +1200 Message-ID: <18634.62039.520244.363312@kahikatea.snap.net.nz> References: <20080912220621.GA13837@elkbook> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1221259905 23186 80.91.229.12 (12 Sep 2008 22:51:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Sep 2008 22:51:45 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "E.L.K." Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 13 00:52:40 2008 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.50) id 1KeHVH-0004AU-T8 for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Sep 2008 00:52:40 +0200 Original-Received: from localhost ([127.0.0.1]:49231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeHUH-0003xT-2e for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Sep 2008 18:51:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeHTw-0003uX-6h for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 18:51:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeHTu-0003qi-JP for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 18:51:15 -0400 Original-Received: from [199.232.76.173] (port=60631 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeHTu-0003qY-Fm for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 18:51:14 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.25]:33462) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KeHTt-00015u-Et for help-gnu-emacs@gnu.org; Fri, 12 Sep 2008 18:51:14 -0400 Original-Received: from kahikatea.snap.net.nz (8.61.255.123.dynamic.snap.net.nz [123.255.61.8]) by viper.snap.net.nz (Postfix) with ESMTP id BDC323DA793; Sat, 13 Sep 2008 10:51:09 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id AEF278FC6D; Sat, 13 Sep 2008 10:51:04 +1200 (NZST) In-Reply-To: <20080912220621.GA13837@elkbook> X-Mailer: VM 7.19 under Emacs 22.3.1 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:57498 Archived-At: > > I have F8 and F9 mapped to gud-remove and gud-break (respectively) in > > gud-mode. > > I'd like to mimic the behaviour of Visual Studio where F9 toggles > > between setting and removing the breakpoint. Is it possible to > > configure emacs so that it will toggle between the two bindings every > > time the key is pressed? > > IIRC, there is function, called gdb-toggle-breakpoint, which can > be what you need. This function doesn't set/clear breakoints but enables/disables them. It also works from the breakpoints buffer, not the source buffer. -- Nick http://www.inet.net.nz/~nickrob