/[emacs]/emacs/lisp/gnus/mm-util.el
ViewVC logotype

Diff of /emacs/lisp/gnus/mm-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by fx, Fri Oct 18 11:02:20 2002 UTC revision 1.27 by lektu, Tue Feb 4 13:06:38 2003 UTC
# Line 128  Line 128 
128         '((iso-8859-15 . iso-8859-1)))         '((iso-8859-15 . iso-8859-1)))
129      ;; Windows-1252 is actually a superset of Latin-1.  See also      ;; Windows-1252 is actually a superset of Latin-1.  See also
130      ;; `gnus-article-dumbquotes-map'.      ;; `gnus-article-dumbquotes-map'.
131      ,@(unless (mm-coding-system-p 'windows-1252)              ,@(unless (mm-coding-system-p 'windows-1252)
132         (if (mm-coding-system-p 'cp1252)         (if (mm-coding-system-p 'cp1252)
133             '((windows-1252 . cp1252))             '((windows-1252 . cp1252))
134           '((windows-1252 . iso-8859-1))))           '((windows-1252 . iso-8859-1))))
# Line 263  Valid elements include: Line 263  Valid elements include:
263  `iso-2022-jp-2'  convert ISO-2022-jp to ISO-2022-jp-2 if ISO-2022-jp-2 exists."  `iso-2022-jp-2'  convert ISO-2022-jp to ISO-2022-jp-2 if ISO-2022-jp-2 exists."
264  )  )
265    
266  (defvar mm-iso-8859-15-compatible  (defvar mm-iso-8859-15-compatible
267    '((iso-8859-1 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE")    '((iso-8859-1 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE")
268      (iso-8859-9 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE\xD0\xDD\xDE\xF0\xFD\xFE"))      (iso-8859-9 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE\xD0\xDD\xDE\xF0\xFD\xFE"))
269    "ISO-8859-15 exchangeable coding systems and inconvertible characters.")    "ISO-8859-15 exchangeable coding systems and inconvertible characters.")
# Line 271  Valid elements include: Line 271  Valid elements include:
271  (defvar mm-iso-8859-x-to-15-table  (defvar mm-iso-8859-x-to-15-table
272    (and (fboundp 'coding-system-p)    (and (fboundp 'coding-system-p)
273         (mm-coding-system-p 'iso-8859-15)         (mm-coding-system-p 'iso-8859-15)
274         (mapcar         (mapcar
275          (lambda (cs)          (lambda (cs)
276            (if (mm-coding-system-p (car cs))            (if (mm-coding-system-p (car cs))
277                (let ((c (string-to-char                (let ((c (string-to-char
278                          (decode-coding-string "\341" (car cs)))))                          (decode-coding-string "\341" (car cs)))))
279                  (cons (char-charset c)                  (cons (char-charset c)
280                        (cons                        (cons
281                         (- (string-to-char                         (- (string-to-char
282                             (decode-coding-string "\341" 'iso-8859-15)) c)                             (decode-coding-string "\341" 'iso-8859-15)) c)
283                         (string-to-list (decode-coding-string (car (cdr cs))                         (string-to-list (decode-coding-string (car (cdr cs))
284                                                               (car cs))))))                                                               (car cs))))))
285              '(gnus-charset 0)))              '(gnus-charset 0)))
286          mm-iso-8859-15-compatible))          mm-iso-8859-15-compatible))
# Line 479  If the charset is `composition', return Line 479  If the charset is `composition', return
479            (goto-char (point-min))            (goto-char (point-min))
480            (skip-chars-forward "\0-\177")            (skip-chars-forward "\0-\177")
481            (while (not (eobp))            (while (not (eobp))
482              (cond              (cond
483               ((not (setq item (assq (char-charset (setq c (char-after)))               ((not (setq item (assq (char-charset (setq c (char-after)))
484                                      mm-iso-8859-x-to-15-table)))                                      mm-iso-8859-x-to-15-table)))
485                (forward-char))                (forward-char))
486               ((memq c (cdr (cdr item)))               ((memq c (cdr (cdr item)))
# Line 507  charset, and a longer list means no appr Line 507  charset, and a longer list means no appr
507               ;; system that has one.               ;; system that has one.
508               (let ((systems (find-coding-systems-region b e)))               (let ((systems (find-coding-systems-region b e)))
509                 (when mm-coding-system-priorities                 (when mm-coding-system-priorities
510                   (setq systems                   (setq systems
511                         (sort systems 'mm-sort-coding-systems-predicate)))                         (sort systems 'mm-sort-coding-systems-predicate)))
512                 ;; Fixme: The `mime-charset' (`x-ctext') of `compound-text'                 ;; Fixme: The `mime-charset' (`x-ctext') of `compound-text'
513                 ;; is not in the IANA list.                 ;; is not in the IANA list.
# Line 523  charset, and a longer list means no appr Line 523  charset, and a longer list means no appr
523                 charsets))                 charsets))
524          ;; Otherwise we're not multibyte, XEmacs or a single coding          ;; Otherwise we're not multibyte, XEmacs or a single coding
525          ;; system won't cover it.          ;; system won't cover it.
526          (setq charsets          (setq charsets
527                (mm-delete-duplicates                (mm-delete-duplicates
528                 (mapcar 'mm-mime-charset                 (mapcar 'mm-mime-charset
529                         (delq 'ascii                         (delq 'ascii
# Line 552  Also bind `default-enable-multibyte-char Line 552  Also bind `default-enable-multibyte-char
552  Equivalent to `progn' in XEmacs"  Equivalent to `progn' in XEmacs"
553    (let ((multibyte (make-symbol "multibyte"))    (let ((multibyte (make-symbol "multibyte"))
554          (buffer (make-symbol "buffer")))          (buffer (make-symbol "buffer")))
555      `(if mm-emacs-mule      `(if mm-emacs-mule
556           (let ((,multibyte enable-multibyte-characters)           (let ((,multibyte enable-multibyte-characters)
557                 (,buffer (current-buffer)))                 (,buffer (current-buffer)))
558             (unwind-protect             (unwind-protect

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26