+2002-11-08 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-art.el (gnus-article-edit-exit): Kill local variables.
+
+ * message.el (message-draft-coding-system): Improve comment; use
+ mm-auto-save-coding-system for the default value.
+
+ * nndraft.el (nndraft-request-article): Revert to the state before
+ 2002-10-29; regexp-quote mail-header-separator.
+
2002-11-06 Jesper Harder <harder@ifa.au.dk>
* gnus-draft.el (gnus-draft-setup): Set gnus-message-group-art to
For information on obtaining this database of pretty pictures, please
see http://www.cs.indiana.edu/picons/ftp/index.html"
:type '(repeat directory)
- :link '(url-link :tag "download"
+ :link '(url-link :tag "download"
"http://www.cs.indiana.edu/picons/ftp/index.html")
:link '(custom-manual "(gnus)Picons")
:group 'gnus-picon)
(if (gnus-buffer-live-p gnus-original-article-buffer)
(insert-buffer-substring gnus-original-article-buffer))
(let ((winconf gnus-prev-winconf))
+ (kill-all-local-variables)
(gnus-article-mode)
(set-window-configuration winconf)
;; Tippy-toe some to make sure that point remains where it was.
;;; Internal Variables:
-(defcustom gnus-button-url-regexp
+(defcustom gnus-button-url-regexp
(if (string-match "[[:digit:]]" "1") ;; support POSIX?
"\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-zA-Z0-9_=#$@~`%&*+|\\/[:word:]]\\)"
"\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)")
(defun gnus-button-handle-apropos-command (url)
"Call apropos when pushing the corresponding URL button."
- (apropos-command
+ (apropos-command
(gnus-replace-in-string url gnus-button-handle-describe-prefix "")))
(defun gnus-button-handle-apropos-variable (url)
:type 'integer)
(defcustom gnus-button-emacs-level 5
- "*Integer that says how many emacs-related buttons Gnus will show.
+ "*Integer that says how many emacs-related buttons Gnus will show.
The higher the number, the more buttons will appear and the more false
positves are possible. Note that you can set this variable local to
specifific groups. Setting it higher in Emacs or Gnus related groups is
("mailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1)
;; This is info
- ("\\binfo:\\(//\\)?\\([^'\">\n\t ]+\\)" 0
+ ("\\binfo:\\(//\\)?\\([^'\">\n\t ]+\\)" 0
(>= gnus-button-emacs-level 1) gnus-button-handle-info 2)
;; This is custom
("\\bcustom:\\(//\\)?\\([^'\">\n\t ]+\\)" 0
"*Alist of regexps matching buttons in article bodies.
Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
-REGEXP: is the string matching text around the button (can also be lisp
+REGEXP: is the string matching text around the button (can also be lisp
expression evaluating to a string),
BUTTON: is the number of the regexp grouping actually matching the button,
FORM: is a lisp expression which must eval to true for the button to
(const :tag "always" t)
(const :tag "ask" ask)))
-(defvar message-draft-coding-system (if (boundp 'MULE)
- '*iso-2022-jp*
- 'iso-2022-7bit)
- "Coding system to compose mail.
-Note that the default value for this variable was emacs-mule for Emacs
-or escape-quoted for XEmacs-MULE in the past.")
+(defvar message-draft-coding-system
+ nnheader-auto-save-coding-system
+ "*Coding system to compose mail.
+If you'd like to make it possible to share draft files between XEmacs
+and Emacs, you may use `iso-2022-7bit' for this value at your own risk.
+Note that the coding-system `iso-2022-7bit' isn't suitable to all data.")
(defcustom message-send-mail-partially-limit 1000000
"The limitation of messages sent as message/partial.
;;; Code:
(eval-when-compile (require 'cl))
-(eval-when-compile (require 'static))
(require 'nnheader)
(require 'nnmail)
;; "real" file.
(let* ((file (nndraft-article-filename id))
(auto (nndraft-auto-save-file-name file))
- (newest (if (or (member group '("drafts" "delayed"))
- (file-newer-than-file-p file auto))
- file
- auto))
- (nntp-server-buffer (or buffer nntp-server-buffer))
- ;; The default value for `message-draft-coding-system' was
- ;; `emacs-mule' for Emacs in the past, and the existing draft
- ;; files may have been saved using that coding-system.
- (maybe-emacs-mule-p (and (not (featurep 'xemacs))
- (not (equal "queue" group))
- (eq message-draft-coding-system
- ;; The present default value.
- 'iso-2022-7bit)
- (find-coding-system 'emacs-mule))))
+ (newest (if (file-newer-than-file-p file auto) file auto))
+ (nntp-server-buffer (or buffer nntp-server-buffer)))
(when (and (file-exists-p newest)
- (if (equal "queue" group)
- (nnmail-find-file newest)
- (let ((nnmail-file-coding-system
- (if (file-newer-than-file-p file auto)
- (if (member group '("drafts" "delayed"))
- (if maybe-emacs-mule-p
- nnheader-text-coding-system
- message-draft-coding-system)
- nnheader-text-coding-system)
- nnheader-auto-save-coding-system)))
- (nnmail-find-file newest))))
+ (let ((nnmail-file-coding-system
+ (if (file-newer-than-file-p file auto)
+ (if (member group '("drafts" "delayed"))
+ message-draft-coding-system
+ nnheader-text-coding-system)
+ nnheader-auto-save-coding-system)))
+ (nnmail-find-file newest)))
(save-excursion
(set-buffer nntp-server-buffer)
- (when maybe-emacs-mule-p
- (goto-char (point-min))
- (if (re-search-forward "[^\000-\177]" nil t)
- ;; Consider the file has been saved as `emacs-mule'.
- (decode-coding-region (point-min) (point-max)
- nnheader-auto-save-coding-system)
- (decode-coding-region (point-min) (point-max)
- message-draft-coding-system)))
(goto-char (point-min))
;; If there's a mail header separator in this file,
;; we remove it.
(when (re-search-forward
- (concat "^" mail-header-separator "$") nil t)
+ (concat "^" (regexp-quote mail-header-separator) "$") nil t)
(replace-match "" t t)))
t))))