[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c,v |
Date: |
Sat, 29 Mar 2008 01:46:12 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/03/29 01:46:11
Index: src/xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1202
retrieving revision 1.1203
diff -u -b -r1.1202 -r1.1203
--- src/xdisp.c 26 Mar 2008 18:11:46 -0000 1.1202
+++ src/xdisp.c 29 Mar 2008 01:46:06 -0000 1.1203
@@ -2316,33 +2316,6 @@
/* Evaluate SEXPR and return the result, or nil if something went
wrong. Prevent redisplay during the evaluation. */
-Lisp_Object
-safe_eval (sexpr)
- Lisp_Object sexpr;
-{
- Lisp_Object val;
-
- if (inhibit_eval_during_redisplay)
- val = Qnil;
- else
- {
- int count = SPECPDL_INDEX ();
- struct gcpro gcpro1;
-
- GCPRO1 (sexpr);
- specbind (Qinhibit_redisplay, Qt);
- /* Use Qt to ensure debugger does not run,
- so there is no possibility of wanting to redisplay. */
- val = internal_condition_case_1 (Feval, sexpr, Qt,
- safe_eval_handler);
- UNGCPRO;
- val = unbind_to (count, val);
- }
-
- return val;
-}
-
-
/* Call function ARGS[0] with arguments ARGS[1] to ARGS[NARGS - 1].
Return the result, or nil if something went wrong. Prevent
redisplay during the evaluation. */
@@ -2389,6 +2362,27 @@
return safe_call (2, args);
}
+static Lisp_Object Qeval;
+
+Lisp_Object
+safe_eval (Lisp_Object sexpr)
+{
+ return safe_call1 (Qeval, sexpr);
+}
+
+/* Call function FN with one argument ARG.
+ Return the result, or nil if something went wrong. */
+
+Lisp_Object
+safe_call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
+{
+ Lisp_Object args[3];
+ args[0] = fn;
+ args[1] = arg1;
+ args[2] = arg2;
+ return safe_call (3, args);
+}
+
/***********************************************************************
@@ -8634,7 +8628,7 @@
{
Lisp_Object msg;
- if (NILP (echo_area_buffer[0]))
+ if (!BUFFERP (echo_area_buffer[0]))
msg = Qnil;
else
{
@@ -24359,6 +24353,9 @@
staticpro (&Qinhibit_point_motion_hooks);
Qinhibit_point_motion_hooks = intern ("inhibit-point-motion-hooks");
+ Qeval = intern ("eval");
+ staticpro (&Qeval);
+
QCdata = intern (":data");
staticpro (&QCdata);
Qdisplay = intern ("display");
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kim F. Storm, 2008/03/08
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Miles Bader, 2008/03/09
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Stefan Monnier, 2008/03/19
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Stefan Monnier, 2008/03/26
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v,
Stefan Monnier <=