X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-art.el;h=d96df61a1f882f50cf24e24a17ccfc5aaedbf347;hb=8339220cc25db3fbdab4367d6252e596bddd9cb1;hp=8a0f0a3c3886f8b00909eed8b55ff5fc52fb32cb;hpb=079381a6c84bf3dfeffb3efbea4b4904a3bee940;p=gnus diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 8a0f0a3c3..d96df61a1 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -257,22 +257,6 @@ This can also be a list of the above values." (regexp :value ".*")) :group 'gnus-article-signature) -(defcustom gnus-fetch-partial-articles nil - "If non-nil, Gnus will fetch partial articles. -If t, nnimap will fetch only the first part. If a string, it -will fetch all parts that have types that match that string. A -likely value would be \"text/\" to automatically fetch all -textual parts. - -Currently only the nnimap backend actually supports partial -article fetching. If the backend doesn't support it, it has no -effect." - :version "24.1" - :type '(choice (const nil) - (const t) - (regexp)) - :group 'gnus-article) - (defcustom gnus-hidden-properties '(invisible t intangible t) "Property list to use for hiding text." :type 'sexp @@ -741,7 +725,7 @@ Each element is a regular expression." :group 'gnus-article-various) (make-obsolete-variable 'gnus-article-hide-pgp-hook nil - "Gnus 5.10 (Emacs-22.1)") + "Gnus 5.10 (Emacs 22.1)") (defface gnus-button '((t (:weight bold))) @@ -1428,7 +1412,7 @@ predicate. See Info node `(gnus)Customizing Articles'." :type gnus-article-treat-custom) (make-obsolete-variable 'gnus-treat-display-xface - 'gnus-treat-display-x-face "22.1") + 'gnus-treat-display-x-face "Emacs 22.1") (defcustom gnus-treat-display-x-face (and (not noninteractive) @@ -1691,10 +1675,10 @@ This requires GNU Libidn, and by default only enabled if it is found." (gnus-treat-hide-signature gnus-article-hide-signature) (gnus-treat-strip-list-identifiers gnus-article-hide-list-identifiers) (gnus-treat-leading-whitespace gnus-article-remove-leading-whitespace) - (gnus-treat-strip-pem gnus-article-hide-pem) (gnus-treat-from-picon gnus-treat-from-picon) (gnus-treat-mail-picon gnus-treat-mail-picon) (gnus-treat-newsgroups-picon gnus-treat-newsgroups-picon) + (gnus-treat-strip-pem gnus-article-hide-pem) (gnus-treat-from-gravatar gnus-treat-from-gravatar) (gnus-treat-mail-gravatar gnus-treat-mail-gravatar) (gnus-treat-highlight-headers gnus-article-highlight-headers) @@ -2301,9 +2285,9 @@ long lines if and only if arg is positive." (insert "X-Boundary: ") (gnus-add-text-properties start (point) '(invisible t intangible t)) (insert (let (str) - (while (>= (1- (window-width)) (length str)) + (while (>= (window-width) (length str)) (setq str (concat str gnus-body-boundary-delimiter))) - (substring str 0 (1- (window-width)))) + (substring str 0 (window-width))) "\n") (gnus-put-text-property start (point) 'gnus-decoration 'header))))) @@ -3974,7 +3958,7 @@ Directory to save to is default to `gnus-article-save-directory'." "Save %s in rmail file" filename gnus-rmail-save-name gnus-newsgroup-name gnus-current-headers 'gnus-newsgroup-last-rmail)) - (gnus-eval-in-buffer-window gnus-save-article-buffer + (with-current-buffer gnus-save-article-buffer (save-excursion (save-restriction (widen) @@ -3992,7 +3976,7 @@ Directory to save to is default to `gnus-article-save-directory'." "Save %s in Unix mail file" filename gnus-mail-save-name gnus-newsgroup-name gnus-current-headers 'gnus-newsgroup-last-mail)) - (gnus-eval-in-buffer-window gnus-save-article-buffer + (with-current-buffer gnus-save-article-buffer (save-excursion (save-restriction (widen) @@ -4013,7 +3997,7 @@ Directory to save to is default to `gnus-article-save-directory'." "Save %s in file" filename gnus-file-save-name gnus-newsgroup-name gnus-current-headers 'gnus-newsgroup-last-file)) - (gnus-eval-in-buffer-window gnus-save-article-buffer + (with-current-buffer gnus-save-article-buffer (save-excursion (save-restriction (widen) @@ -4045,7 +4029,7 @@ The directory to save in defaults to `gnus-article-save-directory'." "Save %s body in file" filename gnus-file-save-name gnus-newsgroup-name gnus-current-headers 'gnus-newsgroup-last-file)) - (gnus-eval-in-buffer-window gnus-save-article-buffer + (with-current-buffer gnus-save-article-buffer (save-excursion (save-restriction (widen) @@ -4124,7 +4108,7 @@ and the raw article including all headers will be piped." (if default (setq command default) (error "A command is required"))) - (gnus-eval-in-buffer-window save-buffer + (with-current-buffer save-buffer (save-restriction (widen) (shell-command-on-region (point-min) (point-max) command nil))) @@ -5072,7 +5056,7 @@ Deleting parts may malfunction or destroy the article; continue? ")) (unless data (error "No MIME part under point")) (with-current-buffer (mm-handle-buffer data) - (let ((bsize (format "%s" (buffer-size)))) + (let ((bsize (buffer-size))) (erase-buffer) (insert (concat @@ -5081,8 +5065,8 @@ Deleting parts may malfunction or destroy the article; continue? ")) "|\n" "| Type: " type "\n" "| Filename: " filename "\n" - "| Size (encoded): " bsize (format " byte%s\n" - (if (= bsize 1) + "| Size (encoded): " (format "%s byte%s\n" + bsize (if (= bsize 1) "" "s")) (when description @@ -5147,11 +5131,10 @@ available media-types." (unless mime-type (setq mime-type (let ((default (gnus-mime-view-part-as-type-internal))) - (completing-read - (format "View as MIME type (default %s): " - (car default)) - (mapcar #'list (mailcap-mime-types)) - pred nil nil nil + (gnus-completing-read + "View as MIME type" + (remove-if-not pred (mailcap-mime-types)) + nil nil nil (car default))))) (gnus-article-check-buffer) (let ((handle (get-text-property (point) 'gnus-data))) @@ -5420,7 +5403,7 @@ If no internal viewer is available, use an external viewer." (defun gnus-mime-action-on-part (&optional action) "Do something with the MIME attachment at \(point\)." (interactive - (list (completing-read "Action: " gnus-mime-action-alist nil t))) + (list (gnus-completing-read "Action" (mapcar 'car gnus-mime-action-alist) t))) (gnus-article-check-buffer) (let ((action-pair (assoc action gnus-mime-action-alist))) (if action-pair @@ -8188,9 +8171,6 @@ url is put as the `gnus-button-url' overlay property on the button." (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)) @@ -8386,9 +8366,9 @@ For example: (interactive (list (or gnus-article-encrypt-protocol - (completing-read "Encrypt protocol: " - gnus-article-encrypt-protocol-alist - nil t)) + (gnus-completing-read "Encrypt protocol" + (mapcar 'car gnus-article-encrypt-protocol-alist) + t)) current-prefix-arg)) ;; User might hit `K E' instead of `K e', so prompt once. (when (and gnus-article-encrypt-protocol