X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-art.el;h=b9020a40b7502e3a9074509205470c285379c66d;hb=873ba7b51ddfb07246cd874b7de72662308236c9;hp=2839a603a9a27d4378ee1ac09101bd9bfb6698d3;hpb=f59e2e33112ea1a959113c4bdc0c4ee9c26b51d7;p=gnus diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 2839a603a..b9020a40b 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1794,14 +1794,6 @@ Initialized from `text-mode-syntax-table.") (put-text-property (max (1- b) (point-min)) b 'intangible nil))) -(defun gnus-article-hide-text-of-type (type) - "Hide text of TYPE in the current buffer." - (save-excursion - (let ((b (point-min)) - (e (point-max))) - (while (setq b (text-property-any b e 'article-type type)) - (add-text-properties b (incf b) gnus-hidden-properties))))) - (defun gnus-article-delete-text-of-type (type) "Delete text of TYPE in the current buffer." (save-excursion @@ -1834,10 +1826,6 @@ Initialized from `text-mode-syntax-table.") b (or (text-property-not-all b (point-max) 'invisible t) (point-max))))))) -(defun gnus-article-text-type-exists-p (type) - "Say whether any text of type TYPE exists in the buffer." - (text-property-any (point-min) (point-max) 'article-type type)) - (defsubst gnus-article-header-rank () "Give the rank of the string HEADER as given by `gnus-sorted-header-list'." (let ((list gnus-sorted-header-list) @@ -2146,23 +2134,6 @@ try this wash." props) (insert replace))))))))) -(defun article-translate-characters (from to) - "Translate all characters in the body of the article according to FROM and TO. -FROM is a string of characters to translate from; to is a string of -characters to translate to." - (save-excursion - (when (article-goto-body) - (let ((inhibit-read-only t) - (x (make-string 225 ?x)) - (i -1)) - (while (< (incf i) (length x)) - (aset x i i)) - (setq i 0) - (while (< i (length from)) - (aset x (aref from i) (aref to i)) - (incf i)) - (translate-region (point) (point-max) x))))) - (defun article-translate-strings (map) "Translate all string in the body of the article according to MAP. MAP is an alist where the elements are on the form (\"from\" \"to\")." @@ -2231,7 +2202,8 @@ unfolded." (unfoldable (or (equal gnus-article-unfold-long-headers t) (and (stringp gnus-article-unfold-long-headers) - (string-match gnus-article-unfold-long-headers header))))) + (string-match gnus-article-unfold-long-headers + header))))) (with-temp-buffer (insert header) (goto-char (point-min)) @@ -2465,9 +2437,10 @@ long lines if and only if arg is positive." (apply 'gnus-create-image png 'png t (cdr (assq 'png gnus-face-properties-alist)))) (goto-char from) - (gnus-add-wash-type 'face) - (gnus-add-image 'face image) - (gnus-put-image image nil 'face)))))))))) + (when image + (gnus-add-wash-type 'face) + (gnus-add-image 'face image) + (gnus-put-image image nil 'face))))))))))) (defun article-display-x-face (&optional force) "Look for an X-Face header and display it if present." @@ -2754,9 +2727,11 @@ If READ-CHARSET, ask for a coding system." (let ((handles nil) (buffer-read-only nil)) (when (gnus-buffer-live-p gnus-original-article-buffer) - (setq handles (mm-dissect-buffer t t))) + (with-current-buffer gnus-original-article-buffer + (setq handles (mm-dissect-buffer t t)))) (article-goto-body) (delete-region (point) (point-max)) + (mm-enable-multibyte) (mm-inline-text-html handles))) (defvar gnus-article-browse-html-temp-list nil @@ -4582,6 +4557,10 @@ commands: (when (eq (elt timer 5) 'image-animate-timeout) (cancel-timer timer)))) +(defun gnus-stop-downloads () + (when (boundp 'url-queue) + (set (intern "url-queue" obarray) nil))) + ;; Set article window start at LINE, where LINE is the number of lines ;; from the head of the article. (defun gnus-article-set-window-start (&optional line) @@ -4804,10 +4783,10 @@ If a prefix ARG is given, ask for confirmation." (dolist (buf (gnus-buffers)) (with-current-buffer buf (when (eq major-mode 'gnus-sticky-article-mode) - (if (not arg) - (gnus-kill-buffer buf) - (when (yes-or-no-p (concat "Kill buffer " (buffer-name buf) "? ")) - (gnus-kill-buffer buf))))))) + (if (not arg) + (gnus-kill-buffer buf) + (when (yes-or-no-p (concat "Kill buffer " (buffer-name buf) "? ")) + (gnus-kill-buffer buf))))))) ;;; ;;; Gnus MIME viewing functions @@ -5614,7 +5593,9 @@ all parts." (let ((handle (cdr (assq n gnus-article-mime-handle-alist)))) (when (gnus-article-goto-part n) (if (equal (car handle) "multipart/alternative") - (gnus-article-press-button) + (progn + (beginning-of-line) ;; Make it toggle subparts + (gnus-article-press-button)) (when (eq (gnus-mm-display-part handle) 'internal) (gnus-set-window-start))))))) @@ -6518,7 +6499,8 @@ not have a face in `gnus-article-boring-faces'." (ding) (unless (member keys nosave-in-article) (set-buffer gnus-article-current-summary)) - (when (get func 'disabled) + (when (and (symbolp func) + (get func 'disabled)) (error "Function %s disabled" func)) (call-interactively func) (setq new-sum-point (point))) @@ -6760,11 +6742,6 @@ If given a prefix, show the hidden text instead." (gnus-article-hide-citation-maybe arg force) (gnus-article-hide-signature arg)) -(defun gnus-article-maybe-highlight () - "Do some article highlighting if article highlighting is requested." - (when (gnus-visual-p 'article-highlight 'highlight) - (gnus-article-highlight-some))) - (defun gnus-check-group-server () ;; Make sure the connection to the server is alive. (unless (gnus-server-opened