aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2005-03-17 13:39:39 +0000
committerStefan Monnier2005-03-17 13:39:39 +0000
commit888953f1ca3f5c676b5bf62c4de64825d381d76f (patch)
tree967c923e92dc7c7dcd8b068ecd526544c2eb3056 /src
parent48502d68e61cc00cca0206ad8e58544cf515bb15 (diff)
downloademacs-888953f1ca3f5c676b5bf62c4de64825d381d76f.tar.gz
emacs-888953f1ca3f5c676b5bf62c4de64825d381d76f.zip
(Fignore_event): Fix ancient obscure C-u handling bug.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/frame.c23
2 files changed, 25 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c2776756ce5..1ef923b62da 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,11 +1,14 @@
12005-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * frame.c (Fignore_event): Fix ancient obscure C-u handling bug.
4
12005-03-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 52005-03-17 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 6
3 * mac.c (HASHKEY_TERMINAL): Remove. 7 * mac.c (HASHKEY_TERMINAL): Remove.
4 (HASHKEY_MAX_NID): New macro. 8 (HASHKEY_MAX_NID): New macro.
5 (xrm_q_get_resource_1): Rename from xrm_q_get_resource. Add extra 9 (xrm_q_get_resource_1): Rename from xrm_q_get_resource. Add extra
6 argument. 10 argument.
7 (xrm_q_get_resource): Call xrm_q_get_resource_1 with extra 11 (xrm_q_get_resource): Call xrm_q_get_resource_1 with extra argument.
8 argument.
9 (xrm_create_database, xrm_q_put_resource) 12 (xrm_create_database, xrm_q_put_resource)
10 (xrm_merge_string_database, xrm_q_get_resource_1) 13 (xrm_merge_string_database, xrm_q_get_resource_1)
11 (xrm_q_get_resource): Change resource database representation so 14 (xrm_q_get_resource): Change resource database representation so
diff --git a/src/frame.c b/src/frame.c
index 2dc8e633a3f..ce48a3f5fbe 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1,5 +1,5 @@
1/* Generic frame functions. 1/* Generic frame functions.
2 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003, 2004 2 Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003, 2004, 2005
3 Free Software Foundation. 3 Free Software Foundation.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -766,11 +766,28 @@ to that frame. */)
766} 766}
767 767
768DEFUN ("ignore-event", Fignore_event, Signore_event, 0, 0, "", 768DEFUN ("ignore-event", Fignore_event, Signore_event, 0, 0, "",
769 doc: /* Do nothing, but preserve any prefix argument already specified. 769 doc: /* Do nothing.
770This is a suitable binding for `iconify-frame' and `make-frame-visible'. */) 770This is a suitable binding for `iconify-frame' and `make-frame-visible'. */)
771 () 771 ()
772{ 772{
773 current_kboard->Vprefix_arg = Vcurrent_prefix_arg; 773 /* Contrary to `handle-switch-frame', `ignore-event' is used from
774 `special-event-map'. Commands from that map are run in a special
775 way that automatically preserves the prefix-arg. Restoring
776 the prefix arg here is not just redundant but harmful:
777 - C-u C-x v =
778 - current-prefix-arg is set to non-nil, prefix-arg is set to nil.
779 - after the first prompt, the exit-minibuffer-hook is run which may
780 iconify a frame and thus push a `iconify-frame' event.
781 - after running exit-minibuffer-hook, current-prefix-arg is
782 restored to the non-nil value it had before the prompt.
783 - we enter the second prompt.
784 current-prefix-arg is non-nil, prefix-arg is nil.
785 - before running the first real event, we run the special iconify-frame
786 event, but we pass the `special' arg to execute-command so
787 current-prefix-arg and prefix-arg are left untouched.
788 - here we foolishly copy the non-nil current-prefix-arg to prefix-arg.
789 - the next key event will have a spuriously non-nil current-prefix-arg.
790 current_kboard->Vprefix_arg = Vcurrent_prefix_arg; */
774 return Qnil; 791 return Qnil;
775} 792}
776 793