From: Dave Love Date: Wed, 9 Oct 2002 22:51:01 +0000 (+0000) Subject: (quoted-printable-encode-region): Fix non-multibyte search X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~263 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d77cab2b6343d3c86c728f85b193fe3eea297826;p=emacs.git (quoted-printable-encode-region): Fix non-multibyte search for Emacs 22. --- diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index 136dbd0c9cb..6ceeb259ae1 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el @@ -1,6 +1,6 @@ ;;; qp.el --- Quoted-Printable functions -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: mail, extensions @@ -94,9 +94,14 @@ encode lines starting with \"From\"." (interactive "r") (save-excursion (goto-char from) - ;; Fixme: This doesn't get eight-bit characters in multibyte buffers. - (if (re-search-forward "[^\x0-\xff]" to t) - (error "Multibyte character in QP encoding region"))) + (if (fboundp 'string-to-multibyte) ; Emacs 22 + ;; Fixme: Should we allow codes in the range \x80-\xff? + (if (re-search-forward (string-to-multibyte "[^\x0-\x7f\x80-\xff]") + to t) + ;; Fixme: Improve message. + (error "Multibyte character in QP encoding region") + (if (re-search-forward "[^\x0-\xff]" to t) + (error "Multibyte character in QP encoding region"))))) (unless class ;; Avoid using 8bit characters. = is \075. ;; Equivalent to "^\000-\007\013\015-\037\200-\377="