Subject: bug#5981: 24.0.50; Attempt to set a constant symbol: enable-multibyte-characters

From: "JJ" <[email-masked]>
Date: Sat, 24 Apr 2010 19:26:38 +0200

>This bug persists for me with the current 100012 bzr Emacs
>trunk. Problems arise in Gnus.
>When trying to `S o m' forward a mail, it reports:
>Attempt to set a constant symbol: enable-multibyte-characters

Here is a patch to fix this error on the latest GNU Emacs bzr trunk:

--- trunk/lisp/gnus/mm-util.el	2010-04-24 18:49:21.189375459 +0200
+++ trunk-patched/lisp/gnus/mm-util.el	2010-04-24 18:50:30.610376339 +0200
@@ -1248,13 +1248,15 @@
 	 (let ((,multibyte enable-multibyte-characters)
 	       (,buffer (current-buffer)))
 	   (unwind-protect
-	       (letf (((default-value 'enable-multibyte-characters) nil))
+	       (letf ()
 		 (set-buffer-multibyte nil)
 		 ,@forms)
 	     (set-buffer ,buffer)
 	     (set-buffer-multibyte ,multibyte)))
-       (letf (((default-value 'enable-multibyte-characters) nil))
-	 ,@forms))))
+       (letf ()
+	 (set-buffer-multibyte nil)
+	 ,@forms
+	 (set-buffer-multibyte ,multibyte)))))
 (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0)
 (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))

-- 
JJ