unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Quoted function in `define-key'
@ 2017-02-04 10:20 Narendra Joshi
  2017-02-04 11:11 ` Narendra Joshi
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Narendra Joshi @ 2017-02-04 10:20 UTC (permalink / raw)
  To: help-gnu-emacs


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.

--
Narendra Joshi



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-05 19:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-04 10:20 Quoted function in `define-key' Narendra Joshi
2017-02-04 11:11 ` Narendra Joshi
2017-02-04 12:05 ` Michael Heerdegen
2017-02-04 15:03   ` Narendra Joshi
2017-02-04 17:25     ` Michael Heerdegen
2017-02-05 10:10       ` Narendra Joshi
2017-02-05 13:50         ` Michael Heerdegen
2017-02-05 19:09           ` Narendra Joshi
2017-02-05 19:45             ` Michael Heerdegen
2017-02-04 18:10 ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).