From 5a073f50755944ae51a08f670d8acf192d69e036 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 3 Jun 2005 23:02:21 +0000 Subject: (unbind_to): Preserve value of Vquit_flag. --- src/eval.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index 8bb201c5df5..0eb1482ee0b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3130,10 +3130,10 @@ unbind_to (count, value) int count; Lisp_Object value; { - int quitf = !NILP (Vquit_flag); - struct gcpro gcpro1; + Lisp_Object quitf = Vquit_flag; + struct gcpro gcpro1, gcpro2; - GCPRO1 (value); + GCPRO2 (value, quitf); Vquit_flag = Qnil; while (specpdl_ptr != specpdl + count) @@ -3182,8 +3182,8 @@ unbind_to (count, value) } } - if (NILP (Vquit_flag) && quitf) - Vquit_flag = Qt; + if (NILP (Vquit_flag) && !NILP (quitf)) + Vquit_flag = quitf; UNGCPRO; return value; -- cgit v1.2.1 From 89f2614d96b5cf84f01c4903652a6a2b5b23d3d3 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Wed, 8 Jun 2005 22:33:36 +0000 Subject: * composite.c (compose_chars_in_text): * eval.c (do_autoload): * macmenu.c (set_frame_menubar): * process.c (read_process_output, exec_sentinel): * xmenu.c (set_frame_menubar): * xdisp.c (prepare_menu_bars, update_menu_bar, update_tool_bar): * w32menu.c (set_frame_menubar): Use record_unwind_save_match_data. Rename restore_match_data to restore_search_regs. --- src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index 0eb1482ee0b..46affcac418 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1971,7 +1971,7 @@ do_autoload (fundef, funname) GCPRO3 (fun, funname, fundef); /* Preserve the match data. */ - record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); + record_unwind_save_match_data (); /* Value saved here is to be restored into Vautoload_queue. */ record_unwind_protect (un_autoload, Vautoload_queue); -- cgit v1.2.1 From 4a9308b8e2b100ab15a7eded063304c8a4fbc144 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 00:39:32 +0000 Subject: (Fdefvaralias): Rename arguments SYMBOL and ALIASED to NEW-ALIAS and BASE-VARIABLE, respectively. --- src/eval.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index 46affcac418..445eb283114 100644 --- a/src/eval.c +++ b/src/eval.c @@ -722,35 +722,36 @@ usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */) DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0, - doc: /* Make SYMBOL a variable alias for symbol ALIASED. -Setting the value of SYMBOL will subsequently set the value of ALIASED, -and getting the value of SYMBOL will return the value ALIASED has. -Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. If it is -omitted or nil, SYMBOL gets the documentation string of ALIASED, or of the -variable at the end of the chain of aliases, if ALIASED is itself an alias. -The return value is ALIASED. */) - (symbol, aliased, docstring) - Lisp_Object symbol, aliased, docstring; + doc: /* Make NEW-ALIAS a variable alias for symbol BASE-VARIABLE. +Setting the value of NEW-ALIAS will subsequently set the value of BASE-VARIABLE, + and getting the value of NEW-ALIAS will return the value BASE-VARIABLE has. +Third arg DOCSTRING, if non-nil, is documentation for NEW-ALIAS. If it is + omitted or nil, NEW-ALIAS gets the documentation string of BASE-VARIABLE, + or of the variable at the end of the chain of aliases, if BASE-VARIABLE is + itself an alias. +The return value is BASE-VARIABLE. */) + (new_alias, base_variable, docstring) + Lisp_Object new_alias, base_variable, docstring; { struct Lisp_Symbol *sym; - CHECK_SYMBOL (symbol); - CHECK_SYMBOL (aliased); + CHECK_SYMBOL (new_alias); + CHECK_SYMBOL (base_variable); - if (SYMBOL_CONSTANT_P (symbol)) + if (SYMBOL_CONSTANT_P (new_alias)) error ("Cannot make a constant an alias"); - sym = XSYMBOL (symbol); + sym = XSYMBOL (new_alias); sym->indirect_variable = 1; - sym->value = aliased; - sym->constant = SYMBOL_CONSTANT_P (aliased); - LOADHIST_ATTACH (symbol); + sym->value = base_variable; + sym->constant = SYMBOL_CONSTANT_P (base_variable); + LOADHIST_ATTACH (new_alias); if (!NILP (docstring)) - Fput (symbol, Qvariable_documentation, docstring); + Fput (new_alias, Qvariable_documentation, docstring); else - Fput (symbol, Qvariable_documentation, Qnil); + Fput (new_alias, Qvariable_documentation, Qnil); - return aliased; + return base_variable; } -- cgit v1.2.1