# HG changeset patch # User Dave Love # Date 1034203861 0 # Node ID 068e199a732e84a0d0d3d3d5dd3ff34cb069f424 # Parent f0d0b711816629cbc3974db454f48f0023d88f3c (quoted-printable-encode-region): Fix non-multibyte search for Emacs 22. diff -r f0d0b7118166 -r 068e199a732e lisp/gnus/qp.el --- a/lisp/gnus/qp.el Wed Oct 09 22:20:36 2002 +0000 +++ b/lisp/gnus/qp.el Wed Oct 09 22:51:01 2002 +0000 @@ -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 @@ (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="