comparison lisp/simple.el @ 23963:c242e2dc93a9

(what-cursor-position): Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Wed, 30 Dec 1998 20:41:24 +0000
parents b5617ede97a8
children 7ffc86429459
comparison
equal deleted inserted replaced
23962:5ab992b6ca59 23963:c242e2dc93a9
482 done))) 482 done)))
483 (- (buffer-size) (forward-line (buffer-size))))))) 483 (- (buffer-size) (forward-line (buffer-size)))))))
484 484
485 (defun what-cursor-position (&optional detail) 485 (defun what-cursor-position (&optional detail)
486 "Print info on cursor position (on screen and within buffer). 486 "Print info on cursor position (on screen and within buffer).
487 With prefix argument, print detailed info of a character on cursor position. 487 Also describe the character after point, and give its character code
488 488 in octal, decimal and hex. For a non-ASCII multibyte character,
489 For the detailed information, Emacs internal character code, Emacs 489 also give its encoding in the buffer's selected coding system,
490 internal character components (the character set name and position 490 if any.
491 code(s)), and the corresponding external character components (the 491
492 external character set name and external character code(s)) are shown 492 With prefix argument, print additional details about that character,
493 in this order. 493 instead of the cursor position. This includes the character set name,
494 the codes that identify the character within that character set,
495 and the corresponding external character components.
494 496
495 Each language environment may show different external character components." 497 Each language environment may show different external character components."
496 (interactive "P") 498 (interactive "P")
497 (let* ((char (following-char)) 499 (let* ((char (following-char))
498 (beg (point-min)) 500 (beg (point-min))
523 (not (and (= (length encoding) 1) 525 (not (and (= (length encoding) 1)
524 (= (aref encoding 0) char)))) 526 (= (aref encoding 0) char))))
525 (format "(0%o, %d, 0x%x, ext %s)" 527 (format "(0%o, %d, 0x%x, ext %s)"
526 char char char 528 char char char
527 encoding-string-hex) 529 encoding-string-hex)
528 (format "(%s, %s, %s)" 530 (format "(0%o, %d, 0x%x)"
529 encoding-string-oct 531 char char char))))
530 encoding-string-dec
531 encoding-string-hex))))
532 (if detail 532 (if detail
533 (let* ((internal (split-char char)) 533 (let* ((internal (split-char char))
534 (charset (char-charset char)) 534 (charset (char-charset char))
535 (slot (assq charset charset-origin-alist)) 535 (slot (assq charset charset-origin-alist))
536 external) 536 external)