Mercurial > emacs
comparison lisp/simple.el @ 83404:69e184bbba16
Merged from miles@gnu.org--gnu-2005 (patch 656-658)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-656
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-657
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-658
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-444
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 23 Nov 2005 01:35:21 +0000 |
parents | 03335deca80b ac8622e9be6d |
children | 1955a4462bf9 |
comparison
equal
deleted
inserted
replaced
83403:51eb0aa362f3 | 83404:69e184bbba16 |
---|---|
891 "" | 891 "" |
892 (format " Hscroll=%d" (window-hscroll)))) | 892 (format " Hscroll=%d" (window-hscroll)))) |
893 (col (current-column))) | 893 (col (current-column))) |
894 (if (= pos end) | 894 (if (= pos end) |
895 (if (or (/= beg 1) (/= end (1+ total))) | 895 (if (or (/= beg 1) (/= end (1+ total))) |
896 (message "point=%d of %d (%d%%) <%d - %d> column %d %s" | 896 (message "point=%d of %d (%d%%) <%d-%d> column=%d%s" |
897 pos total percent beg end col hscroll) | 897 pos total percent beg end col hscroll) |
898 (message "point=%d of %d (EOB) column %d %s" | 898 (message "point=%d of %d (EOB) column=%d%s" |
899 pos total col hscroll)) | 899 pos total col hscroll)) |
900 (let ((coding buffer-file-coding-system) | 900 (let ((coding buffer-file-coding-system) |
901 encoded encoding-msg display-prop under-display) | 901 encoded encoding-msg display-prop under-display) |
902 (if (or (not coding) | 902 (if (or (not coding) |
903 (eq (coding-system-type coding) t)) | 903 (eq (coding-system-type coding) t)) |
904 (setq coding default-buffer-file-coding-system)) | 904 (setq coding default-buffer-file-coding-system)) |
905 (if (not (char-valid-p char)) | 905 (if (not (char-valid-p char)) |
906 (setq encoding-msg | 906 (setq encoding-msg |
907 (format "(0%o, %d, 0x%x, invalid)" char char char)) | 907 (format "(%d, #o%o, #x%x, invalid)" char char char)) |
908 ;; Check if the character is displayed with some `display' | 908 ;; Check if the character is displayed with some `display' |
909 ;; text property. In that case, set under-display to the | 909 ;; text property. In that case, set under-display to the |
910 ;; buffer substring covered by that property. | 910 ;; buffer substring covered by that property. |
911 (setq display-prop (get-text-property pos 'display)) | 911 (setq display-prop (get-text-property pos 'display)) |
912 (if display-prop | 912 (if display-prop |
921 under-display))) | 921 under-display))) |
922 (setq encoded (and (>= char 128) (encode-coding-char char coding)))) | 922 (setq encoded (and (>= char 128) (encode-coding-char char coding)))) |
923 (setq encoding-msg | 923 (setq encoding-msg |
924 (if display-prop | 924 (if display-prop |
925 (if (not (stringp display-prop)) | 925 (if (not (stringp display-prop)) |
926 (format "(0%o, %d, 0x%x, part of display \"%s\")" | 926 (format "(%d, #o%o, #x%x, part of display \"%s\")" |
927 char char char under-display) | 927 char char char under-display) |
928 (format "(0%o, %d, 0x%x, part of display \"%s\"->\"%s\")" | 928 (format "(%d, #o%o, #x%x, part of display \"%s\"->\"%s\")" |
929 char char char under-display display-prop)) | 929 char char char under-display display-prop)) |
930 (if encoded | 930 (if encoded |
931 (format "(0%o, %d, 0x%x, file %s)" | 931 (format "(%d, #o%o, #x%x, file %s)" |
932 char char char | 932 char char char |
933 (if (> (length encoded) 1) | 933 (if (> (length encoded) 1) |
934 "..." | 934 "..." |
935 (encoded-string-description encoded coding))) | 935 (encoded-string-description encoded coding))) |
936 (format "(0%o, %d, 0x%x)" char char char))))) | 936 (format "(%d, #o%o, #x%x)" char char char))))) |
937 (if detail | 937 (if detail |
938 ;; We show the detailed information about CHAR. | 938 ;; We show the detailed information about CHAR. |
939 (describe-char (point))) | 939 (describe-char (point))) |
940 (if (or (/= beg 1) (/= end (1+ total))) | 940 (if (or (/= beg 1) (/= end (1+ total))) |
941 (message "Char: %s %s point=%d of %d (%d%%) <%d - %d> column %d %s" | 941 (message "Char: %s %s point=%d of %d (%d%%) <%d-%d> column=%d%s" |
942 (if (< char 256) | 942 (if (< char 256) |
943 (single-key-description char) | 943 (single-key-description char) |
944 (buffer-substring-no-properties (point) (1+ (point)))) | 944 (buffer-substring-no-properties (point) (1+ (point)))) |
945 encoding-msg pos total percent beg end col hscroll) | 945 encoding-msg pos total percent beg end col hscroll) |
946 (message "Char: %s %s point=%d of %d (%d%%) column %d %s" | 946 (message "Char: %s %s point=%d of %d (%d%%) column=%d%s" |
947 (if enable-multibyte-characters | 947 (if enable-multibyte-characters |
948 (if (< char 128) | 948 (if (< char 128) |
949 (single-key-description char) | 949 (single-key-description char) |
950 (buffer-substring-no-properties (point) (1+ (point)))) | 950 (buffer-substring-no-properties (point) (1+ (point)))) |
951 (single-key-description char)) | 951 (single-key-description char)) |
4318 (let ((syntax (syntax-after blinkpos))) | 4318 (let ((syntax (syntax-after blinkpos))) |
4319 (and (consp syntax) | 4319 (and (consp syntax) |
4320 (eq (syntax-class syntax) 4) | 4320 (eq (syntax-class syntax) 4) |
4321 (cdr syntax))))) | 4321 (cdr syntax))))) |
4322 (cond | 4322 (cond |
4323 ((not (eq matching-paren (char-before oldpos))) | 4323 ((not (or (eq matching-paren (char-before oldpos)) |
4324 ;; The cdr might hold a new paren-class info rather than | |
4325 ;; a matching-char info, in which case the two CDRs | |
4326 ;; should match. | |
4327 (eq matching-paren (cdr (syntax-after oldpos))))) | |
4324 (message "Mismatched parentheses")) | 4328 (message "Mismatched parentheses")) |
4325 ((not blinkpos) | 4329 ((not blinkpos) |
4326 (if (not blink-matching-paren-distance) | 4330 (if (not blink-matching-paren-distance) |
4327 (message "Unmatched parenthesis"))) | 4331 (message "Unmatched parenthesis"))) |
4328 ((pos-visible-in-window-p blinkpos) | 4332 ((pos-visible-in-window-p blinkpos) |