* mm-util.el (mm-charset-to-coding-system): Use coding-system-from-name
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 15 Mar 2010 02:37:02 +0000 (02:37 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 15 Mar 2010 02:37:02 +0000 (02:37 +0000)
if it is available.  (bug#5647)

* lpath.el: Suppress compiler warning for coding-system-from-name for
Emacs 21 and XEmacs.

lisp/ChangeLog
lisp/lpath.el
lisp/mm-util.el

index 5948a43..b2956bd 100644 (file)
@@ -1,3 +1,11 @@
+2010-03-15  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * 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  <juri@jurta.org>
 
        * hmac-def.el:
index 35db4ef..bdcf4a8 100644 (file)
     (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
index 8dc232e..aa2be15 100644 (file)
@@ -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))