From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.help Subject: Re: c-mode-addons Date: Mon, 26 Apr 2004 11:16:23 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <874qr7m74o.fsf@herrrossi.mmweg.rwth-aachen.de> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082972023 26557 80.91.224.253 (26 Apr 2004 09:33:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Apr 2004 09:33:43 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 26 11:33:37 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BI2Ua-000598-00 for ; Mon, 26 Apr 2004 11:33:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BI2Sa-00033I-2F for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Apr 2004 05:31:32 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!a274a.a.pppool.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: a274a.a.pppool.de (213.6.39.74) Original-X-Trace: news.uni-berlin.de 1082970985 12224051 D 213.6.39.74 ([232671] 10357) User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:07uiJFwdHkssJuvsvRDuSHUgqjI= Original-Xref: shelby.stanford.edu gnu.emacs.help:122714 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 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 Xref: main.gmane.org gmane.emacs.help:18003 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18003 >>>>> "axa" == axa writes: axa> (define-key c-mode-map "(" 'c-electric-parenthesis-open) (define-key axa> c++-mode-map "(" 'c-electric-parenthesis-open) Hi, I'm using `c-mode-base-map' and this works for me. After byte-compiling and putting the library into my load-path, I have the following in my init files for GNU Emacs and XEmacs: ;; ** C mode addons (load "c-mode-addons") (add-hook 'c-mode-common-hook (function (lambda () ;; (define-key c-mode-base-map "(" 'c-electric-parenthesis-open) (define-key c-mode-base-map "\M-s" 'c-synopsis-at-point) (define-key c-mode-base-map "\C-ce" 'c-eval-enum)))) The reason I'm not using `c-electric-parenthesis-open' is that this overwrites the original binding of "(" to `c-electric-paren' in c-mode. If I'm getting around to it, I will try to fix this. By the way, where do you got the package? I googled it from the original posting to gnu.emacs.sources, but found all links to a package download dead... Toto -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow They say God created whiskey to keep the Irish from taking over the world. Friedman, Kinky (1993), Greenwich Killing Time. New York (Wings Books), 216