summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-09-16 00:14:53 +0000
committerUlrich Müller <ulm@gentoo.org>2009-09-16 00:14:53 +0000
commitbe04b3c06df8a3dbd153753db7296c1ffd3268ee (patch)
tree1e4ee1f8308fcc4e842e41dedc1cc593815eb1b6 /app-emacs
parentVersion bump (diff)
downloadgentoo-2-be04b3c06df8a3dbd153753db7296c1ffd3268ee.tar.gz
gentoo-2-be04b3c06df8a3dbd153753db7296c1ffd3268ee.tar.bz2
gentoo-2-be04b3c06df8a3dbd153753db7296c1ffd3268ee.zip
Fix wrong charset for outgoing mail with Emacs 23.
(Portage version: 2.2_rc40/cvs/Linux i686)
Diffstat (limited to 'app-emacs')
-rw-r--r--app-emacs/vm/ChangeLog6
-rw-r--r--app-emacs/vm/files/vm-8.0.12-emacs-23.patch96
-rw-r--r--app-emacs/vm/vm-8.0.12-r4.ebuild3
3 files changed, 103 insertions, 2 deletions
diff --git a/app-emacs/vm/ChangeLog b/app-emacs/vm/ChangeLog
index e195e677bb21..4b037b38b1a4 100644
--- a/app-emacs/vm/ChangeLog
+++ b/app-emacs/vm/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-emacs/vm
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emacs/vm/ChangeLog,v 1.67 2009/09/12 10:58:18 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emacs/vm/ChangeLog,v 1.68 2009/09/16 00:14:53 ulm Exp $
+
+ 16 Sep 2009; Ulrich Mueller <ulm@gentoo.org> vm-8.0.12-r4.ebuild,
+ +files/vm-8.0.12-emacs-23.patch:
+ Fix wrong charset for outgoing mail with Emacs 23.
*vm-8.0.12-r4 (12 Sep 2009)
diff --git a/app-emacs/vm/files/vm-8.0.12-emacs-23.patch b/app-emacs/vm/files/vm-8.0.12-emacs-23.patch
new file mode 100644
index 000000000000..aee214333249
--- /dev/null
+++ b/app-emacs/vm/files/vm-8.0.12-emacs-23.patch
@@ -0,0 +1,96 @@
+Fix wrong charset for outgoing mail with Emacs 23
+Gentoo patch, reported upstream:
+http://groups.google.de/group/gnu.emacs.vm.bug/msg/33d027060b6fffe6
+
+--- vm-8.0.12-orig/lisp/vm-mime.el
++++ vm-8.0.12/lisp/vm-mime.el
+@@ -1409,7 +1409,6 @@
+
+ (defvar buffer-file-coding-system)
+
+-;; TODO: integrate with the FSF's unify-8859-on-encoding-mode stuff.
+ (defun vm-determine-proper-charset (beg end)
+ "Work out what MIME character set to use for sending a message.
+
+@@ -1430,6 +1429,28 @@
+ (if (or vm-xemacs-mule-p
+ (and vm-fsfemacs-mule-p enable-multibyte-characters))
+ ;; Okay, we're on a MULE build.
++ (if (fboundp 'check-coding-systems-region)
++ ;; check-coding-systems-region appeared in GNU Emacs 23.
++ (let* ((preapproved (vm-get-coding-system-priorities))
++ (ucs-list (vm-get-mime-ucs-list))
++ (cant-encode (check-coding-systems-region
++ (point-min) (point-max)
++ (cons 'us-ascii preapproved))))
++ (if (not (assq 'us-ascii cant-encode))
++ ;; If there are only ASCII chars, we're done.
++ "us-ascii"
++ (while (and preapproved
++ (assq (car preapproved) cant-encode)
++ (not (memq (car preapproved) ucs-list)))
++ (setq preapproved (cdr preapproved)))
++ (if preapproved
++ (cadr (assq (car preapproved)
++ vm-mime-mule-coding-to-charset-alist))
++ ;; None of the entries in vm-coding-system-priorities
++ ;; can be used. This can only happen if no universal
++ ;; coding system is included. Fall back to utf-8.
++ "utf-8")))
++
+ (let ((charsets (delq 'ascii
+ (vm-charsets-in-region (point-min)
+ (point-max)))))
+@@ -1472,9 +1493,7 @@
+ (while preapproved
+ (if (memq (car preapproved) ucs-list)
+ (throw 'done
+- (car (cdr (assq
+- (vm-coding-system-name
+- (car preapproved))
++ (car (cdr (assq (car preapproved)
+ vm-mime-mule-coding-to-charset-alist)))))
+ (setq preapproved (cdr preapproved)))
+ ;; Nothing universal in the preapproved list.
+@@ -1488,8 +1507,8 @@
+ (when (latin-unity-maybe-remap (point-min)
+ (point-max) sys
+ csets psets t)
+- (throw 'done (second (assq
+- (vm-coding-system-name sys)
++ (throw 'done
++ (second (assq sys
+ vm-mime-mule-coding-to-charset-alist)))))
+ (setq systems (cdr systems)))
+ (throw 'done nil))
+@@ -1511,9 +1530,8 @@
+ ;; If we encounter a universal character set on
+ ;; the preapproved list, pass it back.
+ (if (memq (car preapproved) ucs-list)
+- (throw 'done (second (assq
+- (vm-coding-system-name
+- (car preapproved))
++ (throw 'done
++ (second (assq (car preapproved)
+ vm-mime-mule-coding-to-charset-alist))))
+
+ ;; The preapproved entry isn't universal. Check if
+@@ -1549,15 +1567,14 @@
+ ;; If we encounter a universal character set on
+ ;; the preapproved list, pass it back.
+ (when (memq (car preapproved) ucs-list)
+- (throw 'done (second (assq
+- (vm-coding-system-name
+- (car preapproved))
++ (throw 'done
++ (second (assq (car preapproved)
+ vm-mime-mule-coding-to-charset-alist))))
+ (setq preapproved (cdr preapproved)))))
+ (throw 'done nil))))
+ ;; Couldn't do any magic with vm-coding-system-priorities. Pass
+ ;; back a Japanese iso-2022 MIME character set.
+- (t (or vm-mime-8bit-composition-charset "iso-2022-jp"))))
++ (t (or vm-mime-8bit-composition-charset "iso-2022-jp")))))
+ ;; If we're non-MULE and there are eight bit characters, use a
+ ;; sensible default.
+ (goto-char (point-min))
diff --git a/app-emacs/vm/vm-8.0.12-r4.ebuild b/app-emacs/vm/vm-8.0.12-r4.ebuild
index 6c1a18bdb3e9..b9b92f7b2ceb 100644
--- a/app-emacs/vm/vm-8.0.12-r4.ebuild
+++ b/app-emacs/vm/vm-8.0.12-r4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emacs/vm/vm-8.0.12-r4.ebuild,v 1.1 2009/09/12 10:58:18 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emacs/vm/vm-8.0.12-r4.ebuild,v 1.2 2009/09/16 00:14:53 ulm Exp $
inherit elisp eutils
@@ -26,6 +26,7 @@ src_unpack() {
epatch "${FILESDIR}/${P}-autoload-vm-pine.patch" #246185
epatch "${FILESDIR}/${P}-supercite-yank.patch" #256886
epatch "${FILESDIR}/${P}-folder-corruption.patch" #284668
+ epatch "${FILESDIR}/${P}-emacs-23.patch"
if ! use bbdb; then
elog "Excluding vm-pcrisis.el since the \"bbdb\" USE flag is not set."