diff options
| author | Stefan Monnier | 2014-12-18 13:19:54 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-12-18 13:19:54 -0500 |
| commit | 8f03888e7f2d86970abb638b6e6456610fed6067 (patch) | |
| tree | 83fef5f8f28741913046fa76577ef4eb387c325e | |
| parent | 655a6f35dfae775de53daff99ce0b1c802f4b4b7 (diff) | |
| download | emacs-8f03888e7f2d86970abb638b6e6456610fed6067.tar.gz emacs-8f03888e7f2d86970abb638b6e6456610fed6067.zip | |
* lisp/gnus/gnus-art.el: Fix up compiler warnings.
(article-display-face, article-display-x-face): Remove unused `face'.
(gnus-article-browse-html-save-cid-content): Remove unused var `type'.
(article-date-ut): Remove unused var `first'.
(gnus-article-prepare): Remove unused var `gnus-article'.
(gnus-mime-save-part-and-strip): Remove unused var `param'.
(gnus-mime-inline-part): Remove unused vars `charset', `contents', and
`coding-system' along with corresponding dead code.
(gnus-mime-view-part-externally): Remove unused var
`mm-user-display-methods'.
(gnus-insert-mime-button): Let-bind gnus-tmp-id explicitly.
(gnus-display-mime): Remove unused var `handle'.
(gnus-mime-display-alternative): Remove unused var `props'.
(gnus-article-read-summary-keys): Remove unused var `up-to-top'.
(gnus-article-edit-done): Remove unused var `p'.
(gnus-url-mailto): Remove unused var `to'.
(gnus-treat-article): Let-bind gnus-treat-condition, part-number,
total-parts, and gnus-treat-type explicitly. Remove unused var `elem'.
* lisp/gnus/mm-util.el (mm-with-unibyte-current-buffer): Mark obsolete and
add warning.
| -rw-r--r-- | lisp/gnus/ChangeLog | 24 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 146 | ||||
| -rw-r--r-- | lisp/gnus/mm-util.el | 2 |
3 files changed, 102 insertions, 70 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5f0ed9dc7cc..34dd9191512 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2014-12-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * mm-util.el (mm-with-unibyte-current-buffer): Mark obsolete and | ||
| 4 | add warning. | ||
| 5 | |||
| 6 | * gnus-art.el: Fix up compiler warnings. | ||
| 7 | (article-display-face, article-display-x-face): Remove unused `face'. | ||
| 8 | (gnus-article-browse-html-save-cid-content): Remove unused var `type'. | ||
| 9 | (article-date-ut): Remove unused var `first'. | ||
| 10 | (gnus-article-prepare): Remove unused var `gnus-article'. | ||
| 11 | (gnus-mime-save-part-and-strip): Remove unused var `param'. | ||
| 12 | (gnus-mime-inline-part): Remove unused vars `charset', `contents', and | ||
| 13 | `coding-system' along with corresponding dead code. | ||
| 14 | (gnus-mime-view-part-externally): Remove unused var | ||
| 15 | `mm-user-display-methods'. | ||
| 16 | (gnus-insert-mime-button): Let-bind gnus-tmp-id explicitly. | ||
| 17 | (gnus-display-mime): Remove unused var `handle'. | ||
| 18 | (gnus-mime-display-alternative): Remove unused var `props'. | ||
| 19 | (gnus-article-read-summary-keys): Remove unused var `up-to-top'. | ||
| 20 | (gnus-article-edit-done): Remove unused var `p'. | ||
| 21 | (gnus-url-mailto): Remove unused var `to'. | ||
| 22 | (gnus-treat-article): Let-bind gnus-treat-condition, part-number, | ||
| 23 | total-parts, and gnus-treat-type explicitly. Remove unused var `elem'. | ||
| 24 | |||
| 1 | 2014-12-18 Eric Abrahamsen <eric@ericabrahamsen.net> | 25 | 2014-12-18 Eric Abrahamsen <eric@ericabrahamsen.net> |
| 2 | 26 | ||
| 3 | * registry.el (registry-db): Consolidate the :max-hard and :max-soft | 27 | * registry.el (registry-db): Consolidate the :max-hard and :max-soft |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 53da05e939b..e63737fa133 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1626,6 +1626,8 @@ It is a string, such as \"PGP\". If nil, ask user." | |||
| 1626 | :type 'string | 1626 | :type 'string |
| 1627 | :group 'mime-security) | 1627 | :group 'mime-security) |
| 1628 | 1628 | ||
| 1629 | (defvar idna-program) | ||
| 1630 | |||
| 1629 | (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error)) | 1631 | (defcustom gnus-use-idna (and (condition-case nil (require 'idna) (file-error)) |
| 1630 | (mm-coding-system-p 'utf-8) | 1632 | (mm-coding-system-p 'utf-8) |
| 1631 | idna-program | 1633 | idna-program |
| @@ -1841,7 +1843,7 @@ Initialized from `text-mode-syntax-table.") | |||
| 1841 | (incf i))) | 1843 | (incf i))) |
| 1842 | i)) | 1844 | i)) |
| 1843 | 1845 | ||
| 1844 | (defun article-hide-headers (&optional arg delete) | 1846 | (defun article-hide-headers (&optional _arg _delete) |
| 1845 | "Hide unwanted headers and possibly sort them as well." | 1847 | "Hide unwanted headers and possibly sort them as well." |
| 1846 | (interactive) | 1848 | (interactive) |
| 1847 | ;; This function might be inhibited. | 1849 | ;; This function might be inhibited. |
| @@ -2411,7 +2413,7 @@ long lines if and only if arg is positive." | |||
| 2411 | (if (and wash-face-p (memq 'face gnus-article-wash-types)) | 2413 | (if (and wash-face-p (memq 'face gnus-article-wash-types)) |
| 2412 | (gnus-delete-images 'face) | 2414 | (gnus-delete-images 'face) |
| 2413 | (let ((from (message-fetch-field "from")) | 2415 | (let ((from (message-fetch-field "from")) |
| 2414 | face faces) | 2416 | faces) |
| 2415 | (save-current-buffer | 2417 | (save-current-buffer |
| 2416 | (when (and wash-face-p | 2418 | (when (and wash-face-p |
| 2417 | (gnus-buffer-live-p gnus-original-article-buffer) | 2419 | (gnus-buffer-live-p gnus-original-article-buffer) |
| @@ -2461,7 +2463,7 @@ long lines if and only if arg is positive." | |||
| 2461 | (gnus-delete-images 'xface) | 2463 | (gnus-delete-images 'xface) |
| 2462 | ;; Display X-Faces. | 2464 | ;; Display X-Faces. |
| 2463 | (let ((from (message-fetch-field "from")) | 2465 | (let ((from (message-fetch-field "from")) |
| 2464 | x-faces face) | 2466 | x-faces) |
| 2465 | (save-current-buffer | 2467 | (save-current-buffer |
| 2466 | (when (and wash-face-p | 2468 | (when (and wash-face-p |
| 2467 | (gnus-buffer-live-p gnus-original-article-buffer) | 2469 | (gnus-buffer-live-p gnus-original-article-buffer) |
| @@ -2794,7 +2796,7 @@ summary buffer." | |||
| 2794 | "Find CID content in HANDLES and save it in a file in DIRECTORY. | 2796 | "Find CID content in HANDLES and save it in a file in DIRECTORY. |
| 2795 | Return file name." | 2797 | Return file name." |
| 2796 | (save-match-data | 2798 | (save-match-data |
| 2797 | (let (file type) | 2799 | (let (file) |
| 2798 | (catch 'found | 2800 | (catch 'found |
| 2799 | (dolist (handle handles) | 2801 | (dolist (handle handles) |
| 2800 | (cond | 2802 | (cond |
| @@ -3396,7 +3398,7 @@ means show, 0 means toggle." | |||
| 3396 | 'hidden | 3398 | 'hidden |
| 3397 | nil))) | 3399 | nil))) |
| 3398 | 3400 | ||
| 3399 | (defun gnus-article-show-hidden-text (type &optional dummy) | 3401 | (defun gnus-article-show-hidden-text (type &optional _dummy) |
| 3400 | "Show all hidden text of type TYPE. | 3402 | "Show all hidden text of type TYPE. |
| 3401 | Originally it is hide instead of DUMMY." | 3403 | Originally it is hide instead of DUMMY." |
| 3402 | (let ((inhibit-read-only t) | 3404 | (let ((inhibit-read-only t) |
| @@ -3435,7 +3437,7 @@ lines forward." | |||
| 3435 | gnus-article-date-headers) | 3437 | gnus-article-date-headers) |
| 3436 | t)) | 3438 | t)) |
| 3437 | 3439 | ||
| 3438 | (defun article-date-ut (&optional type highlight date-position) | 3440 | (defun article-date-ut (&optional type _highlight date-position) |
| 3439 | "Convert DATE date to TYPE in the current article. | 3441 | "Convert DATE date to TYPE in the current article. |
| 3440 | The default type is `ut'. See `gnus-article-date-headers' for | 3442 | The default type is `ut'. See `gnus-article-date-headers' for |
| 3441 | possible values." | 3443 | possible values." |
| @@ -3443,7 +3445,6 @@ possible values." | |||
| 3443 | (let* ((case-fold-search t) | 3445 | (let* ((case-fold-search t) |
| 3444 | (inhibit-read-only t) | 3446 | (inhibit-read-only t) |
| 3445 | (inhibit-point-motion-hooks t) | 3447 | (inhibit-point-motion-hooks t) |
| 3446 | (first t) | ||
| 3447 | (visible-date (mail-fetch-field "Date")) | 3448 | (visible-date (mail-fetch-field "Date")) |
| 3448 | pos date bface eface) | 3449 | pos date bface eface) |
| 3449 | (save-excursion | 3450 | (save-excursion |
| @@ -3982,7 +3983,7 @@ This format is defined by the `gnus-article-time-format' variable." | |||
| 3982 | (set dir-var (file-name-directory result))) | 3983 | (set dir-var (file-name-directory result))) |
| 3983 | result)) | 3984 | result)) |
| 3984 | 3985 | ||
| 3985 | (defun gnus-article-archive-name (group) | 3986 | (defun gnus-article-archive-name (_group) |
| 3986 | "Return the first instance of an \"Archive-name\" in the current buffer." | 3987 | "Return the first instance of an \"Archive-name\" in the current buffer." |
| 3987 | (let ((case-fold-search t)) | 3988 | (let ((case-fold-search t)) |
| 3988 | (when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t) | 3989 | (when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t) |
| @@ -4214,7 +4215,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is | |||
| 4214 | default | 4215 | default |
| 4215 | (or last-file default)))) | 4216 | (or last-file default)))) |
| 4216 | 4217 | ||
| 4217 | (defun gnus-plain-save-name (newsgroup headers &optional last-file) | 4218 | (defun gnus-plain-save-name (newsgroup _headers &optional last-file) |
| 4218 | "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. | 4219 | "Generate file name from NEWSGROUP, HEADERS, and optional LAST-FILE. |
| 4219 | If variable `gnus-use-long-file-name' is non-nil, it is | 4220 | If variable `gnus-use-long-file-name' is non-nil, it is |
| 4220 | ~/News/news.group. Otherwise, it is like ~/News/news/group/news." | 4221 | ~/News/news.group. Otherwise, it is like ~/News/news/group/news." |
| @@ -4227,7 +4228,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is | |||
| 4227 | default-directory)) | 4228 | default-directory)) |
| 4228 | gnus-article-save-directory))) | 4229 | gnus-article-save-directory))) |
| 4229 | 4230 | ||
| 4230 | (defun gnus-sender-save-name (newsgroup headers &optional last-file) | 4231 | (defun gnus-sender-save-name (_newsgroup headers &optional _last-file) |
| 4231 | "Generate file name from sender." | 4232 | "Generate file name from sender." |
| 4232 | (let ((from (mail-header-from headers))) | 4233 | (let ((from (mail-header-from headers))) |
| 4233 | (expand-file-name | 4234 | (expand-file-name |
| @@ -4424,6 +4425,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is | |||
| 4424 | (substitute-key-definition | 4425 | (substitute-key-definition |
| 4425 | 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) | 4426 | 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) |
| 4426 | 4427 | ||
| 4428 | (defvar gnus-article-send-map) | ||
| 4429 | |||
| 4427 | (gnus-define-keys (gnus-article-send-map "S" gnus-article-mode-map) | 4430 | (gnus-define-keys (gnus-article-send-map "S" gnus-article-mode-map) |
| 4428 | "W" gnus-article-wide-reply-with-original) | 4431 | "W" gnus-article-wide-reply-with-original) |
| 4429 | (if (featurep 'xemacs) | 4432 | (if (featurep 'xemacs) |
| @@ -4607,18 +4610,19 @@ commands: | |||
| 4607 | (forward-line line) | 4610 | (forward-line line) |
| 4608 | (point))))))) | 4611 | (point))))))) |
| 4609 | 4612 | ||
| 4610 | (defun gnus-article-prepare (article &optional all-headers header) | 4613 | (defvar gnus-tmp-internal-hook) |
| 4614 | |||
| 4615 | (defun gnus-article-prepare (article &optional all-headers _header) | ||
| 4611 | "Prepare ARTICLE in article mode buffer. | 4616 | "Prepare ARTICLE in article mode buffer. |
| 4612 | ARTICLE should either be an article number or a Message-ID. | 4617 | ARTICLE should either be an article number or a Message-ID. |
| 4613 | If ARTICLE is an id, HEADER should be the article headers. | 4618 | If ARTICLE is an id, HEADER should be the article headers. |
| 4614 | If ALL-HEADERS is non-nil, no headers are hidden." | 4619 | If ALL-HEADERS is non-nil, no headers are hidden." |
| 4615 | (save-excursion | 4620 | (save-excursion ;FIXME: Shouldn't that be save-current-buffer? |
| 4616 | ;; Make sure we start in a summary buffer. | 4621 | ;; Make sure we start in a summary buffer. |
| 4617 | (unless (derived-mode-p 'gnus-summary-mode) | 4622 | (unless (derived-mode-p 'gnus-summary-mode) |
| 4618 | (set-buffer gnus-summary-buffer)) | 4623 | (set-buffer gnus-summary-buffer)) |
| 4619 | (setq gnus-summary-buffer (current-buffer)) | 4624 | (setq gnus-summary-buffer (current-buffer)) |
| 4620 | (let* ((gnus-article (if header (mail-header-number header) article)) | 4625 | (let* ((summary-buffer (current-buffer)) |
| 4621 | (summary-buffer (current-buffer)) | ||
| 4622 | (gnus-tmp-internal-hook gnus-article-internal-prepare-hook) | 4626 | (gnus-tmp-internal-hook gnus-article-internal-prepare-hook) |
| 4623 | (group gnus-newsgroup-name) | 4627 | (group gnus-newsgroup-name) |
| 4624 | result) | 4628 | result) |
| @@ -4717,6 +4721,8 @@ If ALL-HEADERS is non-nil, no headers are hidden." | |||
| 4717 | (gnus-run-hooks 'gnus-article-prepare-hook) | 4721 | (gnus-run-hooks 'gnus-article-prepare-hook) |
| 4718 | t)))))) | 4722 | t)))))) |
| 4719 | 4723 | ||
| 4724 | (defvar gnus-mime-display-attachment-buttons-in-header) | ||
| 4725 | |||
| 4720 | ;;;###autoload | 4726 | ;;;###autoload |
| 4721 | (defun gnus-article-prepare-display () | 4727 | (defun gnus-article-prepare-display () |
| 4722 | "Make the current buffer look like a nice article." | 4728 | "Make the current buffer look like a nice article." |
| @@ -4840,6 +4846,16 @@ Valid specifiers include: | |||
| 4840 | General format specifiers can also be used. See Info node | 4846 | General format specifiers can also be used. See Info node |
| 4841 | `(gnus)Formatting Variables'.") | 4847 | `(gnus)Formatting Variables'.") |
| 4842 | 4848 | ||
| 4849 | (defvar gnus-tmp-type) | ||
| 4850 | (defvar gnus-tmp-type-long) | ||
| 4851 | (defvar gnus-tmp-name) | ||
| 4852 | (defvar gnus-tmp-description) | ||
| 4853 | (defvar gnus-tmp-id) | ||
| 4854 | (defvar gnus-tmp-length) | ||
| 4855 | (defvar gnus-tmp-dots) | ||
| 4856 | (defvar gnus-tmp-info) | ||
| 4857 | (defvar gnus-tmp-pressed-details) | ||
| 4858 | |||
| 4843 | (defvar gnus-mime-button-line-format-alist | 4859 | (defvar gnus-mime-button-line-format-alist |
| 4844 | '((?t gnus-tmp-type ?s) | 4860 | '((?t gnus-tmp-type ?s) |
| 4845 | (?T gnus-tmp-type-long ?s) | 4861 | (?T gnus-tmp-type-long ?s) |
| @@ -5066,7 +5082,6 @@ If FILE is given, use it for the external part." | |||
| 5066 | The current article has a complicated MIME structure, giving up...")) | 5082 | The current article has a complicated MIME structure, giving up...")) |
| 5067 | (let* ((data (get-text-property (point) 'gnus-data)) | 5083 | (let* ((data (get-text-property (point) 'gnus-data)) |
| 5068 | (id (get-text-property (point) 'gnus-part)) | 5084 | (id (get-text-property (point) 'gnus-part)) |
| 5069 | param | ||
| 5070 | (handles gnus-article-mime-handles)) | 5085 | (handles gnus-article-mime-handles)) |
| 5071 | (unless file | 5086 | (unless file |
| 5072 | (setq file | 5087 | (setq file |
| @@ -5324,7 +5339,7 @@ Compressed files like .gz and .bz2 are decompressed." | |||
| 5324 | (text-property-any (point-min) (point) 'gnus-data handle))) | 5339 | (text-property-any (point-min) (point) 'gnus-data handle))) |
| 5325 | (setq handle (get-text-property b 'gnus-data)) | 5340 | (setq handle (get-text-property b 'gnus-data)) |
| 5326 | b)) | 5341 | b)) |
| 5327 | start contents charset coding-system) | 5342 | start) |
| 5328 | (when handle | 5343 | (when handle |
| 5329 | (when (= b (prog1 | 5344 | (when (= b (prog1 |
| 5330 | btn | 5345 | btn |
| @@ -5335,27 +5350,11 @@ Compressed files like .gz and .bz2 are decompressed." | |||
| 5335 | (setq b btn)) | 5350 | (setq b btn)) |
| 5336 | (if (and (not arg) (mm-handle-undisplayer handle)) | 5351 | (if (and (not arg) (mm-handle-undisplayer handle)) |
| 5337 | (mm-remove-part handle) | 5352 | (mm-remove-part handle) |
| 5338 | (mm-with-unibyte-buffer | ||
| 5339 | (mm-insert-part handle) | ||
| 5340 | (setq contents | ||
| 5341 | (or (mm-decompress-buffer (mm-handle-filename handle) nil t) | ||
| 5342 | (buffer-string)))) | ||
| 5343 | (cond | 5353 | (cond |
| 5344 | ((not arg) | 5354 | ((not arg) nil) |
| 5345 | (unless (setq charset (mail-content-type-get | ||
| 5346 | (mm-handle-type handle) 'charset)) | ||
| 5347 | (unless (setq coding-system | ||
| 5348 | (mm-with-unibyte-buffer | ||
| 5349 | (insert contents) | ||
| 5350 | (mm-find-buffer-file-coding-system))) | ||
| 5351 | (setq charset gnus-newsgroup-charset)))) | ||
| 5352 | ((numberp arg) | 5355 | ((numberp arg) |
| 5353 | (if (mm-handle-undisplayer handle) | 5356 | (if (mm-handle-undisplayer handle) |
| 5354 | (mm-remove-part handle)) | 5357 | (mm-remove-part handle))) |
| 5355 | (setq charset | ||
| 5356 | (or (cdr (assq arg | ||
| 5357 | gnus-summary-show-article-charset-alist)) | ||
| 5358 | (mm-read-coding-system "Charset: ")))) | ||
| 5359 | ((mm-handle-undisplayer handle) | 5358 | ((mm-handle-undisplayer handle) |
| 5360 | (mm-remove-part handle))) | 5359 | (mm-remove-part handle))) |
| 5361 | (goto-char start) | 5360 | (goto-char start) |
| @@ -5465,7 +5464,6 @@ specified charset." | |||
| 5465 | (interactive) | 5464 | (interactive) |
| 5466 | (gnus-article-check-buffer) | 5465 | (gnus-article-check-buffer) |
| 5467 | (let* ((handle (or handle (get-text-property (point) 'gnus-data))) | 5466 | (let* ((handle (or handle (get-text-property (point) 'gnus-data))) |
| 5468 | (mm-user-display-methods nil) | ||
| 5469 | (mm-inlined-types nil) | 5467 | (mm-inlined-types nil) |
| 5470 | (mail-parse-charset gnus-newsgroup-charset) | 5468 | (mail-parse-charset gnus-newsgroup-charset) |
| 5471 | (mail-parse-ignored-charsets | 5469 | (mail-parse-ignored-charsets |
| @@ -5833,11 +5831,12 @@ all parts." | |||
| 5833 | (when gnus-break-pages | 5831 | (when gnus-break-pages |
| 5834 | (gnus-narrow-to-page)))) | 5832 | (gnus-narrow-to-page)))) |
| 5835 | 5833 | ||
| 5836 | (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) | 5834 | (defun gnus-insert-mime-button (handle id &optional displayed) |
| 5837 | (let ((gnus-tmp-name | 5835 | (let ((gnus-tmp-name |
| 5838 | (or (mm-handle-filename handle) | 5836 | (or (mm-handle-filename handle) |
| 5839 | (mail-content-type-get (mm-handle-type handle) 'url) | 5837 | (mail-content-type-get (mm-handle-type handle) 'url) |
| 5840 | "")) | 5838 | "")) |
| 5839 | (gnus-tmp-id id) | ||
| 5841 | (gnus-tmp-type (mm-handle-media-type handle)) | 5840 | (gnus-tmp-type (mm-handle-media-type handle)) |
| 5842 | (gnus-tmp-description (or (mm-handle-description handle) "")) | 5841 | (gnus-tmp-description (or (mm-handle-description handle) "")) |
| 5843 | (gnus-tmp-dots | 5842 | (gnus-tmp-dots |
| @@ -5888,7 +5887,7 @@ all parts." | |||
| 5888 | "hide" "show") | 5887 | "hide" "show") |
| 5889 | (aref gnus-down-mouse-3 0)))))) | 5888 | (aref gnus-down-mouse-3 0)))))) |
| 5890 | 5889 | ||
| 5891 | (defun gnus-widget-press-button (elems el) | 5890 | (defun gnus-widget-press-button (elems _el) |
| 5892 | (goto-char (widget-get elems :from)) | 5891 | (goto-char (widget-get elems :from)) |
| 5893 | (gnus-article-press-button)) | 5892 | (gnus-article-press-button)) |
| 5894 | 5893 | ||
| @@ -5906,8 +5905,7 @@ all parts." | |||
| 5906 | ;; may change the point. So we set the window point. | 5905 | ;; may change the point. So we set the window point. |
| 5907 | (set-window-point window point))) | 5906 | (set-window-point window point))) |
| 5908 | (let ((handles ihandles) | 5907 | (let ((handles ihandles) |
| 5909 | (inhibit-read-only t) | 5908 | (inhibit-read-only t)) |
| 5910 | handle) | ||
| 5911 | (cond (handles) | 5909 | (cond (handles) |
| 5912 | ((setq handles (mm-dissect-buffer nil gnus-article-loose-mime)) | 5910 | ((setq handles (mm-dissect-buffer nil gnus-article-loose-mime)) |
| 5913 | (when gnus-article-emulate-mime | 5911 | (when gnus-article-emulate-mime |
| @@ -6139,7 +6137,7 @@ If nil, don't show those extra buttons." | |||
| 6139 | (let* ((preferred (or preferred (mm-preferred-alternative handles))) | 6137 | (let* ((preferred (or preferred (mm-preferred-alternative handles))) |
| 6140 | (ihandles handles) | 6138 | (ihandles handles) |
| 6141 | (point (point)) | 6139 | (point (point)) |
| 6142 | handle (inhibit-read-only t) from props begend not-pref) | 6140 | handle (inhibit-read-only t) from begend not-pref) |
| 6143 | (save-window-excursion | 6141 | (save-window-excursion |
| 6144 | (save-restriction | 6142 | (save-restriction |
| 6145 | (when ibegend | 6143 | (when ibegend |
| @@ -6626,6 +6624,8 @@ specifies." | |||
| 6626 | (if header-line-format 1 0) | 6624 | (if header-line-format 1 0) |
| 6627 | 2))))))) | 6625 | 2))))))) |
| 6628 | 6626 | ||
| 6627 | (defvar scroll-in-place) | ||
| 6628 | |||
| 6629 | (defun gnus-article-next-page-1 (lines) | 6629 | (defun gnus-article-next-page-1 (lines) |
| 6630 | (condition-case () | 6630 | (condition-case () |
| 6631 | (let ((scroll-in-place nil) | 6631 | (let ((scroll-in-place nil) |
| @@ -6713,7 +6713,9 @@ not have a face in `gnus-article-boring-faces'." | |||
| 6713 | (unless (derived-mode-p 'gnus-article-mode) | 6713 | (unless (derived-mode-p 'gnus-article-mode) |
| 6714 | (error "Command invoked outside of a Gnus article buffer"))) | 6714 | (error "Command invoked outside of a Gnus article buffer"))) |
| 6715 | 6715 | ||
| 6716 | (defun gnus-article-read-summary-keys (&optional arg key not-restore-window) | 6716 | (defvar gnus-pick-mode) |
| 6717 | |||
| 6718 | (defun gnus-article-read-summary-keys (&optional _arg key not-restore-window) | ||
| 6717 | "Read a summary buffer key sequence and execute it from the article buffer." | 6719 | "Read a summary buffer key sequence and execute it from the article buffer." |
| 6718 | (interactive "P") | 6720 | (interactive "P") |
| 6719 | (gnus-article-check-buffer) | 6721 | (gnus-article-check-buffer) |
| @@ -6726,8 +6728,6 @@ not have a face in `gnus-article-boring-faces'." | |||
| 6726 | "An" "Ap" [?A (meta return)] [?A delete])) | 6728 | "An" "Ap" [?A (meta return)] [?A delete])) |
| 6727 | (nosave-in-article | 6729 | (nosave-in-article |
| 6728 | '("AS" "\C-d")) | 6730 | '("AS" "\C-d")) |
| 6729 | (up-to-top | ||
| 6730 | '("n" "Gn" "p" "Gp")) | ||
| 6731 | keys new-sum-point) | 6731 | keys new-sum-point) |
| 6732 | (with-current-buffer gnus-article-current-summary | 6732 | (with-current-buffer gnus-article-current-summary |
| 6733 | (let (gnus-pick-mode) | 6733 | (let (gnus-pick-mode) |
| @@ -6886,6 +6886,7 @@ KEY is a string or a vector." | |||
| 6886 | (defvar gnus-agent-summary-mode) | 6886 | (defvar gnus-agent-summary-mode) |
| 6887 | (defvar gnus-draft-mode) | 6887 | (defvar gnus-draft-mode) |
| 6888 | (defvar help-xref-stack-item) | 6888 | (defvar help-xref-stack-item) |
| 6889 | (defvar help-xref-following) | ||
| 6889 | 6890 | ||
| 6890 | (defun gnus-article-describe-bindings (&optional prefix) | 6891 | (defun gnus-article-describe-bindings (&optional prefix) |
| 6891 | "Show a list of all defined keys, and their definitions. | 6892 | "Show a list of all defined keys, and their definitions. |
| @@ -7330,7 +7331,6 @@ groups." | |||
| 7330 | (let ((func gnus-article-edit-done-function) | 7331 | (let ((func gnus-article-edit-done-function) |
| 7331 | (buf (current-buffer)) | 7332 | (buf (current-buffer)) |
| 7332 | (start (window-start)) | 7333 | (start (window-start)) |
| 7333 | (p (point)) | ||
| 7334 | (winconf gnus-prev-winconf)) | 7334 | (winconf gnus-prev-winconf)) |
| 7335 | (widen) ;; Widen it in case that users narrowed the buffer. | 7335 | (widen) ;; Widen it in case that users narrowed the buffer. |
| 7336 | (funcall func arg) | 7336 | (funcall func arg) |
| @@ -7959,7 +7959,7 @@ do the highlighting. See the documentation for those functions." | |||
| 7959 | (gnus-article-add-buttons) | 7959 | (gnus-article-add-buttons) |
| 7960 | (gnus-article-add-buttons-to-head)) | 7960 | (gnus-article-add-buttons-to-head)) |
| 7961 | 7961 | ||
| 7962 | (defun gnus-article-highlight-some (&optional force) | 7962 | (defun gnus-article-highlight-some (&optional _force) |
| 7963 | "Highlight current article. | 7963 | "Highlight current article. |
| 7964 | This function calls `gnus-article-highlight-headers', | 7964 | This function calls `gnus-article-highlight-headers', |
| 7965 | `gnus-article-highlight-signature', and `gnus-article-add-buttons' to | 7965 | `gnus-article-highlight-signature', and `gnus-article-add-buttons' to |
| @@ -8262,9 +8262,11 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8262 | (error "Unknown news URL syntax")))) | 8262 | (error "Unknown news URL syntax")))) |
| 8263 | (list scheme server port group message-id articles))) | 8263 | (list scheme server port group message-id articles))) |
| 8264 | 8264 | ||
| 8265 | (defvar nntp-port-number) | ||
| 8266 | |||
| 8265 | (defun gnus-button-handle-news (url) | 8267 | (defun gnus-button-handle-news (url) |
| 8266 | "Fetch a news URL." | 8268 | "Fetch a news URL." |
| 8267 | (destructuring-bind (scheme server port group message-id articles) | 8269 | (destructuring-bind (_scheme server port group message-id _articles) |
| 8268 | (gnus-parse-news-url url) | 8270 | (gnus-parse-news-url url) |
| 8269 | (cond | 8271 | (cond |
| 8270 | (message-id | 8272 | (message-id |
| @@ -8386,7 +8388,7 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8386 | (with-current-buffer gnus-summary-buffer | 8388 | (with-current-buffer gnus-summary-buffer |
| 8387 | (gnus-summary-refer-article message-id))) | 8389 | (gnus-summary-refer-article message-id))) |
| 8388 | 8390 | ||
| 8389 | (defun gnus-button-fetch-group (address &rest ignore) | 8391 | (defun gnus-button-fetch-group (address &rest _ignore) |
| 8390 | "Fetch GROUP specified by ADDRESS." | 8392 | "Fetch GROUP specified by ADDRESS." |
| 8391 | (when (string-match "\\`\\(nntp\\|news\\):\\(//\\)?\\(.*\\)\\'" | 8393 | (when (string-match "\\`\\(nntp\\|news\\):\\(//\\)?\\(.*\\)\\'" |
| 8392 | address) | 8394 | address) |
| @@ -8434,15 +8436,15 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8434 | (setq url (replace-regexp-in-string "\n" " " url)) | 8436 | (setq url (replace-regexp-in-string "\n" " " url)) |
| 8435 | (when (string-match "mailto:/*\\(.*\\)" url) | 8437 | (when (string-match "mailto:/*\\(.*\\)" url) |
| 8436 | (setq url (substring url (match-beginning 1) nil))) | 8438 | (setq url (substring url (match-beginning 1) nil))) |
| 8437 | (let (to args subject func) | 8439 | (let* ((args (gnus-url-parse-query-string |
| 8438 | (setq args (gnus-url-parse-query-string | ||
| 8439 | (if (string-match "^\\?" url) | 8440 | (if (string-match "^\\?" url) |
| 8440 | (substring url 1) | 8441 | (substring url 1) |
| 8441 | (if (string-match "^\\([^?]+\\)\\?\\(.*\\)" url) | 8442 | (if (string-match "^\\([^?]+\\)\\?\\(.*\\)" url) |
| 8442 | (concat "to=" (match-string 1 url) "&" | 8443 | (concat "to=" (match-string 1 url) "&" |
| 8443 | (match-string 2 url)) | 8444 | (match-string 2 url)) |
| 8444 | (concat "to=" url)))) | 8445 | (concat "to=" url))))) |
| 8445 | subject (cdr-safe (assoc "subject" args))) | 8446 | (subject (cdr-safe (assoc "subject" args))) |
| 8447 | func) | ||
| 8446 | (gnus-msg-mail) | 8448 | (gnus-msg-mail) |
| 8447 | (while args | 8449 | (while args |
| 8448 | (setq func (intern-soft (concat "message-goto-" (downcase (caar args))))) | 8450 | (setq func (intern-soft (concat "message-goto-" (downcase (caar args))))) |
| @@ -8499,7 +8501,7 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8499 | :action 'gnus-button-prev-page | 8501 | :action 'gnus-button-prev-page |
| 8500 | :button-keymap gnus-prev-page-map))) | 8502 | :button-keymap gnus-prev-page-map))) |
| 8501 | 8503 | ||
| 8502 | (defun gnus-button-next-page (&optional args more-args) | 8504 | (defun gnus-button-next-page (&optional _args _more-args) |
| 8503 | "Go to the next page." | 8505 | "Go to the next page." |
| 8504 | (interactive) | 8506 | (interactive) |
| 8505 | (let ((win (selected-window))) | 8507 | (let ((win (selected-window))) |
| @@ -8507,7 +8509,7 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8507 | (gnus-article-next-page) | 8509 | (gnus-article-next-page) |
| 8508 | (select-window win))) | 8510 | (select-window win))) |
| 8509 | 8511 | ||
| 8510 | (defun gnus-button-prev-page (&optional args more-args) | 8512 | (defun gnus-button-prev-page (&optional _args _more-args) |
| 8511 | "Go to the prev page." | 8513 | "Go to the prev page." |
| 8512 | (interactive) | 8514 | (interactive) |
| 8513 | (let ((win (selected-window))) | 8515 | (let ((win (selected-window))) |
| @@ -8535,7 +8537,7 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8535 | :action 'gnus-button-next-page | 8537 | :action 'gnus-button-next-page |
| 8536 | :button-keymap gnus-next-page-map))) | 8538 | :button-keymap gnus-next-page-map))) |
| 8537 | 8539 | ||
| 8538 | (defun gnus-article-button-next-page (arg) | 8540 | (defun gnus-article-button-next-page (_arg) |
| 8539 | "Go to the next page." | 8541 | "Go to the next page." |
| 8540 | (interactive "P") | 8542 | (interactive "P") |
| 8541 | (let ((win (selected-window))) | 8543 | (let ((win (selected-window))) |
| @@ -8543,7 +8545,7 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8543 | (gnus-article-next-page) | 8545 | (gnus-article-next-page) |
| 8544 | (select-window win))) | 8546 | (select-window win))) |
| 8545 | 8547 | ||
| 8546 | (defun gnus-article-button-prev-page (arg) | 8548 | (defun gnus-article-button-prev-page (_arg) |
| 8547 | "Go to the prev page." | 8549 | "Go to the prev page." |
| 8548 | (interactive "P") | 8550 | (interactive "P") |
| 8549 | (let ((win (selected-window))) | 8551 | (let ((win (selected-window))) |
| @@ -8594,20 +8596,31 @@ For example: | |||
| 8594 | 8596 | ||
| 8595 | (defvar gnus-inhibit-article-treatments nil) | 8597 | (defvar gnus-inhibit-article-treatments nil) |
| 8596 | 8598 | ||
| 8597 | (defun gnus-treat-article (gnus-treat-condition | 8599 | ;; Dynamic variables. |
| 8598 | &optional part-number total-parts gnus-treat-type) | 8600 | (defvar part-number) ;FIXME: Lacks a "gnus-" prefix. |
| 8599 | (let ((gnus-treat-length (- (point-max) (point-min))) | 8601 | (defvar total-parts) ;FIXME: Lacks a "gnus-" prefix. |
| 8602 | (defvar gnus-treat-type) | ||
| 8603 | (defvar gnus-treat-condition) | ||
| 8604 | (defvar gnus-treat-length) | ||
| 8605 | |||
| 8606 | (defun gnus-treat-article (condition | ||
| 8607 | &optional part-num total type) | ||
| 8608 | (let ((gnus-treat-condition condition) | ||
| 8609 | (part-number part-num) | ||
| 8610 | (total-parts total) | ||
| 8611 | (gnus-treat-type type) | ||
| 8612 | (gnus-treat-length (- (point-max) (point-min))) | ||
| 8600 | (alist gnus-treatment-function-alist) | 8613 | (alist gnus-treatment-function-alist) |
| 8601 | (article-goto-body-goes-to-point-min-p t) | 8614 | (article-goto-body-goes-to-point-min-p t) |
| 8602 | (treated-type | 8615 | (treated-type |
| 8603 | (or (not gnus-treat-type) | 8616 | (or (not type) |
| 8604 | (catch 'found | 8617 | (catch 'found |
| 8605 | (let ((list gnus-article-treat-types)) | 8618 | (let ((list gnus-article-treat-types)) |
| 8606 | (while list | 8619 | (while list |
| 8607 | (when (string-match (pop list) gnus-treat-type) | 8620 | (when (string-match (pop list) type) |
| 8608 | (throw 'found t))))))) | 8621 | (throw 'found t))))))) |
| 8609 | (highlightp (gnus-visual-p 'article-highlight 'highlight)) | 8622 | (highlightp (gnus-visual-p 'article-highlight 'highlight)) |
| 8610 | val elem) | 8623 | val) |
| 8611 | (gnus-run-hooks 'gnus-part-display-hook) | 8624 | (gnus-run-hooks 'gnus-part-display-hook) |
| 8612 | (dolist (elem alist) | 8625 | (dolist (elem alist) |
| 8613 | (setq val | 8626 | (setq val |
| @@ -8625,13 +8638,6 @@ For example: | |||
| 8625 | (save-restriction | 8638 | (save-restriction |
| 8626 | (funcall (cadr elem))))))) | 8639 | (funcall (cadr elem))))))) |
| 8627 | 8640 | ||
| 8628 | ;; Dynamic variables. | ||
| 8629 | (defvar part-number) | ||
| 8630 | (defvar total-parts) | ||
| 8631 | (defvar gnus-treat-type) | ||
| 8632 | (defvar gnus-treat-condition) | ||
| 8633 | (defvar gnus-treat-length) | ||
| 8634 | |||
| 8635 | (defun gnus-treat-predicate (val) | 8641 | (defun gnus-treat-predicate (val) |
| 8636 | (cond | 8642 | (cond |
| 8637 | ((null val) | 8643 | ((null val) |
| @@ -8880,7 +8886,7 @@ For example: | |||
| 8880 | (gnus-mime-security-show-details handle) | 8886 | (gnus-mime-security-show-details handle) |
| 8881 | (gnus-mime-security-verify-or-decrypt handle)))) | 8887 | (gnus-mime-security-verify-or-decrypt handle)))) |
| 8882 | 8888 | ||
| 8883 | (defun gnus-insert-mime-security-button (handle &optional displayed) | 8889 | (defun gnus-insert-mime-security-button (handle &optional _displayed) |
| 8884 | (let* ((protocol (mm-handle-multipart-ctl-parameter handle 'protocol)) | 8890 | (let* ((protocol (mm-handle-multipart-ctl-parameter handle 'protocol)) |
| 8885 | (gnus-tmp-type | 8891 | (gnus-tmp-type |
| 8886 | (concat | 8892 | (concat |
| @@ -8928,7 +8934,7 @@ For example: | |||
| 8928 | :action 'gnus-widget-press-button | 8934 | :action 'gnus-widget-press-button |
| 8929 | :button-keymap gnus-mime-security-button-map | 8935 | :button-keymap gnus-mime-security-button-map |
| 8930 | :help-echo | 8936 | :help-echo |
| 8931 | (lambda (widget) | 8937 | (lambda (_widget) |
| 8932 | ;; Needed to properly clear the message due to a bug in | 8938 | ;; Needed to properly clear the message due to a bug in |
| 8933 | ;; wid-edit (XEmacs only). | 8939 | ;; wid-edit (XEmacs only). |
| 8934 | (when (boundp 'help-echo-owns-message) | 8940 | (when (boundp 'help-echo-owns-message) |
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 31b7d073fbe..e40aecea0cc 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el | |||
| @@ -1243,6 +1243,7 @@ evaluating FORMS but it is no longer done. So, some programs assuming | |||
| 1243 | it if any may malfunction." | 1243 | it if any may malfunction." |
| 1244 | (if (featurep 'xemacs) | 1244 | (if (featurep 'xemacs) |
| 1245 | `(progn ,@forms) | 1245 | `(progn ,@forms) |
| 1246 | (message "Warning: Using brain-dead macro `mm-with-unibyte-current-buffer'!") | ||
| 1246 | (let ((multibyte (make-symbol "multibyte"))) | 1247 | (let ((multibyte (make-symbol "multibyte"))) |
| 1247 | `(let ((,multibyte enable-multibyte-characters)) | 1248 | `(let ((,multibyte enable-multibyte-characters)) |
| 1248 | (when ,multibyte | 1249 | (when ,multibyte |
| @@ -1253,6 +1254,7 @@ it if any may malfunction." | |||
| 1253 | (set-buffer-multibyte t))))))) | 1254 | (set-buffer-multibyte t))))))) |
| 1254 | (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0) | 1255 | (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0) |
| 1255 | (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body)) | 1256 | (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body)) |
| 1257 | (make-obsolete 'mm-with-unibyte-current-buffer nil "25.1") | ||
| 1256 | 1258 | ||
| 1257 | (defun mm-find-charset-region (b e) | 1259 | (defun mm-find-charset-region (b e) |
| 1258 | "Return a list of Emacs charsets in the region B to E." | 1260 | "Return a list of Emacs charsets in the region B to E." |