[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/qp.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/qp.el [emacs-unicode-2] |
Date: |
Thu, 09 Sep 2004 17:32:45 -0400 |
Index: emacs/lisp/gnus/qp.el
diff -c emacs/lisp/gnus/qp.el:1.13.6.1 emacs/lisp/gnus/qp.el:1.13.6.2
*** emacs/lisp/gnus/qp.el:1.13.6.1 Fri Mar 12 00:03:12 2004
--- emacs/lisp/gnus/qp.el Thu Sep 9 09:36:26 2004
***************
*** 1,6 ****
;;; qp.el --- Quoted-Printable functions
! ;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <address@hidden>
;; Keywords: mail, extensions
--- 1,6 ----
;;; qp.el --- Quoted-Printable functions
! ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
;; Author: Lars Magne Ingebrigtsen <address@hidden>
;; Keywords: mail, extensions
***************
*** 32,44 ****
(require 'mm-util)
(eval-when-compile (defvar mm-use-ultra-safe-encoding))
(defun quoted-printable-decode-region (from to &optional coding-system)
"Decode quoted-printable in the region between FROM and TO, per RFC 2045.
If CODING-SYSTEM is non-nil, decode bytes into characters with that
coding-system.
Interactively, you can supply the CODING-SYSTEM argument
! with \\[universal-coding-system-argument]."
(interactive
;; Let the user determine the coding system with "C-x RET c".
(list (region-beginning) (region-end) coding-system-for-read))
--- 32,49 ----
(require 'mm-util)
(eval-when-compile (defvar mm-use-ultra-safe-encoding))
+ ;;;###autoload
(defun quoted-printable-decode-region (from to &optional coding-system)
"Decode quoted-printable in the region between FROM and TO, per RFC 2045.
If CODING-SYSTEM is non-nil, decode bytes into characters with that
coding-system.
Interactively, you can supply the CODING-SYSTEM argument
! with \\[universal-coding-system-argument].
!
! The CODING-SYSTEM argument is a historical hangover and is deprecated.
! QP encodes raw bytes and should be decoded into raw bytes. Decoding
! them into characters should be done separately."
(interactive
;; Let the user determine the coding system with "C-x RET c".
(list (region-beginning) (region-end) coding-system-for-read))
***************
*** 67,85 ****
(+ 3 (point)))
16)))
(mm-insert-byte byte 1)
! (delete-char 3)
! (unless (eq byte ?=)
! (backward-char))))
(t
! (error "Malformed quoted-printable text")
(forward-char)))))
(if coding-system
(mm-decode-coding-region (point-min) (point-max) coding-system)))))
(defun quoted-printable-decode-string (string &optional coding-system)
"Decode the quoted-printable encoded STRING and return the result.
! If CODING-SYSTEM is non-nil, decode the region with coding-system."
! (with-temp-buffer
(insert string)
(quoted-printable-decode-region (point-min) (point-max) coding-system)
(buffer-string)))
--- 72,90 ----
(+ 3 (point)))
16)))
(mm-insert-byte byte 1)
! (delete-char 3)))
(t
! (message "Malformed quoted-printable text")
(forward-char)))))
(if coding-system
(mm-decode-coding-region (point-min) (point-max) coding-system)))))
(defun quoted-printable-decode-string (string &optional coding-system)
"Decode the quoted-printable encoded STRING and return the result.
! If CODING-SYSTEM is non-nil, decode the region with coding-system.
! Use of CODING-SYSTEM is deprecated; this function should deal with
! raw bytes, and coding conversion should be done separately."
! (mm-with-unibyte-buffer
(insert string)
(quoted-printable-decode-region (point-min) (point-max) coding-system)
(buffer-string)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/gnus/qp.el [emacs-unicode-2],
Miles Bader <=