diff options
| author | Miles Bader | 2006-07-19 00:42:56 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-07-19 00:42:56 +0000 |
| commit | 63db3c1b3ffa669435b10aa362115ef664990ab2 (patch) | |
| tree | a62f68b147d4265ce993136af897d4f348570594 /src/editfns.c | |
| parent | 2988d6b36d310ba98ea1fed570142f436804fc18 (diff) | |
| parent | 83676aa2e399363120942ef5ea19f8af6b75e8e8 (diff) | |
| download | emacs-63db3c1b3ffa669435b10aa362115ef664990ab2.tar.gz emacs-63db3c1b3ffa669435b10aa362115ef664990ab2.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 343-356)
- Update from CVS
- Update for ERC 5.1.3.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 113-115)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-90
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/editfns.c b/src/editfns.c index d758e82bbb0..46d661452b2 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -56,6 +56,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 56 | #include "coding.h" | 56 | #include "coding.h" |
| 57 | #include "frame.h" | 57 | #include "frame.h" |
| 58 | #include "window.h" | 58 | #include "window.h" |
| 59 | #include "blockinput.h" | ||
| 59 | 60 | ||
| 60 | #ifdef STDC_HEADERS | 61 | #ifdef STDC_HEADERS |
| 61 | #include <float.h> | 62 | #include <float.h> |
| @@ -313,7 +314,7 @@ region_limit (beginningp) | |||
| 313 | if (!NILP (Vtransient_mark_mode) | 314 | if (!NILP (Vtransient_mark_mode) |
| 314 | && NILP (Vmark_even_if_inactive) | 315 | && NILP (Vmark_even_if_inactive) |
| 315 | && NILP (current_buffer->mark_active)) | 316 | && NILP (current_buffer->mark_active)) |
| 316 | Fsignal (Qmark_inactive, Qnil); | 317 | xsignal0 (Qmark_inactive); |
| 317 | 318 | ||
| 318 | m = Fmarker_position (current_buffer->mark); | 319 | m = Fmarker_position (current_buffer->mark); |
| 319 | if (NILP (m)) | 320 | if (NILP (m)) |
| @@ -1300,7 +1301,9 @@ with that uid, or nil if there is no such user. */) | |||
| 1300 | return Vuser_login_name; | 1301 | return Vuser_login_name; |
| 1301 | 1302 | ||
| 1302 | CHECK_NUMBER (uid); | 1303 | CHECK_NUMBER (uid); |
| 1304 | BLOCK_INPUT; | ||
| 1303 | pw = (struct passwd *) getpwuid (XINT (uid)); | 1305 | pw = (struct passwd *) getpwuid (XINT (uid)); |
| 1306 | UNBLOCK_INPUT; | ||
| 1304 | return (pw ? build_string (pw->pw_name) : Qnil); | 1307 | return (pw ? build_string (pw->pw_name) : Qnil); |
| 1305 | } | 1308 | } |
| 1306 | 1309 | ||
| @@ -1354,9 +1357,17 @@ name, or nil if there is no such user. */) | |||
| 1354 | if (NILP (uid)) | 1357 | if (NILP (uid)) |
| 1355 | return Vuser_full_name; | 1358 | return Vuser_full_name; |
| 1356 | else if (NUMBERP (uid)) | 1359 | else if (NUMBERP (uid)) |
| 1357 | pw = (struct passwd *) getpwuid ((uid_t) XFLOATINT (uid)); | 1360 | { |
| 1361 | BLOCK_INPUT; | ||
| 1362 | pw = (struct passwd *) getpwuid ((uid_t) XFLOATINT (uid)); | ||
| 1363 | UNBLOCK_INPUT; | ||
| 1364 | } | ||
| 1358 | else if (STRINGP (uid)) | 1365 | else if (STRINGP (uid)) |
| 1359 | pw = (struct passwd *) getpwnam (SDATA (uid)); | 1366 | { |
| 1367 | BLOCK_INPUT; | ||
| 1368 | pw = (struct passwd *) getpwnam (SDATA (uid)); | ||
| 1369 | UNBLOCK_INPUT; | ||
| 1370 | } | ||
| 1360 | else | 1371 | else |
| 1361 | error ("Invalid UID specification"); | 1372 | error ("Invalid UID specification"); |
| 1362 | 1373 | ||
| @@ -1467,7 +1478,7 @@ systems that do not provide resolution finer than a second. */) | |||
| 1467 | 1478 | ||
| 1468 | if (getrusage (RUSAGE_SELF, &usage) < 0) | 1479 | if (getrusage (RUSAGE_SELF, &usage) < 0) |
| 1469 | /* This shouldn't happen. What action is appropriate? */ | 1480 | /* This shouldn't happen. What action is appropriate? */ |
| 1470 | Fsignal (Qerror, Qnil); | 1481 | xsignal0 (Qerror); |
| 1471 | 1482 | ||
| 1472 | /* Sum up user time and system time. */ | 1483 | /* Sum up user time and system time. */ |
| 1473 | secs = usage.ru_utime.tv_sec + usage.ru_stime.tv_sec; | 1484 | secs = usage.ru_utime.tv_sec + usage.ru_stime.tv_sec; |
| @@ -2127,7 +2138,6 @@ general_insert_function (insert_func, insert_from_string_func, | |||
| 2127 | for (argnum = 0; argnum < nargs; argnum++) | 2138 | for (argnum = 0; argnum < nargs; argnum++) |
| 2128 | { | 2139 | { |
| 2129 | val = args[argnum]; | 2140 | val = args[argnum]; |
| 2130 | retry: | ||
| 2131 | if (INTEGERP (val)) | 2141 | if (INTEGERP (val)) |
| 2132 | { | 2142 | { |
| 2133 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 2143 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| @@ -2152,10 +2162,7 @@ general_insert_function (insert_func, insert_from_string_func, | |||
| 2152 | inherit); | 2162 | inherit); |
| 2153 | } | 2163 | } |
| 2154 | else | 2164 | else |
| 2155 | { | 2165 | wrong_type_argument (Qchar_or_string_p, val); |
| 2156 | val = wrong_type_argument (Qchar_or_string_p, val); | ||
| 2157 | goto retry; | ||
| 2158 | } | ||
| 2159 | } | 2166 | } |
| 2160 | } | 2167 | } |
| 2161 | 2168 | ||
| @@ -4011,7 +4018,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 4011 | /* Likewise adjust the property end position. */ | 4018 | /* Likewise adjust the property end position. */ |
| 4012 | pos = XINT (XCAR (XCDR (item))); | 4019 | pos = XINT (XCAR (XCDR (item))); |
| 4013 | 4020 | ||
| 4014 | for (; bytepos < pos; bytepos++) | 4021 | for (; position < pos; bytepos++) |
| 4015 | { | 4022 | { |
| 4016 | if (! discarded[bytepos]) | 4023 | if (! discarded[bytepos]) |
| 4017 | position++, translated++; | 4024 | position++, translated++; |