comparison src/editfns.c @ 40981:fee88c193206

(Fuser_real_login_name): Reindent. (Finsert_buffer_substring): Likewise. (Fcompare_buffer_substrings): Likewise. (Fsubst_char_in_region): Likewise.
author Pavel Jan?k <Pavel@Janik.cz>
date Tue, 13 Nov 2001 06:58:58 +0000
parents d51d2fa675d0
children 07a4ff5f0909
comparison
equal deleted inserted replaced
40980:9f8aa681e00b 40981:fee88c193206
1207 pw = (struct passwd *) getpwuid (XINT (uid)); 1207 pw = (struct passwd *) getpwuid (XINT (uid));
1208 return (pw ? build_string (pw->pw_name) : Qnil); 1208 return (pw ? build_string (pw->pw_name) : Qnil);
1209 } 1209 }
1210 1210
1211 DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name, 1211 DEFUN ("user-real-login-name", Fuser_real_login_name, Suser_real_login_name,
1212 0, 0, 0, 1212 0, 0, 0,
1213 doc: /* Return the name of the user's real uid, as a string. 1213 doc: /* Return the name of the user's real uid, as a string.
1214 This ignores the environment variables LOGNAME and USER, so it differs from 1214 This ignores the environment variables LOGNAME and USER, so it differs from
1215 `user-login-name' when running under `su'. */) 1215 `user-login-name' when running under `su'. */)
1216 () 1216 ()
1217 { 1217 {
2302 { 2302 {
2303 return make_buffer_string (BEGV, ZV, 1); 2303 return make_buffer_string (BEGV, ZV, 1);
2304 } 2304 }
2305 2305
2306 DEFUN ("insert-buffer-substring", Finsert_buffer_substring, Sinsert_buffer_substring, 2306 DEFUN ("insert-buffer-substring", Finsert_buffer_substring, Sinsert_buffer_substring,
2307 1, 3, 0, 2307 1, 3, 0,
2308 doc: /* Insert before point a substring of the contents of buffer BUFFER. 2308 doc: /* Insert before point a substring of the contents of buffer BUFFER.
2309 BUFFER may be a buffer or a buffer name. 2309 BUFFER may be a buffer or a buffer name.
2310 Arguments START and END are character numbers specifying the substring. 2310 Arguments START and END are character numbers specifying the substring.
2311 They default to the beginning and the end of BUFFER. */) 2311 They default to the beginning and the end of BUFFER. */)
2312 (buf, start, end) 2312 (buf, start, end)
2352 insert_from_buffer (bp, b, e - b, 0); 2352 insert_from_buffer (bp, b, e - b, 0);
2353 return Qnil; 2353 return Qnil;
2354 } 2354 }
2355 2355
2356 DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings, 2356 DEFUN ("compare-buffer-substrings", Fcompare_buffer_substrings, Scompare_buffer_substrings,
2357 6, 6, 0, 2357 6, 6, 0,
2358 doc: /* Compare two substrings of two buffers; return result as number. 2358 doc: /* Compare two substrings of two buffers; return result as number.
2359 the value is -N if first string is less after N-1 chars, 2359 the value is -N if first string is less after N-1 chars,
2360 +N if first string is greater after N-1 chars, or 0 if strings match. 2360 +N if first string is greater after N-1 chars, or 0 if strings match.
2361 Each substring is represented as three arguments: BUFFER, START and END. 2361 Each substring is represented as three arguments: BUFFER, START and END.
2362 That makes six args in all, three for each substring. 2362 That makes six args in all, three for each substring.
2524 { 2524 {
2525 return current_buffer->filename = arg; 2525 return current_buffer->filename = arg;
2526 } 2526 }
2527 2527
2528 DEFUN ("subst-char-in-region", Fsubst_char_in_region, 2528 DEFUN ("subst-char-in-region", Fsubst_char_in_region,
2529 Ssubst_char_in_region, 4, 5, 0, 2529 Ssubst_char_in_region, 4, 5, 0,
2530 doc: /* From START to END, replace FROMCHAR with TOCHAR each time it occurs. 2530 doc: /* From START to END, replace FROMCHAR with TOCHAR each time it occurs.
2531 If optional arg NOUNDO is non-nil, don't record this change for undo 2531 If optional arg NOUNDO is non-nil, don't record this change for undo
2532 and don't mark the buffer as really changed. 2532 and don't mark the buffer as really changed.
2533 Both characters must have the same length of multi-byte form. */) 2533 Both characters must have the same length of multi-byte form. */)
2534 (start, end, fromchar, tochar, noundo) 2534 (start, end, fromchar, tochar, noundo)