+2001-04-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/gnus-vers.el (gnus-revision-number): Increment to 01.
+
+ * lisp/gnus-art.el (gnus-article-mime-edit-exit): Set buffer to
+ `gnus-article-buffer' just before `gnus-article-prepare-display' is
+ called.
+ (gnus-article-mime-edit-article-setup): Ditto.
+ (gnus-article-prepare-display): Don't bind `buffer-read-only'
+ because of `inhibit-read-only'; don't set the value of
+ `gnus-article-current-summary' here; delete all extents or overlays
+ and clear the value of `gnus-button-marker-list' in advance; make
+ it to run in `gnus-article-buffer'.
+ (gnus-article-prepare): Make it to run in `gnus-article-buffer'.
+ (article-toggle-headers): Don't bind `buffer-read-only' because of
+ `inhibit-read-only'.
+ (article-hide-headers): Ditto.
+
2001-04-16 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus-vers.el: T-gnus 6.15.3 revision 00.
(unless gnus-inhibit-hiding
(save-excursion
(save-restriction
- (let ((buffer-read-only nil)
- (inhibit-read-only t)
+ (let ((inhibit-read-only t)
(case-fold-search t)
(max (1+ (length gnus-sorted-header-list)))
(ignored (when (not gnus-visible-headers)
(header-end (point-min))
header-start field-end field-start
(inhibit-point-motion-hooks t)
- (inhibit-read-only t)
- buffer-read-only)
+ (inhibit-read-only t))
(save-restriction
(widen)
(while (and (setq header-start
result)
(save-excursion
(gnus-article-setup-buffer)
- (set-buffer gnus-original-article-buffer)
+ (set-buffer gnus-article-buffer)
;; Deactivate active regions.
(when (and (boundp 'transient-mark-mode)
transient-mark-mode)
;;;###autoload
(defun gnus-article-prepare-display ()
"Make the current buffer look like a nice article."
- (setq gnus-article-wash-types nil)
- (gnus-run-hooks 'gnus-tmp-internal-hook)
+ (let ((gnus-article-buffer (current-buffer))
+ buffer-read-only)
+ (unless (eq major-mode 'gnus-article-mode)
+ (gnus-article-mode))
+ (setq buffer-read-only nil
+ gnus-button-marker-list nil
+ gnus-article-wash-types nil)
+ (save-restriction
+ (widen)
+ (static-if (featurep 'xemacs)
+ (map-extents (lambda (extent maparg) (delete-extent extent)))
+ (let ((lists (overlay-lists)))
+ (dolist (overlay (nconc (car lists) (cdr lists)))
+ (delete-overlay overlay)))))
+ (gnus-run-hooks 'gnus-tmp-internal-hook))
+ (set-buffer gnus-original-article-buffer)
;; Display message.
(setq mime-message-structure gnus-current-headers)
(mime-buffer-entity-set-buffer-internal mime-message-structure
(let (mime-display-header-hook mime-display-text/plain-hook)
(funcall gnus-article-display-method-for-mime))
(funcall gnus-article-display-method-for-traditional))
- ;; Associate this article with the current summary buffer.
- (setq gnus-article-current-summary gnus-summary-buffer)
;; Call the treatment functions.
- (let ((inhibit-read-only t)
- buffer-read-only)
+ (let ((inhibit-read-only t))
(save-restriction
(widen)
(if gnus-show-mime
nil t)
(replace-match "")))
(apply ,gnus-article-edit-done-function args)
- (set-buffer (get-buffer-create gnus-original-article-buffer))
- (erase-buffer)
- (insert-buffer gnus-article-buffer)
+ (insert
+ (prog1
+ (buffer-substring-no-properties (point-min) (point-max))
+ (set-buffer (get-buffer-create gnus-original-article-buffer))
+ (erase-buffer)))
(setq gnus-current-headers (gnus-article-make-full-mail-header))
+ (set-buffer gnus-article-buffer)
(gnus-article-prepare-display)))
(substitute-key-definition 'gnus-article-edit-done
'gnus-article-mime-edit-done
(set-buffer (get-buffer-create gnus-original-article-buffer))
(erase-buffer)))
(setq gnus-current-headers (gnus-article-make-full-mail-header))
+ (set-buffer gnus-article-buffer)
(gnus-article-prepare-display)
(set-window-configuration winconf))))