]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/rfc1843.el
Partially revert the defmethod->cl-defmethod change in registry.el
[gnu-emacs] / lisp / gnus / rfc1843.el
index cab2f4e751c85efb018fb30a694cbecf4807933b..ee2af4803f658fe1142af0b69baa0f92df956824 100644 (file)
@@ -1,6 +1,6 @@
 ;;; rfc1843.el --- HZ (rfc1843) decoding
 
-;; Copyright (C) 1998-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Keywords: news HZ HZ+ mail i18n
 
 (defvar rfc1843-hzp-word-regexp
   "~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\
-\[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)")
+[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)")
 
 (defvar rfc1843-hzp-word-regexp-strictly
   "~\\({\\([\041-\167][\041-\176]\\)+\\|\
-\[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)")
+[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)")
 
 (defcustom rfc1843-decode-loosely nil
   "Loosely check HZ encoding if non-nil.
@@ -90,12 +90,11 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc"
            (while (re-search-forward (if rfc1843-decode-hzp
                                          rfc1843-hzp-word-regexp
                                        rfc1843-word-regexp) (point-max) t)
-             ;;; Text with extents may cause XEmacs crash
              (setq str (buffer-substring-no-properties
                         (match-beginning 1)
                         (match-end 1)))
              (setq firstc (aref str 0))
-             (insert (mm-decode-coding-string
+             (insert (decode-coding-string
                       (rfc1843-decode
                        (prog1
                            (substring str 1)