From 2755171571932e45ec7b282755e710b605dcb83e Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Mon, 15 Mar 2010 02:37:02 +0000 Subject: [PATCH 1/1] * mm-util.el (mm-charset-to-coding-system): Use coding-system-from-name if it is available. (bug#5647) * lpath.el: Suppress compiler warning for coding-system-from-name for Emacs 21 and XEmacs. --- lisp/ChangeLog | 8 ++++++++ lisp/lpath.el | 28 ++++++++++++++-------------- lisp/mm-util.el | 3 +++ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5948a43ec..b2956bd53 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-03-15 Katsumi Yamaoka + + * mm-util.el (mm-charset-to-coding-system): Use coding-system-from-name + if it is available. (bug#5647) + + * lpath.el: Suppress compiler warning for coding-system-from-name for + Emacs 21 and XEmacs. + 2010-03-14 Juri Linkov * hmac-def.el: diff --git a/lisp/lpath.el b/lisp/lpath.el index 35db4ef02..bdcf4a826 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -31,17 +31,17 @@ (defun split-line (&optional arg)) (maybe-fbind '(clear-string - coding-system-aliasee custom-autoload delete-annotation delete-extent - device-connection dfw-device events-to-keys find-face - font-lock-set-defaults get-char-table glyph-height glyph-width - help-buffer int-to-char ldap-search-entries mail-aliases-setup - make-annotation make-event make-glyph make-network-process map-extents - message-xmas-redefine put-char-table run-mode-hooks set-extent-property - set-itimer-function set-keymap-default-binding temp-directory - time-to-seconds ucs-to-char unicode-precedence-list unicode-to-char - url-generic-parse-url url-http-file-exists-p - valid-image-instantiator-format-p vcard-pretty-print - w3-coding-system-for-mime-charset window-pixel-height + coding-system-aliasee coding-system-from-name custom-autoload + delete-annotation delete-extent device-connection dfw-device + events-to-keys find-face font-lock-set-defaults get-char-table + glyph-height glyph-width help-buffer int-to-char ldap-search-entries + mail-aliases-setup make-annotation make-event make-glyph + make-network-process map-extents message-xmas-redefine put-char-table + run-mode-hooks set-extent-property set-itimer-function + set-keymap-default-binding temp-directory time-to-seconds ucs-to-char + unicode-precedence-list unicode-to-char url-generic-parse-url + url-http-file-exists-p valid-image-instantiator-format-p + vcard-pretty-print w3-coding-system-for-mime-charset window-pixel-height window-pixel-width)) (maybe-bind '(eudc-protocol @@ -56,9 +56,9 @@ '(defun rmail-toggle-header (&optional arg))) (maybe-fbind '(clear-string - codepage-setup cp-supported-codepages create-image detect-coding-string - display-time-event-handler epg-check-configuration event-click-count - event-end event-start find-coding-systems-for-charsets + codepage-setup coding-system-from-name cp-supported-codepages create-image + detect-coding-string display-time-event-handler epg-check-configuration + event-click-count event-end event-start find-coding-systems-for-charsets find-coding-systems-region find-coding-systems-string find-image float-time help-buffer image-size image-type-available-p insert-image mail-abbrevs-setup make-mode-line-mouse-map make-network-process diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 8dc232e75..aa2be153b 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -566,6 +566,9 @@ is not available." ;;; (eq charset (coding-system-get charset 'mime-charset)) ) charset) + ;; Use coding system Emacs knows. + ((and (fboundp 'coding-system-from-name) + (coding-system-from-name charset))) ;; Eval expressions from `mm-charset-eval-alist' ((let* ((el (assq charset mm-charset-eval-alist)) (cs (car el)) -- 2.25.1