Mercurial > emacs
changeset 108084:7ffbe3a6a8f2
* mm-util.el (mm-find-buffer-file-coding-system):
* yenc.el (yenc-decode-region): Don't let-bind a read-only variable.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 23 Apr 2010 12:15:51 -0400 |
parents | 6f2d16153b19 |
children | 34eca4ecfbe6 |
files | lisp/gnus/ChangeLog lisp/gnus/mm-util.el lisp/gnus/yenc.el |
diffstat | 3 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Fri Apr 23 11:59:32 2010 -0400 +++ b/lisp/gnus/ChangeLog Fri Apr 23 12:15:51 2010 -0400 @@ -1,3 +1,8 @@ +2010-04-23 Stefan Monnier <monnier@iro.umontreal.ca> + + * mm-util.el (mm-find-buffer-file-coding-system): + * yenc.el (yenc-decode-region): Don't let-bind a read-only variable. + 2010-04-22 Andreas Seltenreich <seltenreich@gmx.de> * message.el (message-generate-headers): Record insertion of optional
--- a/lisp/gnus/mm-util.el Fri Apr 23 11:59:32 2010 -0400 +++ b/lisp/gnus/mm-util.el Fri Apr 23 12:15:51 2010 -0400 @@ -1239,6 +1239,9 @@ harmful since it is likely to modify existing data in the buffer. For instance, it converts \"\\300\\255\" into \"\\255\" in Emacs 23 (unicode)." + ;; FIXME: (default-value 'enable-multibyte-characters) is read-only + ;; so let-binding it is wrong. The right fix is to not use this + ;; macro at all any more, since it's been ill-defined from the start. (let ((multibyte (make-symbol "multibyte")) (buffer (make-symbol "buffer"))) `(if mm-emacs-mule @@ -1593,8 +1596,8 @@ filename)) (mm-decompress-buffer filename nil t)))) (when decomp - (set-buffer (letf (((default-value 'enable-multibyte-characters) nil)) - (generate-new-buffer " *temp*"))) + (set-buffer (generate-new-buffer " *temp*")) + (mm-disable-multibyte) (insert decomp) (setq filename (file-name-sans-extension filename))) (goto-char (point-min))
--- a/lisp/gnus/yenc.el Fri Apr 23 11:59:32 2010 -0400 +++ b/lisp/gnus/yenc.el Fri Apr 23 12:15:51 2010 -0400 @@ -89,8 +89,9 @@ (when (re-search-forward "^=yend.*$" end t) (setq last (match-beginning 0)) (setq footer-alist (yenc-parse-line (match-string 0))) - (letf (((default-value 'enable-multibyte-characters) nil)) - (setq work-buffer (generate-new-buffer " *yenc-work*"))) + (with-current-buffer + (setq work-buffer (generate-new-buffer " *yenc-work*")) + (set-buffer-multibyte nil)) (while (< first last) (setq char (char-after first)) (cond ((or (eq char ?\r)