|
From: | David Hansen |
Subject: | Re: Comment/Uncomment in C files? |
Date: | Sun, 20 Apr 2008 14:58:33 +0200 |
User-agent: | Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) |
On 20 Apr 2008 11:48:13 GMT Joost Kremers wrote: > 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. But it's way more complicated to `remove-hook' it now. David
[Prev in Thread] | Current Thread | [Next in Thread] |