From 91edf3728f7649f98a1366340c21b8187f955791 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Sun, 28 Oct 2001 16:00:46 +0000 Subject: [PATCH] (mac-roman): Add mime-charset. ("UTF-8"): New language environment. (file-coding-system-alist): Add an entry for utf-8. --- lisp/language/european.el | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/lisp/language/european.el b/lisp/language/european.el index a8b15002526..220aba0685e 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el @@ -1,4 +1,4 @@ -;;; european.el --- European languages -*- coding: iso-2022-7bit; -*- +;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -525,7 +525,38 @@ and it selects the Dutch tutorial.")) 'mac-roman 4 ?M "Mac Roman Encoding" '(decode-mac-roman . encode-mac-roman) '((safe-chars . mac-roman-encoder) - (valid-codes (0 . 255)))) + (valid-codes (0 . 255)) + (mime-charset . macintosh))) ; per IANA, rfc1345 + +;; Probably not the best place for this... +(set-language-info-alist + "UTF-8" `((coding-system utf-8) ; could be from Mule-UCS + (coding-priority mule-utf-8) + ;; Is this necessary/appropriate? + (charset ,@(coding-system-get 'utf-8 'safe-charsets)) + ;; NB. Emacs 21.1's `set-language-environment' needs + ;; fixing to allow lambdas here. + (setup-function + . (lambda () + ;; Use Unicode font under Windows. Jason Rumney fecit. + (if (and (fboundp 'w32-add-charset-info) + (not (boundp 'w32-unicode-charset-defined))) + (w32-add-charset-info "iso10646-1" 'w32-charset-ansi t)))) + (exit-function + . (lambda () + (if (and (fboundp 'w32-add-charset-info) + (not (boundp 'w32-unicode-charset-defined))) + (setq w32-charset-info-alist + (delete (assoc "iso10646-1") + w32-charset-info-alist))))) + (input-method . "rfc1345") + (documentation . "\ +This language environment is a generic one for a subset of the Unicode +character set encoded in UTF-8.")) + nil) + +;; This is conventional. +(push '("\\.utf\\(-8\\)?\\'" . utf-8) file-coding-system-alist) (provide 'european) -- 2.39.5