diff options
| author | Karl Heuer | 1994-09-27 23:32:55 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-09-27 23:32:55 +0000 |
| commit | ae68312980506e0d2deafad6005845c12debd97c (patch) | |
| tree | 5815c0fc9beb1ec60c121cfa4482571cbcd472b3 /src | |
| parent | 6672c42bd1f7eeeca95eb239462bf3975109e0be (diff) | |
| download | emacs-ae68312980506e0d2deafad6005845c12debd97c.tar.gz emacs-ae68312980506e0d2deafad6005845c12debd97c.zip | |
(lisp_time_argument, Finsert, Finsert_and_inherit, Finsert_before_markers,
Finsert_and_inherit_before_markers, Fformat): Use type test macros.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/editfns.c b/src/editfns.c index d06b7607c41..ff3536e9691 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -581,7 +581,7 @@ lisp_time_argument (specified_time, result) | |||
| 581 | high = Fcar (specified_time); | 581 | high = Fcar (specified_time); |
| 582 | CHECK_NUMBER (high, 0); | 582 | CHECK_NUMBER (high, 0); |
| 583 | low = Fcdr (specified_time); | 583 | low = Fcdr (specified_time); |
| 584 | if (XTYPE (low) == Lisp_Cons) | 584 | if (CONSP (low)) |
| 585 | low = Fcar (low); | 585 | low = Fcar (low); |
| 586 | CHECK_NUMBER (low, 0); | 586 | CHECK_NUMBER (low, 0); |
| 587 | *result = (XINT (high) << 16) + (XINT (low) & 0xffff); | 587 | *result = (XINT (high) << 16) + (XINT (low) & 0xffff); |
| @@ -793,12 +793,12 @@ Any other markers at the point of insertion remain before the text.") | |||
| 793 | { | 793 | { |
| 794 | tem = args[argnum]; | 794 | tem = args[argnum]; |
| 795 | retry: | 795 | retry: |
| 796 | if (XTYPE (tem) == Lisp_Int) | 796 | if (INTEGERP (tem)) |
| 797 | { | 797 | { |
| 798 | str[0] = XINT (tem); | 798 | str[0] = XINT (tem); |
| 799 | insert (str, 1); | 799 | insert (str, 1); |
| 800 | } | 800 | } |
| 801 | else if (XTYPE (tem) == Lisp_String) | 801 | else if (STRINGP (tem)) |
| 802 | { | 802 | { |
| 803 | insert_from_string (tem, 0, XSTRING (tem)->size, 0); | 803 | insert_from_string (tem, 0, XSTRING (tem)->size, 0); |
| 804 | } | 804 | } |
| @@ -829,12 +829,12 @@ Any other markers at the point of insertion remain before the text.") | |||
| 829 | { | 829 | { |
| 830 | tem = args[argnum]; | 830 | tem = args[argnum]; |
| 831 | retry: | 831 | retry: |
| 832 | if (XTYPE (tem) == Lisp_Int) | 832 | if (INTEGERP (tem)) |
| 833 | { | 833 | { |
| 834 | str[0] = XINT (tem); | 834 | str[0] = XINT (tem); |
| 835 | insert_and_inherit (str, 1); | 835 | insert_and_inherit (str, 1); |
| 836 | } | 836 | } |
| 837 | else if (XTYPE (tem) == Lisp_String) | 837 | else if (STRINGP (tem)) |
| 838 | { | 838 | { |
| 839 | insert_from_string (tem, 0, XSTRING (tem)->size, 1); | 839 | insert_from_string (tem, 0, XSTRING (tem)->size, 1); |
| 840 | } | 840 | } |
| @@ -864,12 +864,12 @@ Any other markers at the point of insertion also end up after the text.") | |||
| 864 | { | 864 | { |
| 865 | tem = args[argnum]; | 865 | tem = args[argnum]; |
| 866 | retry: | 866 | retry: |
| 867 | if (XTYPE (tem) == Lisp_Int) | 867 | if (INTEGERP (tem)) |
| 868 | { | 868 | { |
| 869 | str[0] = XINT (tem); | 869 | str[0] = XINT (tem); |
| 870 | insert_before_markers (str, 1); | 870 | insert_before_markers (str, 1); |
| 871 | } | 871 | } |
| 872 | else if (XTYPE (tem) == Lisp_String) | 872 | else if (STRINGP (tem)) |
| 873 | { | 873 | { |
| 874 | insert_from_string_before_markers (tem, 0, XSTRING (tem)->size, 0); | 874 | insert_from_string_before_markers (tem, 0, XSTRING (tem)->size, 0); |
| 875 | } | 875 | } |
| @@ -901,12 +901,12 @@ Any other markers at the point of insertion also end up after the text.") | |||
| 901 | { | 901 | { |
| 902 | tem = args[argnum]; | 902 | tem = args[argnum]; |
| 903 | retry: | 903 | retry: |
| 904 | if (XTYPE (tem) == Lisp_Int) | 904 | if (INTEGERP (tem)) |
| 905 | { | 905 | { |
| 906 | str[0] = XINT (tem); | 906 | str[0] = XINT (tem); |
| 907 | insert_before_markers_and_inherit (str, 1); | 907 | insert_before_markers_and_inherit (str, 1); |
| 908 | } | 908 | } |
| 909 | else if (XTYPE (tem) == Lisp_String) | 909 | else if (STRINGP (tem)) |
| 910 | { | 910 | { |
| 911 | insert_from_string_before_markers (tem, 0, XSTRING (tem)->size, 1); | 911 | insert_from_string_before_markers (tem, 0, XSTRING (tem)->size, 1); |
| 912 | } | 912 | } |
| @@ -1629,12 +1629,12 @@ Use %% to put a single % into the output.") | |||
| 1629 | args[n] = tem; | 1629 | args[n] = tem; |
| 1630 | goto string; | 1630 | goto string; |
| 1631 | } | 1631 | } |
| 1632 | else if (XTYPE (args[n]) == Lisp_Symbol) | 1632 | else if (SYMBOLP (args[n])) |
| 1633 | { | 1633 | { |
| 1634 | XSET (args[n], Lisp_String, XSYMBOL (args[n])->name); | 1634 | XSET (args[n], Lisp_String, XSYMBOL (args[n])->name); |
| 1635 | goto string; | 1635 | goto string; |
| 1636 | } | 1636 | } |
| 1637 | else if (XTYPE (args[n]) == Lisp_String) | 1637 | else if (STRINGP (args[n])) |
| 1638 | { | 1638 | { |
| 1639 | string: | 1639 | string: |
| 1640 | if (*format != 's' && *format != 'S') | 1640 | if (*format != 's' && *format != 'S') |
| @@ -1642,7 +1642,7 @@ Use %% to put a single % into the output.") | |||
| 1642 | total += XSTRING (args[n])->size; | 1642 | total += XSTRING (args[n])->size; |
| 1643 | } | 1643 | } |
| 1644 | /* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */ | 1644 | /* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */ |
| 1645 | else if (XTYPE (args[n]) == Lisp_Int && *format != 's') | 1645 | else if (INTEGERP (args[n]) && *format != 's') |
| 1646 | { | 1646 | { |
| 1647 | #ifdef LISP_FLOAT_TYPE | 1647 | #ifdef LISP_FLOAT_TYPE |
| 1648 | /* The following loop assumes the Lisp type indicates | 1648 | /* The following loop assumes the Lisp type indicates |
| @@ -1655,7 +1655,7 @@ Use %% to put a single % into the output.") | |||
| 1655 | total += 10; | 1655 | total += 10; |
| 1656 | } | 1656 | } |
| 1657 | #ifdef LISP_FLOAT_TYPE | 1657 | #ifdef LISP_FLOAT_TYPE |
| 1658 | else if (XTYPE (args[n]) == Lisp_Float && *format != 's') | 1658 | else if (FLOATP (args[n]) && *format != 's') |
| 1659 | { | 1659 | { |
| 1660 | if (! (*format == 'e' || *format == 'f' || *format == 'g')) | 1660 | if (! (*format == 'e' || *format == 'f' || *format == 'g')) |
| 1661 | args[n] = Ftruncate (args[n]); | 1661 | args[n] = Ftruncate (args[n]); |
| @@ -1686,12 +1686,12 @@ Use %% to put a single % into the output.") | |||
| 1686 | { | 1686 | { |
| 1687 | if (n >= nargs) | 1687 | if (n >= nargs) |
| 1688 | strings[i++] = (unsigned char *) ""; | 1688 | strings[i++] = (unsigned char *) ""; |
| 1689 | else if (XTYPE (args[n]) == Lisp_Int) | 1689 | else if (INTEGERP (args[n])) |
| 1690 | /* We checked above that the corresponding format effector | 1690 | /* We checked above that the corresponding format effector |
| 1691 | isn't %s, which would cause MPV. */ | 1691 | isn't %s, which would cause MPV. */ |
| 1692 | strings[i++] = (unsigned char *) XINT (args[n]); | 1692 | strings[i++] = (unsigned char *) XINT (args[n]); |
| 1693 | #ifdef LISP_FLOAT_TYPE | 1693 | #ifdef LISP_FLOAT_TYPE |
| 1694 | else if (XTYPE (args[n]) == Lisp_Float) | 1694 | else if (FLOATP (args[n])) |
| 1695 | { | 1695 | { |
| 1696 | union { double d; int half[2]; } u; | 1696 | union { double d; int half[2]; } u; |
| 1697 | 1697 | ||