APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1352237655 0
# Node ID b490ddbd42aab637aa8332b0fc3dbb722f60dc44
# Parent 7b5f88e5b456b61e5108c84079389b2235ee5c77
Back out 7371081ce8f7, I have a better approach.
diff -r 7b5f88e5b456 -r b490ddbd42aa lisp/ChangeLog
--- a/lisp/ChangeLog Mon Oct 15 20:47:00 2012 +0200
+++ b/lisp/ChangeLog Tue Nov 06 21:34:15 2012 +0000
@@ -1,10 +1,3 @@
-2012-10-14 Aidan Kehoe <kehoea(a)parhasard.net>
-
- * help.el:
- * help.el (describe-function-1):
- Add some newlines here when dealing with remapped commands, thank
- you Robert Pluim.
-
2012-10-13 Mats Lidell <matsl(a)xemacs.org>
* process.el (call-process-shell-command): New function from GNU.
diff -r 7b5f88e5b456 -r b490ddbd42aa lisp/help.el
--- a/lisp/help.el Mon Oct 15 20:47:00 2012 +0200
+++ b/lisp/help.el Tue Nov 06 21:34:15 2012 +0000
@@ -1544,10 +1544,10 @@
(format "\n\\[%s]" function))))
(when commands-remapped-to
(if (cdr commands-remapped-to)
- (princ (format "\n\nThe following functions are \
+ (princ (format "The following functions are \
remapped to it:\n`%s'" (mapconcat #'prin1-to-string commands-remapped-to
"', `")))
- (princ (format "\n\n`%s' is remapped to it.\n"
+ (princ (format "`%s' is remapped to it.\n"
(car
commands-remapped-to))))))))))))))
diff -r 7b5f88e5b456 -r b490ddbd42aa src/ChangeLog
--- a/src/ChangeLog Mon Oct 15 20:47:00 2012 +0200
+++ b/src/ChangeLog Tue Nov 06 21:34:15 2012 +0000
@@ -1,14 +1,3 @@
-2012-10-14 Aidan Kehoe <kehoea(a)parhasard.net>
-
- Have command remapping work interactively too, thank you Robert
- Pluim.
- * event-stream.c (Fdispatch_event):
- Obey command remapping here, it wasn't done for us.
- * keymap.c:
- * keymap.c (command_remapping_for_event): New, needed to observe
- command remapping interactively.
- * lisp.h: Make it available.
-
2012-10-14 Aidan Kehoe <kehoea(a)parhasard.net>
Respect face and display table information in the minibuffer
diff -r 7b5f88e5b456 -r b490ddbd42aa src/event-stream.c
--- a/src/event-stream.c Mon Oct 15 20:47:00 2012 +0200
+++ b/src/event-stream.c Tue Nov 06 21:34:15 2012 +0000
@@ -4550,6 +4550,8 @@
int magic_undo = 0;
Elemcount magic_undo_count = 20;
+ Vthis_command = leaf;
+
/* Don't push an undo boundary if the command set the prefix arg,
or if we are executing a keyboard macro, or if in the
minibuffer. If the command we are about to execute is
@@ -4565,8 +4567,6 @@
if (SYMBOLP (leaf))
{
Lisp_Object prop = Fget (leaf, Qself_insert_defer_undo, Qnil);
- Lisp_Object remap = Qnil;
-
if (NATNUMP (prop))
{
magic_undo = 1;
@@ -4587,16 +4587,8 @@
magic_undo = 1;
else if (EQ (leaf, Qself_insert_command))
magic_undo = 1;
-
- remap = command_remapping_for_event (leaf, event);
- if (!NILP (remap))
- {
- leaf = remap;
- }
}
- Vthis_command = leaf;
-
if (!magic_undo)
command_builder->self_insert_countdown = 0;
if (NILP (XCONSOLE (console)->prefix_arg)
diff -r 7b5f88e5b456 -r b490ddbd42aa src/keymap.c
--- a/src/keymap.c Mon Oct 15 20:47:00 2012 +0200
+++ b/src/keymap.c Tue Nov 06 21:34:15 2012 +0000
@@ -2127,20 +2127,6 @@
return Qnil;
}
-Lisp_Object
-command_remapping_for_event (Lisp_Object command, Lisp_Object event0)
-{
- /* This function can GC */
- Lisp_Object maps[100];
- int nmaps;
-
- nmaps = get_relevant_keymaps (event0, Qnil, countof (maps), maps);
- if (nmaps > countof (maps))
- nmaps = countof (maps);
-
- return command_remapping (command, nmaps, maps);
-}
-
DEFUN ("command-remapping", Fcommand_remapping, 1, 3, 0, /*
Return the remapping for command COMMAND.
diff -r 7b5f88e5b456 -r b490ddbd42aa src/lisp.h
--- a/src/lisp.h Mon Oct 15 20:47:00 2012 +0200
+++ b/src/lisp.h Tue Nov 06 21:34:15 2012 +0000
@@ -5473,9 +5473,6 @@
EXFUN (Fmake_sparse_keymap, 1);
EXFUN (Fset_keymap_parents, 2);
-Lisp_Object command_remapping_for_event (Lisp_Object command,
- Lisp_Object event0);
-
void where_is_to_char (Lisp_Object, Eistring *);
/* Defined in lread.c */
--
‘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
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches