diff options
| author | Kenichi Handa | 2001-01-09 02:30:03 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2001-01-09 02:30:03 +0000 |
| commit | e6cddb1aa28852c4adeec420f5c9b54d703ba2e0 (patch) | |
| tree | 492093b0c9b69d1fbbbd6da44e44b979e2abc59d | |
| parent | 134d6265c7c0b8f861bcfaa587a96e908ca91211 (diff) | |
| download | emacs-e6cddb1aa28852c4adeec420f5c9b54d703ba2e0.tar.gz emacs-e6cddb1aa28852c4adeec420f5c9b54d703ba2e0.zip | |
(make-coding-system): If the coding system
accepts extra latin codes, register such codes as safe for the
coding system.
| -rw-r--r-- | lisp/international/mule.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 89f2e02727a..5228464ab82 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -716,6 +716,7 @@ a value of `safe-charsets' in PLIST." | |||
| 716 | (let ((coding-spec (make-vector 5 nil)) | 716 | (let ((coding-spec (make-vector 5 nil)) |
| 717 | (no-initial-designation t) | 717 | (no-initial-designation t) |
| 718 | (no-alternative-designation t) | 718 | (no-alternative-designation t) |
| 719 | (accept-latin-extra-code nil) | ||
| 719 | coding-category) | 720 | coding-category) |
| 720 | (if (or (not (integerp type)) (< type 0) (> type 5)) | 721 | (if (or (not (integerp type)) (< type 0) (> type 5)) |
| 721 | (error "TYPE argument must be 0..5")) | 722 | (error "TYPE argument must be 0..5")) |
| @@ -763,6 +764,9 @@ a value of `safe-charsets' in PLIST." | |||
| 763 | (setq fl (cdr fl) i (1+ i))) | 764 | (setq fl (cdr fl) i (1+ i))) |
| 764 | (while (and (< i 32) fl) | 765 | (while (and (< i 32) fl) |
| 765 | (aset vec i (car fl)) | 766 | (aset vec i (car fl)) |
| 767 | (if (and (= i 16) ; ACCEPT-LATIN-EXTRA-CODE | ||
| 768 | (car fl)) | ||
| 769 | (setq accept-latin-extra-code t)) | ||
| 766 | (setq fl (cdr fl) i (1+ i))) | 770 | (setq fl (cdr fl) i (1+ i))) |
| 767 | (aset coding-spec 4 vec) | 771 | (aset coding-spec 4 vec) |
| 768 | (setq coding-category | 772 | (setq coding-category |
| @@ -839,7 +843,13 @@ a value of `safe-charsets' in PLIST." | |||
| 839 | (aset safe-chars i t) | 843 | (aset safe-chars i t) |
| 840 | (setq i (1+ i))))) | 844 | (setq i (1+ i))))) |
| 841 | (t | 845 | (t |
| 842 | (aset safe-chars (make-char charset) t))))) | 846 | (aset safe-chars (make-char charset) t)))) |
| 847 | (if accept-latin-extra-code | ||
| 848 | (let ((i 128)) | ||
| 849 | (while (< i 160) | ||
| 850 | (if (aref latin-extra-code-table i) | ||
| 851 | (aset safe-chars i t)) | ||
| 852 | (setq i (1+ i)))))) | ||
| 843 | (setq l (cons (cons 'safe-chars safe-chars) l)))) | 853 | (setq l (cons (cons 'safe-chars safe-chars) l)))) |
| 844 | (while l | 854 | (while l |
| 845 | (setq prop (car (car l)) val (cdr (car l)) l (cdr l)) | 855 | (setq prop (car (car l)) val (cdr (car l)) l (cdr l)) |