comparison src/editfns.c @ 25608:1cdab17df2b3

(Fbufsize): Accept an extra BUFFER parameter.
author Richard M. Stallman <rms@gnu.org>
date Wed, 08 Sep 1999 07:56:20 +0000
parents b9b4581adf36
children 157f0e91232e
comparison
equal deleted inserted replaced
25607:e1f5592218c1 25608:1cdab17df2b3
425 425
426 val = Fprogn (args); 426 val = Fprogn (args);
427 return unbind_to (count, val); 427 return unbind_to (count, val);
428 } 428 }
429 429
430 DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 0, 0, 430 DEFUN ("buffer-size", Fbufsize, Sbufsize, 0, 1, 0,
431 "Return the number of characters in the current buffer.") 431 "Return the number of characters in the current buffer.\n\
432 () 432 If BUFFER, return the number of characters in that buffer instead.")
433 { 433 (buffer)
434 Lisp_Object temp; 434 Lisp_Object buffer;
435 XSETFASTINT (temp, Z - BEG); 435 {
436 return temp; 436 if (NILP (buffer))
437 return make_number (Z - BEG);
438 else {
439 CHECK_BUFFER (buffer, 1);
440 return make_number (BUF_Z (XBUFFER (buffer)) - BUF_BEG (XBUFFER (buffer)));
441 }
437 } 442 }
438 443
439 DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0, 444 DEFUN ("point-min", Fpoint_min, Spoint_min, 0, 0, 0,
440 "Return the minimum permissible value of point in the current buffer.\n\ 445 "Return the minimum permissible value of point in the current buffer.\n\
441 This is 1, unless narrowing (a buffer restriction) is in effect.") 446 This is 1, unless narrowing (a buffer restriction) is in effect.")