(Fsplit_window): Treat width just like height;
[bpt/emacs.git] / src / mocklisp.c
index 5f0800f..ad6ae99 100644 (file)
@@ -1,11 +1,11 @@
 /* Mocklisp compatibility functions for GNU Emacs Lisp interpreter.
 /* Mocklisp compatibility functions for GNU Emacs Lisp interpreter.
-   Copyright (C) 1985, 1986 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1995 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -15,12 +15,13 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
 
 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.  */
 
 
 /* Compatibility for mocklisp */
 
 
 
 /* Compatibility for mocklisp */
 
-#include "config.h"
+#include <config.h>
 #include "lisp.h"
 #include "buffer.h"
 
 #include "lisp.h"
 #include "buffer.h"
 
@@ -32,7 +33,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 * {
 *  Lisp_Object elt;
 *
 * {
 *  Lisp_Object elt;
 *
-*   while (!NULL (args))
+*   while (!NILP (args))
 *     {
 *       elt = Fcar (args);
 *       Ffset (Fcar (elt), Fcons (Qmocklisp, Fcdr (elt)));
 *     {
 *       elt = Fcar (args);
 *       Ffset (Fcar (elt), Fcons (Qmocklisp, Fcdr (elt)));
@@ -50,11 +51,11 @@ DEFUN ("ml-if", Fml_if, Sml_if, 0, UNEVALLED, 0, "Mocklisp version of `if'.")
   struct gcpro gcpro1;
 
   GCPRO1 (args);
   struct gcpro gcpro1;
 
   GCPRO1 (args);
-  while (!NULL (args))
+  while (!NILP (args))
     {
       val = Feval (Fcar (args));
       args = Fcdr (args);
     {
       val = Feval (Fcar (args));
       args = Fcdr (args);
-      if (NULL (args)) break;
+      if (NILP (args)) break;
       if (XINT (val))
        {
          val = Feval (Fcar (args));
       if (XINT (val))
        {
          val = Feval (Fcar (args));
@@ -156,7 +157,7 @@ DEFUN ("ml-prefix-argument-loop", Fml_prefix_argument_loop, Sml_prefix_argument_
   struct gcpro gcpro1;
 
   /* Set `arg' in case we call a built-in function that looks at it.  Still are a few. */
   struct gcpro gcpro1;
 
   /* Set `arg' in case we call a built-in function that looks at it.  Still are a few. */
-  if (NULL (Vcurrent_prefix_arg))
+  if (NILP (Vcurrent_prefix_arg))
     i = 1;
   else
     {
     i = 1;
   else
     {
@@ -194,7 +195,7 @@ If either FROM or LENGTH is negative, the length of STRING is added to it.")
   XSETINT (to, XINT (to) + XINT (from));
   return Fsubstring (string, from, to);
 }
   XSETINT (to, XINT (to) + XINT (from));
   return Fsubstring (string, from, to);
 }
-#endif NOTDEF
+#endif /* 0 */
 DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0,
   "Mocklisp-compatibility insert function.\n\
 Like the function `insert' except that any argument that is a number\n\
 DEFUN ("insert-string", Finsert_string, Sinsert_string, 0, MANY, 0,
   "Mocklisp-compatibility insert function.\n\
 Like the function `insert' except that any argument that is a number\n\
@@ -210,9 +211,9 @@ is converted into a string by expressing it in decimal.")
     {
       tem = args[argnum];
     retry:
     {
       tem = args[argnum];
     retry:
-      if (XTYPE (tem) == Lisp_Int)
-       tem = Fint_to_string (tem);
-      if (XTYPE (tem) == Lisp_String)
+      if (INTEGERP (tem))
+       tem = Fnumber_to_string (tem);
+      if (STRINGP (tem))
        insert1 (tem);
       else
        {
        insert1 (tem);
       else
        {