diff options
author | Kenichi Handa <handa@m17n.org> | 2010-09-01 16:13:21 +0900 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2010-09-01 16:13:21 +0900 |
commit | 9e69cb054d5c124bdf913c82453518ac4d9d6d53 (patch) | |
tree | 95537c8c17759cef4da7241d914059d15d7dc0c4 /lisp/disp-table.el | |
parent | 0a46a12f7a484e3fab96ea2f46fa738e90dabf1c (diff) | |
parent | d419e1d94e885388b86f8753d741befa1855d333 (diff) | |
download | emacs-9e69cb054d5c124bdf913c82453518ac4d9d6d53.tar.gz |
merge changes in emacs-23 branch
Diffstat (limited to 'lisp/disp-table.el')
-rw-r--r-- | lisp/disp-table.el | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index e0d2d790f6c..e9bdd3d9be3 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -110,11 +110,27 @@ Valid symbols are `truncation', `wrap', `escape', `control', ;;;###autoload (defun standard-display-8bit (l h) - "Display characters in the range L to H literally." + "Display characters representing raw bytes in the range L to H literally. + +On a terminal display, each character in the range is displayed +by sending the corresponding byte directly to the terminal. + +On a graphic display, each character in the range is displayed +using the default font by a glyph whose code is the corresponding +byte. + +Note that ASCII printable characters (SPC to TILDA) are displayed +in the default way after this call." (or standard-display-table (setq standard-display-table (make-display-table))) + (if (> h 255) + (setq h 255)) (while (<= l h) - (aset standard-display-table l (if (or (< l ?\s) (>= l 127)) (vector l))) + (if (< l 128) + (aset standard-display-table l + (if (or (< l ?\s) (= l 127)) (vector l))) + (let ((c (unibyte-char-to-multibyte l))) + (aset standard-display-table c (vector c)))) (setq l (1+ l)))) ;;;###autoload @@ -236,9 +252,12 @@ in `.emacs'." (and (null arg) (char-table-p standard-display-table) ;; Test 161, because 160 displays as a space. - (equal (aref standard-display-table 161) [161]))) + (equal (aref standard-display-table + (unibyte-char-to-multibyte 161)) + (vector (unibyte-char-to-multibyte 161))))) (progn - (standard-display-default 160 255) + (standard-display-default + (unibyte-char-to-multibyte 160) (unibyte-char-to-multibyte 255)) (unless (or (memq window-system '(x w32 ns))) (and (terminal-coding-system) (set-terminal-coding-system nil)))) |