* mm-util.el (mm-find-buffer-file-coding-system):

* yenc.el (yenc-decode-region): Don't let-bind a read-only variable.
This commit is contained in:
Stefan Monnier 2010-04-23 12:15:51 -04:00
parent 3b548e1b3a
commit bd486b039f
3 changed files with 13 additions and 4 deletions

View file

@ -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

View file

@ -1239,6 +1239,9 @@ worth using this macro in unibyte buffers of course). Use of
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 @@ gzip, bzip2, etc. are allowed."
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))

View file

@ -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)