comparison src/editfns.c @ 78:c7528f8e288d r20-0b34

Import from CVS: tag r20-0b34
author cvs
date Mon, 13 Aug 2007 09:05:42 +0200
parents 131b0175ea99
children fe104dbd9147
comparison
equal deleted inserted replaced
77:6cb4f478e7bc 78:c7528f8e288d
547 struct buffer *b = decode_buffer (buffer, 1); 547 struct buffer *b = decode_buffer (buffer, 1);
548 return buildmark (BUF_ZV (b), make_buffer (b)); 548 return buildmark (BUF_ZV (b), make_buffer (b));
549 } 549 }
550 550
551 DEFUN ("following-char", Ffollowing_char, 0, 1, 0, /* 551 DEFUN ("following-char", Ffollowing_char, 0, 1, 0, /*
552 Return the character following point, as a number. 552 Return the character following point.
553 At the end of the buffer or accessible region, return 0. 553 At the end of the buffer or accessible region, return 0.
554 If BUFFER is nil, the current buffer is assumed. 554 If BUFFER is nil, the current buffer is assumed.
555 */ 555 */
556 (buffer)) 556 (buffer))
557 { 557 {
561 else 561 else
562 return (make_char (BUF_FETCH_CHAR (b, BUF_PT (b)))); 562 return (make_char (BUF_FETCH_CHAR (b, BUF_PT (b))));
563 } 563 }
564 564
565 DEFUN ("preceding-char", Fpreceding_char, 0, 1, 0, /* 565 DEFUN ("preceding-char", Fpreceding_char, 0, 1, 0, /*
566 Return the character preceding point, as a number. 566 Return the character preceding point.
567 At the beginning of the buffer or accessible region, return 0. 567 At the beginning of the buffer or accessible region, return 0.
568 If BUFFER is nil, the current buffer is assumed. 568 If BUFFER is nil, the current buffer is assumed.
569 */ 569 */
570 (buffer)) 570 (buffer))
571 { 571 {
582 If BUFFER is nil, the current buffer is assumed. 582 If BUFFER is nil, the current buffer is assumed.
583 */ 583 */
584 (buffer)) 584 (buffer))
585 { 585 {
586 struct buffer *b = decode_buffer (buffer, 1); 586 struct buffer *b = decode_buffer (buffer, 1);
587 if (BUF_PT (b) == BUF_BEGV (b)) 587 return BUF_PT (b) == BUF_BEGV (b) ? Qt : Qnil;
588 return Qt;
589 return Qnil;
590 } 588 }
591 589
592 DEFUN ("eobp", Feobp, 0, 1, 0, /* 590 DEFUN ("eobp", Feobp, 0, 1, 0, /*
593 Return T if point is at the end of the buffer. 591 Return T if point is at the end of the buffer.
594 If the buffer is narrowed, this means the end of the narrowed part. 592 If the buffer is narrowed, this means the end of the narrowed part.
595 If BUFFER is nil, the current buffer is assumed. 593 If BUFFER is nil, the current buffer is assumed.
596 */ 594 */
597 (buffer)) 595 (buffer))
598 { 596 {
599 struct buffer *b = decode_buffer (buffer, 1); 597 struct buffer *b = decode_buffer (buffer, 1);
600 if (BUF_PT (b) == BUF_ZV (b)) 598 return BUF_PT (b) == BUF_ZV (b) ? Qt : Qnil;
601 return Qt;
602 return Qnil;
603 } 599 }
604 600
605 int 601 int
606 beginning_of_line_p (struct buffer *b, Bufpos pt) 602 beginning_of_line_p (struct buffer *b, Bufpos pt)
607 { 603 {