[# If set to t, that means we are running in a shell under Emacs.
# If you have an Emacs named "t", then use the full path.
test "$EMACS" = t && EMACS=
- AC_PATH_PROG(EMACS, emacs xemacs, no)
+ AC_PATH_PROGS(EMACS, emacs xemacs, no)
if test $EMACS != "no"; then
AC_MSG_CHECKING([where .elc files should go])
dnl Set default value
+Mon Jun 28 17:54:01 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.89 is released.
+
+1999-06-24 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * nnmail.el (nnmail-file-coding-system-1): For NTEmacs in Windows.
+ * message.el (message-draft-coding-system): Ditto.
+ * mm-util.el (mm-running-ntemacs): Ditto.
+
+1999-06-23 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-xmas.el (gnus-xmas-summary-recenter): A blank line may
+ cause problem.
+
+1999-06-23 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-view.el (mm-inline-text): Ignore error in w3-region.
+
+1999-06-23 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mml.el: require mm-decode.
+
+1999-06-23 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-art.el (gnus-display-mime): Treat as head only if necessary.
+
+1999-06-23 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-view.el (mm-inline-image): Fix image undisplayer.
+
+1999-06-22 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mml.el (mml-insert-multipart): Error in compeling-read.
+ (mml-insert-tag): Match tags.
+
+1999-06-19 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-cache.el (gnus-cache-braid-nov): Fix coding-system bug.
+ (gnus-cache-braid-heads): Ditto.
+ (gnus-cache-retrieve-headers): Ditto.
+
+1999-06-16 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-draft.el (gnus-draft-send): Fix encoding bug.
+
+1999-06-16 10:17:29 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-art.el (gnus-article-read-summary-keys): Convert key events
+ to string under XEmacs.
+
+1999-06-28 19:34:03 Petersen Jens-Ulrik <jens-ulrik.petersen@nokia.com>
+
+ * gnus-start.el (gnus-find-new-newsgroups): Doc fix.
+
+1999-06-22 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-view.el (mm-inline-message): Fix message view bug.
+ * gnus-art.el (gnus-article-prepare): Ditto.
+
+1999-06-16 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-cache.el (gnus-cache-possibly-enter-article): Fetch headers.
+
Tue Jun 15 04:13:01 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.88 is released.
(set-buffer gnus-article-buffer)
(let ((inhibit-point-motion-hooks t)
buffer-read-only
- (mail-parse-charset gnus-newsgroup-charset))
+ (mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(mail-decode-encoded-word-region (point-min) (point-max)))))
(defun article-decode-charset (&optional prompt)
(ctl
(mail-content-type-get ctl 'charset))))
(mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets))
buffer-read-only)
- (when (memq charset gnus-newsgroup-ignored-charsets)
- (setq charset nil))
(goto-char (point-max))
(widen)
(forward-line 1)
(save-current-buffer
(set-buffer gnus-article-buffer)
(let ((handles (or handles gnus-article-mime-handles))
- (mail-parse-charset gnus-newsgroup-charset))
+ (mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(if (stringp (car handles))
(gnus-mime-view-all-parts (cdr handles))
(mapcar 'mm-display-part handles)))))
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
(mm-user-display-methods nil)
(mm-all-images-fit t)
- (mail-parse-charset gnus-newsgroup-charset))
+ (mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(if (mm-handle-undisplayer handle)
(mm-remove-part handle)
(mm-display-part handle))))
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
(mm-user-display-methods '((".*" . inline)))
(mm-all-images-fit t)
- (mail-parse-charset gnus-newsgroup-charset))
+ (mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(if (mm-handle-undisplayer handle)
(mm-remove-part handle)
(mm-display-part handle))))
(forward-line 1)
(prog1
(let ((window (selected-window))
- (mail-parse-charset gnus-newsgroup-charset))
+ (mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(save-excursion
(unwind-protect
(let ((win (get-buffer-window (current-buffer) t))
(when (and (not ihandles)
(not gnus-displaying-mime))
;; Top-level call; we clean up.
- (mm-destroy-parts gnus-article-mime-handles)
- (setq gnus-article-mime-handles handles
- gnus-article-mime-handle-alist nil)
+ (when gnus-article-mime-handles
+ (mm-destroy-parts gnus-article-mime-handles)
+ (setq gnus-article-mime-handle-alist nil)) ;; A trick.
+ (setq gnus-article-mime-handles handles)
;; We allow users to glean info from the handles.
(when gnus-article-mime-part-function
(gnus-mime-part-function handles)))
(narrow-to-region (point) (point-max))
(gnus-treat-article nil 1 1)
(widen)))
- ;; Highlight the headers.
- (save-excursion
- (save-restriction
- (article-goto-body)
- (narrow-to-region (point-min) (point))
- (gnus-treat-article 'head)))))))
+ (if (not ihandles)
+ ;; Highlight the headers.
+ (save-excursion
+ (save-restriction
+ (article-goto-body)
+ (narrow-to-region (point-min) (point))
+ (gnus-treat-article 'head))))))))
(defvar gnus-mime-display-multipart-as-mixed nil)
(display
(when move
(forward-line -2))
- (let ((mail-parse-charset gnus-newsgroup-charset))
+ (let ((mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(mm-display-part handle t))
(goto-char (point-max)))
((and text not-attachment)
(when preferred
(if (stringp (car preferred))
(gnus-display-mime preferred)
- (let ((mail-parse-charset gnus-newsgroup-charset))
+ (let ((mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(mm-display-part preferred)))
(goto-char (point-max))
(setcdr begend (point-marker)))))
(set-buffer gnus-article-current-summary)
(let (gnus-pick-mode)
(push (or key last-command-event) unread-command-events)
- (setq keys (read-key-sequence nil))))
+ (setq keys (if gnus-xemacs
+ (events-to-keys (read-key-sequence nil))
+ (read-key-sequence nil)))))
+
(message "")
(if (or (member keys nosaves)
(when (> (buffer-size) 0)
(gnus-write-buffer-as-coding-system
gnus-cache-write-file-coding-system file)
+ (setq headers (nnheader-parse-head t))
+ (mail-header-set-number headers number)
(gnus-cache-change-buffer group)
(set-buffer (cdr gnus-cache-buffer))
(goto-char (point-max))
;; unsuccessful), so we use the cached headers exclusively.
(set-buffer nntp-server-buffer)
(erase-buffer)
- (nnheader-insert-file-contents cache-file)
+ (let ((nnheader-file-coding-system
+ gnus-cache-overview-coding-system))
+ (nnheader-insert-file-contents cache-file))
'nov)
((eq type 'nov)
;; We have both cached and uncached NOV headers, so we
(save-excursion
(set-buffer cache-buf)
(erase-buffer)
- (nnheader-insert-file-contents (or file (gnus-cache-file-name group ".overview")))
+ (let ((nnheader-file-coding-system gnus-cache-overview-coding-system))
+ (nnheader-insert-file-contents
+ (or file (gnus-cache-file-name group ".overview"))))
(goto-char (point-min))
(insert "\n")
(goto-char (point-min)))
(save-excursion
(set-buffer cache-buf)
(erase-buffer)
- (nnheader-insert-file-contents (gnus-cache-file-name group (car cached)))
+ (let ((nnheader-file-coding-system gnus-cache-coding-system))
+ (nnheader-insert-file-contents
+ (gnus-cache-file-name group (car cached))))
(goto-char (point-min))
(insert "220 ")
(princ (car cached) (current-buffer))
(charset (symbol :tag "Charset") "\
The default charset to use in the group.")
+ (ignored-charsets
+ (choice :tag "Ignored charsets"
+ :value nil
+ (repeat (symbol))) "\
+List of charsets that should be ignored.
+
+When these charsets are used in the \"charset\" parameter, the
+default charset will be used instead.")
+
(highlight-words
(choice :tag "Highlight words"
:value nil
(gnus-draft-setup-for-sending article (or group "nndraft:queue"))
(let ((message-syntax-checks (if interactive nil
'dont-check-for-anything-just-trust-me))
- (message-inhibit-body-encoding t)
- message-send-hook type method)
+ (message-inhibit-body-encoding (or (not group)
+ (equal group "nndraft:queue")
+ message-inhibit-body-encoding))
+ (message-send-hook (and group (not (equal group "nndraft:queue"))
+ message-send-hook))
+ type method)
;; We read the meta-information that says how and where
;; this message is to be sent.
(save-restriction
(defun gnus-find-new-newsgroups (&optional arg)
"Search for new newsgroups and add them.
-Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.'
+Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method'.
The `-n' option line from .newsrc is respected.
With 1 C-u, use the `ask-server' method to query the server for new
:type '(repeat symbol)
:group 'gnus-charset)
+(defcustom gnus-group-ignored-charsets-alist
+ '(("alt\\.chinese\\.text" iso-8859-1))
+ "Alist of regexps (to match group names) and charsets that should be ignored.
+When these charsets are used in the \"charset\" parameter, the
+default charset will be used instead."
+ :type '(repeat (cons (regexp :tag "Group")
+ (repeat symbol)))
+ :group 'gnus-charset)
+
(defcustom gnus-group-highlight-words-alist nil
"Alist of group regexps and highlight regexps.
This variable uses the same syntax as `gnus-emphasis-alist'."
"\M-\C-e" gnus-summary-expire-articles-now
"\177" gnus-summary-delete-article
[delete] gnus-summary-delete-article
+ [backspace] gnus-summary-delete-article
"m" gnus-summary-move-article
"r" gnus-summary-respool-article
"w" gnus-summary-edit-article
(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))))
- (mail-parse-charset gnus-newsgroup-charset))
+ (mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(cond
((and to
gnus-ignored-from-addresses
(save-excursion (set-buffer gnus-summary-buffer)
gnus-newsgroup-dependencies)))
headers id end ref
- (mail-parse-charset gnus-newsgroup-charset))
+ (mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ (save-excursion (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-ignored-charsets)))
(save-excursion
(set-buffer nntp-server-buffer)
;; Translate all TAB characters into SPACE characters.
;; NNTP servers do not include Xrefs when using XOVER.
(setq gnus-article-internal-prepare-hook '(gnus-article-get-xrefs))
(let ((mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)
(cur nntp-server-buffer)
(dependencies (or dependencies gnus-newsgroup-dependencies))
number headers header)
If FORCE is non-nil, allow editing of articles even in read-only
groups."
(interactive "P")
- (let ((mail-parse-charset gnus-newsgroup-charset))
- (save-excursion
- (set-buffer gnus-summary-buffer)
+ (save-excursion
+ (set-buffer gnus-summary-buffer)
+ (let ((mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
(gnus-set-global-variables)
(when (and (not force)
(gnus-group-read-only-p))
(gnus-article-edit-article
'ignore
`(lambda (no-highlight)
- (let ((mail-parse-charset ',gnus-newsgroup-charset))
+ (let ((mail-parse-charset ',gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets
+ ',gnus-newsgroup-ignored-charsets))
(gnus-summary-edit-article-done
,(or (mail-header-references gnus-current-headers) "")
,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight)))))))
(defun gnus-summary-setup-default-charset ()
"Setup newsgroup default charset."
- (let ((name (and gnus-newsgroup-name
- (gnus-group-real-name gnus-newsgroup-name))))
+ (let* ((name (and gnus-newsgroup-name
+ (gnus-group-real-name gnus-newsgroup-name)))
+ (ignored-charsets
+ (append
+ (and gnus-newsgroup-name
+ (or (gnus-group-find-parameter gnus-newsgroup-name
+ 'ignored-charsets t)
+ (let ((alist gnus-group-ignored-charsets-alist)
+ elem (charsets nil))
+ (while (setq elem (pop alist))
+ (when (and name
+ (string-match (car elem) name))
+ (setq alist nil
+ charsets (cdr elem))))
+ charsets)))
+ gnus-newsgroup-ignored-charsets)))
(setq gnus-newsgroup-charset
(or (and gnus-newsgroup-name
(or (gnus-group-find-parameter gnus-newsgroup-name
(setq alist nil
charset (cadr elem))))
charset)))
- gnus-default-charset))))
+ gnus-default-charset))
+ (set (make-local-variable 'gnus-newsgroup-ignored-charsets)
+ ignored-charsets)))
;;;
;;; Mime Commands
(sit-for 0))
(when gnus-auto-center-summary
(let* ((height (if (fboundp 'window-displayed-height)
- (window-displayed-height)
+ (1- (window-displayed-height))
(- (window-height) 2)))
(top (cond ((< height 4) 0)
((< height 7) 1)
functions that wish to call mail-parse functions and let them know
what the desired charset is to be.")
+(defvar mail-parse-ignored-charsets nil
+ "Ignored charsets used by low-level libraries.
+This variable should never be set. Instead, it should be bound by
+functions that wish to call mail-parse functions and let them know
+what the desired charsets is to be ignored.")
+
(provide 'mail-prsvr)
;;; mail-prsvr.el ends here
(cond
((not (fboundp 'find-coding-system)) nil)
((find-coding-system 'emacs-mule)
- (if (string-match "nt" system-configuration)
+ (if (string-match "nt\\|windows" system-configuration)
'emacs-mule-dos 'emacs-mule))
((find-coding-system 'escape-quoted) 'escape-quoted)
((find-coding-system 'no-conversion) 'no-conversion)
(defun mm-decode-body (charset &optional encoding type)
"Decode the current article that has been encoded with ENCODING.
The characters in CHARSET should then be decoded."
- (setq charset (or charset mail-parse-charset))
+ (if (stringp charset)
+ (setq charset (intern (downcase charset))))
+ (if (or (not charset) (memq charset mail-parse-ignored-charsets))
+ (setq charset mail-parse-charset))
(save-excursion
(when encoding
(mm-decode-content-transfer-encoding encoding type))
(defun mm-decode-string (string charset)
"Decode STRING with CHARSET."
- (setq charset (or charset mail-parse-charset))
+ (if (stringp charset)
+ (setq charset (intern (downcase charset))))
+ (if (or (not charset) (memq charset mail-parse-ignored-charsets))
+ (setq charset mail-parse-charset))
(or
(when (featurep 'mule)
(let (mule-charset)
(defvar mm-running-ntemacs
(and (not mm-running-xemacs)
- (string-match "nt" system-configuration)))
+ (string-match "nt\\|windows" system-configuration)))
(defvar mm-binary-coding-system
(if mm-running-xemacs
;;;
(defun mm-inline-image (handle)
- (let ((annot (make-annotation (mm-get-image handle) nil 'text))
+ (let ((b (point))
+ (annot (make-annotation (mm-get-image handle) nil 'text))
buffer-read-only)
- (mm-insert-inline handle "\n")
+ (insert "\n")
+ (mm-handle-set-undisplayer
+ handle
+ `(lambda ()
+ (let (buffer-read-only)
+ (delete-annotation ,annot)
+ (delete-region ,(set-marker (make-marker) b)
+ ,(set-marker (make-marker) (point))))))
(set-extent-property annot 'mm t)
(set-extent-property annot 'duplicable t)))
(save-restriction
(narrow-to-region b (point))
(goto-char (point-min))
- (if (or (re-search-forward w3-meta-content-type-charset-regexp nil t)
- (re-search-forward w3-meta-charset-content-type-regexp nil t))
+ (if (or (re-search-forward
+ w3-meta-content-type-charset-regexp nil t)
+ (re-search-forward
+ w3-meta-charset-content-type-regexp nil t))
(setq charset (w3-coding-system-for-mime-charset
(buffer-substring-no-properties
(match-beginning 2)
(match-end 2)))))
(mm-decode-body charset)
(save-window-excursion
- (let ((w3-strict-width width)
- (url-standalone-mode t))
- (w3-region (point-min) (point-max)))))
- (narrow-to-region (1+ (point-min)) (point-max))
- (mm-handle-set-undisplayer
- handle
- `(lambda ()
- (let (buffer-read-only)
- (mapc (lambda (prop)
- (remove-specifier
- (face-property 'default prop) (current-buffer)))
- '(background background-pixmap foreground))
- (delete-region ,(point-min-marker)
- ,(point-max-marker))))))))
+ (save-restriction
+ (let ((w3-strict-width width)
+ (url-standalone-mode t))
+ (condition-case var
+ (w3-region (point-min) (point-max))
+ (error)))))
+;;; (narrow-to-region (1+ (point-min)) (point-max))
+ (mm-handle-set-undisplayer
+ handle
+ `(lambda ()
+ (let (buffer-read-only)
+ (if (functionp 'remove-specifier)
+ (mapc (lambda (prop)
+ (remove-specifier
+ (face-property 'default prop) (current-buffer)))
+ '(background background-pixmap foreground)))
+ (delete-region ,(point-min-marker)
+ ,(point-max-marker)))))))))
((or (equal type "enriched")
(equal type "richtext"))
(save-excursion
(goto-char (point-min)))
(defun mm-inline-message (handle)
- (let ((b (point)))
+ (let ((b (point)) gnus-displaying-mime handles)
(save-excursion
(save-restriction
(narrow-to-region b b)
(mm-insert-part handle)
- (run-hooks 'gnus-article-decode-hook)
- (gnus-article-prepare-display)
+ (let (gnus-article-mime-handles)
+ (run-hooks 'gnus-article-decode-hook)
+ (gnus-article-prepare-display)
+ (setq handles gnus-article-mime-handles))
+ (if handles
+ (setq gnus-article-mime-handles
+ (append gnus-article-mime-handles handles)))
(mm-handle-set-undisplayer
handle
`(lambda ()
(require 'mm-util)
(require 'mm-bodies)
(require 'mm-encode)
+(require 'mm-decode)
(eval-and-compile
(autoload 'message-make-message-id "message"))
(when (string-match "[\"\\~/* \t\n]" value)
(setq value (prin1-to-string value)))
(insert (format " %s=%s" key value)))))
- (insert ">\n<#/part>\n"))
+ (insert ">\n<#/" name ">\n"))
;;; Attachment functions.
'description description))
(defun mml-insert-multipart (&optional type)
- (interactive (list (completing-read "Multipart type (default mixed): ")
- "mixed"
+ (interactive (list (completing-read "Multipart type (default mixed): "
'(("mixed") ("alternative") ("digest") ("parallel")
- ("signed") ("encrypted"))))
+ ("signed") ("encrypted"))
+ nil nil "mixed")))
(or type
(setq type "mixed"))
(mml-insert-tag "multipart" 'type type)
- (insert "<#/!multipart>\n")
(forward-line -1))
(defun mml-preview (&optional raw)
"Coding system used in nnmail.")
(defvar nnmail-file-coding-system-1
- (if (string-match "nt" system-configuration)
+ (if (string-match "nt\\|windows" system-configuration)
'raw-text-dos 'binary)
"Another coding system used in nnmail.")
"Decode STRING that uses CHARSET with ENCODING.
Valid ENCODINGs are \"B\" and \"Q\".
If your Emacs implementation can't decode CHARSET, it returns nil."
+ (if (stringp charset)
+ (setq charset (intern (downcase charset))))
+ (if (or (not charset) (memq charset mail-parse-ignored-charsets))
+ (setq charset mail-parse-charset))
(let ((cs (mm-charset-to-coding-system charset)))
(when cs
(when (and (eq cs 'ascii)