From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Quoted function in `define-key' Date: Sat, 04 Feb 2017 13:05:10 +0100 Message-ID: <874m0ap3ex.fsf@drachen> References: <874m0a6ywa.fsf@vicarie.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486209949 27141 195.159.176.226 (4 Feb 2017 12:05:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2017 12:05:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Narendra Joshi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 04 13:05:45 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 1cZz69-0006rS-1x for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Feb 2017 13:05:45 +0100 Original-Received: from localhost ([::1]:38915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZz6E-0006aF-Iq for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Feb 2017 07:05:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZz5j-0006ZB-P3 for help-gnu-emacs@gnu.org; Sat, 04 Feb 2017 07:05:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZz5e-0000BN-S5 for help-gnu-emacs@gnu.org; Sat, 04 Feb 2017 07:05:19 -0500 Original-Received: from mout.web.de ([212.227.15.14]:59609) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZz5e-0000B6-Hn for help-gnu-emacs@gnu.org; Sat, 04 Feb 2017 07:05:14 -0500 Original-Received: from drachen.dragon ([188.98.111.232]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Md4le-1cs3u83wA6-00IACX; Sat, 04 Feb 2017 13:05:11 +0100 In-Reply-To: <874m0a6ywa.fsf@vicarie.i-did-not-set--mail-host-address--so-tickle-me> (Narendra Joshi's message of "Sat, 04 Feb 2017 15:50:05 +0530") X-Provags-ID: V03:K0:QzJC+0bIfyfO4rXuHrzln+0X2X883wfdDw74sY99FPr1TqVWSIB d9tRjPnjRAUEQ8s/w1mUkknR8l9uz7tHEvzzhXUopqHo+wPtkdz+0nDPouw0yRuAs8gsxDg 3W7XbQtrnDO6EdYixCw920ePpXqRkwDilMVIZr/4fwq5Haj9RG8DW+HP9reAY6EUKcXNllP GWYms5MNC8NRfy+jls7Sg== X-UI-Out-Filterresults: notjunk:1;V01:K0:HWNbzpcs874=:ZVHOIdTY6Iz8kWtY/Yx5BW uMdBWVxBrEu1t8NWCIC/PwgfR55wGJ90SkHKJhlxLg/7tntUvAULdXiKd+SXif0qZvtGHaaOD FHeF01PydIihGYUv12mAmvCEM+DzKnLnVHqFKcvJdwP2LzdLmz28XR3aabmfFLKGe/PAOi9iJ 4CYn/KppHkRA1yLrJlk5yvr6x4M0UZuo4fio+0vUykjK9mtORHzmxZplzOBdKhbcGXHWbRD+/ gQ3IiTlMf+Wdznjt1JRUeZOEnZNeAqy5Tq2MwP2TmNruuYUviqIRV5HMvkqaf5ZWTRE1t/iGQ y1CAykjX9x6Oowsr3XtypkSu5IyS4iTqhJnQ2xy6zuhNJxdP4g7SYUPO8a4moEQYl8EMJ7lWm R7op3EQk5yJTXzXNKEsD6Nh/s1t2Q+gxszKAWqO9mJ+kI3sSIXkEWX82eDgjbbw17t6xASlDg oDa7KCmvhxax1+FfzGbF0Ddv5D9csqsNTj5AYNprJ8oLcGKMhadNk91/d+YZz64jBG8CA0kTe qb14gtgftx50e4JLzqbOUPGiq1yAXqOgKBdeqAT16GlwE+V+soj3wi9reHfd9Gf9L335AxrO7 T5myjjbORZf75IxQGxHeYM614SemekeDQQzbaNNySavgkTQlzmF973fnkMlolz7YYt6ByAk3Z VozsMOORmkNsW1FUiAwRxsbtgv0ubRX0P0i7yBFw4D2uZJUjW6JL93ob7a9WnMlIVtBakZsKh +bzocGJ1HjNmgYPqgUEAoablmgOucqXnScdp0nbQ1K/Ry/c4t6FvgLcVFHVNZ6L8p+wPn+38 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.14 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:112237 Archived-At: Narendra Joshi writes: > The following piece of code is confusing me. It is from `rinari-minor-mode'. > > (dolist (el (append (mapcar > (lambda (el) > (cons (concat "f" (second el)) > (read (format "'rinari-find-%S" > (first el))))) > rinari-jump-schema) > rinari-minor-mode-keybindings)) > (eval `(define-key rinari-prefix-map ,(car el) ,(cdr el)))) > > > If I replace the last expression with: > > (define-key rinari-prefix-map (car el) (cdr el)) > > why does it fail? > > (cdr el) is (quote function-name) which is exactly the same as > 'function-name. Sure, but this is then not evaluated again, and you want the DEF argument of `define-key' to be function-name, not (quote function-name). And yes, using `eval' in this context is indeed overkill (as well as `read' which could be replaced with `intern'). Michael.