:group 'gnus-summary
:type '(repeat character))
-(defcustom gnus-inhibit-user-auto-expire nil
+(defcustom gnus-inhibit-user-auto-expire t
"*If non-nil, user marking commands will not mark an article as expirable, even if the group has auto-expire turned on."
:group 'gnus-summary
:type 'boolean)
:group 'gnus-summary
:type 'regexp)
+(defcustom gnus-newsgroup-coding-system-alist
+ '(("^hk\\>\\|^tw\\>\\|\\<big5\\>" . cn-big5)
+ ("^cn\\>\\|\\<chinese\\>" . cn-gb-2312)
+ ("^fj\\>" . iso-2022-jp-2)
+ ("^relcom\\>" . koi8-r))
+ "Alist of Regexps (to match group names) and CODING-SYSTEMs to be applied."
+ :type '(repeat (cons (regexp :tag "Group")
+ (symbol :tag "Charset")))
+ :group 'gnus)
+
+(defcustom gnus-newsgroup-iso-8859-1-forced-regexp
+ "^tw\\>\\|^hk\\>\\|^cn\\>\\|\\<chinese\\>"
+ "Regexp of newsgroup in which ISO-8859-1 is forced to other charset."
+ :type 'regexp
+ :group 'gnus)
+
;;; Internal variables
(defvar gnus-article-mime-handles nil)
(defvar gnus-last-article nil)
(defvar gnus-newsgroup-history nil)
+(defvar gnus-newsgroup-coding-system nil)
+(defvar gnus-newsgroup-iso-8859-1-forced nil)
+
(defconst gnus-summary-local-variables
'(gnus-newsgroup-name
gnus-newsgroup-begin gnus-newsgroup-end
(gnus-newsgroup-expunged-tally . 0)
gnus-cache-removable-articles gnus-newsgroup-cached
gnus-newsgroup-data gnus-newsgroup-data-reverse
- gnus-newsgroup-limit gnus-newsgroup-limits)
+ gnus-newsgroup-limit gnus-newsgroup-limits
+ gnus-newsgroup-coding-system gnus-newsgroup-iso-8859-1-forced)
"Variables that are buffer-local to the summary buffers.")
;; Byte-compiler warning.
"\C-d" gnus-summary-enter-digest-group
"\M-\C-d" gnus-summary-read-document
"\M-\C-e" gnus-summary-edit-parameters
+ "\M-\C-g" gnus-summary-customize-parameters
"\C-c\C-b" gnus-bug
"*" gnus-cache-enter-article
"\M-*" gnus-cache-remove-article
"h" gnus-summary-save-article-folder
"v" gnus-summary-save-article-vm
"p" gnus-summary-pipe-output
- "s" gnus-soup-add-article))
+ "s" gnus-soup-add-article)
+
+ (gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map)
+ "b" gnus-summary-display-buttonized)
+ )
(defun gnus-summary-make-menu-bar ()
(gnus-turn-off-edit-menu 'summary)
["Edit local kill file" gnus-summary-edit-local-kill t]
["Edit main kill file" gnus-summary-edit-global-kill t]
["Edit group parameters" gnus-summary-edit-parameters t]
+ ["Customize group parameters" gnus-summary-customize-parameters t]
["Send a bug report" gnus-bug t]
("Exit"
["Catchup and exit" gnus-summary-catchup-and-exit t]
(original gnus-original-article-buffer)
(gac gnus-article-current)
(reffed gnus-reffed-article-number)
- (score-file gnus-current-score-file))
+ (score-file gnus-current-score-file)
+ (coding-system gnus-newsgroup-coding-system)
+ (iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(set-buffer gnus-group-buffer)
(setq gnus-newsgroup-name name
gnus-article-buffer article-buffer
gnus-original-article-buffer original
gnus-reffed-article-number reffed
- gnus-current-score-file score-file)
+ gnus-current-score-file score-file
+ gnus-newsgroup-coding-system coding-system
+ gnus-newsgroup-iso-8859-1-forced iso-8859-1-forced)
;; The article buffer also has local variables.
(when (gnus-buffer-live-p gnus-article-buffer)
(set-buffer gnus-article-buffer)
(defun gnus-summary-from-or-to-or-newsgroups (header)
(let ((to (cdr (assq 'To (mail-header-extra header))))
- (newsgroups (cdr (assq 'Newsgroups (mail-header-extra header)))))
+ (newsgroups (cdr (assq 'Newsgroups (mail-header-extra header))))
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(cond
((and to
gnus-ignored-from-addresses
(setq gnus-newsgroup-name group)
(setq gnus-newsgroup-unselected nil)
(setq gnus-newsgroup-unreads (gnus-list-of-unread-articles group))
+ (gnus-newsgroup-setup-coding-system)
;; Adjust and set lists of article marks.
(when info
(or dependencies
(save-excursion (set-buffer gnus-summary-buffer)
gnus-newsgroup-dependencies)))
- headers id end ref)
+ headers id end ref
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(set-buffer nntp-server-buffer)
;; Translate all TAB characters into SPACE characters.
;; Get the Xref when the users reads the articles since most/some
;; NNTP servers do not include Xrefs when using XOVER.
(setq gnus-article-internal-prepare-hook '(gnus-article-get-xrefs))
- (let ((cur nntp-server-buffer)
+ (let ((rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced)
+ (cur nntp-server-buffer)
(dependencies (or dependencies gnus-newsgroup-dependencies))
number headers header)
(save-excursion
(interactive)
(gnus-group-edit-group gnus-newsgroup-name 'params))
+(defun gnus-summary-customize-parameters ()
+ "Customize the group parameters of the current group."
+ (interactive)
+ (gnus-group-customize gnus-newsgroup-name))
+
(defun gnus-summary-enter-digest-group (&optional force)
"Enter an nndoc group based on the current article.
If FORCE, force a digest interpretation. If not, try
(if (not arg)
;; Select the article the normal way.
(gnus-summary-select-article nil 'force)
+ ;; We have to require this here to make sure that the following
+ ;; dynamic binding isn't shadowed by autoloading.
+ (require 'gnus-async)
+ (require 'gnus-art)
;; Bind the article treatment functions to nil.
(let ((gnus-have-all-headers t)
gnus-article-display-hook
(gnus-summary-exit))
buffers)))))
+(defun gnus-newsgroup-setup-coding-system ()
+ "Setup newsgroup default coding system."
+ (setq gnus-newsgroup-coding-system
+ (or (and gnus-newsgroup-name
+ (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'charset)
+ (let ((alist gnus-newsgroup-coding-system-alist)
+ elem (charset nil))
+ (while alist
+ (if (string-match
+ (car (setq elem (pop alist)))
+ gnus-newsgroup-name)
+ (setq alist nil
+ charset (cdr elem))))
+ charset)))
+ rfc2047-default-charset))
+ (setq gnus-newsgroup-iso-8859-1-forced
+ (and gnus-newsgroup-name
+ (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'iso-8859-1-forced)
+ (string-match gnus-newsgroup-iso-8859-1-forced-regexp
+ gnus-newsgroup-name))))
+ (if (stringp gnus-newsgroup-coding-system)
+ (setq gnus-newsgroup-coding-system
+ (intern (downcase gnus-newsgroup-coding-system))))
+ (setq gnus-newsgroup-iso-8859-1-forced
+ (if (stringp gnus-newsgroup-iso-8859-1-forced)
+ (intern (downcase gnus-newsgroup-iso-8859-1-forced))
+ (and gnus-newsgroup-iso-8859-1-forced
+ gnus-newsgroup-coding-system))))
+
+;;;
+;;; MIME Commands
+;;;
+
+(defun gnus-summary-display-buttonized (&optional arg)
+ "Display the current buffer fully MIME-buttonized."
+ (interactive "P")
+ (require 'gnus-art)
+ (let ((gnus-unbuttonized-mime-types nil))
+ (gnus-summary-show-article arg)))
+
(gnus-ems-redefine)
(provide 'gnus-sum)