aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2013-11-05 15:47:54 -0500
committerStefan Monnier2013-11-05 15:47:54 -0500
commit2e670b957698eefb9f90a907968b497efe8c540b (patch)
tree68cccead777d050184e603a9a6f705cea6743a55 /src
parent2ea0d614991d2ca8617c898c24a1ddd6e0d09f68 (diff)
downloademacs-2e670b957698eefb9f90a907968b497efe8c540b.tar.gz
emacs-2e670b957698eefb9f90a907968b497efe8c540b.zip
* src/keyboard.c (Fcommand_error_default_function): Rename from
Fdefault_error_output.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/keyboard.c38
2 files changed, 24 insertions, 24 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 04eabcb26db..fec1a12de8a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,13 @@
12013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * keyboard.c (Fcommand_error_default_function): Rename from
4 Fdefault_error_output.
5
12013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change) 62013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
2 7
3 * keyboard.c: new function default-error-output which becomes 8 * keyboard.c (Fdefault_error_output): New function, extracted from
4 a default value for command-error-function. 9 cmd_error_internal.
10 (syms_of_keyboard): Use it for Vcommand_error_function.
5 11
62013-11-05 Stefan Monnier <monnier@iro.umontreal.ca> 122013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
7 13
diff --git a/src/keyboard.c b/src/keyboard.c
index dbc0bccd232..574780e2004 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -241,8 +241,6 @@ Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook;
241 241
242static Lisp_Object Qecho_area_clear_hook; 242static Lisp_Object Qecho_area_clear_hook;
243 243
244static Lisp_Object Qdefault_error_output;
245
246/* Hooks to run before and after each command. */ 244/* Hooks to run before and after each command. */
247static Lisp_Object Qpre_command_hook; 245static Lisp_Object Qpre_command_hook;
248static Lisp_Object Qpost_command_hook; 246static Lisp_Object Qpost_command_hook;
@@ -1074,8 +1072,7 @@ cmd_error_internal (Lisp_Object data, const char *context)
1074 Vquit_flag = Qnil; 1072 Vquit_flag = Qnil;
1075 Vinhibit_quit = Qt; 1073 Vinhibit_quit = Qt;
1076 1074
1077 /* Use user's specified output function, 1075 /* Use user's specified output function if any. */
1078 initially it is our Fdefault_error_output. */
1079 if (!NILP (Vcommand_error_function)) 1076 if (!NILP (Vcommand_error_function))
1080 call3 (Vcommand_error_function, data, 1077 call3 (Vcommand_error_function, data,
1081 context ? build_string (context) : empty_unibyte_string, 1078 context ? build_string (context) : empty_unibyte_string,
@@ -1084,17 +1081,17 @@ cmd_error_internal (Lisp_Object data, const char *context)
1084 Vsignaling_function = Qnil; 1081 Vsignaling_function = Qnil;
1085} 1082}
1086 1083
1087DEFUN ("default-error-output", Fdefault_error_output, 1084DEFUN ("command-error-default-function", Fcommand_error_default_function,
1088 Sdefault_error_output, 3, 3, 0, 1085 Scommand_error_default_function, 3, 3, 0,
1089 doc: /* Produce default output for the error message, 1086 doc: /* Produce default output for unhandled error message.
1090into the messages buffer and the echo area. */) 1087Default value of `command-error-function'. */)
1091 (Lisp_Object data, Lisp_Object context, Lisp_Object signal) 1088 (Lisp_Object data, Lisp_Object context, Lisp_Object signal)
1092{ 1089{
1093 struct frame *sf = SELECTED_FRAME (); 1090 struct frame *sf = SELECTED_FRAME ();
1094 const char *sz_context; 1091 const char *sz_context;
1095 1092
1096 CHECK_STRING(context); 1093 CHECK_STRING (context);
1097 sz_context = XSTRING(context)->data; 1094 sz_context = XSTRING (context)->data;
1098 1095
1099 /* If the window system or terminal frame hasn't been initialized 1096 /* If the window system or terminal frame hasn't been initialized
1100 yet, or we're not interactive, write the message to stderr and exit. */ 1097 yet, or we're not interactive, write the message to stderr and exit. */
@@ -1126,6 +1123,7 @@ into the messages buffer and the echo area. */)
1126 1123
1127 print_error_message (data, Qt, sz_context, signal); 1124 print_error_message (data, Qt, sz_context, signal);
1128 } 1125 }
1126 return Qnil;
1129} 1127}
1130 1128
1131static Lisp_Object command_loop_2 (Lisp_Object); 1129static Lisp_Object command_loop_2 (Lisp_Object);
@@ -11123,7 +11121,7 @@ syms_of_keyboard (void)
11123 defsubr (&Sabort_recursive_edit); 11121 defsubr (&Sabort_recursive_edit);
11124 defsubr (&Sexit_recursive_edit); 11122 defsubr (&Sexit_recursive_edit);
11125 defsubr (&Srecursion_depth); 11123 defsubr (&Srecursion_depth);
11126 defsubr (&Sdefault_error_output); 11124 defsubr (&Scommand_error_default_function);
11127 defsubr (&Stop_level); 11125 defsubr (&Stop_level);
11128 defsubr (&Sdiscard_input); 11126 defsubr (&Sdiscard_input);
11129 defsubr (&Sopen_dribble_file); 11127 defsubr (&Sopen_dribble_file);
@@ -11602,18 +11600,14 @@ The value of that variable is passed to `quit-flag' and later causes a
11602peculiar kind of quitting. */); 11600peculiar kind of quitting. */);
11603 Vthrow_on_input = Qnil; 11601 Vthrow_on_input = Qnil;
11604 11602
11605 DEFSYM (Qdefault_error_output, "default-error-output");
11606 DEFVAR_LISP ("command-error-function", Vcommand_error_function, 11603 DEFVAR_LISP ("command-error-function", Vcommand_error_function,
11607 doc: /* If non-nil, function to output error messages. 11604 doc: /* Function to output error messages.
11608The arguments are the error data, a list of the form 11605Called with three arguments:
11609 (SIGNALED-CONDITIONS . SIGNAL-DATA) 11606- the error data, a list of the form (SIGNALED-CONDITION . SIGNAL-DATA)
11610such as just as `condition-case' would bind its variable to, 11607 such as what `condition-case' would bind its variable to,
11611the context (a string which normally goes at the start of the message), 11608- the context (a string which normally goes at the start of the message),
11612and the Lisp function within which the error was signaled. 11609- the Lisp function within which the error was signaled. */);
11613 11610 Vcommand_error_function = intern ("command-error-default-function");
11614This variable is initialized with Emacs default error output function.
11615It is suggested that user functions are added using add-function. */);
11616 Vcommand_error_function = Qdefault_error_output;
11617 11611
11618 DEFVAR_LISP ("enable-disabled-menus-and-buttons", 11612 DEFVAR_LISP ("enable-disabled-menus-and-buttons",
11619 Venable_disabled_menus_and_buttons, 11613 Venable_disabled_menus_and_buttons,