comparison src/character.c @ 94114:327f7207ff7e

(Fchar_bytes, Fchar_width, Fstring_width, Fchar_direction): Add usage in the docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 16 Apr 2008 11:36:29 +0000
parents 88d1a8b0752e
children 096ad76b9ccf
comparison
equal deleted inserted replaced
94113:d4c7a819cf48 94114:327f7207ff7e
362 return make_number (c); 362 return make_number (c);
363 } 363 }
364 364
365 DEFUN ("char-bytes", Fchar_bytes, Schar_bytes, 1, 1, 0, 365 DEFUN ("char-bytes", Fchar_bytes, Schar_bytes, 1, 1, 0,
366 doc: /* Return 1 regardless of the argument CHAR. 366 doc: /* Return 1 regardless of the argument CHAR.
367 This is now an obsolete function. We keep it just for backward compatibility. */) 367 This is now an obsolete function. We keep it just for backward compatibility.
368 usage: (char-bytes CHAR) */)
368 (ch) 369 (ch)
369 Lisp_Object ch; 370 Lisp_Object ch;
370 { 371 {
371 CHECK_CHARACTER (ch); 372 CHECK_CHARACTER (ch);
372 return make_number (1); 373 return make_number (1);
373 } 374 }
374 375
375 DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0, 376 DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0,
376 doc: /* Return width of CHAR when displayed in the current buffer. 377 doc: /* Return width of CHAR when displayed in the current buffer.
377 The width is measured by how many columns it occupies on the screen. 378 The width is measured by how many columns it occupies on the screen.
378 Tab is taken to occupy `tab-width' columns. */) 379 Tab is taken to occupy `tab-width' columns.
380 usage: (char-width CHAR) */)
379 (ch) 381 (ch)
380 Lisp_Object ch; 382 Lisp_Object ch;
381 { 383 {
382 Lisp_Object disp; 384 Lisp_Object disp;
383 int c, width; 385 int c, width;
550 doc: /* Return width of STRING when displayed in the current buffer. 552 doc: /* Return width of STRING when displayed in the current buffer.
551 Width is measured by how many columns it occupies on the screen. 553 Width is measured by how many columns it occupies on the screen.
552 When calculating width of a multibyte character in STRING, 554 When calculating width of a multibyte character in STRING,
553 only the base leading-code is considered; the validity of 555 only the base leading-code is considered; the validity of
554 the following bytes is not checked. Tabs in STRING are always 556 the following bytes is not checked. Tabs in STRING are always
555 taken to occupy `tab-width' columns. */) 557 taken to occupy `tab-width' columns.
558 usage: (string-width STRING) */)
556 (str) 559 (str)
557 Lisp_Object str; 560 Lisp_Object str;
558 { 561 {
559 Lisp_Object val; 562 Lisp_Object val;
560 563
563 return val; 566 return val;
564 } 567 }
565 568
566 DEFUN ("char-direction", Fchar_direction, Schar_direction, 1, 1, 0, 569 DEFUN ("char-direction", Fchar_direction, Schar_direction, 1, 1, 0,
567 doc: /* Return the direction of CHAR. 570 doc: /* Return the direction of CHAR.
568 The returned value is 0 for left-to-right and 1 for right-to-left. */) 571 The returned value is 0 for left-to-right and 1 for right-to-left.
572 usage: (char-direction CHAR) */)
569 (ch) 573 (ch)
570 Lisp_Object ch; 574 Lisp_Object ch;
571 { 575 {
572 int c; 576 int c;
573 577