From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nathanael Schweers Newsgroups: gmane.emacs.help Subject: Re: using auctex key bindings in C/C++ mode Date: Sun, 26 Feb 2017 19:36:06 +0100 Message-ID: <877f4cre95.fsf@mailbox.org> References: <87bmtodfkq.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1488134194 2075 195.159.176.226 (26 Feb 2017 18:36:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Feb 2017 18:36:34 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Sivaram Neelakantan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 26 19:36:30 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci3gK-0008M0-SK for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Feb 2017 19:36:29 +0100 Original-Received: from localhost ([::1]:47871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci3gQ-000386-TD for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Feb 2017 13:36:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci3g3-00037z-3Z for help-gnu-emacs@gnu.org; Sun, 26 Feb 2017 13:36:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci3fy-0006yG-3o for help-gnu-emacs@gnu.org; Sun, 26 Feb 2017 13:36:11 -0500 Original-Received: from mx2.mailbox.org ([80.241.60.215]:51251) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ci3fx-0006y9-Q2 for help-gnu-emacs@gnu.org; Sun, 26 Feb 2017 13:36:06 -0500 Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 01AEB44223; Sun, 26 Feb 2017 19:36:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:in-reply-to:date:date:references:subject:subject :from:from:received; s=mail20150812; t=1488134161; bh=k/tiAqYFZh wd5usAN6m7tYufILzveXjKckCn9uNxbko=; b=kw813z++aMMbW5dyzCimHNAMYr Xbm4Y+NYEVa2zx0XVhHbCf0ilB0jMrMqol8tsbLXlAiM1zexnOQ5OBk5w4Jf1O00 ObsFf22l6lnltHjl8f8UZvdsVTyUx83wyVnp3hReE8bmsRbHnlC5E7e8vqEumpA+ I8Yd53w0jARvNEagi9k60o/+nzewRSbvarR6Ijq2JbfbdGOPPSD/MadLIfsWKAzx 13YVysFFU7dqtiCWsj1tTbElJIYDdAy7dysUyyiXpTMyVbIAA69OvPkG71jE+zUH AwufQwBy+IHKxzetjbRflb7Yup8mK+z1OqiBVEgk3Mq8dFish2102C53xBrg== X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id 0Xy8Wlu6pm7c; Sun, 26 Feb 2017 19:36:01 +0100 (CET) In-Reply-To: <87bmtodfkq.fsf@gmail.com> (Sivaram Neelakantan's message of "Sun, 26 Feb 2017 23:01:17 +0530") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 80.241.60.215 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112378 Archived-At: Sivaram Neelakantan writes: > I'd like to use C-c C-c for compilation and C; for commenting out code > in C/C++. These are the default in Auctex mode. Question is, is > there anything I'd break if use the same in C/C++ mode when writing C > code? I=E2=80=99m not sure, as I don=E2=80=99t write that much C or C++ code. Yo= u can find out easily what those particalar bindings are for your configuration. Just press C-h k C-c C-c to check what the current binding is (there may be none, which would be good). The same goes for C-h k C-; > And is there a canonical way to unbind and rebind the defaults in > C/C++ mode? I=E2=80=99m not sure if it=E2=80=99s canonical; just say something like thi= s: (add-hook 'c++-mode-hook (lambda () (define-key c++-mode-map (kbd "C-c C-c") 'compile))) I=E2=80=99m not entirely sure about which exact mode you=E2=80=99d like to = use. I have at least c-mode and c++-mode. You might have to repeat the above expression for c-mode. Regards, Nathanael