emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104794: * lisp/gnus/mm-util.el (mm-c


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104794: * lisp/gnus/mm-util.el (mm-charset-synonym-alist): Move definition before use.
Date: Wed, 29 Jun 2011 19:53:07 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104794
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2011-06-29 19:53:07 -0700
message:
  * lisp/gnus/mm-util.el (mm-charset-synonym-alist): Move definition before use.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/mm-util.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-06-30 01:44:14 +0000
+++ b/lisp/gnus/ChangeLog       2011-06-30 02:53:07 +0000
@@ -1,3 +1,7 @@
+2011-06-30  Glenn Morris  <address@hidden>
+
+       * mm-util.el (mm-charset-synonym-alist): Move definition before use.
+
 2011-06-30  Lars Magne Ingebrigtsen  <address@hidden>
 
        * mm-util.el (mm-charset-to-coding-system): Recognise all ANSI.x3.4

=== modified file 'lisp/gnus/mm-util.el'
--- a/lisp/gnus/mm-util.el      2011-06-30 01:44:14 +0000
+++ b/lisp/gnus/mm-util.el      2011-06-30 02:53:07 +0000
@@ -300,34 +300,6 @@
       ;; no-MULE XEmacs:
       (car (memq cs (mm-get-coding-system-list))))))
 
-(defun mm-codepage-setup (number &optional alias)
-  "Create a coding system cpNUMBER.
-The coding system is created using `codepage-setup'.  If ALIAS is
-non-nil, an alias is created and added to
-`mm-charset-synonym-alist'.  If ALIAS is a string, it's used as
-the alias.  Else windows-NUMBER is used."
-  (interactive
-   (let ((completion-ignore-case t)
-        (candidates (if (fboundp 'cp-supported-codepages)
-                        (cp-supported-codepages)
-                      ;; Removed in Emacs 23 (unicode), so signal an error:
-                      (error "`codepage-setup' not present in this Emacs 
version"))))
-     (list (gnus-completing-read "Setup DOS Codepage" candidates
-                                 t nil nil "437"))))
-  (when alias
-    (setq alias (if (stringp alias)
-                   (intern alias)
-                 (intern (format "windows-%s" number)))))
-  (let* ((cp (intern (format "cp%s" number))))
-    (unless (mm-coding-system-p cp)
-      (if (fboundp 'codepage-setup)    ; silence compiler
-         (codepage-setup number)
-       (error "`codepage-setup' not present in this Emacs version")))
-    (when (and alias
-              ;; Don't add alias if setup of cp failed.
-              (mm-coding-system-p cp))
-      (add-to-list 'mm-charset-synonym-alist (cons alias cp)))))
-
 (defvar mm-charset-synonym-alist
   `(
     ;; Not in XEmacs, but it's not a proper MIME charset anyhow.
@@ -376,6 +348,34 @@
 
 See `mm-codepage-iso-8859-list' and `mm-codepage-ibm-list'.")
 
+(defun mm-codepage-setup (number &optional alias)
+  "Create a coding system cpNUMBER.
+The coding system is created using `codepage-setup'.  If ALIAS is
+non-nil, an alias is created and added to
+`mm-charset-synonym-alist'.  If ALIAS is a string, it's used as
+the alias.  Else windows-NUMBER is used."
+  (interactive
+   (let ((completion-ignore-case t)
+        (candidates (if (fboundp 'cp-supported-codepages)
+                        (cp-supported-codepages)
+                      ;; Removed in Emacs 23 (unicode), so signal an error:
+                      (error "`codepage-setup' not present in this Emacs 
version"))))
+     (list (gnus-completing-read "Setup DOS Codepage" candidates
+                                 t nil nil "437"))))
+  (when alias
+    (setq alias (if (stringp alias)
+                   (intern alias)
+                 (intern (format "windows-%s" number)))))
+  (let* ((cp (intern (format "cp%s" number))))
+    (unless (mm-coding-system-p cp)
+      (if (fboundp 'codepage-setup)    ; silence compiler
+         (codepage-setup number)
+       (error "`codepage-setup' not present in this Emacs version")))
+    (when (and alias
+              ;; Don't add alias if setup of cp failed.
+              (mm-coding-system-p cp))
+      (add-to-list 'mm-charset-synonym-alist (cons alias cp)))))
+
 (defcustom mm-codepage-iso-8859-list
   (list 1250 ;; Windows-1250 is a variant of Latin-2 heavily used by Microsoft
        ;; Outlook users in Czech republic.  Use this to allow reading of


reply via email to

[Prev in Thread] Current Thread [Next in Thread]