Mercurial > hg > xemacs-beta
comparison src/editfns.c @ 5581:56144c8593a8
Mechanically change INT to FIXNUM in our sources.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT (where it refers to non-bignum Lisp
integers) to FIXNUM in our sources. Done for the following
functions, enums, and macros: Lisp_Type_Int_Even,
Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(),
XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(),
EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to
MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to
NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT.
The EMACS_INT typedef was not changed, it does not describe
non-bignum Lisp integers.
Script that did the change available in
http://mid.gmane.org/20067.17650.181273.12014@parhasard.net .
modules/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers. See the src/ChangeLog entry for more details.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (How Lisp Objects Are Represented in C):
* internals/internals.texi (Integers and Characters):
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 09:51:57 +0100 |
parents | f2881cb841b4 |
children | aa5f38ecb804 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
140 | 140 |
141 static Lisp_Object | 141 static Lisp_Object |
142 buildmark (Charbpos val, Lisp_Object buffer) | 142 buildmark (Charbpos val, Lisp_Object buffer) |
143 { | 143 { |
144 Lisp_Object mark = Fmake_marker (); | 144 Lisp_Object mark = Fmake_marker (); |
145 Fset_marker (mark, make_int (val), buffer); | 145 Fset_marker (mark, make_fixnum (val), buffer); |
146 return mark; | 146 return mark; |
147 } | 147 } |
148 | 148 |
149 DEFUN ("point", Fpoint, 0, 1, 0, /* | 149 DEFUN ("point", Fpoint, 0, 1, 0, /* |
150 Return value of point, as an integer. | 150 Return value of point, as an integer. |
152 If BUFFER is nil, the current buffer is assumed. | 152 If BUFFER is nil, the current buffer is assumed. |
153 */ | 153 */ |
154 (buffer)) | 154 (buffer)) |
155 { | 155 { |
156 struct buffer *b = decode_buffer (buffer, 1); | 156 struct buffer *b = decode_buffer (buffer, 1); |
157 return make_int (BUF_PT (b)); | 157 return make_fixnum (BUF_PT (b)); |
158 } | 158 } |
159 | 159 |
160 DEFUN ("point-marker", Fpoint_marker, 0, 2, 0, /* | 160 DEFUN ("point-marker", Fpoint_marker, 0, 2, 0, /* |
161 Return value of point, as a marker object. | 161 Return value of point, as a marker object. |
162 This marker is a copy; you may modify it with reckless abandon. | 162 This marker is a copy; you may modify it with reckless abandon. |
195 { | 195 { |
196 struct buffer *b = decode_buffer (buffer, 1); | 196 struct buffer *b = decode_buffer (buffer, 1); |
197 Charbpos n = get_buffer_pos_char (b, position, GB_COERCE_RANGE); | 197 Charbpos n = get_buffer_pos_char (b, position, GB_COERCE_RANGE); |
198 BUF_SET_PT (b, n); | 198 BUF_SET_PT (b, n); |
199 atomic_extent_goto_char_p = 1; | 199 atomic_extent_goto_char_p = 1; |
200 return make_int (n); | 200 return make_fixnum (n); |
201 } | 201 } |
202 | 202 |
203 static Lisp_Object | 203 static Lisp_Object |
204 region_limit (int beginningp, struct buffer *b) | 204 region_limit (int beginningp, struct buffer *b) |
205 { | 205 { |
210 && NILP (b->mark_active)) | 210 && NILP (b->mark_active)) |
211 Fsignal (Qmark_inactive, Qnil); | 211 Fsignal (Qmark_inactive, Qnil); |
212 #endif | 212 #endif |
213 m = Fmarker_position (b->mark); | 213 m = Fmarker_position (b->mark); |
214 if (NILP (m)) invalid_operation ("There is no region now", Qunbound); | 214 if (NILP (m)) invalid_operation ("There is no region now", Qunbound); |
215 if (!!(BUF_PT (b) < XINT (m)) == !!beginningp) | 215 if (!!(BUF_PT (b) < XFIXNUM (m)) == !!beginningp) |
216 return make_int (BUF_PT (b)); | 216 return make_fixnum (BUF_PT (b)); |
217 else | 217 else |
218 return m; | 218 return m; |
219 } | 219 } |
220 | 220 |
221 DEFUN ("region-beginning", Fregion_beginning, 0, 1, 0, /* | 221 DEFUN ("region-beginning", Fregion_beginning, 0, 1, 0, /* |
310 /* There was once a check for preparing_for_armageddon here, which | 310 /* There was once a check for preparing_for_armageddon here, which |
311 did nothing; perhaps a left-over from FSF Emacs. Obviously | 311 did nothing; perhaps a left-over from FSF Emacs. Obviously |
312 incorrect. --ben */ | 312 incorrect. --ben */ |
313 | 313 |
314 #ifdef ERROR_CHECK_TEXT | 314 #ifdef ERROR_CHECK_TEXT |
315 assert (XINT (Fpoint (Qnil)) == | 315 assert (XFIXNUM (Fpoint (Qnil)) == |
316 XINT (Fmarker_position (Fpoint_marker (Qt, Qnil)))); | 316 XFIXNUM (Fmarker_position (Fpoint_marker (Qt, Qnil)))); |
317 #endif | 317 #endif |
318 | 318 |
319 b = current_buffer; | 319 b = current_buffer; |
320 | 320 |
321 return noseeum_cons (noseeum_copy_marker (b->point_marker, Qnil), | 321 return noseeum_cons (noseeum_copy_marker (b->point_marker, Qnil), |
413 If BUFFER is nil, the current buffer is assumed. | 413 If BUFFER is nil, the current buffer is assumed. |
414 */ | 414 */ |
415 (buffer)) | 415 (buffer)) |
416 { | 416 { |
417 struct buffer *b = decode_buffer (buffer, 1); | 417 struct buffer *b = decode_buffer (buffer, 1); |
418 return make_int (BUF_SIZE (b)); | 418 return make_fixnum (BUF_SIZE (b)); |
419 } | 419 } |
420 | 420 |
421 DEFUN ("point-min", Fpoint_min, 0, 1, 0, /* | 421 DEFUN ("point-min", Fpoint_min, 0, 1, 0, /* |
422 Return the minimum permissible value of point in BUFFER. | 422 Return the minimum permissible value of point in BUFFER. |
423 This is 1, unless narrowing (a buffer restriction) | 423 This is 1, unless narrowing (a buffer restriction) |
425 If BUFFER is nil, the current buffer is assumed. | 425 If BUFFER is nil, the current buffer is assumed. |
426 */ | 426 */ |
427 (buffer)) | 427 (buffer)) |
428 { | 428 { |
429 struct buffer *b = decode_buffer (buffer, 1); | 429 struct buffer *b = decode_buffer (buffer, 1); |
430 return make_int (BUF_BEGV (b)); | 430 return make_fixnum (BUF_BEGV (b)); |
431 } | 431 } |
432 | 432 |
433 DEFUN ("point-min-marker", Fpoint_min_marker, 0, 1, 0, /* | 433 DEFUN ("point-min-marker", Fpoint_min_marker, 0, 1, 0, /* |
434 Return a marker to the minimum permissible value of point in BUFFER. | 434 Return a marker to the minimum permissible value of point in BUFFER. |
435 This is the beginning, unless narrowing (a buffer restriction) | 435 This is the beginning, unless narrowing (a buffer restriction) |
449 If BUFFER is nil, the current buffer is assumed. | 449 If BUFFER is nil, the current buffer is assumed. |
450 */ | 450 */ |
451 (buffer)) | 451 (buffer)) |
452 { | 452 { |
453 struct buffer *b = decode_buffer (buffer, 1); | 453 struct buffer *b = decode_buffer (buffer, 1); |
454 return make_int (BUF_ZV (b)); | 454 return make_fixnum (BUF_ZV (b)); |
455 } | 455 } |
456 | 456 |
457 DEFUN ("point-max-marker", Fpoint_max_marker, 0, 1, 0, /* | 457 DEFUN ("point-max-marker", Fpoint_max_marker, 0, 1, 0, /* |
458 Return a marker to the maximum permissible value of point in BUFFER. | 458 Return a marker to the maximum permissible value of point in BUFFER. |
459 This is (1+ (buffer-size)), unless narrowing (a buffer restriction) | 459 This is (1+ (buffer-size)), unless narrowing (a buffer restriction) |
663 Ibyte *returned_name; | 663 Ibyte *returned_name; |
664 uid_t local_uid; | 664 uid_t local_uid; |
665 | 665 |
666 if (!NILP (uid)) | 666 if (!NILP (uid)) |
667 { | 667 { |
668 CHECK_INT (uid); | 668 CHECK_FIXNUM (uid); |
669 local_uid = XINT (uid); | 669 local_uid = XFIXNUM (uid); |
670 returned_name = user_login_name (&local_uid); | 670 returned_name = user_login_name (&local_uid); |
671 } | 671 } |
672 else | 672 else |
673 { | 673 { |
674 returned_name = user_login_name (NULL); | 674 returned_name = user_login_name (NULL); |
748 DEFUN ("user-uid", Fuser_uid, 0, 0, 0, /* | 748 DEFUN ("user-uid", Fuser_uid, 0, 0, 0, /* |
749 Return the effective uid of Emacs, as an integer. | 749 Return the effective uid of Emacs, as an integer. |
750 */ | 750 */ |
751 ()) | 751 ()) |
752 { | 752 { |
753 return make_int (geteuid ()); | 753 return make_fixnum (geteuid ()); |
754 } | 754 } |
755 | 755 |
756 DEFUN ("user-real-uid", Fuser_real_uid, 0, 0, 0, /* | 756 DEFUN ("user-real-uid", Fuser_real_uid, 0, 0, 0, /* |
757 Return the real uid of Emacs, as an integer. | 757 Return the real uid of Emacs, as an integer. |
758 */ | 758 */ |
759 ()) | 759 ()) |
760 { | 760 { |
761 return make_int (getuid ()); | 761 return make_fixnum (getuid ()); |
762 } | 762 } |
763 | 763 |
764 DEFUN ("user-full-name", Fuser_full_name, 0, 1, 0, /* | 764 DEFUN ("user-full-name", Fuser_full_name, 0, 1, 0, /* |
765 Return the full name of the user logged in, as a string. | 765 Return the full name of the user logged in, as a string. |
766 If the optional argument USER is given, then the full name for that | 766 If the optional argument USER is given, then the full name for that |
908 DEFUN ("emacs-pid", Femacs_pid, 0, 0, 0, /* | 908 DEFUN ("emacs-pid", Femacs_pid, 0, 0, 0, /* |
909 Return the process ID of Emacs, as an integer. | 909 Return the process ID of Emacs, as an integer. |
910 */ | 910 */ |
911 ()) | 911 ()) |
912 { | 912 { |
913 return make_int (qxe_getpid ()); | 913 return make_fixnum (qxe_getpid ()); |
914 } | 914 } |
915 | 915 |
916 DEFUN ("current-time", Fcurrent_time, 0, 0, 0, /* | 916 DEFUN ("current-time", Fcurrent_time, 0, 0, 0, /* |
917 Return the current time, as the number of seconds since 1970-01-01 00:00:00. | 917 Return the current time, as the number of seconds since 1970-01-01 00:00:00. |
918 The time is returned as a list of three integers. The first has the | 918 The time is returned as a list of three integers. The first has the |
926 ()) | 926 ()) |
927 { | 927 { |
928 EMACS_TIME t; | 928 EMACS_TIME t; |
929 | 929 |
930 EMACS_GET_TIME (t); | 930 EMACS_GET_TIME (t); |
931 return list3 (make_int ((EMACS_SECS (t) >> 16) & 0xffff), | 931 return list3 (make_fixnum ((EMACS_SECS (t) >> 16) & 0xffff), |
932 make_int ((EMACS_SECS (t) >> 0) & 0xffff), | 932 make_fixnum ((EMACS_SECS (t) >> 0) & 0xffff), |
933 make_int (EMACS_USECS (t))); | 933 make_fixnum (EMACS_USECS (t))); |
934 } | 934 } |
935 | 935 |
936 DEFUN ("current-process-time", Fcurrent_process_time, 0, 0, 0, /* | 936 DEFUN ("current-process-time", Fcurrent_process_time, 0, 0, 0, /* |
937 Return the amount of time used by this XEmacs process so far. | 937 Return the amount of time used by this XEmacs process so far. |
938 The return value is a list of three floating-point numbers, expressing | 938 The return value is a list of three floating-point numbers, expressing |
977 CHECK_CONS (specified_time); | 977 CHECK_CONS (specified_time); |
978 high = XCAR (specified_time); | 978 high = XCAR (specified_time); |
979 low = XCDR (specified_time); | 979 low = XCDR (specified_time); |
980 if (CONSP (low)) | 980 if (CONSP (low)) |
981 low = XCAR (low); | 981 low = XCAR (low); |
982 CHECK_INT (high); | 982 CHECK_FIXNUM (high); |
983 CHECK_INT (low); | 983 CHECK_FIXNUM (low); |
984 *result = (XINT (high) << 16) + (XINT (low) & 0xffff); | 984 *result = (XFIXNUM (high) << 16) + (XFIXNUM (low) & 0xffff); |
985 return *result >> 16 == XINT (high); | 985 return *result >> 16 == XFIXNUM (high); |
986 } | 986 } |
987 | 987 |
988 Lisp_Object time_to_lisp (time_t the_time); | 988 Lisp_Object time_to_lisp (time_t the_time); |
989 Lisp_Object | 989 Lisp_Object |
990 time_to_lisp (time_t the_time) | 990 time_to_lisp (time_t the_time) |
991 { | 991 { |
992 unsigned int item = (unsigned int) the_time; | 992 unsigned int item = (unsigned int) the_time; |
993 return Fcons (make_int (item >> 16), make_int (item & 0xffff)); | 993 return Fcons (make_fixnum (item >> 16), make_fixnum (item & 0xffff)); |
994 } | 994 } |
995 | 995 |
996 size_t emacs_strftime (Extbyte *string, size_t max, const Extbyte *format, | 996 size_t emacs_strftime (Extbyte *string, size_t max, const Extbyte *format, |
997 const struct tm *tm); | 997 const struct tm *tm); |
998 static long difftm (const struct tm *a, const struct tm *b); | 998 static long difftm (const struct tm *a, const struct tm *b); |
1109 /* Make a copy, in case gmtime modifies the struct. */ | 1109 /* Make a copy, in case gmtime modifies the struct. */ |
1110 save_tm = *decoded_time; | 1110 save_tm = *decoded_time; |
1111 decoded_time = gmtime (&time_spec); | 1111 decoded_time = gmtime (&time_spec); |
1112 | 1112 |
1113 return listn(9, | 1113 return listn(9, |
1114 make_int (save_tm.tm_sec), | 1114 make_fixnum (save_tm.tm_sec), |
1115 make_int (save_tm.tm_min), | 1115 make_fixnum (save_tm.tm_min), |
1116 make_int (save_tm.tm_hour), | 1116 make_fixnum (save_tm.tm_hour), |
1117 make_int (save_tm.tm_mday), | 1117 make_fixnum (save_tm.tm_mday), |
1118 make_int (save_tm.tm_mon + 1), | 1118 make_fixnum (save_tm.tm_mon + 1), |
1119 make_int (save_tm.tm_year + 1900), | 1119 make_fixnum (save_tm.tm_year + 1900), |
1120 make_int (save_tm.tm_wday), | 1120 make_fixnum (save_tm.tm_wday), |
1121 save_tm.tm_isdst ? Qt : Qnil, | 1121 save_tm.tm_isdst ? Qt : Qnil, |
1122 (decoded_time == NULL) | 1122 (decoded_time == NULL) |
1123 ? Qnil | 1123 ? Qnil |
1124 : make_int (difftm (&save_tm, decoded_time))); | 1124 : make_fixnum (difftm (&save_tm, decoded_time))); |
1125 } | 1125 } |
1126 | 1126 |
1127 static void set_time_zone_rule (Extbyte *tzstring); | 1127 static void set_time_zone_rule (Extbyte *tzstring); |
1128 | 1128 |
1129 /* from GNU Emacs 21, per Simon Josefsson, modified by stephen | 1129 /* from GNU Emacs 21, per Simon Josefsson, modified by stephen |
1130 The slight inefficiency is justified since negative times are weird. */ | 1130 The slight inefficiency is justified since negative times are weird. */ |
1131 Lisp_Object | 1131 Lisp_Object |
1132 make_time (time_t tiempo) | 1132 make_time (time_t tiempo) |
1133 { | 1133 { |
1134 return list2 (make_int (tiempo < 0 ? tiempo / 0x10000 : tiempo >> 16), | 1134 return list2 (make_fixnum (tiempo < 0 ? tiempo / 0x10000 : tiempo >> 16), |
1135 make_int (tiempo & 0xFFFF)); | 1135 make_fixnum (tiempo & 0xFFFF)); |
1136 } | 1136 } |
1137 | 1137 |
1138 DEFUN ("encode-time", Fencode_time, 6, MANY, 0, /* | 1138 DEFUN ("encode-time", Fencode_time, 6, MANY, 0, /* |
1139 Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. | 1139 Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. |
1140 This is the reverse operation of `decode-time', which see. | 1140 This is the reverse operation of `decode-time', which see. |
1159 { | 1159 { |
1160 time_t the_time; | 1160 time_t the_time; |
1161 struct tm tm; | 1161 struct tm tm; |
1162 Lisp_Object zone = (nargs > 6) ? args[nargs - 1] : Qnil; | 1162 Lisp_Object zone = (nargs > 6) ? args[nargs - 1] : Qnil; |
1163 | 1163 |
1164 CHECK_INT (*args); tm.tm_sec = XINT (*args++); /* second */ | 1164 CHECK_FIXNUM (*args); tm.tm_sec = XFIXNUM (*args++); /* second */ |
1165 CHECK_INT (*args); tm.tm_min = XINT (*args++); /* minute */ | 1165 CHECK_FIXNUM (*args); tm.tm_min = XFIXNUM (*args++); /* minute */ |
1166 CHECK_INT (*args); tm.tm_hour = XINT (*args++); /* hour */ | 1166 CHECK_FIXNUM (*args); tm.tm_hour = XFIXNUM (*args++); /* hour */ |
1167 CHECK_INT (*args); tm.tm_mday = XINT (*args++); /* day */ | 1167 CHECK_FIXNUM (*args); tm.tm_mday = XFIXNUM (*args++); /* day */ |
1168 CHECK_INT (*args); tm.tm_mon = XINT (*args++) - 1; /* month */ | 1168 CHECK_FIXNUM (*args); tm.tm_mon = XFIXNUM (*args++) - 1; /* month */ |
1169 CHECK_INT (*args); tm.tm_year = XINT (*args++) - 1900;/* year */ | 1169 CHECK_FIXNUM (*args); tm.tm_year = XFIXNUM (*args++) - 1900;/* year */ |
1170 | 1170 |
1171 tm.tm_isdst = -1; | 1171 tm.tm_isdst = -1; |
1172 | 1172 |
1173 if (CONSP (zone)) | 1173 if (CONSP (zone)) |
1174 zone = XCAR (zone); | 1174 zone = XCAR (zone); |
1183 Extbyte *tzstring; | 1183 Extbyte *tzstring; |
1184 Extbyte **oldenv = environ, **newenv; | 1184 Extbyte **oldenv = environ, **newenv; |
1185 | 1185 |
1186 if (STRINGP (zone)) | 1186 if (STRINGP (zone)) |
1187 tzstring = LISP_STRING_TO_EXTERNAL (zone, Qtime_zone_encoding); | 1187 tzstring = LISP_STRING_TO_EXTERNAL (zone, Qtime_zone_encoding); |
1188 else if (INTP (zone)) | 1188 else if (FIXNUMP (zone)) |
1189 { | 1189 { |
1190 int abszone = abs (XINT (zone)); | 1190 int abszone = abs (XFIXNUM (zone)); |
1191 sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XINT (zone) < 0), | 1191 sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XFIXNUM (zone) < 0), |
1192 abszone / (60*60), (abszone/60) % 60, abszone % 60); | 1192 abszone / (60*60), (abszone/60) % 60, abszone % 60); |
1193 tzstring = tzbuf; | 1193 tzstring = tzbuf; |
1194 } | 1194 } |
1195 else | 1195 else |
1196 invalid_argument ("Invalid time zone specification", Qunbound); | 1196 invalid_argument ("Invalid time zone specification", Qunbound); |
1325 int am = (offset < 0 ? -offset : offset) / 60; | 1325 int am = (offset < 0 ? -offset : offset) / 60; |
1326 qxesprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, | 1326 qxesprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, |
1327 am%60); | 1327 am%60); |
1328 tem = build_istring (buf); | 1328 tem = build_istring (buf); |
1329 } | 1329 } |
1330 return list2 (make_int (offset), tem); | 1330 return list2 (make_fixnum (offset), tem); |
1331 } | 1331 } |
1332 else | 1332 else |
1333 return list2 (Qnil, Qnil); | 1333 return list2 (Qnil, Qnil); |
1334 } | 1334 } |
1335 | 1335 |
1577 CHECK_CHAR_COERCE_INT (character); | 1577 CHECK_CHAR_COERCE_INT (character); |
1578 if (NILP (count)) | 1578 if (NILP (count)) |
1579 cou = 1; | 1579 cou = 1; |
1580 else | 1580 else |
1581 { | 1581 { |
1582 CHECK_INT (count); | 1582 CHECK_FIXNUM (count); |
1583 cou = XINT (count); | 1583 cou = XFIXNUM (count); |
1584 } | 1584 } |
1585 | 1585 |
1586 charlen = set_itext_ichar (str, XCHAR (character)); | 1586 charlen = set_itext_ichar (str, XCHAR (character)); |
1587 n = cou * charlen; | 1587 n = cou * charlen; |
1588 if (n <= 0) | 1588 if (n <= 0) |
1716 { | 1716 { |
1717 c1 = TRT_TABLE_OF (trt, c1); | 1717 c1 = TRT_TABLE_OF (trt, c1); |
1718 c2 = TRT_TABLE_OF (trt, c2); | 1718 c2 = TRT_TABLE_OF (trt, c2); |
1719 } | 1719 } |
1720 if (c1 < c2) | 1720 if (c1 < c2) |
1721 return make_int (- 1 - i); | 1721 return make_fixnum (- 1 - i); |
1722 if (c1 > c2) | 1722 if (c1 > c2) |
1723 return make_int (i + 1); | 1723 return make_fixnum (i + 1); |
1724 } | 1724 } |
1725 | 1725 |
1726 /* The strings match as far as they go. | 1726 /* The strings match as far as they go. |
1727 If one is shorter, that one is less. */ | 1727 If one is shorter, that one is less. */ |
1728 if (length < len1) | 1728 if (length < len1) |
1729 return make_int (length + 1); | 1729 return make_fixnum (length + 1); |
1730 else if (length < len2) | 1730 else if (length < len2) |
1731 return make_int (- length - 1); | 1731 return make_fixnum (- length - 1); |
1732 | 1732 |
1733 /* Same length too => they are equal. */ | 1733 /* Same length too => they are equal. */ |
1734 return Qzero; | 1734 return Qzero; |
1735 } | 1735 } |
1736 | 1736 |
1960 } | 1960 } |
1961 else | 1961 else |
1962 dead_wrong_type_argument (Qstringp, table); | 1962 dead_wrong_type_argument (Qstringp, table); |
1963 end_multiple_change (buf, mc_count); | 1963 end_multiple_change (buf, mc_count); |
1964 | 1964 |
1965 return make_int (cnt); | 1965 return make_fixnum (cnt); |
1966 } | 1966 } |
1967 | 1967 |
1968 DEFUN ("delete-region", Fdelete_region, 2, 3, "r", /* | 1968 DEFUN ("delete-region", Fdelete_region, 2, 3, "r", /* |
1969 Delete the text between point and mark. | 1969 Delete the text between point and mark. |
1970 When called from a program, expects two arguments START and END | 1970 When called from a program, expects two arguments START and END |
2068 because insertion at the end of the saved region | 2068 because insertion at the end of the saved region |
2069 does not advance mh and is considered "outside" the saved region. ]] | 2069 does not advance mh and is considered "outside" the saved region. ]] |
2070 | 2070 |
2071 But that was clearly before the advent of marker-insertion-type. --ben */ | 2071 But that was clearly before the advent of marker-insertion-type. --ben */ |
2072 | 2072 |
2073 Fset_marker (bottom, make_int (BUF_BEGV (buf)), wrap_buffer (buf)); | 2073 Fset_marker (bottom, make_fixnum (BUF_BEGV (buf)), wrap_buffer (buf)); |
2074 Fset_marker (top, make_int (BUF_ZV (buf)), wrap_buffer (buf)); | 2074 Fset_marker (top, make_fixnum (BUF_ZV (buf)), wrap_buffer (buf)); |
2075 Fset_marker_insertion_type (top, Qt); | 2075 Fset_marker_insertion_type (top, Qt); |
2076 | 2076 |
2077 return noseeum_cons (wrap_buffer (buf), noseeum_cons (bottom, top)); | 2077 return noseeum_cons (wrap_buffer (buf), noseeum_cons (bottom, top)); |
2078 } | 2078 } |
2079 | 2079 |