unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] FUNCTIONP check for Qclosure
@ 2012-08-20  2:34 Barry OReilly
  2012-08-20  2:35 ` Fwd: " Barry OReilly
  0 siblings, 1 reply; 2+ messages in thread
From: Barry OReilly @ 2012-08-20  2:34 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 436 bytes --]

>   (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: 503 bytes --]

[-- Attachment #2: lambdaKeyTranslation.txt --]
[-- Type: text/plain, Size: 2198 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: gundaetiapo@gmail.com-20120812022358-9hf38s3yqrngmwj0
# target_branch: bzr://bzr.savannah.gnu.org/emacs/trunk/
# testament_sha1: 97ac7d396cfcbf692e8e88df42589ecba0fc8c70
# timestamp: 2012-08-11 22:24:03 -0400
# base_revision_id: jasonr@gnu.org-20120811145028-ax1qarn6z0mj5gtr
# 
# Begin patch
=== modified file 'src/keyboard.c'
--- src/keyboard.c	2012-08-08 15:53:52 +0000
+++ src/keyboard.c	2012-08-12 02:23:58 +0000
@@ -8837,7 +8837,8 @@
   /* If the keymap gives a function, not an
      array, then call the function with one arg and use
      its value instead.  */
-  if (SYMBOLP (next) && !NILP (Ffboundp (next)) && do_funcall)
+  if ((SYMBOLP (next) && !NILP (Ffboundp (next)) || FUNCTIONP(next))
+      && do_funcall)
     {
       Lisp_Object tem;
       tem = next;

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWWp4r5MAAXxfgBAQceP/93sn
3iC////0UAN88dFe9qAANJT1NpDQ0BoD0gaA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OlKnKFy6LaKGtPUgtuqgmpiJ77SIOnwcoLzFJ9z4Qo1NV9p1FRbGs7
GV7AZBap2K/lSTQ/6qDWNK2TkbIXzSwpM6PnKoK03gmxk1YdqaGG9RStjS3ooq4HcBZqlXqgWikr
c0a1T6i8VG8o98f/F3JFOFCQanivkw==

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

end of thread, other threads:[~2012-08-20  2:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20  2:34 [PATCH] FUNCTIONP check for Qclosure Barry OReilly
2012-08-20  2:35 ` Fwd: " Barry OReilly

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).