[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el [gnus-5_10-branch]
From: |
Reiner Steib |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el [gnus-5_10-branch] |
Date: |
Tue, 31 Aug 2004 10:58:10 -0400 |
Index: emacs/lisp/gnus/gnus-art.el
diff -c emacs/lisp/gnus/gnus-art.el:1.49.2.3
emacs/lisp/gnus/gnus-art.el:1.49.2.4
*** emacs/lisp/gnus/gnus-art.el:1.49.2.3 Mon Aug 23 14:13:39 2004
--- emacs/lisp/gnus/gnus-art.el Tue Aug 31 14:47:59 2004
***************
*** 1555,1579 ****
(interactive)
;; This function might be inhibited.
(unless gnus-inhibit-hiding
! (save-excursion
! (save-restriction
! (let ((inhibit-read-only t)
! (case-fold-search t)
! (max (1+ (length gnus-sorted-header-list)))
! (ignored (when (not gnus-visible-headers)
! (cond ((stringp gnus-ignored-headers)
! gnus-ignored-headers)
! ((listp gnus-ignored-headers)
! (mapconcat 'identity gnus-ignored-headers
! "\\|")))))
! (visible
! (cond ((stringp gnus-visible-headers)
! gnus-visible-headers)
! ((and gnus-visible-headers
! (listp gnus-visible-headers))
! (mapconcat 'identity gnus-visible-headers "\\|"))))
! (inhibit-point-motion-hooks t)
! beg)
;; First we narrow to just the headers.
(article-narrow-to-head)
;; Hide any "From " lines at the beginning of (mail) articles.
--- 1555,1589 ----
(interactive)
;; This function might be inhibited.
(unless gnus-inhibit-hiding
! (let ((inhibit-read-only nil)
! (case-fold-search t)
! (max (1+ (length gnus-sorted-header-list)))
! (inhibit-point-motion-hooks t)
! (cur (current-buffer))
! ignored visible beg)
! (save-excursion
! ;; `gnus-ignored-headers' and `gnus-visible-headers' may be
! ;; group parameters, so we should go to the summary buffer.
! (when (prog1
! (condition-case nil
! (progn (set-buffer gnus-summary-buffer) t)
! (error nil))
! (setq ignored (when (not gnus-visible-headers)
! (cond ((stringp gnus-ignored-headers)
! gnus-ignored-headers)
! ((listp gnus-ignored-headers)
! (mapconcat 'identity
! gnus-ignored-headers
! "\\|"))))
! visible (cond ((stringp gnus-visible-headers)
! gnus-visible-headers)
! ((and gnus-visible-headers
! (listp gnus-visible-headers))
! (mapconcat 'identity
! gnus-visible-headers
! "\\|")))))
! (set-buffer cur))
! (save-restriction
;; First we narrow to just the headers.
(article-narrow-to-head)
;; Hide any "From " lines at the beginning of (mail) articles.
***************
*** 2382,2397 ****
(mm-setup-w3m)
(save-restriction
(narrow-to-region (point) (point-max))
! (let ((w3m-safe-url-regexp (if mm-inline-text-html-with-images
! nil
! "\\`cid:"))
w3m-force-redisplay)
(w3m-region (point-min) (point-max)))
! (when mm-inline-text-html-with-w3m-keymap
(add-text-properties
(point-min) (point-max)
! (nconc (mm-w3m-local-map-property)
! '(mm-inline-text-html-with-w3m t))))))
(defun article-hide-list-identifiers ()
"Remove list identifies from the Subject header.
--- 2392,2408 ----
(mm-setup-w3m)
(save-restriction
(narrow-to-region (point) (point-max))
! (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp)
w3m-force-redisplay)
(w3m-region (point-min) (point-max)))
! (when (and mm-inline-text-html-with-w3m-keymap
! (boundp 'w3m-minor-mode-map)
! w3m-minor-mode-map)
(add-text-properties
(point-min) (point-max)
! (list 'keymap w3m-minor-mode-map
! ;; Put the mark meaning this part was rendered by emacs-w3m.
! 'mm-inline-text-html-with-w3m t)))))
(defun article-hide-list-identifiers ()
"Remove list identifies from the Subject header.
***************
*** 3942,4013 ****
"Save the MIME part under point then replace it with an external body."
(interactive)
(gnus-article-check-buffer)
! (let* ((data (get-text-property (point) 'gnus-data))
! file param
! (handles gnus-article-mime-handles))
! (if (mm-multiple-handles gnus-article-mime-handles)
! (error "This function is not implemented"))
! (setq file (and data (mm-save-part data)))
! (when file
! (with-current-buffer (mm-handle-buffer data)
! (erase-buffer)
! (insert "Content-Type: " (mm-handle-media-type data))
! (mml-insert-parameter-string (cdr (mm-handle-type data))
! '(charset))
! (insert "\n")
! (insert "Content-ID: " (message-make-message-id) "\n")
! (insert "Content-Transfer-Encoding: binary\n")
! (insert "\n"))
! (setcdr data
! (cdr (mm-make-handle nil
! `("message/external-body"
! (access-type . "LOCAL-FILE")
! (name . ,file)))))
! (set-buffer gnus-summary-buffer)
! (gnus-article-edit-article
! `(lambda ()
! (erase-buffer)
! (let ((mail-parse-charset (or gnus-article-charset
! ',gnus-newsgroup-charset))
! (mail-parse-ignored-charsets
! (or gnus-article-ignored-charsets
! ',gnus-newsgroup-ignored-charsets))
! (mbl mml-buffer-list))
! (setq mml-buffer-list nil)
! (insert-buffer gnus-original-article-buffer)
! (mime-to-mml ',handles)
! (setq gnus-article-mime-handles nil)
! (let ((mbl1 mml-buffer-list))
! (setq mml-buffer-list mbl)
! (set (make-local-variable 'mml-buffer-list) mbl1))
! (gnus-make-local-hook 'kill-buffer-hook)
! (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)))
! `(lambda (no-highlight)
! (let ((mail-parse-charset (or gnus-article-charset
! ',gnus-newsgroup-charset))
! (message-options message-options)
! (message-options-set-recipient)
! (mail-parse-ignored-charsets
! (or gnus-article-ignored-charsets
! ',gnus-newsgroup-ignored-charsets)))
! (mml-to-mime)
! (mml-destroy-buffers)
! (remove-hook 'kill-buffer-hook
! 'mml-destroy-buffers t)
! (kill-local-variable 'mml-buffer-list))
! (gnus-summary-edit-article-done
! ,(or (mail-header-references gnus-current-headers) "")
! ,(gnus-group-read-only-p)
! ,gnus-summary-buffer no-highlight))))))
(defun gnus-mime-delete-part ()
"Delete the MIME part under point.
Replace it with some information about the removed part."
(interactive)
(gnus-article-check-buffer)
! (unless (and gnus-novice-user
! (not (gnus-yes-or-no-p
! "Really delete attachment forever? ")))
(let* ((data (get-text-property (point) 'gnus-data))
(handles gnus-article-mime-handles)
(none "(none)")
--- 3953,4033 ----
"Save the MIME part under point then replace it with an external body."
(interactive)
(gnus-article-check-buffer)
! (when (gnus-group-read-only-p)
! (error "The current group does not support deleting of parts"))
! (when (mm-complicated-handles gnus-article-mime-handles)
! (error "\
! The current article has a complicated MIME structure, giving up..."))
! (when (gnus-yes-or-no-p "\
! Deleting parts may malfunction or destroy the article; continue? ")
! (let* ((data (get-text-property (point) 'gnus-data))
! file param
! (handles gnus-article-mime-handles))
! (setq file (and data (mm-save-part data)))
! (when file
! (with-current-buffer (mm-handle-buffer data)
! (erase-buffer)
! (insert "Content-Type: " (mm-handle-media-type data))
! (mml-insert-parameter-string (cdr (mm-handle-type data))
! '(charset))
! (insert "\n")
! (insert "Content-ID: " (message-make-message-id) "\n")
! (insert "Content-Transfer-Encoding: binary\n")
! (insert "\n"))
! (setcdr data
! (cdr (mm-make-handle nil
! `("message/external-body"
! (access-type . "LOCAL-FILE")
! (name . ,file)))))
! (set-buffer gnus-summary-buffer)
! (gnus-article-edit-article
! `(lambda ()
! (erase-buffer)
! (let ((mail-parse-charset (or gnus-article-charset
! ',gnus-newsgroup-charset))
! (mail-parse-ignored-charsets
! (or gnus-article-ignored-charsets
! ',gnus-newsgroup-ignored-charsets))
! (mbl mml-buffer-list))
! (setq mml-buffer-list nil)
! (insert-buffer gnus-original-article-buffer)
! (mime-to-mml ',handles)
! (setq gnus-article-mime-handles nil)
! (let ((mbl1 mml-buffer-list))
! (setq mml-buffer-list mbl)
! (set (make-local-variable 'mml-buffer-list) mbl1))
! (gnus-make-local-hook 'kill-buffer-hook)
! (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)))
! `(lambda (no-highlight)
! (let ((mail-parse-charset (or gnus-article-charset
! ',gnus-newsgroup-charset))
! (message-options message-options)
! (message-options-set-recipient)
! (mail-parse-ignored-charsets
! (or gnus-article-ignored-charsets
! ',gnus-newsgroup-ignored-charsets)))
! (mml-to-mime)
! (mml-destroy-buffers)
! (remove-hook 'kill-buffer-hook
! 'mml-destroy-buffers t)
! (kill-local-variable 'mml-buffer-list))
! (gnus-summary-edit-article-done
! ,(or (mail-header-references gnus-current-headers) "")
! ,(gnus-group-read-only-p)
! ,gnus-summary-buffer no-highlight)))))))
(defun gnus-mime-delete-part ()
"Delete the MIME part under point.
Replace it with some information about the removed part."
(interactive)
(gnus-article-check-buffer)
! (when (gnus-group-read-only-p)
! (error "The current group does not support deleting of parts"))
! (when (mm-complicated-handles gnus-article-mime-handles)
! (error "\
! The current article has a complicated MIME structure, giving up..."))
! (when (gnus-yes-or-no-p "\
! Deleting parts may malfunction or destroy the article; continue? ")
(let* ((data (get-text-property (point) 'gnus-data))
(handles gnus-article-mime-handles)
(none "(none)")
***************
*** 4019,4026 ****
(or (mail-content-type-get (mm-handle-disposition data) 'filename)
none))
(type (mm-handle-media-type data)))
! (if (mm-multiple-handles gnus-article-mime-handles)
! (error "This function is not implemented"))
(with-current-buffer (mm-handle-buffer data)
(let ((bsize (format "%s" (buffer-size))))
(erase-buffer)
--- 4039,4046 ----
(or (mail-content-type-get (mm-handle-disposition data) 'filename)
none))
(type (mm-handle-media-type data)))
! (unless data
! (error "No MIME part under point"))
(with-current-buffer (mm-handle-buffer data)
(let ((bsize (format "%s" (buffer-size))))
(erase-buffer)
***************
*** 5016,5021 ****
--- 5036,5042 ----
(save-excursion
(save-restriction
(widen)
+ (forward-line)
(eobp)))) ;Real end-of-buffer?
(progn
(when gnus-article-over-scroll
***************
*** 5173,5183 ****
(let ((obuf (current-buffer))
(owin (current-window-configuration))
(opoint (point))
! (summary gnus-article-current-summary)
! func in-buffer selected)
! (if not-restore-window
! (pop-to-buffer summary 'norecord)
! (switch-to-buffer summary 'norecord))
(setq in-buffer (current-buffer))
;; We disable the pick minor mode commands.
(if (and (setq func (let (gnus-pick-mode)
--- 5194,5206 ----
(let ((obuf (current-buffer))
(owin (current-window-configuration))
(opoint (point))
! win func in-buffer selected new-sum-start new-sum-hscroll)
! (cond (not-restore-window
! (pop-to-buffer gnus-article-current-summary 'norecord))
! ((setq win (get-buffer-window gnus-article-current-summary))
! (select-window win))
! (t
! (switch-to-buffer gnus-article-current-summary 'norecord)))
(setq in-buffer (current-buffer))
;; We disable the pick minor mode commands.
(if (and (setq func (let (gnus-pick-mode)
***************
*** 5185,5191 ****
(functionp func))
(progn
(call-interactively func)
! (setq new-sum-point (point))
(when (eq in-buffer (current-buffer))
(setq selected (gnus-summary-select-article))
(set-buffer obuf)
--- 5208,5217 ----
(functionp func))
(progn
(call-interactively func)
! (when (eq win (selected-window))
! (setq new-sum-point (point)
! new-sum-start (window-start win)
! new-sum-hscroll (window-hscroll win))
(when (eq in-buffer (current-buffer))
(setq selected (gnus-summary-select-article))
(set-buffer obuf)
***************
*** 5197,5206 ****
1)
(set-window-point (get-buffer-window (current-buffer))
(point)))
! (let ((win (get-buffer-window gnus-article-current-summary)))
! (when win
! (set-window-point win new-sum-point)))) )
! (switch-to-buffer gnus-article-buffer)
(ding))))))
(defun gnus-article-describe-key (key)
--- 5223,5234 ----
1)
(set-window-point (get-buffer-window (current-buffer))
(point)))
! (when (and (not not-restore-window)
! new-sum-point)
! (set-window-point win new-sum-point)
! (set-window-start win new-sum-start)
! (set-window-hscroll win new-sum-hscroll)))))
! (set-window-configuration owin)
(ding))))))
(defun gnus-article-describe-key (key)
***************
*** 6678,6683 ****
--- 6706,6720 ----
(define-key map "\r" 'gnus-button-prev-page)
map))
+ (defvar gnus-next-page-map
+ (let ((map (make-sparse-keymap)))
+ (unless (>= emacs-major-version 21)
+ ;; XEmacs doesn't care.
+ (set-keymap-parent map gnus-article-mode-map))
+ (define-key map gnus-mouse-2 'gnus-button-next-page)
+ (define-key map "\r" 'gnus-button-next-page)
+ map))
+
(defun gnus-insert-prev-page-button ()
(let ((b (point))
(inhibit-read-only t))
***************
*** 6695,6718 ****
:action 'gnus-button-prev-page
:button-keymap gnus-prev-page-map)))
- (defvar gnus-prev-page-map
- (let ((map (make-sparse-keymap)))
- (unless (>= emacs-major-version 21)
- ;; XEmacs doesn't care.
- (set-keymap-parent map gnus-article-mode-map))
- (define-key map gnus-mouse-2 'gnus-button-prev-page)
- (define-key map "\r" 'gnus-button-prev-page)
- map))
-
- (defvar gnus-next-page-map
- (let ((map (make-sparse-keymap)))
- (unless (>= emacs-major-version 21)
- ;; XEmacs doesn't care.
- (set-keymap-parent map gnus-article-mode-map))
- (define-key map gnus-mouse-2 'gnus-button-next-page)
- (define-key map "\r" 'gnus-button-next-page)
- map))
-
(defun gnus-button-next-page (&optional args more-args)
"Go to the next page."
(interactive)
--- 6732,6737 ----