You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
hacked on by jwz@lucid.com 17-jun-91
o added a compile-time switch to turn on simple sanity checking;
#define Bmult 0137
#define Bpoint 0140
-#define Bmark 0141 /* no longer generated as of v18 */
+/* Was Bmark in v17. */
+#define Bsave_current_buffer 0141
#define Bgoto_char 0142
#define Binsert 0143
#define Bpoint_max 0144
DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0,
"Function used internally in byte-compiled code.\n\
-The first argument is a string of byte code; the second, a vector of constants;\n\
-the third, the maximum stack depth used in this function.\n\
+The first argument, BYTESTR, is a string of byte code;\n\
+the second, VECTOR, a vector of constants;\n\
+the third, MAXDEPTH, the maximum stack depth used in this function.\n\
If the third argument is incorrect, Emacs may crash.")
(bytestr, vector, maxdepth)
Lisp_Object bytestr, vector, maxdepth;
else
{
v2 = XSYMBOL (v1)->value;
-#ifdef SWITCH_ENUM_BUG
- switch ((int) XTYPE (v2))
-#else
- switch (XTYPE (v2))
-#endif
- {
- case Lisp_Symbol:
- if (!EQ (v2, Qunbound))
- break;
- case Lisp_Intfwd:
- case Lisp_Boolfwd:
- case Lisp_Objfwd:
- case Lisp_Buffer_Local_Value:
- case Lisp_Some_Buffer_Local_Value:
- case Lisp_Buffer_Objfwd:
- v2 = Fsymbol_value (v1);
- }
+ if (MISCP (v2) || EQ (v2, Qunbound))
+ v2 = Fsymbol_value (v1);
}
PUSH (v2);
break;
case BRgoto:
QUIT;
- pc += *pc - 127;
+ pc += (int) *pc - 127;
break;
case BRgotoifnil:
if (NILP (POP))
{
QUIT;
- pc += *pc - 128;
+ pc += (int) *pc - 128;
}
pc++;
break;
if (!NILP (POP))
{
QUIT;
- pc += *pc - 128;
+ pc += (int) *pc - 128;
}
pc++;
break;
record_unwind_protect (save_excursion_restore, save_excursion_save ());
break;
+ case Bsave_current_buffer:
+ record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
+ break;
+
case Bsave_window_excursion:
TOP = Fsave_window_excursion (TOP);
break;
v2 = POP; v1 = TOP;
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1, 0);
CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2, 0);
- TOP = (XFLOATINT (v1) == XFLOATINT (v2)) ? Qt : Qnil;
+#ifdef LISP_FLOAT_TYPE
+ if (FLOATP (v1) || FLOATP (v2))
+ {
+ double f1, f2;
+
+ f1 = (FLOATP (v1) ? XFLOAT (v1)->data : XINT (v1));
+ f2 = (FLOATP (v2) ? XFLOAT (v2)->data : XINT (v2));
+ TOP = (f1 == f2 ? Qt : Qnil);
+ }
+ else
+#endif
+ TOP = (XINT (v1) == XINT (v2) ? Qt : Qnil);
break;
case Bgtr:
break;
case Bpoint:
- XSETFASTINT (v1, point);
+ XSETFASTINT (v1, PT);
PUSH (v1);
break;
break;
case Bfollowing_char:
- XSETFASTINT (v1, PT == ZV ? 0 : FETCH_CHAR (point));
+ v1 = Ffollowing_char ();
PUSH (v1);
break;
case Bpreceding_char:
- XSETFASTINT (v1, point <= BEGV ? 0 : FETCH_CHAR (point - 1));
+ v1 = Fprevious_char ();
PUSH (v1);
break;
case Bchar_syntax:
CHECK_NUMBER (TOP, 0);
XSETFASTINT (TOP,
- syntax_code_spec[(int) SYNTAX (0xFF & XINT (TOP))]);
+ syntax_code_spec[(int) SYNTAX (XINT (TOP))]);
break;
case Bbuffer_substring: