From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Narendra Joshi Newsgroups: gmane.emacs.help Subject: Re: Quoted function in `define-key' Date: Sat, 04 Feb 2017 16:41:32 +0530 Message-ID: <878tpm2ot7.fsf@vicarie.i-did-not-set--mail-host-address--so-tickle-me> 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 1486206476 16498 195.159.176.226 (4 Feb 2017 11:07:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2017 11:07:56 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (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 12:07:49 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 1cZyC4-00041p-Oz for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Feb 2017 12:07:48 +0100 Original-Received: from localhost ([::1]:38754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZyCA-0006Fz-D3 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Feb 2017 06:07:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZyBf-0006Fg-Iw for help-gnu-emacs@gnu.org; Sat, 04 Feb 2017 06:07:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZyBa-0004Cj-Kv for help-gnu-emacs@gnu.org; Sat, 04 Feb 2017 06:07:23 -0500 Original-Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:35284) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZyBa-0004Cc-FR for help-gnu-emacs@gnu.org; Sat, 04 Feb 2017 06:07:18 -0500 Original-Received: by mail-pf0-x242.google.com with SMTP id f144so3379508pfa.2 for ; Sat, 04 Feb 2017 03:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=9nu7Ny/NTobB1M9UsNKMIekKNHV4igGJ3ALI1FYYGN0=; b=G/Vv+PaVfAmedP2XIVO8xs3uP9PC0xCAyH10F13K39VQrK9MtjVl3nJs9O/jaIrrZK lbwKJPeGz5yuy0OeT4vOUXs5U3a138p6mP3Ur+/hhVzFNtz2x8H8MGUcYQMNxqQtBuad vRA2wlS/fJ/vRcBai0TjDP/swvKQIc1TEqQE/hdaeJxS2OxephzjxAx6Xj4DMfOcURmn vADqAsxZO6srVnf3MplDxlf4ZK2IKUgortLkA3WVW5dOypyTPyAR/mn0lIxVD2pu0dMl Skbh8KHFMMUcwMkhNrpkaVxfNkUFSVPv6juO2UvvU1GUYYJ7Tv+wxIjeKKytSBITyNtP JMyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=9nu7Ny/NTobB1M9UsNKMIekKNHV4igGJ3ALI1FYYGN0=; b=g9SZXKLYm2rhjRlpBKgg50KDopE3XalKIeA8bfaJTqclmdHv0I5E0aKvraCj4mQV7a dnRNrnHh3t6xU2/mQaCGtoFiDgLaKGSiQ97tyyqFTn80CbqnmD7kU3to9Q8TGKlBpUAj ljRTquJzNpDVO0zmsWD2kSKM+VChU5mF9UJtOKT8ztGTxhODR8hBpg8gfjG/LFdHTgL+ HLuLRFTRox9Ew4iYzGMGjw4zgYylA8FIbs7hpDhGDBmsfnYu9m8V0OZa9wxLrDmt+/f1 9wzvHJLQBVVmQEqMEkmHns/VZ0TumJtq0S1I6d+1DMwOptFrQflbe/woHMkAxYyJtmuG 7gxg== X-Gm-Message-State: AIkVDXL0wmmwCCM741Jc8Qz69jlR8rIrQr/MJb2hk9T5SM5WLuJZlgOITm431Mw0f0DRzQ== X-Received: by 10.98.31.18 with SMTP id f18mr1966451pff.36.1486206437342; Sat, 04 Feb 2017 03:07:17 -0800 (PST) Original-Received: from vicarie ([182.70.97.13]) by smtp.gmail.com with ESMTPSA id k184sm74986639pgc.23.2017.02.04.03.07.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Feb 2017 03:07:16 -0800 (PST) X-Google-Original-From: Narendra Joshi 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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::242 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:112236 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)))) I have also tried changing this ^ to (let ((key (car el)) (func (cdr el))) (define-key rinari-prefix-map key func)) I thought maybe `define-key` is a macro and hence the calls to `car` and `cdr` might not be evaluated. But that doesn't seem to be the case. This still fails. The key is bound to a value that is equal to (quote some-function-name). -- Narendra Joshi