[COMMIT] Autoload within #'keymapp, as documented.

Aidan Kehoe <[email protected]>
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
I’d welcome discussion on this. E.g in extents.c:5448, an extent’s keymap
must have #'keymapp give non-nil, so autoloaded keymaps don’t work;
keymap.c:773 maps using keymap_submaps_mapper_0 to force loading of those
maps to be autoloaded, and that doesn’t work; as far as I can see, mapping
across autoloaded submaps hasn’t worked since 1997.

APPROVE COMMIT

Note: This patch has been committed.

# HG changeset patch
# User Aidan Kehoe <[email protected]>
# Date 1404319549 -3600
#      Wed Jul 02 17:45:49 2014 +0100
# Node ID 236e4afc565dcd32516d0946525c2c63397573c3
# Parent  0e9f791cc6558e3dba92ffff659d331138f1431e
Autoload within #'keymapp, as documented.

src/ChangeLog addition:

2014-07-02  Aidan Kehoe  <[email protected]>

	* keymap.c (Fkeymapp):
	Autoload within this, as documented. Our callers are not prepared
	to do the intelligent thing if a symbol that is fboundp to an
	autoloaded keymap, is not itself #'keymapp.

lisp/ChangeLog addition:

2014-07-02  Aidan Kehoe  <[email protected]>

	* byte-optimize.el (side-effect-free-fns):
	#'keymapp is not side-effect-free, it can autoload.

diff -r 0e9f791cc655 -r 236e4afc565d lisp/ChangeLog
--- a/lisp/ChangeLog	Wed Jul 02 16:32:19 2014 +0100
+++ b/lisp/ChangeLog	Wed Jul 02 17:45:49 2014 +0100
@@ -1,3 +1,8 @@
+2014-07-02  Aidan Kehoe  <[email protected]>
+
+	* byte-optimize.el (side-effect-free-fns):
+	#'keymapp is not side-effect-free, it can autoload.
+
 2014-07-02  Aidan Kehoe  <[email protected]>
 
 	* cmdloop.el:
diff -r 0e9f791cc655 -r 236e4afc565d lisp/byte-optimize.el
--- a/lisp/byte-optimize.el	Wed Jul 02 16:32:19 2014 +0100
+++ b/lisp/byte-optimize.el	Wed Jul 02 17:45:49 2014 +0100
@@ -1340,7 +1340,7 @@
 	 hash-table-p
 	 identity ignore integerp integer-or-marker-p interactive-p
 	 invocation-directory invocation-name
-	 keymapp list list* listp
+	 list list* listp
 	 make-marker mark mark-marker markerp memory-limit minibuffer-window
 	 ;; mouse-movement-p not in XEmacs
 	 natnump nlistp not null number-or-marker-p numberp
diff -r 0e9f791cc655 -r 236e4afc565d src/ChangeLog
--- a/src/ChangeLog	Wed Jul 02 16:32:19 2014 +0100
+++ b/src/ChangeLog	Wed Jul 02 17:45:49 2014 +0100
@@ -1,3 +1,10 @@
+2014-07-02  Aidan Kehoe  <[email protected]>
+
+	* keymap.c (Fkeymapp):
+	Autoload within this, as documented. Our callers are not prepared
+	to do the intelligent thing if a symbol that is fboundp to an
+	autoloaded keymap, is not itself #'keymapp.
+
 2014-07-02  Aidan Kehoe  <[email protected]>
 
 	* event-stream.c (Fnext_command_event):
diff -r 0e9f791cc655 -r 236e4afc565d src/keymap.c
--- a/src/keymap.c	Wed Jul 02 16:32:19 2014 +0100
+++ b/src/keymap.c	Wed Jul 02 17:45:49 2014 +0100
@@ -1008,7 +1008,7 @@
        (object))
 {
   /* This function can GC */
-  return KEYMAPP (get_keymap (object, 0, 0)) ? Qt : Qnil;
+  return KEYMAPP (get_keymap (object, 0, 1)) ? Qt : Qnil;
 }
 
 /* Check that OBJECT is a keymap (after dereferencing through any


-- 
‘Liston operated so fast that he once accidentally amputated an assistant’s 
fingers along with a patient’s leg, […] The patient and the assistant both 
died of sepsis, and a spectator reportedly died of shock, resulting in the 
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)

_______________________________________________
XEmacs-Patches mailing list
[email protected]
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.