From: Barry OReilly <gundaetiapo@gmail.com>
To: emacs-devel@gnu.org
Subject: Fwd: [PATCH] FUNCTIONP check for Qclosure
Date: Sun, 19 Aug 2012 22:35:43 -0400 [thread overview]
Message-ID: <CAFM41H1g-osvnNSi6C992YyACZ6dcF_LhLXciKY-vdSResn0Lg@mail.gmail.com> (raw)
In-Reply-To: <CAFM41H1iV6K4EbGwkhDz4Nz8XrU367pkOsTZnAUwxiLvzs4O2A@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 656 bytes --]
Wrong attachment, sorry.
---------- Forwarded message ----------
From: Barry OReilly <gundaetiapo@gmail.com>
Date: Sun, Aug 19, 2012 at 10:34 PM
Subject: [PATCH] FUNCTIONP check for Qclosure
To: emacs-devel@gnu.org
> (define-key key-translation-map
> (kbd "C-e")
> (lambda (prompt) (kbd "C-c")))
Though I don't understand why FUNCTIONP has a different implementation than
DEFUN "functionp", I suspect having FUNCTIONP check for Qclosure is closer
to the right thing, so I made a patch that does that. I verified the
change allows the quoted test case to work with lexical binding enabled.
Please consider accepting it.
[-- Attachment #1.2: Type: text/html, Size: 944 bytes --]
[-- Attachment #2: functionpCheckClosure.txt --]
[-- Type: text/plain, Size: 2181 bytes --]
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: gundaetiapo@gmail.com-20120820022354-fo6psnrv1vhz1vru
# target_branch: file:///home/epich/bzr/emacs/trunk/
# testament_sha1: bc2a442f40d7a6eaceb1089a20591c50114e0ae4
# timestamp: 2012-08-19 22:24:19 -0400
# base_revision_id: lekktu@gmail.com-20120820012835-ls1wiq8t7iyc4tb1
#
# Begin patch
=== modified file 'src/lisp.h'
--- src/lisp.h 2012-08-18 23:53:43 +0000
+++ src/lisp.h 2012-08-20 02:23:54 +0000
@@ -1907,7 +1907,8 @@
/* Non-zero if OBJ is a Lisp function. */
#define FUNCTIONP(OBJ) \
- ((CONSP (OBJ) && EQ (XCAR (OBJ), Qlambda)) \
+ ((CONSP (OBJ) && (EQ (XCAR (OBJ), Qlambda) \
+ || EQ (XCAR (OBJ), Qclosure))) \
|| (SYMBOLP (OBJ) && !NILP (Ffboundp (OBJ))) \
|| COMPILEDP (OBJ) \
|| SUBRP (OBJ))
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWfdtTgAAAX//gDIQQABR5//3
ezH+RL////RQA36XSlgYAwyRBoAKJp+mmKnhpGTTEymPU0DU2NUaBzAEYJiAYBME0ZDQwCYIxMMo
Gmpqn+qaaRpoepoaAAMgGgABoHMARgmIBgEwTRkNDAJgjEwkkCmDQEMqeBKeaT1Cep5RiAxBiNGk
Vjw8W/f5kN27TVoPy4XAcNznxHOtQnSGbX6vA8CvP22IiDh6jm05Oii0pa/qD/eq8Yvta+Q37xPS
uMURJFV+pZbOGsqQijD526Fk47PjzV0qChBXZMF8iAg6NgPVT3l3MbNGBnIRj81/m2dOy++KOLM3
JOZBYwiaeyUXrkMIvgoBDnzL/iUKgHOdPFTr0BuWp1OKmMp0BNdy8ylu4WaRtznDnL78j0w63KC8
i0njiZmbfQX1FyVWhVag2IT08RWKG8UTcXyV7sHhB5sTVQurePTKxRlCxaTRfKNHM2CoRjftqzID
XnKcKwNEUTTTW8Y2lohw5XPHeoqLThiPli4V0CzfGJgu1SpyjMorMsjVWXMsDMmK6UpKxitazooS
yrEOwUG7NLTIwlPYqbrSi/ptVd1FBebLKrjML8worGAMKKgai3YicpPSBxQEnl00bDAHGIvdUnVg
ezSLQUb+x3rNZPuIHgEGo2fF41zcW2LaTnlN74abPOK+C5cYdHMcXG73x88ap6EA3aliztWB3DTc
me3w0XZo9MRMngA2CLpZ522iZoCMjCkDph7xsG17btf/OrTcdYE9RhFIfFA2bqKOmdTefhcCJnL2
CayMZKIsFIlLC84vyDpdWT0B8R1yfgMgwod+bJWEwyP71z/yufryx5RaqJgEnYn1U5iQyZJYS81I
qamrlKbYcaC9BSM5Qw0fe2jFiwitKkNSft7T1DnHTjinQOiYrHH08/Pd3icuBgjLTqI958BpV9Fj
sbzBnL19/U5i1q7UcGSbZs/1NDsN+YjeqYnmO8LPXnk/WH/LEPOtOSi/w3Ls0zDFXqAhwUBQ4NXj
FXLnzbPH0SoN6rPERp3CMVUTpOe2iMSI8KIPCxKDq9FkLJEGTLhOScLqlXDBIkHoeS5BW5UPWROa
wswZk4hglRhHyF5dywVFGtODjOoiirS0o40htxffTIlzFcLa9U61VdRboxPEGkdzXCguFBqRYXzu
7k+9/1L8063WZNRXNKqZUFYPZXfYnhwyYdNP6v49iVSeL0qteQrQZByV1agsqAfeu0WTgmb+/xdy
RThQkPdtTgA=
prev parent reply other threads:[~2012-08-20 2:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 2:34 [PATCH] FUNCTIONP check for Qclosure Barry OReilly
2012-08-20 2:35 ` Barry OReilly [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFM41H1g-osvnNSi6C992YyACZ6dcF_LhLXciKY-vdSResn0Lg@mail.gmail.com \
--to=gundaetiapo@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.