summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog28
-rw-r--r--lisp/gnus/gnus-agent.el12
-rw-r--r--lisp/gnus/gnus-sum.el11
-rw-r--r--lisp/gnus/mm-util.el141
-rw-r--r--lisp/gnus/mm-view.el2
5 files changed, 167 insertions, 27 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 766a92c1dbd..fd9de602fb0 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,30 @@
+2006-10-29 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * mm-util.el (mm-codepage-iso-8859-list, mm-codepage-ibm-list): New
+ variables.
+ (mm-setup-codepage-iso-8859, mm-setup-codepage-ibm): New functions.
+ (mm-charset-synonym-alist): Move some entries to
+ mm-codepage-iso-8859-list.
+ (mm-charset-synonym-alist, mm-charset-override-alist): Add
+ iso-8859-8/windows-1255 and iso-8859-9/windows-1254.
+
+2006-10-29 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-sum.el (gnus-set-mode-line): Quote % in group name.
+
+2006-10-28 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-agent.el (gnus-agent-make-mode-line-string): Make it compatible
+ with Emacs 21 and XEmacs.
+
+2006-10-26 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * mm-view.el: Add interactive arg to html2text autoload.
+
+2006-10-25 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-sum.el (gnus-summary-move-article): Use no-encode for `B B'.
+
2006-10-20 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-group.el (gnus-group-make-doc-group): Work for non-ASCII group
@@ -12,6 +39,7 @@
2006-10-19 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.el (gnus-mime): Remove unused custom group.
+ (gnus-getenv-nntpserver, gnus-select-method): Autoload.
2006-10-13 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index f4e9f2e3dc9..733b7533cc1 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -577,7 +577,17 @@ manipulated as follows:
(fboundp 'make-mode-line-mouse-map))
(propertize string 'local-map
(make-mode-line-mouse-map mouse-button mouse-func)
- 'mouse-face 'mode-line-highlight)
+ 'mouse-face
+ (cond ((and (featurep 'xemacs)
+ ;; XEmacs' `facep' only checks for a face
+ ;; object, not for a face name, so it's useless
+ ;; to check with `facep'.
+ (find-face 'modeline))
+ 'modeline)
+ ((facep 'mode-line-highlight) ;; Emacs 22
+ 'mode-line-highlight)
+ ((facep 'mode-line) ;; Emacs 21
+ 'mode-line)) )
string))
(defun gnus-agent-toggle-plugged (set-to)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index fb0ef25c916..7d0b7203654 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -5711,8 +5711,9 @@ If WHERE is `summary', the summary mode line format will be used."
(let* ((mformat (symbol-value
(intern
(format "gnus-%s-mode-line-format-spec" where))))
- (gnus-tmp-group-name (gnus-group-decoded-name
- gnus-newsgroup-name))
+ (gnus-tmp-group-name (gnus-mode-string-quote
+ (gnus-group-decoded-name
+ gnus-newsgroup-name)))
(gnus-tmp-article-number (or gnus-current-article 0))
(gnus-tmp-unread gnus-newsgroup-unreads)
(gnus-tmp-unread-and-unticked (length gnus-newsgroup-unreads))
@@ -9153,7 +9154,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
(gnus-request-article-this-buffer article gnus-newsgroup-name)
(when (consp (setq art-group
(gnus-request-accept-article
- to-newsgroup select-method (not articles))))
+ to-newsgroup select-method (not articles) t)))
(setq new-xref (concat new-xref " " (car art-group)
":"
(number-to-string (cdr art-group))))
@@ -9161,7 +9162,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
;; it and replace the new article.
(nnheader-replace-header "Xref" new-xref)
(gnus-request-replace-article
- (cdr art-group) to-newsgroup (current-buffer))
+ (cdr art-group) to-newsgroup (current-buffer) t)
art-group))))))
(cond
((not art-group)
@@ -9259,7 +9260,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
(gnus-request-article-this-buffer article gnus-newsgroup-name)
(nnheader-replace-header "Xref" new-xref)
(gnus-request-replace-article
- article gnus-newsgroup-name (current-buffer))))
+ article gnus-newsgroup-name (current-buffer) t)))
;; run the move/copy/crosspost/respool hook
(run-hook-with-args 'gnus-summary-article-move-hook
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index e75f2ef6d5f..05c37a54e74 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -205,39 +205,140 @@ the alias. Else windows-NUMBER is used."
;; Not in XEmacs, but it's not a proper MIME charset anyhow.
,@(unless (mm-coding-system-p 'x-ctext)
'((x-ctext . ctext)))
- ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_!
+ ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_ in 8
+ ;; positions!
,@(unless (mm-coding-system-p 'iso-8859-15)
'((iso-8859-15 . iso-8859-1)))
;; BIG-5HKSCS is similar to, but different than, BIG-5.
,@(unless (mm-coding-system-p 'big5-hkscs)
'((big5-hkscs . big5)))
- ;; Windows-1252 is actually a superset of Latin-1. See also
- ;; `gnus-article-dumbquotes-map'.
- ,@(unless (mm-coding-system-p 'windows-1252)
- (if (mm-coding-system-p 'cp1252)
- '((windows-1252 . cp1252))
- '((windows-1252 . iso-8859-1))))
- ;; Windows-1250 is a variant of Latin-2 heavily used by Microsoft
- ;; Outlook users in Czech republic. Use this to allow reading of their
- ;; e-mails. cp1250 should be defined by M-x codepage-setup.
- ,@(if (and (not (mm-coding-system-p 'windows-1250))
- (mm-coding-system-p 'cp1250))
- '((windows-1250 . cp1250)))
;; A Microsoft misunderstanding.
- ,@(if (and (not (mm-coding-system-p 'unicode))
- (mm-coding-system-p 'utf-16-le))
- '((unicode . utf-16-le)))
+ ,@(when (and (not (mm-coding-system-p 'unicode))
+ (mm-coding-system-p 'utf-16-le))
+ '((unicode . utf-16-le)))
;; A Microsoft misunderstanding.
,@(unless (mm-coding-system-p 'ks_c_5601-1987)
(if (mm-coding-system-p 'cp949)
'((ks_c_5601-1987 . cp949))
'((ks_c_5601-1987 . euc-kr))))
;; Windows-31J is Windows Codepage 932.
- ,@(if (and (not (mm-coding-system-p 'windows-31j))
- (mm-coding-system-p 'cp932))
- '((windows-31j . cp932)))
+ ,@(when (and (not (mm-coding-system-p 'windows-31j))
+ (mm-coding-system-p 'cp932))
+ '((windows-31j . cp932)))
)
- "A mapping from unknown or invalid charset names to the real charset names.")
+ "A mapping from unknown or invalid charset names to the real charset names.
+
+See `mm-codepage-iso-8859-list' and `mm-codepage-ibm-list'.")
+
+(defcustom mm-codepage-iso-8859-list
+ (list 1250 ;; Windows-1250 is a variant of Latin-2 heavily used by Microsoft
+ ;; Outlook users in Czech republic. Use this to allow reading of
+ ;; their e-mails. cp1250 should be defined by M-x codepage-setup
+ ;; (Emacs 21).
+ '(1252 . 1) ;; Windows-1252 is a superset of iso-8859-1 (West
+ ;; Europe). See also `gnus-article-dumbquotes-map'.
+ '(1254 . 9) ;; Windows-1254 is a superset of iso-8859-9 (Turkish).
+ '(1255 . 8));; Windows-1255 is a superset of iso-8859-8 (Hebrew).
+ "A list of Windows codepage numbers and iso-8859 charset numbers.
+
+If an element is a number corresponding to a supported windows
+codepage, appropriate entries to `mm-charset-synonym-alist' are
+added by `mm-setup-codepage-iso-8859'. An element may also be a
+cons cell where the car is a codepage number and the cdr is the
+corresponding number of an iso-8859 charset."
+ :type '(list (set :inline t
+ (const 1250 :tag "Central and East European")
+ (const (1252 . 1) :tag "West European")
+ (const (1254 . 9) :tag "Turkish")
+ (const (1255 . 8) :tag "Hebrew"))
+ (repeat :inline t
+ :tag "Other options"
+ (choice
+ (integer :tag "Windows codepage number")
+ (cons (integer :tag "Windows codepage number")
+ (integer :tag "iso-8859 charset number")))))
+ :version "22.1" ;; Gnus 5.10.9
+ :group 'mime)
+
+(defcustom mm-codepage-ibm-list
+ (list 437 ;; (US etc.)
+ 860 ;; (Portugal)
+ 861 ;; (Iceland)
+ 862 ;; (Israel)
+ 863 ;; (Canadian French)
+ 865 ;; (Nordic)
+ 852 ;;
+ 850 ;; (Latin 1)
+ 855 ;; (Cyrillic)
+ 866 ;; (Cyrillic - Russian)
+ 857 ;; (Turkish)
+ 864 ;; (Arabic)
+ 869 ;; (Greek)
+ 874);; (Thai)
+ ;; In Emacs 23 (unicode), cp... and ibm... are aliases.
+ ;; Cf. http://thread.gmane.org/v9lkng5nwy.fsf@marauder.physik.uni-ulm.de
+ "List of IBM codepage numbers.
+
+The codepage mappings slighly differ between IBM and other vendors.
+See \"ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/IBM/README.TXT\".
+
+If an element is a number corresponding to a supported windows
+codepage, appropriate entries to `mm-charset-synonym-alist' are
+added by `mm-setup-codepage-ibm'."
+ :type '(list (set :inline t
+ (const 437 :tag "US etc.")
+ (const 860 :tag "Portugal")
+ (const 861 :tag "Iceland")
+ (const 862 :tag "Israel")
+ (const 863 :tag "Canadian French")
+ (const 865 :tag "Nordic")
+ (const 852)
+ (const 850 :tag "Latin 1")
+ (const 855 :tag "Cyrillic")
+ (const 866 :tag "Cyrillic - Russian")
+ (const 857 :tag "Turkish")
+ (const 864 :tag "Arabic")
+ (const 869 :tag "Greek")
+ (const 874 :tag "Thai"))
+ (repeat :inline t
+ :tag "Other options"
+ (integer :tag "Codepage number")))
+ :version "22.1" ;; Gnus 5.10.9
+ :group 'mime)
+
+(defun mm-setup-codepage-iso-8859 (&optional list)
+ "Add appropriate entries to `mm-charset-synonym-alist'.
+Unless LIST is given, `mm-codepage-iso-8859-list' is used."
+ (unless list
+ (setq list mm-codepage-iso-8859-list))
+ (dolist (i list)
+ (let (cp windows iso)
+ (if (consp i)
+ (setq cp (intern (format "cp%d" (car i)))
+ windows (intern (format "windows-%d" (car i)))
+ iso (intern (format "iso-8859-%d" (cdr i))))
+ (setq cp (intern (format "cp%d" i))
+ windows (intern (format "windows-%d" i))))
+ (unless (mm-coding-system-p windows)
+ (if (mm-coding-system-p cp)
+ (add-to-list 'mm-charset-synonym-alist (cons windows cp))
+ (add-to-list 'mm-charset-synonym-alist (cons windows iso)))))))
+
+(defun mm-setup-codepage-ibm (&optional list)
+ "Add appropriate entries to `mm-charset-synonym-alist'.
+Unless LIST is given, `mm-codepage-ibm-list' is used."
+ (unless list
+ (setq list mm-codepage-ibm-list))
+ (dolist (number list)
+ (let ((ibm (intern (format "ibm%d" number)))
+ (cp (intern (format "cp%d" number))))
+ (when (and (not (mm-coding-system-p ibm))
+ (mm-coding-system-p cp))
+ (add-to-list 'mm-charset-synonym-alist (cons ibm cp))))))
+
+;; Initialize:
+(mm-setup-codepage-iso-8859)
+(mm-setup-codepage-ibm)
(defcustom mm-charset-override-alist
`((iso-8859-1 . windows-1252))
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 5972a0681a6..8b6d3e8e795 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -36,7 +36,7 @@
(autoload 'vcard-parse-string "vcard")
(autoload 'vcard-format-string "vcard")
(autoload 'fill-flowed "flow-fill")
- (autoload 'html2text "html2text")
+ (autoload 'html2text "html2text" nil t)
(unless (fboundp 'diff-mode)
(autoload 'diff-mode "diff-mode" "" t nil)))