From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Comment/Uncomment in C files? Date: 20 Apr 2008 11:48:13 GMT Message-ID: References: <4809b5de$0$90267$14726298@news.sunsite.dk> <4809cde8$0$90266$14726298@news.sunsite.dk> <4809d0ee$0$90270$14726298@news.sunsite.dk> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1208695284 21654 80.91.229.12 (20 Apr 2008 12:41:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Apr 2008 12:41:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 20 14:41:58 2008 connect(): Connection refused 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 1JnYri-00062T-Pk for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Apr 2008 14:41:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnYr3-0007mc-H9 for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Apr 2008 08:41:13 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-X-Trace: individual.net EVHXbNAL2SnMHNgdSOU9fwV78i4zq3KMnXh63HcojbRDKmkuPx Cancel-Lock: sha1:JOcPxRNW2Y07lDPvhrkyrABP2S0= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/0.9.8.1 (Linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:158049 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:53416 Archived-At: Alan Mackenzie wrote: > (defun sm-C-d () > (define-key c-mode-base-map "\C-d" 'comment-dwim)) ; or nil > (add-hook 'c-initialization-hook 'sm-C-d) no need to use a defun for that: (add-hook 'c-initialization-hook #'(lambda () (define-key c-mode-base-map "\C-d" 'comment-dwim) works just as well. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)