comparison lisp/gnus/rfc1843.el @ 82951:0fde48feb604

Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
author Andreas Schwab <schwab@suse.de>
date Thu, 22 Jul 2004 16:45:51 +0000
parents 695cf19ef79e
children 18a818a2ee7c cce1c0ee76ee
comparison
equal deleted inserted replaced
56503:8bbd2323fbf2 82951:0fde48feb604
1 ;;; rfc1843.el --- HZ (rfc1843) decoding 1 ;;; rfc1843.el --- HZ (rfc1843) decoding
2 ;; Copyright (c) 1998, 1999, 2000 Free Software Foundation, Inc. 2 ;; Copyright (c) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
3 3
4 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> 4 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
5 ;; Keywords: news HZ HZ+ mail i18n 5 ;; Keywords: news HZ HZ+ mail i18n
6 6
7 ;; This file is part of GNU Emacs. 7 ;; This file is part of GNU Emacs.
41 (defvar rfc1843-word-regexp-strictly 41 (defvar rfc1843-word-regexp-strictly
42 "~\\({\\([\041-\167][\041-\176]\\)+\\)\\(~}\\|$\\)") 42 "~\\({\\([\041-\167][\041-\176]\\)+\\)\\(~}\\|$\\)")
43 43
44 (defvar rfc1843-hzp-word-regexp 44 (defvar rfc1843-hzp-word-regexp
45 "~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\ 45 "~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\
46 [<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)") 46 \[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)")
47 47
48 (defvar rfc1843-hzp-word-regexp-strictly 48 (defvar rfc1843-hzp-word-regexp-strictly
49 "~\\({\\([\041-\167][\041-\176]\\)+\\|\ 49 "~\\({\\([\041-\167][\041-\176]\\)+\\|\
50 [<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)") 50 \[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)")
51 51
52 (defcustom rfc1843-decode-loosely nil 52 (defcustom rfc1843-decode-loosely nil
53 "Loosely check HZ encoding if non-nil. 53 "Loosely check HZ encoding if non-nil.
54 When it is set non-nil, only buffers or strings with strictly 54 When it is set non-nil, only buffers or strings with strictly
55 HZ-encoded are decoded." 55 HZ-encoded are decoded."
56 :type 'boolean 56 :type 'boolean
57 :group 'gnus) 57 :group 'mime)
58 58
59 (defcustom rfc1843-decode-hzp t 59 (defcustom rfc1843-decode-hzp t
60 "HZ+ decoding support if non-nil. 60 "HZ+ decoding support if non-nil.
61 HZ+ specification (also known as HZP) is to provide a standardized 61 HZ+ specification (also known as HZP) is to provide a standardized
62 7-bit representation of mixed Big5, GB, and ASCII text for convenient 62 7-bit representation of mixed Big5, GB, and ASCII text for convenient
63 e-mail transmission, news posting, etc. 63 e-mail transmission, news posting, etc.
64 The document of HZ+ 0.78 specification can be found at 64 The document of HZ+ 0.78 specification can be found at
65 ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" 65 ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc"
66 :type 'boolean 66 :type 'boolean
67 :group 'gnus) 67 :group 'mime)
68 68
69 (defcustom rfc1843-newsgroups-regexp "chinese\\|hz" 69 (defcustom rfc1843-newsgroups-regexp "chinese\\|hz"
70 "Regexp of newsgroups in which might be HZ encoded." 70 "Regexp of newsgroups in which might be HZ encoded."
71 :type 'string 71 :type 'string
72 :group 'gnus) 72 :group 'mime)
73 73
74 (defun rfc1843-decode-region (from to) 74 (defun rfc1843-decode-region (from to)
75 "Decode HZ in the region between FROM and TO." 75 "Decode HZ in the region between FROM and TO."
76 (interactive "r") 76 (interactive "r")
77 (let (str firstc) 77 (let (str firstc)