From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: elisp macros problem Date: 25 Jul 2004 01:41:28 +0200 Organization: Organization?!? Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <4102DDEE.9080906@cs.ubc.ca> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1090712549 25454 80.91.224.253 (24 Jul 2004 23:42:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Jul 2004 23:42:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 25 01:42:22 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BoW9m-0007Dx-00 for ; Sun, 25 Jul 2004 01:42:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BoWCj-0001JK-AS for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Jul 2004 19:45:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp Original-Lines: 42 Original-X-Trace: news.uni-berlin.de nJX1zbtXNEwcQ/rh53y7nApDhc68GOiLTCSPTTu9yKW1IsZgOk X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:124438 comp.lang.lisp:144154 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19774 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19774 Please don't copy me with Email to Usenet articles: it is a very bad breach of netiquette to force the unwary to reply twice, once in private and then again in public. Lowell Kirsh writes: > > (defmacro my-add-hook (hook &rest body) > > `(add-hook ',(intern (concat (symbol-name hook) "-mode-hook")) > > (lambda () ,@body))) > > > > I just tried it out and it doesn't seem to work. I tried both: > > (my-add-hook 'emacs-lisp (keyboard-translate ?\( ?\[)) > ^ Which is wrong. > and > > (my-add-hook emacs-lisp (keyboard-translate ?\( ?\[)) Which results here in: emacs-lisp-mode-hook's value is ((lambda nil (keyboard-translate 40 91))) Hook run when entering Emacs Lisp mode. You can customize this variable. Defined in `emacs-lisp/lisp-mode'. [back] Looks fine to me. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum