From 69943ae70ce0aec075bd26ad0100c174b34bad7f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 8 Feb 2021 19:08:14 -0500 Subject: * lisp/gnus/gnus-topic.el: Fix a backward incompatibility (gnus-topic-insert-topic-line): Make the vars used in `gnus-topic-line-format-spec` dynamically scoped since it seems that they're sometimes accessed from functions called by `gnus-topic-line-format-spec` :-( * lisp/gnus/gnus-util.el (gnus--\,@): Move macro to here... * lisp/gnus/gnus-art.el (gnus--\,@): .. from here. * lisp/gnus/gnus.el (gnus-method-to-server): Apply DeMorgan. --- lisp/gnus/gnus-art.el | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7ded9e40e99..c9afa3ac948 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4325,10 +4325,6 @@ If variable `gnus-use-long-file-name' is non-nil, it is (if (gnus-buffer-live-p gnus-original-article-buffer) (canlock-verify gnus-original-article-buffer))) -(defmacro gnus--\,@ (exp) - (declare (debug t)) - `(progn ,@(eval exp t))) - (gnus--\,@ (mapcar (lambda (func) `(defun ,(intern (format "gnus-%s" func)) -- cgit v1.2.3 From c0221990c46a89b6ecbc8c831225785405aa82b7 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 14 Feb 2021 14:14:48 +0100 Subject: Do `interactive' mode markup in all Gnus files --- lisp/gnus/deuglify.el | 10 +- lisp/gnus/gnus-art.el | 276 +++++++++++---------- lisp/gnus/gnus-bookmark.el | 24 +- lisp/gnus/gnus-cache.el | 8 +- lisp/gnus/gnus-cite.el | 12 +- lisp/gnus/gnus-cus.el | 9 +- lisp/gnus/gnus-delay.el | 8 +- lisp/gnus/gnus-diary.el | 4 +- lisp/gnus/gnus-dired.el | 9 +- lisp/gnus/gnus-draft.el | 6 +- lisp/gnus/gnus-eform.el | 4 +- lisp/gnus/gnus-fun.el | 19 +- lisp/gnus/gnus-gravatar.el | 4 +- lisp/gnus/gnus-group.el | 276 +++++++++++---------- lisp/gnus/gnus-icalendar.el | 14 +- lisp/gnus/gnus-int.el | 2 +- lisp/gnus/gnus-mh.el | 2 +- lisp/gnus/gnus-msg.el | 85 ++++--- lisp/gnus/gnus-picon.el | 8 +- lisp/gnus/gnus-registry.el | 11 +- lisp/gnus/gnus-salt.el | 10 +- lisp/gnus/gnus-score.el | 51 ++-- lisp/gnus/gnus-sieve.el | 2 +- lisp/gnus/gnus-srvr.el | 68 ++--- lisp/gnus/gnus-start.el | 4 +- lisp/gnus/gnus-sum.el | 586 +++++++++++++++++++++++--------------------- lisp/gnus/gnus-topic.el | 101 ++++---- lisp/gnus/gnus-uu.el | 99 ++++---- lisp/gnus/gnus-vm.el | 4 +- lisp/gnus/gnus.el | 44 ++-- 30 files changed, 932 insertions(+), 828 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 08beef7db9f..e6c4630a67b 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -310,7 +310,7 @@ You can control what lines will be unwrapped by frobbing `gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max', indicating the minimum and maximum length of an unwrapped citation line. If NODISPLAY is non-nil, don't redisplay the article buffer." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (let ((case-fold-search nil) (inhibit-read-only t) (cite-marks gnus-outlook-deuglify-cite-marks) @@ -430,7 +430,7 @@ NODISPLAY is non-nil, don't redisplay the article buffer." (defun gnus-article-outlook-repair-attribution (&optional nodisplay) "Repair a broken attribution line. If NODISPLAY is non-nil, don't redisplay the article buffer." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (let ((attrib-start (or (gnus-outlook-repair-attribution-other) @@ -442,7 +442,7 @@ If NODISPLAY is non-nil, don't redisplay the article buffer." (defun gnus-article-outlook-rearrange-citation (&optional nodisplay) "Repair broken citations. If NODISPLAY is non-nil, don't redisplay the article buffer." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (let ((attrib-start (gnus-article-outlook-repair-attribution 'nodisplay))) ;; rearrange citations if an attribution line has been recognized (if attrib-start @@ -455,7 +455,7 @@ If NODISPLAY is non-nil, don't redisplay the article buffer." Treat \"smartquotes\", unwrap lines, repair attribution and rearrange citation. If NODISPLAY is non-nil, don't redisplay the article buffer." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) ;; apply treatment of dumb quotes (gnus-article-treat-smartquotes) ;; repair wrapped cited lines @@ -467,7 +467,7 @@ article buffer." ;;;###autoload (defun gnus-article-outlook-deuglify-article () "Deuglify broken Outlook (Express) articles and redisplay." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-outlook-deuglify-article nil)) (provide 'deuglify) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c9afa3ac948..435ccab7403 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1823,7 +1823,7 @@ Initialized from `text-mode-syntax-table'.") (defun article-hide-headers (&optional _arg _delete) "Hide unwanted headers and possibly sort them as well." - (interactive) + (interactive nil gnus-article-mode) ;; This function might be inhibited. (unless gnus-inhibit-hiding (let ((inhibit-read-only t) @@ -1891,7 +1891,7 @@ Initialized from `text-mode-syntax-table'.") "Toggle hiding of headers that aren't very interesting. If given a negative prefix, always show; if given a positive prefix, always hide." - (interactive (gnus-article-hidden-arg)) + (interactive (gnus-article-hidden-arg) gnus-article-mode) (when (and (not (gnus-article-check-hidden-text 'boring-headers arg)) (not gnus-show-all-headers)) (save-excursion @@ -2050,7 +2050,7 @@ always hide." (defun article-normalize-headers () "Make all header lines 40 characters long." - (interactive) + (interactive nil gnus-article-mode) (let ((inhibit-read-only t) column) (save-excursion @@ -2086,7 +2086,7 @@ iso-8859-1 character map in an attempt to provide more quoting characters. If you see something like \\222 or \\264 where you're expecting some kind of apostrophe or quotation mark, then try this wash." - (interactive) + (interactive nil gnus-article-mode) (article-translate-strings gnus-article-smartquotes-map)) (define-obsolete-function-alias 'article-treat-dumbquotes #'article-treat-smartquotes "27.1") @@ -2095,7 +2095,7 @@ try this wash." (defun article-treat-non-ascii () "Translate many Unicode characters into their ASCII equivalents." - (interactive) + (interactive nil gnus-article-mode) (require 'org-entities) (let ((table (make-char-table nil))) (dolist (elem org-entities) @@ -2138,7 +2138,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (defun article-treat-overstrike () "Translate overstrikes into bold text." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (when (article-goto-body) (let ((inhibit-read-only t)) @@ -2166,7 +2166,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (defun article-treat-ansi-sequences () "Translate ANSI SGR control sequences into overlays or extents." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (when (article-goto-body) (require 'ansi-color) @@ -2178,7 +2178,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." "Unfold folded message headers. Only the headers that fit into the current window width will be unfolded." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-headers (let (length) (while (not (eobp)) @@ -2204,7 +2204,7 @@ unfolded." (defun gnus-article-treat-fold-headers () "Fold message headers." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-headers (while (not (eobp)) (save-restriction @@ -2214,7 +2214,7 @@ unfolded." (defun gnus-treat-smiley () "Toggle display of textual emoticons (\"smileys\") as small graphical icons." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (if (memq 'smiley gnus-article-wash-types) (gnus-delete-images 'smiley) @@ -2227,7 +2227,7 @@ unfolded." (defun gnus-article-remove-images () "Remove all images from the article buffer." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (save-restriction (widen) @@ -2239,7 +2239,7 @@ unfolded." (defun gnus-article-show-images () "Show any images that are in the HTML-rendered article buffer. This only works if the article in question is HTML." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (save-restriction (widen) @@ -2255,7 +2255,7 @@ This only works if the article in question is HTML." (defun gnus-article-treat-fold-newsgroups () "Fold the Newsgroups and Followup-To message headers." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-headers (while (gnus-article-goto-header "newsgroups\\|followup-to") (save-restriction @@ -2279,7 +2279,7 @@ predicate. See Info node `(gnus)Customizing Articles'." If ARG is non-nil and not a number, toggle `gnus-article-truncate-lines' too. If ARG is a number, truncate long lines if and only if arg is positive." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (cond ((and (numberp arg) (> arg 0)) (setq gnus-article-truncate-lines t)) @@ -2298,7 +2298,7 @@ long lines if and only if arg is positive." (defun gnus-article-treat-body-boundary () "Place a boundary line at the end of the headers." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (when (and gnus-body-boundary-delimiter (> (length gnus-body-boundary-delimiter) 0)) (gnus-with-article-headers @@ -2317,7 +2317,7 @@ long lines if and only if arg is positive." "Fill lines that are wider than the window width or `fill-column'. If WIDTH (interactively, the numeric prefix), use that as the fill width." - (interactive "P") + (interactive "P" gnus-article-mode) (save-excursion (let* ((inhibit-read-only t) (window-width (window-width (get-buffer-window (current-buffer)))) @@ -2341,7 +2341,7 @@ fill width." (defun article-capitalize-sentences () "Capitalize the first word in each sentence." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-read-only t) (paragraph-start "^[\n\^L]")) @@ -2352,7 +2352,7 @@ fill width." (defun article-remove-cr () "Remove trailing CRs and then translate remaining CRs into LFs." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-read-only t)) (goto-char (point-min)) @@ -2364,7 +2364,7 @@ fill width." (defun article-remove-trailing-blank-lines () "Remove all trailing blank lines from the article." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-read-only t)) (goto-char (point-max)) @@ -2383,7 +2383,7 @@ fill width." (defun article-display-face (&optional force) "Display any Face headers in the header." - (interactive (list 'force)) + (interactive (list 'force) gnus-article-mode gnus-summary-mode) (let ((wash-face-p buffer-read-only)) (gnus-with-article-headers ;; When displaying parts, this function can be called several times on @@ -2431,7 +2431,7 @@ fill width." (defun article-display-x-face (&optional force) "Look for an X-Face header and display it if present." - (interactive (list 'force)) + (interactive (list 'force) gnus-article-mode gnus-summary-mode) (let ((wash-face-p buffer-read-only)) ;; When type `W f' (gnus-with-article-headers ;; Delete the old process, if any. @@ -2493,7 +2493,7 @@ fill width." (defun article-decode-mime-words () "Decode all MIME-encoded words in the article." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (let ((inhibit-point-motion-hooks t) (mail-parse-charset gnus-newsgroup-charset) @@ -2505,7 +2505,7 @@ fill width." (defun article-decode-charset (&optional prompt) "Decode charset-encoded text in the article. If PROMPT (the prefix), prompt for a coding system to use." - (interactive "P") + (interactive "P" gnus-article-mode) (let ((inhibit-point-motion-hooks t) (case-fold-search t) (inhibit-read-only t) (mail-parse-charset gnus-newsgroup-charset) @@ -2627,7 +2627,7 @@ Mail-Reply-To: and Mail-Followup-To:." If FORCE, decode the article whether it is marked as quoted-printable or not. If READ-CHARSET, ask for a coding system." - (interactive (list 'force current-prefix-arg)) + (interactive (list 'force current-prefix-arg) gnus-article-mode) (save-excursion (let ((inhibit-read-only t) type charset) (if (gnus-buffer-live-p gnus-original-article-buffer) @@ -2655,7 +2655,7 @@ If READ-CHARSET, ask for a coding system." "Translate a base64 article. If FORCE, decode the article whether it is marked as base64 not. If READ-CHARSET, ask for a coding system." - (interactive (list 'force current-prefix-arg)) + (interactive (list 'force current-prefix-arg) gnus-article-mode) (save-excursion (let ((inhibit-read-only t) type charset) (if (gnus-buffer-live-p gnus-original-article-buffer) @@ -2687,7 +2687,7 @@ If READ-CHARSET, ask for a coding system." (defun article-decode-HZ () "Translate a HZ-encoded article." - (interactive) + (interactive nil gnus-article-mode) (require 'rfc1843) (save-excursion (let ((inhibit-read-only t)) @@ -2695,7 +2695,7 @@ If READ-CHARSET, ask for a coding system." (defun article-unsplit-urls () "Remove the newlines that some other mailers insert into URLs." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-read-only t)) (goto-char (point-min)) @@ -2707,7 +2707,7 @@ If READ-CHARSET, ask for a coding system." (defun article-wash-html () "Format an HTML article." - (interactive) + (interactive nil gnus-article-mode) (let ((handles nil) (inhibit-read-only t)) (when (gnus-buffer-live-p gnus-original-article-buffer) @@ -3041,7 +3041,7 @@ This command creates temporary files to pass HTML contents including images if any to the browser, and deletes them when exiting the group \(if you want)." ;; Cf. `mm-w3m-safe-url-regexp' - (interactive "P") + (interactive "P" gnus-article-mode) (if arg (gnus-summary-show-article) (let ((gnus-visible-headers @@ -3078,7 +3078,7 @@ images if any to the browser, and deletes them when exiting the group (defun article-hide-list-identifiers () "Remove list identifiers from the Subject header. The `gnus-list-identifiers' variable specifies what to do." - (interactive) + (interactive nil gnus-article-mode) (let ((inhibit-point-motion-hooks t) (regexp (gnus-group-get-list-identifiers gnus-newsgroup-name)) (inhibit-read-only t)) @@ -3100,7 +3100,7 @@ The `gnus-list-identifiers' variable specifies what to do." "Toggle hiding of any PEM headers and signatures in the current article. If given a negative prefix, always show; if given a positive prefix, always hide." - (interactive (gnus-article-hidden-arg)) + (interactive (gnus-article-hidden-arg) gnus-article-mode) (unless (gnus-article-check-hidden-text 'pem arg) (save-excursion (let ((inhibit-read-only t) end) @@ -3126,7 +3126,7 @@ always hide." (defun article-strip-banner () "Strip the banners specified by the `banner' group parameter and by `gnus-article-address-banner-alist'." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (save-restriction (let ((inhibit-point-motion-hooks t)) @@ -3175,7 +3175,7 @@ always hide." (defun article-babel () "Translate article using an online translation service." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (require 'babel) (gnus-with-article-buffer (when (article-goto-body) @@ -3192,7 +3192,7 @@ always hide." "Hide the signature in the current article. If given a negative prefix, always show; if given a positive prefix, always hide." - (interactive (gnus-article-hidden-arg)) + (interactive (gnus-article-hidden-arg) gnus-article-mode) (unless (gnus-article-check-hidden-text 'signature arg) (save-excursion (save-restriction @@ -3204,7 +3204,7 @@ always hide." (defun article-strip-headers-in-body () "Strip offensive headers from bodies." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (article-goto-body) (let ((case-fold-search t)) @@ -3213,7 +3213,7 @@ always hide." (defun article-strip-leading-blank-lines () "Remove all blank lines from the beginning of the article." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-point-motion-hooks t) (inhibit-read-only t)) @@ -3255,7 +3255,7 @@ Point is left at the beginning of the narrowed-to region." (defun article-strip-multiple-blank-lines () "Replace consecutive blank lines with one empty line." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-point-motion-hooks t) (inhibit-read-only t)) @@ -3274,7 +3274,7 @@ Point is left at the beginning of the narrowed-to region." (defun article-strip-leading-space () "Remove all white space from the beginning of the lines in the article." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-point-motion-hooks t) (inhibit-read-only t)) @@ -3284,7 +3284,7 @@ Point is left at the beginning of the narrowed-to region." (defun article-strip-trailing-space () "Remove all white space from the end of the lines in the article." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-point-motion-hooks t) (inhibit-read-only t)) @@ -3294,14 +3294,14 @@ Point is left at the beginning of the narrowed-to region." (defun article-strip-blank-lines () "Strip leading, trailing and multiple blank lines." - (interactive) + (interactive nil gnus-article-mode) (article-strip-leading-blank-lines) (article-remove-trailing-blank-lines) (article-strip-multiple-blank-lines)) (defun article-strip-all-blank-lines () "Strip all blank lines." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (let ((inhibit-point-motion-hooks t) (inhibit-read-only t)) @@ -3433,7 +3433,7 @@ lines forward." "Convert DATE date to TYPE in the current article. The default type is `ut'. See `gnus-article-date-headers' for possible values." - (interactive (list 'ut t)) + (interactive (list 'ut t) gnus-article-mode) (let* ((case-fold-search t) (inhibit-read-only t) (inhibit-point-motion-hooks t) @@ -3677,29 +3677,29 @@ possible values." (defun article-date-local (&optional highlight) "Convert the current article date to the local timezone." - (interactive (list t)) + (interactive (list t) gnus-article-mode) (article-date-ut 'local highlight)) (defun article-date-english (&optional highlight) "Convert the current article date to something that is proper English." - (interactive (list t)) + (interactive (list t) gnus-article-mode) (article-date-ut 'english highlight)) (defun article-date-original (&optional highlight) "Convert the current article date to what it was originally. This is only useful if you have used some other date conversion function and want to see what the date was before converting." - (interactive (list t)) + (interactive (list t) gnus-article-mode) (article-date-ut 'original highlight)) (defun article-date-lapsed (&optional highlight) "Convert the current article date to time lapsed since it was sent." - (interactive (list t)) + (interactive (list t) gnus-article-mode) (article-date-ut 'lapsed highlight)) (defun article-date-combined-lapsed (&optional highlight) "Convert the current article date to time lapsed since it was sent." - (interactive (list t)) + (interactive (list t) gnus-article-mode) (article-date-ut 'combined-lapsed highlight)) (defun article-update-date-lapsed () @@ -3748,7 +3748,7 @@ function and want to see what the date was before converting." "Start a timer to update the Date headers in the article buffers. The numerical prefix says how frequently (in seconds) the function is to run." - (interactive "p") + (interactive "p" gnus-article-mode) (unless n (setq n 1)) (gnus-stop-date-timer) @@ -3757,7 +3757,7 @@ is to run." (defun gnus-stop-date-timer () "Stop the Date timer." - (interactive) + (interactive nil gnus-article-mode) (when article-lapsed-timer (cancel-timer article-lapsed-timer) (setq article-lapsed-timer nil))) @@ -3765,12 +3765,12 @@ is to run." (defun article-date-user (&optional highlight) "Convert the current article date to the user-defined format. This format is defined by the `gnus-article-time-format' variable." - (interactive (list t)) + (interactive (list t) gnus-article-mode) (article-date-ut 'user-defined highlight)) (defun article-date-iso8601 (&optional highlight) "Convert the current article date to ISO8601." - (interactive (list t)) + (interactive (list t) gnus-article-mode) (article-date-ut 'iso8601 highlight)) (defmacro gnus-article-save-original-date (&rest forms) @@ -3803,7 +3803,7 @@ This format is defined by the `gnus-article-time-format' variable." (defun article-remove-leading-whitespace () "Remove excessive whitespace from all headers." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (save-restriction (let ((inhibit-read-only t)) @@ -3814,7 +3814,7 @@ This format is defined by the `gnus-article-time-format' variable." (defun article-emphasize (&optional arg) "Emphasize text according to `gnus-emphasis-alist'." - (interactive (gnus-article-hidden-arg)) + (interactive (gnus-article-hidden-arg) gnus-article-mode) (unless (gnus-article-check-hidden-text 'emphasis arg) (save-excursion (let ((alist (or @@ -4247,7 +4247,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is (defun article-verify-x-pgp-sig () "Verify X-PGP-Sig." ;; - (interactive) + (interactive nil gnus-article-mode) (if (gnus-buffer-live-p gnus-original-article-buffer) (let ((sig (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "X-PGP-Sig"))) @@ -4321,7 +4321,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is (defun article-verify-cancel-lock () "Verify Cancel-Lock header." - (interactive) + (interactive nil gnus-article-mode) (if (gnus-buffer-live-p gnus-original-article-buffer) (canlock-verify gnus-original-article-buffer))) @@ -4330,7 +4330,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is `(defun ,(intern (format "gnus-%s" func)) (&optional interactive &rest args) ,(format "Run `%s' in the article buffer." func) - (interactive (list t)) + (interactive (list t) gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (if interactive (call-interactively #',func) @@ -4752,7 +4752,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (defun gnus-sticky-article (arg) "Make the current article sticky. If a prefix ARG is given, ask for a name for this sticky article buffer." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (gnus-summary-show-thread) (gnus-summary-select-article nil nil 'pseudo) (let (new-art-buf-name) @@ -4796,7 +4796,7 @@ If a prefix ARG is given, ask for a name for this sticky article buffer." "Kill the given sticky article BUFFER. If none is given, assume the current buffer and kill it if it has `gnus-sticky-article-mode'." - (interactive) + (interactive nil gnus-article-mode) (unless buffer (setq buffer (current-buffer))) (with-current-buffer buffer @@ -4806,7 +4806,7 @@ If none is given, assume the current buffer and kill it if it has (defun gnus-kill-sticky-article-buffers (arg) "Kill all sticky article buffers. If a prefix ARG is given, ask for confirmation." - (interactive "P") + (interactive "P" gnus-article-mode) (dolist (buf (gnus-buffers)) (with-current-buffer buf (and (derived-mode-p 'gnus-sticky-article-mode) @@ -4948,7 +4948,7 @@ General format specifiers can also be used. See Info node (defun gnus-mime-view-all-parts (&optional handles) "View all the MIME parts." - (interactive) + (interactive nil gnus-article-mode) (with-current-buffer gnus-article-buffer (let ((handles (or handles gnus-article-mime-handles)) (mail-parse-charset gnus-newsgroup-charset) @@ -4965,7 +4965,7 @@ General format specifiers can also be used. See Info node (defun gnus-article-jump-to-part (n) "Jump to MIME part N." - (interactive "P") + (interactive "P" gnus-article-mode) (let ((parts (with-current-buffer gnus-article-buffer (length gnus-article-mime-handle-alist)))) (when (zerop parts) @@ -5061,11 +5061,11 @@ and `gnus-mime-delete-part', and not provided at run-time normally." (defun gnus-mime-replace-part (file) "Replace MIME part under point with an external body." ;; Useful if file has already been saved to disk - (interactive - (list - (read-file-name "Replace MIME part with file: " - (or mm-default-directory default-directory) - nil t))) + (interactive (list + (read-file-name "Replace MIME part with file: " + (or mm-default-directory default-directory) + nil t)) + gnus-article-mode) (unless (file-regular-p (file-truename file)) (error "Can't replace part with %s, which isn't a regular file" file)) @@ -5074,7 +5074,7 @@ and `gnus-mime-delete-part', and not provided at run-time normally." (defun gnus-mime-save-part-and-strip (&optional file event) "Save the MIME part under point then replace it with an external body. If FILE is given, use it for the external part." - (interactive (list nil last-nonmenu-event)) + (interactive (list nil last-nonmenu-event) gnus-article-mode) (save-excursion (mouse-set-point event) (gnus-article-check-buffer) @@ -5116,7 +5116,7 @@ The current article has a complicated MIME structure, giving up...")) (defun gnus-mime-delete-part (&optional event) "Delete the MIME part under point. Replace it with some information about the removed part." - (interactive (list last-nonmenu-event)) + (interactive (list last-nonmenu-event) gnus-article-mode) (mouse-set-point event) (gnus-article-check-buffer) (when (gnus-group-read-only-p) @@ -5165,7 +5165,7 @@ Deleting parts may malfunction or destroy the article; continue? ")) (defun gnus-mime-save-part (&optional event) "Save the MIME part under point." - (interactive (list last-nonmenu-event)) + (interactive (list last-nonmenu-event) gnus-article-mode) (mouse-set-point event) (gnus-article-check-buffer) (let ((data (get-text-property (point) 'gnus-data))) @@ -5175,7 +5175,7 @@ Deleting parts may malfunction or destroy the article; continue? ")) (defun gnus-mime-pipe-part (&optional cmd event) "Pipe the MIME part under point to a process. Use CMD as the process." - (interactive (list nil last-nonmenu-event)) + (interactive (list nil last-nonmenu-event) gnus-article-mode) (mouse-set-point event) (gnus-article-check-buffer) (let ((data (get-text-property (point) 'gnus-data))) @@ -5184,7 +5184,7 @@ Use CMD as the process." (defun gnus-mime-view-part (&optional event) "Interactively choose a viewing method for the MIME part under point." - (interactive (list last-nonmenu-event)) + (interactive (list last-nonmenu-event) gnus-article-mode) (save-excursion (mouse-set-point event) (gnus-article-check-buffer) @@ -5214,7 +5214,7 @@ Use CMD as the process." "Choose a MIME media type, and view the part as such. If non-nil, PRED is a predicate to use during completion to limit the available media-types." - (interactive (list nil nil last-nonmenu-event)) + (interactive (list nil nil last-nonmenu-event) gnus-article-mode) (save-excursion (if event (mouse-set-point event)) (unless mime-type @@ -5253,7 +5253,8 @@ available media-types." "Put the MIME part under point into a new buffer. If `auto-compression-mode' is enabled, compressed files like .gz and .bz2 are decompressed." - (interactive (list nil current-prefix-arg last-nonmenu-event)) + (interactive (list nil current-prefix-arg last-nonmenu-event) + gnus-article-mode) (mouse-set-point event) (gnus-article-check-buffer) (unless handle @@ -5309,7 +5310,8 @@ are decompressed." (defun gnus-mime-print-part (&optional handle filename event) "Print the MIME part under point." (interactive - (list nil (ps-print-preprint current-prefix-arg) last-nonmenu-event)) + (list nil (ps-print-preprint current-prefix-arg) last-nonmenu-event) + gnus-article-mode) (save-excursion (mouse-set-point event) (gnus-article-check-buffer) @@ -5337,7 +5339,8 @@ are decompressed." (defun gnus-mime-inline-part (&optional handle arg event) "Insert the MIME part under point into the current buffer. Compressed files like .gz and .bz2 are decompressed." - (interactive (list nil current-prefix-arg last-nonmenu-event)) + (interactive (list nil current-prefix-arg last-nonmenu-event) + gnus-article-mode) (if event (mouse-set-point event)) (gnus-article-check-buffer) (let* ((inhibit-read-only t) @@ -5435,7 +5438,8 @@ CHARSET may either be a string or a symbol." (defun gnus-mime-view-part-as-charset (&optional handle arg event) "Insert the MIME part under point into the current buffer using the specified charset." - (interactive (list nil current-prefix-arg last-nonmenu-event)) + (interactive (list nil current-prefix-arg last-nonmenu-event) + gnus-article-mode) (save-excursion (mouse-set-point event) (gnus-article-check-buffer) @@ -5475,7 +5479,7 @@ specified charset." (defun gnus-mime-view-part-externally (&optional handle event) "View the MIME part under point with an external viewer." - (interactive (list nil last-nonmenu-event)) + (interactive (list nil last-nonmenu-event) gnus-article-mode) (save-excursion (mouse-set-point event) (gnus-article-check-buffer) @@ -5497,7 +5501,7 @@ specified charset." (defun gnus-mime-view-part-internally (&optional handle event) "View the MIME part under point with an internal viewer. If no internal viewer is available, use an external viewer." - (interactive (list nil last-nonmenu-event)) + (interactive (list nil last-nonmenu-event) gnus-article-mode) (save-excursion (mouse-set-point event) (gnus-article-check-buffer) @@ -5518,7 +5522,9 @@ 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 (gnus-completing-read "Action" (mapcar #'car gnus-mime-action-alist) t))) + (list (gnus-completing-read + "Action" (mapcar #'car gnus-mime-action-alist) t)) + gnus-article-mode) (gnus-article-check-buffer) (let ((action-pair (assoc action gnus-mime-action-alist))) (if action-pair @@ -5611,62 +5617,62 @@ If INTERACTIVE, call FUNCTION interactively." (defun gnus-article-pipe-part (n) "Pipe MIME part N, which is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'mm-pipe-part)) (defun gnus-article-save-part (n) "Save MIME part N, which is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'mm-save-part)) (defun gnus-article-interactively-view-part (n) "View MIME part N interactively, which is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'mm-interactively-view-part)) (defun gnus-article-copy-part (n) "Copy MIME part N, which is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-copy-part)) (defun gnus-article-view-part-as-charset (n) "View MIME part N using a specified charset. N is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-view-part-as-charset)) (defun gnus-article-view-part-externally (n) "View MIME part N externally, which is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-view-part-externally)) (defun gnus-article-inline-part (n) "Inline MIME part N, which is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-inline-part)) (defun gnus-article-save-part-and-strip (n) "Save MIME part N and replace it with an external body. N is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-save-part-and-strip t)) (defun gnus-article-replace-part (n) "Replace MIME part N with an external body. N is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-replace-part t t)) (defun gnus-article-delete-part (n) "Delete MIME part N and add some information about the removed part. N is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-delete-part t)) (defun gnus-article-view-part-as-type (n) "Choose a MIME media type, and view part N as such. N is the numerical prefix." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-part-wrapper n 'gnus-mime-view-part-as-type t)) (defun gnus-article-mime-match-handle-first (condition) @@ -5693,7 +5699,7 @@ N is the numerical prefix." "View MIME part N, which is the numerical prefix. If the part is already shown, hide the part. If N is nil, view all parts." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (or (numberp n) (setq n (gnus-article-mime-match-handle-first gnus-article-mime-match-handle-function))) @@ -6383,7 +6389,7 @@ Provided for backwards compatibility." This function toggles the display when called interactively. Note that buttons to be added to the header are only the ones that aren't inlined in the body. Use `gnus-header-face-alist' to highlight buttons." - (interactive (list t)) + (interactive (list t) gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (let ((case-fold-search t) buttons st) (save-excursion @@ -6488,7 +6494,7 @@ the coding cookie." (defun gnus-narrow-to-page (&optional arg) "Narrow the article buffer to a page. If given a numerical ARG, move forward ARG pages." - (interactive "P") + (interactive "P" gnus-article-mode) (setq arg (if arg (prefix-numeric-value arg) 0)) (with-current-buffer gnus-article-buffer (widen) @@ -6541,7 +6547,7 @@ If given a numerical ARG, move forward ARG pages." (defun gnus-article-goto-next-page () "Show the next page of the article." - (interactive) + (interactive nil gnus-article-mode) (when (gnus-article-next-page) (goto-char (point-min)) (gnus-article-read-summary-keys nil ?n))) @@ -6549,7 +6555,7 @@ If given a numerical ARG, move forward ARG pages." (defun gnus-article-goto-prev-page () "Show the previous page of the article." - (interactive) + (interactive nil gnus-article-mode) (if (save-restriction (widen) (bobp)) ;; Real beginning-of-buffer? (gnus-article-read-summary-keys nil ?p) (gnus-article-prev-page nil))) @@ -6572,7 +6578,7 @@ If given a numerical ARG, move forward ARG pages." "Show the next page of the current article. If end of article, return non-nil. Otherwise return nil. Argument LINES specifies lines to be scrolled up." - (interactive "p") + (interactive "p" gnus-article-mode) (move-to-window-line (- -1 scroll-margin)) (if (and (not (and gnus-article-over-scroll (> (count-lines (window-start) (point-max)) @@ -6628,7 +6634,7 @@ specifies." (defun gnus-article-prev-page (&optional lines) "Show previous page of current article. Argument LINES specifies lines to be scrolled down." - (interactive "p") + (interactive "p" gnus-article-mode) (move-to-window-line 0) (if (and gnus-page-broken (bobp) @@ -6669,7 +6675,7 @@ not have a face in `gnus-article-boring-faces'." (defun gnus-article-refer-article () "Read article specified by message-id around point." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (re-search-backward "[ \t]\\|^" (point-at-bol) t) (re-search-forward "\\[gnus-article-goto-next-page]:Next page \\[gnus-article-goto-prev-page]:Prev page \\[gnus-article-show-summary]:Show summary \\[gnus-info-find-node]:Run Info \\[gnus-article-describe-briefly]:This help"))) (defun gnus-article-check-buffer () @@ -6703,7 +6709,7 @@ not have a face in `gnus-article-boring-faces'." (defun gnus-article-read-summary-keys (&optional _arg key not-restore-window) "Read a summary buffer key sequence and execute it from the article buffer." - (interactive "P") + (interactive "P" gnus-article-mode) (gnus-article-check-buffer) (let ((nosaves '("q" "Q" "r" "m" "a" "f" "WDD" "WDW" @@ -6814,7 +6820,7 @@ not have a face in `gnus-article-boring-faces'." (ding)))))))) (defun gnus-article-read-summary-send-keys () - (interactive) + (interactive nil gnus-article-mode) (let ((unread-command-events (list ?S))) (gnus-article-read-summary-keys))) @@ -6822,7 +6828,8 @@ not have a face in `gnus-article-boring-faces'." "Display documentation of the function invoked by KEY. KEY is a string or a vector." (interactive (list (let ((cursor-in-echo-area t)) - (read-key-sequence "Describe key: ")))) + (read-key-sequence "Describe key: "))) + gnus-article-mode) (gnus-article-check-buffer) (if (memq (key-binding key t) '(gnus-article-read-summary-keys gnus-article-read-summary-send-keys)) @@ -6844,7 +6851,8 @@ KEY is a string or a vector." KEY is a string or a vector." (interactive (list (let ((cursor-in-echo-area t)) (read-key-sequence "Describe key: ")) - current-prefix-arg)) + current-prefix-arg) + gnus-article-mode) (gnus-article-check-buffer) (if (memq (key-binding key t) '(gnus-article-read-summary-keys gnus-article-read-summary-send-keys)) @@ -6871,7 +6879,7 @@ KEY is a string or a vector." "Show a list of all defined keys, and their definitions. The optional argument PREFIX, if non-nil, should be a key sequence; then we display only bindings that start with that prefix." - (interactive) + (interactive nil gnus-article-mode) (gnus-article-check-buffer) (let ((keymap (copy-keymap gnus-article-mode-map)) (map (copy-keymap gnus-article-send-map)) @@ -6930,7 +6938,7 @@ then we display only bindings that start with that prefix." "Start composing a reply mail to the current message. The text in the region will be yanked. If the region isn't active, the entire article will be yanked." - (interactive) + (interactive nil gnus-article-mode) (let ((article (cdr gnus-article-current)) contents) (if (not (and transient-mark-mode mark-active)) @@ -6948,14 +6956,14 @@ the entire article will be yanked." "Start composing a wide reply mail to the current message. The text in the region will be yanked. If the region isn't active, the entire article will be yanked." - (interactive) + (interactive nil gnus-article-mode) (gnus-article-reply-with-original t)) (defun gnus-article-followup-with-original () "Compose a followup to the current article. The text in the region will be yanked. If the region isn't active, the entire article will be yanked." - (interactive) + (interactive nil gnus-article-mode) (let ((article (cdr gnus-article-current)) contents) (if (not (and transient-mark-mode mark-active)) @@ -6974,7 +6982,8 @@ the entire article will be yanked." This means that signatures, cited text and (some) headers will be hidden. If given a prefix, show the hidden text instead." - (interactive (append (gnus-article-hidden-arg) (list 'force))) + (interactive (append (gnus-article-hidden-arg) (list 'force)) + gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (article-hide-headers arg) (article-hide-list-identifiers) @@ -7269,7 +7278,7 @@ This is an extended text-mode. This will have permanent effect only in mail groups. If FORCE is non-nil, allow editing of articles even in read-only groups." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (when (and (not force) (gnus-group-read-only-p)) (error "The current newsgroup does not support article editing")) @@ -7302,7 +7311,7 @@ groups." (defun gnus-article-edit-done (&optional arg) "Update the article edits and exit." - (interactive "P") + (interactive "P" gnus-article-mode) (let ((func gnus-article-edit-done-function) (buf (current-buffer)) (start (window-start)) @@ -7336,7 +7345,7 @@ groups." (defun gnus-article-edit-exit () "Exit the article editing without updating." - (interactive) + (interactive nil gnus-article-mode) (when (or (not (buffer-modified-p)) (yes-or-no-p "Article modified; kill anyway? ")) (let ((curbuf (current-buffer)) @@ -7357,7 +7366,7 @@ groups." (defun gnus-article-edit-full-stops () "Interactively repair spacing at end of sentences." - (interactive) + (interactive nil gnus-article-mode) (save-excursion (goto-char (point-min)) (search-forward-regexp "^$" nil t) @@ -7875,7 +7884,7 @@ HEADER is a regexp to match a header. For a fuller explanation, see "Check text under the mouse pointer for a callback function. If the text under the mouse pointer has a `gnus-callback' property, call it with the value of the `gnus-data' text property." - (interactive "e") + (interactive "e" gnus-article-mode) (set-buffer (window-buffer (posn-window (event-start event)))) (let* ((pos (posn-point (event-start event))) (data (get-text-property pos 'gnus-data)) @@ -7888,7 +7897,7 @@ call it with the value of the `gnus-data' text property." "Check text at point for a callback function. If the text at point has a `gnus-callback' property, call it with the value of the `gnus-data' text property." - (interactive (list last-nonmenu-event)) + (interactive (list last-nonmenu-event) gnus-article-mode) (save-excursion (when event (mouse-set-point event)) @@ -7902,7 +7911,7 @@ This function calls `gnus-article-highlight-headers', `gnus-article-highlight-citation', `gnus-article-highlight-signature', and `gnus-article-add-buttons' to do the highlighting. See the documentation for those functions." - (interactive (list 'force)) + (interactive (list 'force) gnus-article-mode) (gnus-article-highlight-headers) (gnus-article-highlight-citation force) (gnus-article-highlight-signature) @@ -7914,14 +7923,14 @@ do the highlighting. See the documentation for those functions." This function calls `gnus-article-highlight-headers', `gnus-article-highlight-signature', and `gnus-article-add-buttons' to do the highlighting. See the documentation for those functions." - (interactive (list 'force)) + (interactive (list 'force) gnus-article-mode) (gnus-article-highlight-headers) (gnus-article-highlight-signature) (gnus-article-add-buttons)) (defun gnus-article-highlight-headers () "Highlight article headers as specified by `gnus-header-face-alist'." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-headers (let (regexp header-face field-face from hpoints fpoints) (dolist (entry gnus-header-face-alist) @@ -7955,7 +7964,7 @@ do the highlighting. See the documentation for those functions." "Highlight the signature in an article. It does this by highlighting everything after `gnus-signature-separator' using the face `gnus-signature'." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (let ((inhibit-point-motion-hooks t)) (save-restriction @@ -7978,7 +7987,7 @@ It does this by highlighting everything after "Find external references in the article and make buttons of them. \"External references\" are things like Message-IDs and URLs, as specified by `gnus-button-alist'." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (let ((inhibit-point-motion-hooks t) (case-fold-search t) @@ -8072,7 +8081,7 @@ url is put as the `gnus-button-url' overlay property on the button." ;; Add buttons to the head of an article. (defun gnus-article-add-buttons-to-head () "Add buttons to the head of the article." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-headers (let (beg end) (dolist (entry gnus-header-button-alist) @@ -8120,7 +8129,7 @@ url is put as the `gnus-button-url' overlay property on the button." (defun gnus-article-copy-string () "Copy the string in the button to the kill ring." - (interactive) + (interactive nil gnus-article-mode) (gnus-article-check-buffer) (let ((data (get-text-property (point) 'gnus-string))) (when data @@ -8236,7 +8245,7 @@ url is put as the `gnus-button-url' overlay property on the button." (defun gnus-button-patch (library line) "Visit an Emacs Lisp library LIBRARY on line LINE." - (interactive) + (interactive nil gnus-article-mode) (let ((file (locate-library (file-name-nondirectory library)))) (unless file (error "Couldn't find library %s" library)) @@ -8428,7 +8437,7 @@ url is put as the `gnus-button-url' overlay property on the button." (defun gnus-button-next-page (&optional _args _more-args) "Go to the next page." - (interactive) + (interactive nil gnus-article-mode) (let ((win (selected-window))) (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-next-page) @@ -8436,7 +8445,7 @@ url is put as the `gnus-button-url' overlay property on the button." (defun gnus-button-prev-page (&optional _args _more-args) "Go to the prev page." - (interactive) + (interactive nil gnus-article-mode) (let ((win (selected-window))) (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-prev-page) @@ -8460,7 +8469,7 @@ url is put as the `gnus-button-url' overlay property on the button." (defun gnus-article-button-next-page (_arg) "Go to the next page." - (interactive "P") + (interactive "P" gnus-article-mode) (let ((win (selected-window))) (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-next-page) @@ -8468,7 +8477,7 @@ url is put as the `gnus-button-url' overlay property on the button." (defun gnus-article-button-prev-page (_arg) "Go to the prev page." - (interactive "P") + (interactive "P" gnus-article-mode) (let ((win (selected-window))) (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-prev-page) @@ -8602,9 +8611,10 @@ For example: (list (or gnus-article-encrypt-protocol (gnus-completing-read "Encrypt protocol" - (mapcar #'car gnus-article-encrypt-protocol-alist) - t)) - current-prefix-arg)) + (mapcar #'car gnus-article-encrypt-protocol-alist) + t)) + current-prefix-arg) + gnus-article-mode) ;; User might hit `K E' instead of `K e', so prompt once. (when (and gnus-article-encrypt-protocol gnus-novice-user) @@ -8728,7 +8738,7 @@ For example: (defun gnus-mime-security-button-menu (event prefix) "Construct a context-sensitive menu of security commands." - (interactive "e\nP") + (interactive "e\nP" gnus-article-mode) (save-window-excursion (let ((pos (event-start event))) (select-window (posn-window pos)) @@ -8885,12 +8895,12 @@ For example: (defun gnus-mime-security-save-part () "Save the security part under point." - (interactive) + (interactive nil gnus-article-mode) (gnus-mime-security-run-function 'mm-save-part)) (defun gnus-mime-security-pipe-part () "Pipe the security part under point to a process." - (interactive) + (interactive nil gnus-article-mode) (gnus-mime-security-run-function 'mm-pipe-part)) (provide 'gnus-art) diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index bc41d5b149d..8c2a928ab98 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -168,7 +168,7 @@ So the cdr of each bookmark is an alist too.") ;;;###autoload (defun gnus-bookmark-set () "Set a bookmark for this article." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-bookmark-maybe-load-default-file) (if (or (not (derived-mode-p 'gnus-summary-mode)) (not gnus-article-current)) @@ -483,7 +483,7 @@ Gnus bookmarks names preceded by a \"*\" have annotations. (defun gnus-bookmark-bmenu-toggle-infos (&optional show) "Toggle whether details are shown in the Gnus bookmark list. Optional argument SHOW means show them unconditionally." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (cond (show (setq gnus-bookmark-bmenu-toggle-infos nil) @@ -649,14 +649,14 @@ reposition and try again, else return nil." (defun gnus-bookmark-bmenu-show-details () "Show the annotation for the current bookmark in another window." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (let ((bookmark (gnus-bookmark-bmenu-bookmark))) (if (gnus-bookmark-bmenu-check-position) (gnus-bookmark-show-details bookmark)))) (defun gnus-bookmark-bmenu-mark () "Mark bookmark on this line to be displayed by \\\\[gnus-bookmark-bmenu-select]." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (beginning-of-line) (if (gnus-bookmark-bmenu-check-position) (let ((inhibit-read-only t)) @@ -668,7 +668,7 @@ reposition and try again, else return nil." (defun gnus-bookmark-bmenu-unmark (&optional backup) "Cancel all requested operations on bookmark on this line and move down. Optional BACKUP means move up." - (interactive "P") + (interactive "P" gnus-bookmark-bmenu-mode) (beginning-of-line) (if (gnus-bookmark-bmenu-check-position) (progn @@ -683,7 +683,7 @@ Optional BACKUP means move up." (defun gnus-bookmark-bmenu-backup-unmark () "Move up and cancel all requested operations on bookmark on line above." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (forward-line -1) (if (gnus-bookmark-bmenu-check-position) (progn @@ -695,7 +695,7 @@ Optional BACKUP means move up." "Mark Gnus bookmark on this line to be deleted. To carry out the deletions that you've marked, use \\\\[gnus-bookmark-bmenu-execute-deletions]." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (beginning-of-line) (if (gnus-bookmark-bmenu-check-position) (let ((inhibit-read-only t)) @@ -708,7 +708,7 @@ To carry out the deletions that you've marked, use "Mark bookmark on this line to be deleted, then move up one line. To carry out the deletions that you've marked, use \\\\[gnus-bookmark-bmenu-execute-deletions]." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (gnus-bookmark-bmenu-delete) (forward-line -2) (if (gnus-bookmark-bmenu-check-position) @@ -720,7 +720,7 @@ To carry out the deletions that you've marked, use You can mark bookmarks with the \\\\[gnus-bookmark-bmenu-mark] command." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (if (gnus-bookmark-bmenu-check-position) (let ((bmrk (gnus-bookmark-bmenu-bookmark)) (menu (current-buffer))) @@ -730,13 +730,13 @@ command." (bury-buffer menu)))) (defun gnus-bookmark-bmenu-select-by-mouse (event) - (interactive "e") + (interactive "e" gnus-bookmark-bmenu-mode) (mouse-set-point event) (gnus-bookmark-bmenu-select)) (defun gnus-bookmark-bmenu-load () "Load the Gnus bookmark file and rebuild the bookmark menu-buffer." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (if (gnus-bookmark-bmenu-check-position) (save-excursion (save-window-excursion @@ -745,7 +745,7 @@ command." (defun gnus-bookmark-bmenu-execute-deletions () "Delete Gnus bookmarks marked with \\\\[Buffer-menu-delete] commands." - (interactive) + (interactive nil gnus-bookmark-bmenu-mode) (message "Deleting Gnus bookmarks...") (let ((hide-em gnus-bookmark-bmenu-toggle-infos) (o-point (point)) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 5ed731947bc..34dba54c11d 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -342,7 +342,7 @@ it's not cached." "Enter the next N articles into the cache. If not given a prefix, use the process marked articles instead. Returns the list of articles entered." - (interactive "P") + (interactive "P" gnus-summary-mode) (let (out) (dolist (article (gnus-summary-work-articles n)) (gnus-summary-remove-process-mark article) @@ -363,7 +363,7 @@ Returns the list of articles entered." "Remove the next N articles from the cache. If not given a prefix, use the process marked articles instead. Returns the list of articles removed." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-cache-change-buffer gnus-newsgroup-name) (let (out) (dolist (article (gnus-summary-work-articles n)) @@ -388,7 +388,7 @@ Returns the list of articles removed." (defun gnus-summary-insert-cached-articles () "Insert all the articles cached for this group into the current buffer." - (interactive) + (interactive nil gnus-summary-mode) (let ((gnus-verbose (max 6 gnus-verbose))) (cond ((not gnus-newsgroup-cached) @@ -401,7 +401,7 @@ Returns the list of articles removed." (defun gnus-summary-limit-include-cached () "Limit the summary buffer to articles that are cached." - (interactive) + (interactive nil gnus-summary-mode) (let ((gnus-verbose (max 6 gnus-verbose))) (if gnus-newsgroup-cached (progn diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 96f1a7de5ec..1f564f192b0 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -335,7 +335,7 @@ lines matches `message-cite-prefix-regexp' with the same prefix. Lines matching `gnus-cite-attribution-suffix' and perhaps `gnus-cite-attribution-prefix' are considered attribution lines." - (interactive (list 'force)) + (interactive (list 'force) gnus-article-mode gnus-summary-mode) (with-current-buffer (if same-buffer (current-buffer) gnus-article-buffer) (gnus-cite-parse-maybe force) (let ((buffer-read-only nil) @@ -459,7 +459,7 @@ frame width. Sections that are heuristically interpreted as not being text (i.e., computer code and the like) will not be folded." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (let ((buffer-read-only nil) (inhibit-point-motion-hooks t) @@ -529,7 +529,8 @@ text (i.e., computer code and the like) will not be folded." See the documentation for `gnus-article-highlight-citation'. If given a negative prefix, always show; if given a positive prefix, always hide." - (interactive (append (gnus-article-hidden-arg) (list 'force))) + (interactive (append (gnus-article-hidden-arg) (list 'force)) + gnus-article-mode gnus-summary-mode) (gnus-set-format 'cited-opened-text-button t) (gnus-set-format 'cited-closed-text-button t) (with-current-buffer gnus-article-buffer @@ -661,7 +662,8 @@ percent and at least `gnus-cite-hide-absolute' lines of the body is cited text with attributions. When called interactively, these two variables are ignored. See also the documentation for `gnus-article-highlight-citation'." - (interactive (append (gnus-article-hidden-arg) '(force))) + (interactive (append (gnus-article-hidden-arg) '(force)) + gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (gnus-delete-wash-type 'cite) (unless (gnus-article-check-hidden-text 'cite arg) @@ -689,7 +691,7 @@ See also the documentation for `gnus-article-highlight-citation'." (defun gnus-article-hide-citation-in-followups () "Hide cited text in non-root articles." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (let ((article (cdr gnus-article-current))) (unless (with-current-buffer gnus-summary-buffer diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index d8f48b19f87..0852f8e1264 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -337,7 +337,8 @@ category.")) (defun gnus-group-customize (group &optional topic) "Edit the group or topic on the current line." - (interactive (list (gnus-group-group-name) (gnus-group-topic-name))) + (interactive (list (gnus-group-group-name) (gnus-group-topic-name)) + gnus-group-mode) (let (info (types (mapcar (lambda (entry) `(cons :format "%v%h\n" @@ -485,7 +486,7 @@ form, but who cares?" (defun gnus-group-customize-done (&rest _ignore) "Apply changes and bury the buffer." - (interactive) + (interactive nil gnus-custom-mode) (let ((params (widget-value gnus-custom-params))) (if gnus-custom-topic (gnus-topic-set-parameters gnus-custom-topic params) @@ -829,7 +830,7 @@ eh?"))) "Customize score file FILE. When called interactively, FILE defaults to the current score file. This can be changed using the `\\[gnus-score-change-score-file]' command." - (interactive (list gnus-current-score-file)) + (interactive (list gnus-current-score-file) gnus-summary-mode) (unless file (error "No score file for %s" gnus-newsgroup-name)) (let ((scores (gnus-score-load file)) @@ -1000,7 +1001,7 @@ articles in the thread. (defun gnus-agent-customize-category (category) "Edit the CATEGORY." - (interactive (list (gnus-category-name))) + (interactive (list (gnus-category-name)) gnus-custom-mode) (let ((info (assq category gnus-category-alist)) (defaults (list nil '(agent-predicate . false) (cons 'agent-enable-expiration diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el index 0cee01b9428..944fd9795a2 100644 --- a/lisp/gnus/gnus-delay.el +++ b/lisp/gnus/gnus-delay.el @@ -76,10 +76,10 @@ DELAY is a string, giving the length of the time. Possible values are: The value of `message-draft-headers' determines which headers are generated when the article is delayed. Remaining headers are generated when the article is sent." - (interactive - (list (read-string - "Target date (YYYY-MM-DD), time (hh:mm), or length of delay (units in [mhdwMY]): " - gnus-delay-default-delay))) + (interactive (list (read-string + "Target date (YYYY-MM-DD), time (hh:mm), or length of delay (units in [mhdwMY]): " + gnus-delay-default-delay)) + message-mode) ;; Allow spell checking etc. (run-hooks 'message-send-hook) (let (num unit year month day hour minute deadline) ;; days diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el index 52705640bf0..64eb639f61c 100644 --- a/lisp/gnus/gnus-diary.el +++ b/lisp/gnus/gnus-diary.el @@ -214,7 +214,7 @@ There are currently two built-in format functions: (defun gnus-summary-sort-by-schedule (&optional reverse) "Sort nndiary summary buffers by schedule of appointments. Optional prefix (or REVERSE argument) means sort in reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'schedule reverse)) (defvar gnus-summary-misc-menu) ;; Avoid byte compiler warning. @@ -322,7 +322,7 @@ This function checks that all NNDiary required headers are present and valid, and prompts for values / correction otherwise. If ARG (or prefix) is non-nil, force prompting for all fields." - (interactive "P") + (interactive "P" gnus-summary-mode) (save-excursion (mapcar (lambda (head) diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el index ca2d57de7dc..af0b782202a 100644 --- a/lisp/gnus/gnus-dired.el +++ b/lisp/gnus/gnus-dired.el @@ -124,7 +124,8 @@ filenames." (mapcar ;; don't attach directories (lambda (f) (if (file-directory-p f) nil f)) - (nreverse (dired-map-over-marks (dired-get-filename) nil)))))) + (nreverse (dired-map-over-marks (dired-get-filename) nil))))) + dired-mode) (let ((destination nil) (files-str nil) (bufs nil)) @@ -178,7 +179,8 @@ filenames." If ARG is non-nil, open it in a new buffer." (interactive (list (file-name-sans-versions (dired-get-filename) t) - current-prefix-arg)) + current-prefix-arg) + dired-mode) (mailcap-parse-mailcaps) (if (file-exists-p file-name) (let (mime-type method) @@ -216,7 +218,8 @@ that name. If PRINT-TO is a number, prompt the user for the name of the file to save in." (interactive (list (file-name-sans-versions (dired-get-filename) t) - (ps-print-preprint current-prefix-arg))) + (ps-print-preprint current-prefix-arg)) + dired-mode) (mailcap-parse-mailcaps) (cond ((file-directory-p file-name) diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index f68e9d6b749..9a0f21359f8 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el @@ -71,7 +71,7 @@ (defun gnus-draft-toggle-sending (article) "Toggle whether to send an article or not." - (interactive (list (gnus-summary-article-number))) + (interactive (list (gnus-summary-article-number)) gnus-summary-mode) (if (gnus-draft-article-sendable-p article) (progn (push article gnus-newsgroup-unsendable) @@ -83,7 +83,7 @@ (defun gnus-draft-edit-message () "Enter a mail/post buffer to edit and send the draft." - (interactive) + (interactive nil gnus-summary-mode) (let ((article (gnus-summary-article-number)) (group gnus-newsgroup-name)) (gnus-draft-check-draft-articles (list article)) @@ -109,7 +109,7 @@ (defun gnus-draft-send-message (&optional n) "Send the current draft(s). Obeys the standard process/prefix convention." - (interactive "P") + (interactive "P" gnus-summary-mode) (let* ((articles (gnus-summary-work-articles n)) (total (length articles)) article) diff --git a/lisp/gnus/gnus-eform.el b/lisp/gnus/gnus-eform.el index 265edf4d612..3fd8bf51de4 100644 --- a/lisp/gnus/gnus-eform.el +++ b/lisp/gnus/gnus-eform.el @@ -104,7 +104,7 @@ The optional LAYOUT overrides the `edit-form' window layout." (defun gnus-edit-form-done () "Update changes and kill the current buffer." - (interactive) + (interactive nil gnus-edit-form-mode) (goto-char (point-min)) (let ((form (condition-case nil (read (current-buffer)) @@ -115,7 +115,7 @@ The optional LAYOUT overrides the `edit-form' window layout." (defun gnus-edit-form-exit () "Kill the current buffer." - (interactive) + (interactive nil gnus-edit-form-mode) (let ((winconf gnus-prev-winconf)) (kill-buffer (current-buffer)) (set-window-configuration winconf))) diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index f69c2ed12c2..c2e72aba933 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -132,11 +132,12 @@ For instance, to insert an X-Face use `gnus-random-x-face' as FUN Files matching `gnus-x-face-omit-files' are not considered." (interactive) - (gnus--random-face-with-type gnus-x-face-directory "\\.pbm$" gnus-x-face-omit-files - (lambda (file) - (gnus-shell-command-to-string - (format gnus-convert-pbm-to-x-face-command - (shell-quote-argument file)))))) + (gnus--random-face-with-type + gnus-x-face-directory "\\.pbm$" gnus-x-face-omit-files + (lambda (file) + (gnus-shell-command-to-string + (format gnus-convert-pbm-to-x-face-command + (shell-quote-argument file)))))) ;;;###autoload (defun gnus-insert-random-x-face-header () @@ -231,8 +232,8 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to Files matching `gnus-face-omit-files' are not considered." (interactive) (gnus--random-face-with-type gnus-face-directory "\\.png$" - gnus-face-omit-files - 'gnus-convert-png-to-face)) + gnus-face-omit-files + 'gnus-convert-png-to-face)) ;;;###autoload (defun gnus-insert-random-face-header () @@ -277,7 +278,6 @@ colors of the displayed X-Faces." (defun gnus-grab-cam-x-face () "Grab a picture off the camera and make it into an X-Face." - (interactive) (shell-command "xawtv-remote snap ppm") (let ((file nil)) (while (null (setq file (directory-files "/tftpboot/sparky/tmp" @@ -289,13 +289,11 @@ colors of the displayed X-Faces." (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>%s | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface" file null-device) (current-buffer)) - ;;(sleep-for 3) (delete-file file) (buffer-string)))) (defun gnus-grab-cam-face () "Grab a picture off the camera and make it into an X-Face." - (interactive) (shell-command "xawtv-remote snap ppm") (let ((file nil) (tempfile (make-temp-file "gnus-face-" nil ".ppm")) @@ -312,7 +310,6 @@ colors of the displayed X-Faces." (gnus-fun-ppm-change-string)))) (setq result (gnus-face-from-file tempfile))) (delete-file file) - ;;(delete-file tempfile) ; FIXME why are we not deleting it?! result)) (defun gnus-fun-ppm-change-string () diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index 9ea9e100316..be57774fe96 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el @@ -125,7 +125,7 @@ callback for `gravatar-retrieve'." (defun gnus-treat-from-gravatar (&optional force) "Display gravatar in the From header. If gravatar is already displayed, remove it." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (if (memq 'from-gravatar gnus-article-wash-types) (gnus-delete-images 'from-gravatar) @@ -135,7 +135,7 @@ If gravatar is already displayed, remove it." (defun gnus-treat-mail-gravatar (&optional force) "Display gravatars in the Cc and To headers. If gravatars are already displayed, remove them." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (gnus-with-article-buffer (if (memq 'mail-gravatar gnus-article-wash-types) (gnus-delete-images 'mail-gravatar) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index e8b62a4133e..909391b6b0c 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1160,7 +1160,7 @@ The following commands are available: (defun gnus-mouse-pick-group (e) "Enter the group under the mouse pointer." - (interactive "e") + (interactive "e" gnus-group-mode) (mouse-set-point e) (gnus-group-read-group nil)) @@ -1241,7 +1241,8 @@ Also see the `gnus-group-use-permanent-levels' variable." (or (gnus-group-default-level nil t) (gnus-group-default-list-level) - gnus-level-subscribed)))) + gnus-level-subscribed))) + gnus-group-mode) (unless level (setq level (car gnus-group-list-mode) unread (cdr gnus-group-list-mode))) @@ -1292,7 +1293,7 @@ Also see the `gnus-group-use-permanent-levels' variable." (defun gnus-group-list-level (level &optional all) "List groups on LEVEL. If ALL (the prefix), also list groups that have no unread articles." - (interactive "nList groups on level: \nP") + (interactive "nList groups on level: \nP" gnus-group-mode) (gnus-group-list-groups level all level)) (defun gnus-group-prepare-logic (group test) @@ -1866,7 +1867,7 @@ If FIRST-TOO, the current line is also eligible as a target." (defun gnus-group-mark-group (n &optional unmark no-advance) "Mark the current group." - (interactive "p") + (interactive "p" gnus-group-mode) (let ((buffer-read-only nil) group) (while (and (> n 0) @@ -1891,13 +1892,13 @@ If FIRST-TOO, the current line is also eligible as a target." (defun gnus-group-unmark-group (n) "Remove the mark from the current group." - (interactive "p") + (interactive "p" gnus-group-mode) (gnus-group-mark-group n 'unmark) (gnus-group-position-point)) (defun gnus-group-unmark-all-groups () "Unmark all groups." - (interactive) + (interactive nil gnus-group-mode) (save-excursion (mapc #'gnus-group-remove-mark gnus-group-marked)) (gnus-group-position-point)) @@ -1905,7 +1906,7 @@ If FIRST-TOO, the current line is also eligible as a target." (defun gnus-group-mark-region (unmark beg end) "Mark all groups between point and mark. If UNMARK, remove the mark instead." - (interactive "P\nr") + (interactive "P\nr" gnus-group-mode) (let ((num (count-lines beg end))) (save-excursion (goto-char beg) @@ -1914,12 +1915,12 @@ If UNMARK, remove the mark instead." (defun gnus-group-mark-buffer (&optional unmark) "Mark all groups in the buffer. If UNMARK, remove the mark instead." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-mark-region unmark (point-min) (point-max))) (defun gnus-group-mark-regexp (regexp) "Mark all groups that match some regexp." - (interactive "sMark (regexp): ") + (interactive "sMark (regexp): " gnus-group-mode) (let ((alist (cdr gnus-newsrc-alist)) group) (save-excursion @@ -2028,7 +2029,7 @@ number of the earliest articles in the group. If the optional argument NO-ARTICLE is non-nil, no article will be auto-selected upon group entry. If GROUP is non-nil, fetch that group." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((no-display (eq all 0)) (group (or group (gnus-group-group-name))) number active marked entry) @@ -2062,7 +2063,7 @@ If ALL is a positive number, fetch this number of the latest articles in the group. If ALL is a negative number, fetch this number of the earliest articles in the group." - (interactive "P") + (interactive "P" gnus-group-mode) (when (and (eobp) (not (gnus-group-group-name))) (forward-line -1)) (gnus-group-read-group all t)) @@ -2081,7 +2082,7 @@ buffer. If GROUP is nil, use current group. This might be useful if you want to toggle threading before entering the group." - (interactive "P") + (interactive "P" gnus-group-mode) (require 'gnus-score) (let (gnus-visual gnus-score-find-score-files-function @@ -2092,7 +2093,7 @@ before entering the group." (defun gnus-group-visible-select-group (&optional all) "Select the current group without hiding any articles." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((gnus-inhibit-limiting t)) (gnus-group-read-group all t))) @@ -2101,7 +2102,7 @@ before entering the group." You will actually be entered into a group that's a copy of the current group; no changes you make while in this group will be permanent." - (interactive) + (interactive nil gnus-group-mode) (require 'gnus-score) (let* (gnus-visual gnus-score-find-score-files-function gnus-apply-kill-hook @@ -2333,7 +2334,8 @@ specified by `gnus-gmane-group-download-format'." (list (gnus-group-completing-read "Gmane group") (read-number "Start article number: ") - (read-number "How many articles: "))) + (read-number "How many articles: ")) + gnus-group-mode) (unless range (setq range 500)) (when (< range 1) (error "Invalid range: %s" range)) @@ -2367,8 +2369,7 @@ Valid input formats include: ;; - The URLs should be added to `gnus-button-alist'. Probably we should ;; prompt the user to decide: "View via `browse-url' or in Gnus? " ;; (`gnus-read-ephemeral-gmane-group-url') - (interactive - (list (gnus-group-completing-read "Gmane URL"))) + (interactive (list (gnus-group-completing-read "Gmane URL")) gnus-group-mode) (let (group start range) (cond ;; URLs providing `group', `start' and `range': @@ -2543,7 +2544,8 @@ If PROMPT (the prefix) is a number, use the prompt specified in (or (and (stringp gnus-group-jump-to-group-prompt) gnus-group-jump-to-group-prompt) (let ((p (cdr (assq 0 gnus-group-jump-to-group-prompt)))) - (and (stringp p) p))))))) + (and (stringp p) p)))))) + gnus-group-mode) (when (equal group "") (error "Empty group name")) @@ -2612,7 +2614,7 @@ Return nil if GROUP is not found." If N is negative, search backward instead. Returns the difference between N and the number of skips actually done." - (interactive "p") + (interactive "p" gnus-group-mode) (gnus-group-next-unread-group n t nil silent)) (defun gnus-group-next-unread-group (n &optional all level silent) @@ -2624,7 +2626,7 @@ such group can be found, the next group with a level higher than LEVEL. Returns the difference between N and the number of skips actually made." - (interactive "p") + (interactive "p" gnus-group-mode) (let ((backward (< n 0)) (n (abs n))) (while (and (> n 0) @@ -2641,14 +2643,14 @@ made." "Go to previous N'th newsgroup. Returns the difference between N and the number of skips actually done." - (interactive "p") + (interactive "p" gnus-group-mode) (gnus-group-next-unread-group (- n) t)) (defun gnus-group-prev-unread-group (n) "Go to previous N'th unread newsgroup. Returns the difference between N and the number of skips actually done." - (interactive "p") + (interactive "p" gnus-group-mode) (gnus-group-next-unread-group (- n))) (defun gnus-group-next-unread-group-same-level (n) @@ -2656,7 +2658,7 @@ done." If N is negative, search backward instead. Returns the difference between N and the number of skips actually done." - (interactive "p") + (interactive "p" gnus-group-mode) (gnus-group-next-unread-group n t (gnus-group-group-level)) (gnus-group-position-point)) @@ -2664,14 +2666,14 @@ done." "Go to next N'th unread newsgroup on the same level. Returns the difference between N and the number of skips actually done." - (interactive "p") + (interactive "p" gnus-group-mode) (gnus-group-next-unread-group (- n) t (gnus-group-group-level)) (gnus-group-position-point)) (defun gnus-group-best-unread-group (&optional exclude-group) "Go to the group with the highest level. If EXCLUDE-GROUP, do not go to that group." - (interactive) + (interactive nil gnus-group-mode) (goto-char (point-min)) (let ((best 100000) unread best-point) @@ -2711,7 +2713,7 @@ If EXCLUDE-GROUP, do not go to that group." (defun gnus-group-first-unread-group () "Go to the first group with unread articles." - (interactive) + (interactive nil gnus-group-mode) (prog1 (let ((opoint (point)) unread) @@ -2727,13 +2729,13 @@ If EXCLUDE-GROUP, do not go to that group." (defun gnus-group-enter-server-mode () "Jump to the server buffer." - (interactive) + (interactive nil gnus-group-mode) (gnus-enter-server-buffer)) (defun gnus-group-make-group-simple (&optional group) "Add a new newsgroup. The user will be prompted for GROUP." - (interactive (list (gnus-group-completing-read))) + (interactive (list (gnus-group-completing-read)) gnus-group-mode) (gnus-group-make-group (gnus-group-real-name group) (gnus-group-server group) nil nil)) @@ -2749,7 +2751,8 @@ server." (interactive (list (gnus-read-group "Group name: ") - (gnus-read-method "Select method for new group (use tab for completion)"))) + (gnus-read-method "Select method for new group (use tab for completion)")) + gnus-group-mode) (when (stringp method) (setq method (or (gnus-server-to-method method) method))) @@ -2794,7 +2797,7 @@ server." (defun gnus-group-delete-groups (&optional arg) "Delete the current group. Only meaningful with editable groups." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((n (length (gnus-group-process-prefix arg)))) (when (gnus-yes-or-no-p (if (= n 1) @@ -2809,8 +2812,8 @@ server." If OLDP (the prefix), only delete articles that are \"old\", according to the expiry settings. Note that this will delete old not-expirable articles, too." - (interactive (list (gnus-group-group-name) - current-prefix-arg)) + (interactive (list (gnus-group-group-name) current-prefix-arg) + gnus-group-mode) (let ((articles (gnus-uncompress-range (gnus-active group)))) (when (gnus-yes-or-no-p (format "Do you really want to delete these %d articles forever? " @@ -2829,9 +2832,8 @@ doing the deletion. Note that you also have to specify FORCE if you want the group to be removed from the server, even when it's empty." - (interactive - (list (gnus-group-group-name) - current-prefix-arg)) + (interactive (list (gnus-group-group-name) current-prefix-arg) + gnus-group-mode) (unless group (error "No group to delete")) (unless (gnus-check-backend-function 'request-delete-group group) @@ -2865,7 +2867,8 @@ and NEW-NAME will be prompted for." "Rename group to: " (gnus-group-real-name group)) method (gnus-info-method (gnus-get-info group))) - (list group (gnus-group-prefixed-name new-name method)))) + (list group (gnus-group-prefixed-name new-name method))) + gnus-group-mode) (unless (gnus-check-backend-function 'request-rename-group group) (error "This back end does not support renaming groups")) @@ -2911,7 +2914,7 @@ and NEW-NAME will be prompted for." (defun gnus-group-edit-group (group &optional part) "Edit the group on the current line." - (interactive (list (gnus-group-group-name))) + (interactive (list (gnus-group-group-name)) gnus-group-mode) (let ((part (or part 'info)) info) (unless group @@ -2950,12 +2953,12 @@ and NEW-NAME will be prompted for." (defun gnus-group-edit-group-method (group) "Edit the select method of GROUP." - (interactive (list (gnus-group-group-name))) + (interactive (list (gnus-group-group-name)) gnus-group-mode) (gnus-group-edit-group group 'method)) (defun gnus-group-edit-group-parameters (group) "Edit the group parameters of GROUP." - (interactive (list (gnus-group-group-name))) + (interactive (list (gnus-group-group-name)) gnus-group-mode) (gnus-group-edit-group group 'params)) (defun gnus-group-edit-group-done (part group form) @@ -2993,14 +2996,16 @@ and NEW-NAME will be prompted for." (defun gnus-group-make-useful-group (group method) "Create one of the groups described in `gnus-useful-groups'." (interactive - (let ((entry (assoc (gnus-completing-read "Create group" - (mapcar #'car gnus-useful-groups) - t) + (let ((entry (assoc (gnus-completing-read + "Create group" + (mapcar #'car gnus-useful-groups) + t) gnus-useful-groups))) (list (cadr entry) - ;; Don't use `caddr' here since macros within the `interactive' - ;; form won't be expanded. - (car (cddr entry))))) + ;; Don't use `caddr' here since macros within the + ;; `interactive' form won't be expanded. + (car (cddr entry)))) + gnus-group-mode) (setq method (copy-tree method)) (let (entry) (while (setq entry (memq (assq 'eval method) method)) @@ -3014,7 +3019,7 @@ group already exists: - if not given, and error is signaled, - if t, stay silent, - if anything else, just print a message." - (interactive) + (interactive nil gnus-group-mode) (let ((name (gnus-group-prefixed-name "gnus-help" '(nndoc "gnus-help"))) (file (nnheader-find-etc-directory "gnus-tut.txt" t))) (if (gnus-group-entry name) @@ -3040,9 +3045,9 @@ group already exists: "Create a group that uses a single file as the source. If called with a prefix argument, ask for the file type." - (interactive - (list (read-file-name "File name: ") - (and current-prefix-arg 'ask))) + (interactive (list (read-file-name "File name: ") + (and current-prefix-arg 'ask)) + gnus-group-mode) (when (eq type 'ask) (let ((err "") char found) @@ -3077,7 +3082,7 @@ If called with a prefix argument, ask for the file type." (defun gnus-group-make-web-group (&optional solid) "Create an ephemeral nnweb group. If SOLID (the prefix), create a solid group." - (interactive "P") + (interactive "P" gnus-group-mode) (require 'nnweb) (let* ((group (if solid (gnus-read-group "Group name: ") @@ -3117,7 +3122,7 @@ If SOLID (the prefix), create a solid group." (defun gnus-group-make-rss-group (&optional url) "Given a URL, discover if there is an RSS feed. If there is, use Gnus to create an nnrss group" - (interactive) + (interactive nil gnus-group-mode) (require 'nnrss) (if (not url) (setq url (read-from-minibuffer "URL to Search for RSS: "))) @@ -3158,8 +3163,8 @@ If there is, use Gnus to create an nnrss group" The user will be prompted for a directory. The contents of this directory will be used as a newsgroup. The directory should contain mail messages or news articles in files that have numeric names." - (interactive - (list (read-directory-name "Create group from directory: "))) + (interactive (list (read-directory-name "Create group from directory: ")) + gnus-group-mode) (unless (file-exists-p dir) (error "No such directory")) (unless (file-directory-p dir) @@ -3192,7 +3197,7 @@ prefix arg NO-PARSE means that Gnus should not parse the search query before passing it to the underlying search engine. A non-nil SPECS arg must be an alist with `search-query-spec' and `search-group-spec' keys, and skips all prompting." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((name (gnus-read-group "Group name: "))) (with-current-buffer gnus-group-buffer (let* ((group-spec @@ -3246,7 +3251,7 @@ prefix arg NO-PARSE means that Gnus should not parse the search query before passing it to the underlying search engine. A non-nil SPECS arg must be an alist with `search-query-spec' and `search-group-spec' keys, and skips all prompting." - (interactive "P") + (interactive "P" gnus-group-mode) (let* ((group-spec (or (cdr (assq 'search-group-spec specs)) (cdr (assq 'nnir-group-spec specs)) @@ -3286,10 +3291,10 @@ non-nil SPECS arg must be an alist with `search-query-spec' and (defun gnus-group-add-to-virtual (n vgroup) "Add the current group to a virtual group." - (interactive - (list current-prefix-arg - (gnus-group-completing-read "Add to virtual group" - nil t "nnvirtual:"))) + (interactive (list current-prefix-arg + (gnus-group-completing-read "Add to virtual group" + nil t "nnvirtual:")) + gnus-group-mode) (unless (eq (car (gnus-find-method-for-group vgroup)) 'nnvirtual) (error "%s is not an nnvirtual group" vgroup)) (gnus-close-group vgroup) @@ -3307,7 +3312,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and (defun gnus-group-make-empty-virtual (group) "Create a new, fresh, empty virtual group." - (interactive "sCreate new, empty virtual group: ") + (interactive "sCreate new, empty virtual group: " gnus-group-mode) (let* ((method (list 'nnvirtual "^$")) (pgroup (gnus-group-prefixed-name group method))) ;; Check whether it exists already. @@ -3321,7 +3326,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and (defun gnus-group-enter-directory (dir) "Enter an ephemeral nneething group." - (interactive "DDirectory to read: ") + (interactive "DDirectory to read: " gnus-group-mode) (let* ((method (list 'nneething dir '(nneething-read-only t))) (leaf (gnus-group-prefixed-name (file-name-nondirectory (directory-file-name dir)) @@ -3336,7 +3341,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and (defun gnus-group-expunge-group (group) "Expunge deleted articles in current nnimap GROUP." - (interactive (list (gnus-group-group-name))) + (interactive (list (gnus-group-group-name)) gnus-group-mode) (let ((method (gnus-find-method-for-group group))) (if (not (gnus-check-backend-function 'request-expunge-group (car method))) @@ -3348,7 +3353,7 @@ non-nil SPECS arg must be an alist with `search-query-spec' and (defun gnus-group-nnimap-edit-acl (group) "Edit the Access Control List of current nnimap GROUP." - (interactive (list (gnus-group-group-name))) + (interactive (list (gnus-group-group-name)) gnus-group-mode) (let ((mailbox (gnus-group-real-name group)) method acl) (unless group (error "No group on current line")) @@ -3395,7 +3400,8 @@ Editing the access control list for `%s'. When used interactively, the sorting function used will be determined by the `gnus-group-sort-function' variable. If REVERSE (the prefix), reverse the sorting order." - (interactive (list gnus-group-sort-function current-prefix-arg)) + (interactive (list gnus-group-sort-function current-prefix-arg) + gnus-group-mode) (funcall gnus-group-sort-alist-function (gnus-make-sort-function func) reverse) (gnus-group-unmark-all-groups) @@ -3428,56 +3434,57 @@ value is disregarded." (defun gnus-group-sort-groups-by-alphabet (&optional reverse) "Sort the group buffer alphabetically by group name. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-alphabet reverse)) (defun gnus-group-sort-groups-by-real-name (&optional reverse) "Sort the group buffer alphabetically by real (unprefixed) group name. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-real-name reverse)) (defun gnus-group-sort-groups-by-unread (&optional reverse) "Sort the group buffer by number of unread articles. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-unread reverse)) (defun gnus-group-sort-groups-by-level (&optional reverse) "Sort the group buffer by group level. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-level reverse)) (defun gnus-group-sort-groups-by-score (&optional reverse) "Sort the group buffer by group score. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-score reverse)) (defun gnus-group-sort-groups-by-rank (&optional reverse) "Sort the group buffer by group rank. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-rank reverse)) (defun gnus-group-sort-groups-by-method (&optional reverse) "Sort the group buffer alphabetically by back end name. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-method reverse)) (defun gnus-group-sort-groups-by-server (&optional reverse) "Sort the group buffer alphabetically by server name. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-sort-groups 'gnus-group-sort-by-server reverse)) ;;; Selected group sorting. (defun gnus-group-sort-selected-groups (n func &optional reverse) "Sort the process/prefixed groups." - (interactive (list current-prefix-arg gnus-group-sort-function)) + (interactive (list current-prefix-arg gnus-group-sort-function) + gnus-group-mode) (let ((groups (gnus-group-process-prefix n))) (funcall gnus-group-sort-selected-function groups (gnus-make-sort-function func) reverse) @@ -3509,49 +3516,49 @@ If REVERSE is non-nil, reverse the sorting." "Sort the group buffer alphabetically by group name. Obeys the process/prefix convention. If REVERSE (the symbolic prefix), sort in reverse order." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-group-mode) (gnus-group-sort-selected-groups n 'gnus-group-sort-by-alphabet reverse)) (defun gnus-group-sort-selected-groups-by-real-name (&optional n reverse) "Sort the group buffer alphabetically by real group name. Obeys the process/prefix convention. If REVERSE (the symbolic prefix), sort in reverse order." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-group-mode) (gnus-group-sort-selected-groups n 'gnus-group-sort-by-real-name reverse)) (defun gnus-group-sort-selected-groups-by-unread (&optional n reverse) "Sort the group buffer by number of unread articles. Obeys the process/prefix convention. If REVERSE (the symbolic prefix), sort in reverse order." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-group-mode) (gnus-group-sort-selected-groups n 'gnus-group-sort-by-unread reverse)) (defun gnus-group-sort-selected-groups-by-level (&optional n reverse) "Sort the group buffer by group level. Obeys the process/prefix convention. If REVERSE (the symbolic prefix), sort in reverse order." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-group-mode) (gnus-group-sort-selected-groups n 'gnus-group-sort-by-level reverse)) (defun gnus-group-sort-selected-groups-by-score (&optional n reverse) "Sort the group buffer by group score. Obeys the process/prefix convention. If REVERSE (the symbolic prefix), sort in reverse order." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-group-mode) (gnus-group-sort-selected-groups n 'gnus-group-sort-by-score reverse)) (defun gnus-group-sort-selected-groups-by-rank (&optional n reverse) "Sort the group buffer by group rank. Obeys the process/prefix convention. If REVERSE (the symbolic prefix), sort in reverse order." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-group-mode) (gnus-group-sort-selected-groups n 'gnus-group-sort-by-rank reverse)) (defun gnus-group-sort-selected-groups-by-method (&optional n reverse) "Sort the group buffer alphabetically by back end name. Obeys the process/prefix convention. If REVERSE (the symbolic prefix), sort in reverse order." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-group-mode) (gnus-group-sort-selected-groups n 'gnus-group-sort-by-method reverse)) ;;; Sorting predicates. @@ -3609,7 +3616,7 @@ sort in reverse order." (defun gnus-group-clear-data (&optional arg) "Clear all marks and read ranges from the current group. Obeys the process/prefix convention." - (interactive "P") + (interactive "P" gnus-group-mode) (when (gnus-y-or-n-p "Really clear data? ") (gnus-group-iterate arg (lambda (group) @@ -3621,7 +3628,7 @@ Obeys the process/prefix convention." (defun gnus-group-clear-data-on-native-groups () "Clear all marks and read ranges from all native groups." - (interactive) + (interactive nil gnus-group-mode) (when (gnus-yes-or-no-p "Really clear all data from almost all groups? ") (let ((alist (cdr gnus-newsrc-alist)) info) @@ -3665,7 +3672,7 @@ caught up. If ALL is non-nil, marked articles will also be marked as read. Cross references (Xref: header) of articles are ignored. The number of newsgroups that this function was unable to catch up is returned." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((groups (gnus-group-process-prefix n)) (ret 0) group) @@ -3704,7 +3711,7 @@ up is returned." (defun gnus-group-catchup-current-all (&optional n) "Mark all articles in current newsgroup as read. Cross references (Xref: header) of articles are ignored." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-catchup-current n 'all)) (declare-function gnus-sequence-of-unread-articles "gnus-sum" (group)) @@ -3751,7 +3758,7 @@ or nil if no action could be taken." (defun gnus-group-expire-articles (&optional n) "Expire all expirable articles in the current newsgroup. Uses the process/prefix convention." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((groups (gnus-group-process-prefix n)) group) (unless groups @@ -3797,7 +3804,7 @@ Uses the process/prefix convention." (defun gnus-group-expire-all-groups () "Expire all expirable articles in all newsgroups." - (interactive) + (interactive nil gnus-group-mode) (save-excursion (gnus-message 5 "Expiring...") (let ((gnus-group-marked (mapcar (lambda (info) (gnus-info-group info)) @@ -3821,7 +3828,8 @@ Uses the process/prefix convention." (if (string-match "^\\s-*$" s) (int-to-string (or (gnus-group-group-level) gnus-level-default-subscribed)) - s)))))) + s))))) + gnus-group-mode) (unless (and (>= level 1) (<= level gnus-level-killed)) (error "Invalid level: %d" level)) (dolist (group (gnus-group-process-prefix n)) @@ -3837,18 +3845,18 @@ Uses the process/prefix convention." (defun gnus-group-unsubscribe (&optional n) "Unsubscribe the current group." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-unsubscribe-current-group n 'unsubscribe)) (defun gnus-group-subscribe (&optional n) "Subscribe the current group." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-unsubscribe-current-group n 'subscribe)) (defun gnus-group-unsubscribe-current-group (&optional n do-sub) "Toggle subscription of the current group. If given numerical prefix, toggle the N next groups." - (interactive "P") + (interactive "P" gnus-group-mode) (dolist (group (gnus-group-process-prefix n)) (gnus-group-remove-mark group) (gnus-group-unsubscribe-group @@ -3871,7 +3879,8 @@ If given numerical prefix, toggle the N next groups." Killed newsgroups are subscribed. If SILENT, don't try to update the group line." (interactive (list (gnus-group-completing-read - nil nil (gnus-read-active-file-p)))) + nil nil (gnus-read-active-file-p))) + gnus-group-mode) (let ((newsrc (gnus-group-entry group))) (cond ((string-match "\\`[ \t]*\\'" group) @@ -3905,7 +3914,7 @@ group line." "Move the current newsgroup up N places. If given a negative prefix, move down instead. The difference between N and the number of steps taken is returned." - (interactive "p") + (interactive "p" gnus-group-mode) (unless (gnus-group-group-name) (error "No group on current line")) (gnus-group-kill-group 1) @@ -3917,7 +3926,8 @@ N and the number of steps taken is returned." (defun gnus-group-kill-all-zombies (&optional dummy) "Kill all zombie newsgroups. The optional DUMMY should always be nil." - (interactive (list (not (gnus-yes-or-no-p "Really kill all zombies? ")))) + (interactive (list (not (gnus-yes-or-no-p "Really kill all zombies? "))) + gnus-group-mode) (unless dummy (setq gnus-killed-list (nconc gnus-zombie-list gnus-killed-list)) (setq gnus-zombie-list nil) @@ -3927,7 +3937,7 @@ The optional DUMMY should always be nil." (defun gnus-group-kill-region (begin end) "Kill newsgroups in current region (excluding current point). The killed newsgroups can be yanked by using \\[gnus-group-yank-group]." - (interactive "r") + (interactive "r" gnus-group-mode) (let ((lines ;; Count lines. (save-excursion @@ -3949,7 +3959,7 @@ However, only groups that were alive can be yanked; already killed groups or zombie groups can't be yanked. The return value is the name of the group that was killed, or a list of groups killed." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((buffer-read-only nil) (groups (gnus-group-process-prefix n)) group entry level out) @@ -4009,7 +4019,7 @@ of groups killed." The numeric ARG specifies how many newsgroups are to be yanked. The name of the newsgroup yanked is returned, or (if several groups are yanked) a list of yanked groups is returned." - (interactive "p") + (interactive "p" gnus-group-mode) (setq arg (or arg 1)) (let (info group prev out) (while (>= (cl-decf arg) 0) @@ -4034,7 +4044,7 @@ yanked) a list of yanked groups is returned." (defun gnus-group-kill-level (level) "Kill all groups that is on a certain LEVEL." - (interactive "nKill all groups on level: ") + (interactive "nKill all groups on level: " gnus-group-mode) (cond ((= level gnus-level-zombie) (setq gnus-killed-list @@ -4065,7 +4075,7 @@ yanked) a list of yanked groups is returned." "List all newsgroups with level ARG or lower. Default is `gnus-level-unsubscribed', which lists all subscribed and most unsubscribed groups." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-group-list-groups (or arg gnus-level-unsubscribed) t)) ;; Redefine this to list ALL killed groups if prefix arg used. @@ -4074,7 +4084,7 @@ unsubscribed groups." "List all killed newsgroups in the group buffer. If ARG is non-nil, list ALL killed groups known to Gnus. This may entail asking the server for the groups." - (interactive "P") + (interactive "P" gnus-group-mode) ;; Find all possible killed newsgroups if arg. (when arg (gnus-get-killed-groups)) @@ -4088,7 +4098,7 @@ entail asking the server for the groups." (defun gnus-group-list-zombies () "List all zombie newsgroups in the group buffer." - (interactive) + (interactive nil gnus-group-mode) (if (not gnus-zombie-list) (gnus-message 6 "No zombie groups") (let (gnus-group-list-mode) @@ -4099,7 +4109,7 @@ entail asking the server for the groups." (defun gnus-group-list-active () "List all groups that are available from the server(s)." - (interactive) + (interactive nil gnus-group-mode) ;; First we make sure that we have really read the active file. (unless (gnus-read-active-file-p) (let ((gnus-read-active-file t) @@ -4121,7 +4131,7 @@ entail asking the server for the groups." (defun gnus-activate-all-groups (level) "Activate absolutely all groups." - (interactive (list gnus-level-unsubscribed)) + (interactive (list gnus-level-unsubscribed) gnus-group-mode) (let ((gnus-activate-level level) (gnus-activate-foreign-newsgroups level)) (gnus-group-get-new-news))) @@ -4133,7 +4143,7 @@ re-scanning. If ARG is non-nil and not a number, this will force \"hard\" re-reading of the active files from all servers. If ONE-LEVEL is not nil, then re-scan only the specified level, otherwise all levels below ARG will be scanned too." - (interactive "P") + (interactive "P" gnus-group-mode) (require 'nnmail) (let ((gnus-inhibit-demon t) ;; Binding this variable will inhibit multiple fetchings @@ -4163,7 +4173,7 @@ otherwise all levels below ARG will be scanned too." The difference between N and the number of newsgroup checked is returned. If N is negative, this group and the N-1 previous groups will be checked. If DONT-SCAN is non-nil, scan non-activated groups as well." - (interactive "P") + (interactive "P" gnus-group-mode) (let* ((groups (gnus-group-process-prefix n)) (ret (if (numberp n) (- n (length groups)) 0)) (beg (unless n @@ -4208,7 +4218,8 @@ If DONT-SCAN is non-nil, scan non-activated groups as well." (defun gnus-group-describe-group (force &optional group) "Display a description of the current newsgroup." - (interactive (list current-prefix-arg (gnus-group-group-name))) + (interactive (list current-prefix-arg (gnus-group-group-name)) + gnus-group-mode) (let* ((method (gnus-find-method-for-group group)) (mname (gnus-group-prefixed-name "" method)) desc) @@ -4230,7 +4241,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well." ;; Suggested by Per Abrahamsen . (defun gnus-group-describe-all-groups (&optional force) "Pop up a buffer with descriptions of all newsgroups." - (interactive "P") + (interactive "P" gnus-group-mode) (when force (setq gnus-description-hashtb nil)) (when (not (or gnus-description-hashtb @@ -4255,7 +4266,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well." ;; Suggested by Daniel Quinlan . (defun gnus-group-apropos (regexp &optional search-description) "List all newsgroups that have names that match a regexp." - (interactive "sGnus apropos (regexp): ") + (interactive "sGnus apropos (regexp): " gnus-group-mode) (let ((prev "") (obuf (current-buffer)) groups des) @@ -4294,7 +4305,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well." (defun gnus-group-description-apropos (regexp) "List all newsgroups that have names or descriptions that match REGEXP." - (interactive "sGnus description apropos (regexp): ") + (interactive "sGnus description apropos (regexp): " gnus-group-mode) (when (not (or gnus-description-hashtb (gnus-read-all-descriptions-files))) (error "Couldn't request descriptions file")) @@ -4309,7 +4320,7 @@ If ALL, also list groups with no unread articles. If LOWEST, don't list groups with level lower than LOWEST. This command may read the active file." - (interactive "P\nsList newsgroups matching: ") + (interactive "P\nsList newsgroups matching: " gnus-group-mode) ;; First make sure active file has been read. (when (and level (> (prefix-numeric-value level) gnus-level-killed)) @@ -4324,7 +4335,7 @@ This command may read the active file." If the prefix LEVEL is non-nil, it should be a number that says which level to cut off listing groups. If LOWEST, don't list groups with level lower than LOWEST." - (interactive "P\nsList newsgroups matching: ") + (interactive "P\nsList newsgroups matching: " gnus-group-mode) (when level (setq level (prefix-numeric-value level))) (gnus-group-list-matching (or level gnus-level-killed) regexp t lowest)) @@ -4333,12 +4344,12 @@ If LOWEST, don't list groups with level lower than LOWEST." (defun gnus-group-save-newsrc (&optional force) "Save the Gnus startup files. If FORCE, force saving whether it is necessary or not." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-save-newsrc-file force)) (defun gnus-group-restart (&optional _arg) "Force Gnus to read the .newsrc file." - (interactive) + (interactive nil gnus-group-mode) (when (gnus-yes-or-no-p (format "Are you sure you want to restart Gnus? ")) (gnus-save-newsrc-file) @@ -4347,7 +4358,7 @@ If FORCE, force saving whether it is necessary or not." (defun gnus-group-read-init-file () "Read the Gnus elisp init file." - (interactive) + (interactive nil gnus-group-mode) (gnus-read-init-file) (gnus-message 5 "Read %s" gnus-init-file)) @@ -4355,7 +4366,7 @@ If FORCE, force saving whether it is necessary or not." "Check bogus newsgroups. If given a prefix, don't ask for confirmation before removing a bogus group." - (interactive "P") + (interactive "P" gnus-group-mode) (gnus-check-bogus-newsgroups (and (not silent) (not gnus-expert-user))) (gnus-group-list-groups)) @@ -4366,7 +4377,7 @@ With 1 C-u, use the `ask-server' method to query the server for new groups. With 2 C-u's, use most complete method possible to query the server for new groups, and subscribe the new groups as zombies." - (interactive "p") + (interactive "p" gnus-group-mode) (let ((new-groups (gnus-find-new-newsgroups (or arg 1))) current-group) (gnus-group-list-groups) @@ -4379,7 +4390,7 @@ for new groups, and subscribe the new groups as zombies." (defun gnus-group-edit-global-kill (&optional article group) "Edit the global kill file. If GROUP, edit that local kill file instead." - (interactive "P") + (interactive "P" gnus-group-mode) (setq gnus-current-kill-article article) (gnus-kill-file-edit-file group) (gnus-message 6 "Editing a %s kill file (Type %s to exit)" @@ -4388,12 +4399,12 @@ If GROUP, edit that local kill file instead." (defun gnus-group-edit-local-kill (article group) "Edit a local kill file." - (interactive (list nil (gnus-group-group-name))) + (interactive (list nil (gnus-group-group-name)) gnus-group-mode) (gnus-group-edit-global-kill article group)) (defun gnus-group-force-update () "Update `.newsrc' file." - (interactive) + (interactive nil gnus-group-mode) (gnus-save-newsrc-file)) (defvar gnus-backlog-articles) @@ -4402,7 +4413,7 @@ If GROUP, edit that local kill file instead." "Suspend the current Gnus session. In fact, cleanup buffers except for group mode buffer. The hook `gnus-suspend-gnus-hook' is called before actually suspending." - (interactive) + (interactive nil gnus-group-mode) (gnus-run-hooks 'gnus-suspend-gnus-hook) (gnus-offer-save-summaries) ;; Kill Gnus buffers except for group mode buffer. @@ -4425,14 +4436,14 @@ The hook `gnus-suspend-gnus-hook' is called before actually suspending." (defun gnus-group-clear-dribble () "Clear all information from the dribble buffer." - (interactive) + (interactive nil gnus-group-mode) (gnus-dribble-clear) (gnus-message 7 "Cleared dribble buffer")) (defun gnus-group-exit () "Quit reading news after updating .newsrc.eld and .newsrc. The hook `gnus-exit-gnus-hook' is called before actually exiting." - (interactive) + (interactive nil gnus-group-mode) (when (or noninteractive ;For gnus-batch-kill (not gnus-interactive-exit) ;Without confirmation @@ -4466,7 +4477,7 @@ The hook `gnus-exit-gnus-hook' is called before actually exiting." (defun gnus-group-quit () "Quit reading news without updating .newsrc.eld or .newsrc. The hook `gnus-exit-gnus-hook' is called before actually exiting." - (interactive) + (interactive nil gnus-group-mode) (when (or noninteractive ;For gnus-batch-kill (zerop (buffer-size)) (not (gnus-server-opened gnus-select-method)) @@ -4491,7 +4502,7 @@ The hook `gnus-exit-gnus-hook' is called before actually exiting." (defun gnus-group-describe-briefly () "Give a one line description of the group mode commands." - (interactive) + (interactive nil gnus-group-mode) (gnus-message 7 "%s" (substitute-command-keys "\\\\[gnus-group-read-group]:Select \\[gnus-group-next-unread-group]:Forward \\[gnus-group-prev-unread-group]:Backward \\[gnus-group-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-group-describe-briefly]:This help"))) (defun gnus-group-browse-foreign-server (method) @@ -4504,7 +4515,7 @@ and the second element is the address." (list (let ((how (gnus-completing-read "Which back end" (mapcar #'car (append gnus-valid-select-methods - gnus-server-alist)) + gnus-server-alist)) t (cons "nntp" 0) 'gnus-method-history))) ;; We either got a back end name or a virtual server name. ;; If the first, we also need an address. @@ -4520,7 +4531,8 @@ and the second element is the address." gnus-secondary-servers (cdr gnus-select-method)))) ;; We got a server name. - how)))) + how))) + gnus-group-mode) (gnus-browse-foreign-server method)) (defun gnus-group-set-info (info &optional method-only-group part) @@ -4678,7 +4690,7 @@ level to cut off listing groups. If LOWEST, don't list groups with level lower than LOWEST. This command may read the active file." - (interactive "P") + (interactive "P" gnus-group-mode) (when level (setq level (prefix-numeric-value level))) (when (or (not level) (>= level gnus-level-zombie)) @@ -4709,7 +4721,7 @@ level to cut off listing groups. If LOWEST, don't list groups with level lower than LOWEST. This command may read the active file." - (interactive "P") + (interactive "P" gnus-group-mode) (when level (setq level (prefix-numeric-value level))) (when (or (not level) (>= level gnus-level-zombie)) @@ -4731,7 +4743,7 @@ level to cut off listing groups. If LOWEST, don't list groups with level lower than LOWEST. This command may read the active file." - (interactive "P") + (interactive "P" gnus-group-mode) (when level (setq level (prefix-numeric-value level))) (when (or (not level) (>= level gnus-level-zombie)) @@ -4759,7 +4771,7 @@ This command may read the active file." (defun gnus-group-list-plus (&optional _args) "List groups plus the current selection." - (interactive) + (interactive nil gnus-group-mode) (let ((gnus-group-listed-groups (gnus-group-listed-groups)) (gnus-group-list-mode gnus-group-list-mode) ;; Save it. func) @@ -4775,7 +4787,7 @@ This command may read the active file." (defun gnus-group-list-flush (&optional args) "Flush groups from the current selection." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((gnus-group-list-option 'flush)) (gnus-group-list-plus args))) @@ -4786,7 +4798,7 @@ with this command. If you've first limited to groups with dormant articles with `A ?', you can then further limit with `A / c', which will then limit to groups with cached articles, giving you the groups that have both dormant articles and cached articles." - (interactive "P") + (interactive "P" gnus-group-mode) (let ((gnus-group-list-option 'limit)) (gnus-group-list-plus args))) @@ -4839,7 +4851,7 @@ operation is only meaningful for back ends using one file per article \(e.g. nnml). Note: currently only implemented in nnml." - (interactive (list (gnus-group-group-name))) + (interactive (list (gnus-group-group-name)) gnus-group-mode) (unless group (error "No group to compact")) (unless (gnus-check-backend-function 'request-compact-group group) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 9811e8b440f..1b2743c1484 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -970,7 +970,7 @@ These will be used to retrieve the RSVP information from ical events." (defun gnus-icalendar-save-event () "Save the Calendar event in the text/calendar part under point." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-article-check-buffer) (let ((data (get-text-property (point) 'gnus-data))) (when data @@ -978,28 +978,28 @@ These will be used to retrieve the RSVP information from ical events." (defun gnus-icalendar-reply-accept () "Accept invitation in the current article." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (gnus-icalendar-reply (list gnus-icalendar-handle 'accepted gnus-icalendar-event)) (setq-local gnus-icalendar-reply-status 'accepted))) (defun gnus-icalendar-reply-tentative () "Send tentative response to invitation in the current article." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (gnus-icalendar-reply (list gnus-icalendar-handle 'tentative gnus-icalendar-event)) (setq-local gnus-icalendar-reply-status 'tentative))) (defun gnus-icalendar-reply-decline () "Decline invitation in the current article." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (gnus-icalendar-reply (list gnus-icalendar-handle 'declined gnus-icalendar-event)) (setq-local gnus-icalendar-reply-status 'declined))) (defun gnus-icalendar-event-export () "Export calendar event to `org-mode', or update existing agenda entry." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (with-current-buffer gnus-article-buffer (gnus-icalendar-sync-event-to-org gnus-icalendar-event)) ;; refresh article buffer in case the reply had been sent before initial org @@ -1009,14 +1009,14 @@ These will be used to retrieve the RSVP information from ical events." (defun gnus-icalendar-event-show () "Display `org-mode' agenda entry related to the calendar event." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-icalendar--show-org-event (with-current-buffer gnus-article-buffer gnus-icalendar-event))) (defun gnus-icalendar-event-check-agenda () "Display `org-mode' agenda for days between event start and end dates." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-icalendar-show-org-agenda (with-current-buffer gnus-article-buffer gnus-icalendar-event))) diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 64928623e6a..01053797b3a 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -662,7 +662,7 @@ This is the string that Gnus uses to identify the group." "Look up the current article in the group where it originated. This command only makes sense for groups shows articles gathered from other groups -- for instance, search results and the like." - (interactive) + (interactive nil gnus-summary-mode) (let ((gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name))) (or diff --git a/lisp/gnus/gnus-mh.el b/lisp/gnus/gnus-mh.el index fc8d9be8d6d..df076c11759 100644 --- a/lisp/gnus/gnus-mh.el +++ b/lisp/gnus/gnus-mh.el @@ -53,7 +53,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-folder)) (gnus-summary-save-article arg))) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 61b76381a0b..d7851f26290 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -653,7 +653,7 @@ network. The corresponding back end must have a `request-post' method." If ARG, post to group under point. If ARG is 1, prompt for group name. Depending on the selected group, the message might be either a mail or a news." - (interactive "P") + (interactive "P" gnus-group-mode) ;; Bind this variable here to make message mode hooks work ok. (let ((gnus-newsgroup-name (if arg @@ -672,7 +672,7 @@ a news." Use the posting of the current group by default. If ARG, don't do that. If ARG is 1, prompt for group name to find the posting style." - (interactive "P") + (interactive "P" gnus-summary-mode) (let* (;;(group gnus-newsgroup-name) ;; make sure last viewed article doesn't affect posting styles: (gnus-article-copy) @@ -695,7 +695,7 @@ If ARG, don't do that. If ARG is 1, prompt for group name to post to. This function prepares a news even when using mail groups. This is useful for posting messages to mail groups without actually sending them over the network. The corresponding back end must have a `request-post' method." - (interactive "P") + (interactive "P" gnus-summary-mode) (let* (;;(group gnus-newsgroup-name) ;; make sure last viewed article doesn't affect posting styles: (gnus-article-copy) @@ -722,7 +722,7 @@ network. The corresponding back end must have a `request-post' method." If ARG, don't do that. If ARG is 1, prompt for a group name to post to. Depending on the selected group, the message might be either a mail or a news." - (interactive "P") + (interactive "P" gnus-summary-mode) ;; Bind this variable here to make message mode hooks work ok. (let ((gnus-newsgroup-name (if arg @@ -742,9 +742,9 @@ If prefix argument YANK is non-nil, the original article is yanked automatically. YANK is a list of elements, where the car of each element is the article number, and the cdr is the string to be yanked." - (interactive - (list (and current-prefix-arg - (gnus-summary-work-articles 1)))) + (interactive (list (and current-prefix-arg + (gnus-summary-work-articles 1))) + gnus-summary-mode) (when yank (gnus-summary-goto-subject (if (listp (car yank)) @@ -764,19 +764,19 @@ article number, and the cdr is the string to be yanked." "Compose a followup to an article and include the original article. The text in the region will be yanked. If the region isn't active, the entire article will be yanked." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-followup (gnus-summary-work-articles n) force-news)) (defun gnus-summary-followup-to-mail (&optional arg) "Followup to the current mail message via news." - (interactive - (list (and current-prefix-arg - (gnus-summary-work-articles 1)))) + (interactive (list (and current-prefix-arg + (gnus-summary-work-articles 1))) + gnus-summary-mode) (gnus-summary-followup arg t)) (defun gnus-summary-followup-to-mail-with-original (&optional arg) "Followup to the current mail message via news." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-followup (gnus-summary-work-articles arg) t)) (defun gnus-inews-yank-articles (articles) @@ -811,7 +811,7 @@ active, the entire article will be yanked." Uses the process-prefix convention. If given the symbolic prefix `a', cancel using the standard posting method; if not post using the current select method." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-summary-mode) (let ((message-post-method (let ((gn gnus-newsgroup-name)) (lambda (_arg) (gnus-post-method (eq symp 'a) gn)))) @@ -841,7 +841,7 @@ post using the current select method." "Compose an article that will supersede a previous article. This is done simply by taking the old article and adding a Supersedes header line with the old Message-ID." - (interactive) + (interactive nil gnus-summary-mode) (let ((article (gnus-summary-article-number)) (mail-parse-charset gnus-newsgroup-charset)) (gnus-setup-message 'reply-yank @@ -1080,7 +1080,6 @@ If SILENT, don't prompt the user." (defun gnus-extended-version () "Stringified Gnus version and Emacs version. See the variable `gnus-user-agent'." - (interactive) (if (stringp gnus-user-agent) gnus-user-agent ;; `gnus-user-agent' is a list: @@ -1109,9 +1108,9 @@ If prefix argument YANK is non-nil, the original article is yanked automatically. If WIDE, make a wide reply. If VERY-WIDE, make a very wide reply." - (interactive - (list (and current-prefix-arg - (gnus-summary-work-articles 1)))) + (interactive (list (and current-prefix-arg + (gnus-summary-work-articles 1))) + gnus-summary-mode) ;; Allow user to require confirmation before replying by mail to the ;; author of a news article (or mail message). (when (or (not (or (gnus-news-group-p gnus-newsgroup-name) @@ -1179,14 +1178,14 @@ If VERY-WIDE, make a very wide reply." (defun gnus-summary-reply-with-original (n &optional wide) "Start composing a reply mail to the current message. The original article will be yanked." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-reply (gnus-summary-work-articles n) wide)) (defun gnus-summary-reply-to-list-with-original (n &optional wide) "Start composing a reply mail to the current message. The reply goes only to the mailing list. The original article will be yanked." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((message-reply-to-function (lambda nil `((To . ,(gnus-mailing-list-followup-to)))))) @@ -1198,32 +1197,32 @@ If prefix argument YANK is non-nil, the original article is yanked automatically. If WIDE, make a wide reply. If VERY-WIDE, make a very wide reply." - (interactive - (list (and current-prefix-arg - (gnus-summary-work-articles 1)))) + (interactive (list (and current-prefix-arg + (gnus-summary-work-articles 1))) + gnus-summary-mode) (let ((gnus-msg-force-broken-reply-to t)) (gnus-summary-reply yank wide very-wide))) (defun gnus-summary-reply-broken-reply-to-with-original (n &optional wide) "Like `gnus-summary-reply-with-original' except removing reply-to field. The original article will be yanked." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-reply-broken-reply-to (gnus-summary-work-articles n) wide)) (defun gnus-summary-wide-reply (&optional yank) "Start composing a wide reply mail to the current message. If prefix argument YANK is non-nil, the original article is yanked automatically." - (interactive - (list (and current-prefix-arg - (gnus-summary-work-articles 1)))) + (interactive (list (and current-prefix-arg + (gnus-summary-work-articles 1))) + gnus-summary-mode) (gnus-summary-reply yank t)) (defun gnus-summary-wide-reply-with-original (n) "Start composing a wide reply mail to the current message. The original article(s) will be yanked. Uses the process/prefix convention." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-reply-with-original n t)) (defun gnus-summary-very-wide-reply (&optional yank) @@ -1236,9 +1235,9 @@ messages as the To/Cc headers. If prefix argument YANK is non-nil, the original article(s) will be yanked automatically." - (interactive - (list (and current-prefix-arg - (gnus-summary-work-articles 1)))) + (interactive (list (and current-prefix-arg + (gnus-summary-work-articles 1))) + gnus-summary-mode) (gnus-summary-reply yank t (gnus-summary-work-articles yank))) (defun gnus-summary-very-wide-reply-with-original (n) @@ -1250,7 +1249,7 @@ The reply will include all From/Cc headers from the original messages as the To/Cc headers. The original article(s) will be yanked." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-reply (gnus-summary-work-articles n) t (gnus-summary-work-articles n))) @@ -1266,7 +1265,7 @@ otherwise, use flipped `message-forward-as-mime'. If POST, post instead of mail. For the \"inline\" alternatives, also see the variable `message-forward-ignored-headers'." - (interactive "P") + (interactive "P" gnus-summary-mode) (if (cdr (gnus-summary-work-articles nil)) ;; Process marks are given. (gnus-uu-digest-mail-forward nil post) @@ -1355,7 +1354,8 @@ the message before resending." ;; initial-contents. (with-current-buffer gnus-original-article-buffer (nnmail-fetch-field "to")))) - current-prefix-arg)) + current-prefix-arg) + gnus-summary-mode) (let ((message-header-setup-hook (copy-sequence message-header-setup-hook)) (message-sent-hook (copy-sequence message-sent-hook)) ;; Honor posting-style for `name' and `address' in Resent-From header. @@ -1408,7 +1408,7 @@ the message before resending." A new buffer will be created to allow the user to modify body and contents of the message, and then, everything will happen as when composing a new message." - (interactive) + (interactive nil gnus-summary-mode) (let ((mail-parse-charset gnus-newsgroup-charset)) (gnus-setup-message 'reply-yank (gnus-summary-select-article t) @@ -1436,12 +1436,12 @@ composing a new message." (defun gnus-summary-post-forward (&optional arg) "Forward the current article to a newsgroup. See `gnus-summary-mail-forward' for ARG." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-mail-forward arg t)) (defun gnus-summary-mail-crosspost-complaint (n) "Send a complaint about crossposting to the current article(s)." - (interactive "P") + (interactive "P" gnus-summary-mode) (dolist (article (gnus-summary-work-articles n)) (set-buffer gnus-summary-buffer) (gnus-summary-goto-subject article) @@ -1509,9 +1509,9 @@ Already submitted bugs can be found in the Emacs bug tracker: (defun gnus-summary-yank-message (buffer n) "Yank the current article into a composed message." - (interactive - (list (gnus-completing-read "Buffer" (message-buffers) t) - current-prefix-arg)) + (interactive (list (gnus-completing-read "Buffer" (message-buffers) t) + current-prefix-arg) + gnus-summary-mode) (gnus-summary-iterate n (let ((gnus-inhibit-treatment t)) (gnus-summary-select-article)) @@ -1528,7 +1528,7 @@ contains some mail you have written which has been bounced back to you. If FETCH, try to fetch the article that this is a reply to, if indeed this is a reply." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-select-article t) (let (summary-buffer parent) (if fetch @@ -1571,7 +1571,6 @@ this is a reply." ;; Do Gcc handling, which copied the message over to some group. (defun gnus-inews-do-gcc (&optional gcc) - (interactive) (save-excursion (save-restriction (message-narrow-to-headers) @@ -1964,7 +1963,7 @@ created. This command uses the process/prefix convention, so if you process-mark several articles, they will all be attached." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((buffers (message-buffers)) destination) ;; Set up the destination mail composition buffer. diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index 7927b88c3de..fd4d3b8a762 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el @@ -244,7 +244,7 @@ replacement is added." (gnus-picon-insert-glyph (pop spec) category)))))))))) (defun gnus-picon-transform-newsgroups (header) - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-with-article-headers (gnus-article-goto-header header) (mail-header-narrow-to-field) @@ -283,7 +283,7 @@ replacement is added." (defun gnus-treat-from-picon () "Display picons in the From header. If picons are already displayed, remove them." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((wash-picon-p buffer-read-only)) (gnus-with-article-buffer (if (and wash-picon-p (memq 'from-picon gnus-article-wash-types)) @@ -294,7 +294,7 @@ If picons are already displayed, remove them." (defun gnus-treat-mail-picon () "Display picons in the Cc and To headers. If picons are already displayed, remove them." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((wash-picon-p buffer-read-only)) (gnus-with-article-buffer (if (and wash-picon-p (memq 'mail-picon gnus-article-wash-types)) @@ -306,7 +306,7 @@ If picons are already displayed, remove them." (defun gnus-treat-newsgroups-picon () "Display picons in the Newsgroups and Followup-To headers. If picons are already displayed, remove them." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((wash-picon-p buffer-read-only)) (gnus-with-article-buffer (if (and wash-picon-p (memq 'newsgroups-picon gnus-article-wash-types)) diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 147550d8cf3..9a22256113c 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -813,7 +813,7 @@ Consults `gnus-registry-ignored-groups' and (defun gnus-registry-wash-for-keywords (&optional force) "Get the keywords of the current article. Overrides existing keywords with FORCE set non-nil." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((id (gnus-registry-fetch-message-id-fast gnus-current-article)) word words) (if (or (not (gnus-registry-get-id-key id 'keyword)) @@ -1039,13 +1039,15 @@ Uses `gnus-registry-marks' to find what shortcuts to install." (defun gnus-registry-set-article-mark (&rest articles) "Apply a mark to process-marked ARTICLES." - (interactive (gnus-summary-work-articles current-prefix-arg)) + (interactive (gnus-summary-work-articles current-prefix-arg) + gnus-article-mode gnus-summary-mode) (gnus-registry-set-article-mark-internal (gnus-registry-read-mark) articles nil t)) (defun gnus-registry-remove-article-mark (&rest articles) "Remove a mark from process-marked ARTICLES." - (interactive (gnus-summary-work-articles current-prefix-arg)) + (interactive (gnus-summary-work-articles current-prefix-arg) + gnus-article-mode gnus-summary-mode) (gnus-registry-set-article-mark-internal (gnus-registry-read-mark) articles t t)) @@ -1069,7 +1071,8 @@ Uses `gnus-registry-marks' to find what shortcuts to install." "Get the Gnus registry marks for ARTICLES and show them if interactive. Uses process/prefix conventions. For multiple articles, only the last one's marks are returned." - (interactive (gnus-summary-work-articles 1)) + (interactive (gnus-summary-work-articles 1) + gnus-article-mode gnus-summary-mode) (let* ((article (last articles)) (id (gnus-registry-fetch-message-id-fast article)) (marks (when id (gnus-registry-get-id-key id 'mark)))) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index e222d24b694..5b746a8efa9 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -137,6 +137,8 @@ It accepts the same format specs that `gnus-summary-line-format' does." "Start reading the picked articles. If given a prefix, mark all unpicked articles as read." (interactive "P") + (declare (completion (lambda (s b) + (completion-minor-mode-active-p s b 'gnus-pick-mode)))) (if gnus-newsgroup-processable (progn (gnus-summary-limit-to-articles nil) @@ -462,7 +464,7 @@ Two predefined functions are available: (defun gnus-tree-read-summary-keys (&optional arg) "Read a summary buffer key sequence and execute it." - (interactive "P") + (interactive "P" gnus-tree-mode) (unless gnus-tree-inhibit (let ((buf (current-buffer)) (gnus-tree-inhibit t) @@ -477,7 +479,7 @@ Two predefined functions are available: (defun gnus-tree-show-summary () "Reconfigure windows to show summary buffer." - (interactive) + (interactive nil gnus-tree-mode) (if (not (gnus-buffer-live-p gnus-summary-buffer)) (error "There is no summary buffer for this tree buffer") (gnus-configure-windows 'article) @@ -485,7 +487,7 @@ Two predefined functions are available: (defun gnus-tree-select-article (article) "Select the article under point, if any." - (interactive (list (gnus-tree-article-number))) + (interactive (list (gnus-tree-article-number)) gnus-tree-mode) (let ((buf (current-buffer))) (when article (with-current-buffer gnus-summary-buffer @@ -494,7 +496,7 @@ Two predefined functions are available: (defun gnus-tree-pick-article (e) "Select the article under the mouse pointer." - (interactive "e") + (interactive "e" gnus-tree-mode) (mouse-set-point e) (gnus-tree-select-article (gnus-tree-article-number))) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index ade0897a16a..ce64dcef041 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -528,7 +528,8 @@ permanence, and the string to be used. The numerical prefix will be used as SCORE. A symbolic prefix of `a' (the SYMP parameter) says to use the `all.SCORE' file for the command instead of the current score file." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") + gnus-article-mode gnus-summary-mode) (gnus-summary-increase-score (- (gnus-score-delta-default score)) symp)) (defun gnus-score-kill-help-buffer () @@ -544,7 +545,8 @@ permanence, and the string to be used. The numerical prefix will be used as SCORE. A symbolic prefix of `a' (the SYMP parameter) says to use the `all.SCORE' file for the command instead of the current score file." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") + gnus-article-mode gnus-summary-mode) (let* ((nscore (gnus-score-delta-default score)) (prefix (if (< nscore 0) ?L ?I)) (increase (> nscore 0)) @@ -931,15 +933,16 @@ TYPE is the score type. SCORE is the score to add. EXTRA is the possible non-standard header." (interactive (list (gnus-completing-read "Header" - (mapcar + (mapcar #'car (seq-filter (lambda (x) (fboundp (nth 2 x))) gnus-header-index)) - t) + t) (read-string "Match: ") (if (y-or-n-p "Use regexp match? ") 'r 's) - (string-to-number (read-string "Score: ")))) + (string-to-number (read-string "Score: "))) + gnus-article-mode gnus-summary-mode) (save-excursion (unless (and (stringp match) (> (length match) 0)) (error "No match")) @@ -974,7 +977,8 @@ EXTRA is the possible non-standard header." "Automatically mark articles with score below SCORE as read." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-number (read-string "Mark below: "))))) + (string-to-number (read-string "Mark below: ")))) + gnus-article-mode gnus-summary-mode) (setq score (or score gnus-summary-default-score 0)) (gnus-score-set 'mark (list score)) (gnus-score-set 'touched '(t)) @@ -1008,14 +1012,15 @@ EXTRA is the possible non-standard header." "Automatically expunge articles with score below SCORE." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-number (read-string "Set expunge below: "))))) + (string-to-number (read-string "Set expunge below: ")))) + gnus-article-mode gnus-summary-mode) (setq score (or score gnus-summary-default-score 0)) (gnus-score-set 'expunge (list score)) (gnus-score-set 'touched '(t))) (defun gnus-score-followup-article (&optional score) "Add SCORE to all followups to the article in the current buffer." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (setq score (gnus-score-delta-default score)) (when (gnus-buffer-live-p gnus-summary-buffer) (save-excursion @@ -1030,7 +1035,7 @@ EXTRA is the possible non-standard header." (defun gnus-score-followup-thread (&optional score) "Add SCORE to all later articles in the thread the current buffer is part of." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (setq score (gnus-score-delta-default score)) (when (gnus-buffer-live-p gnus-summary-buffer) (save-excursion @@ -1064,13 +1069,13 @@ EXTRA is the possible non-standard header." (defun gnus-summary-raise-score (n) "Raise the score of the current article by N." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (gnus-summary-set-score (+ (gnus-summary-article-score) (or n gnus-score-interactive-default-score )))) (defun gnus-summary-set-score (n) "Set the score of the current article to N." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (save-excursion (gnus-summary-show-thread) (let ((buffer-read-only nil)) @@ -1089,7 +1094,7 @@ EXTRA is the possible non-standard header." (defun gnus-summary-current-score (arg) "Return the score of the current article. With prefix ARG, return the total score of the current (sub)thread." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (message "%s" (if arg (gnus-thread-total-score (gnus-id-to-thread @@ -1099,14 +1104,16 @@ EXTRA is the possible non-standard header." (defun gnus-score-change-score-file (file) "Change current score alist." (interactive - (list (read-file-name "Change to score file: " gnus-kill-files-directory))) + (list (read-file-name "Change to score file: " gnus-kill-files-directory)) + gnus-article-mode gnus-summary-mode) (gnus-score-load-file file) (gnus-set-mode-line 'summary)) (defvar gnus-score-edit-exit-function) (defun gnus-score-edit-current-scores (file) "Edit the current score alist." - (interactive (list gnus-current-score-file)) + (interactive (list gnus-current-score-file) + gnus-article-mode gnus-summary-mode) (if (not gnus-current-score-file) (error "No current score file") (let ((winconf (current-window-configuration))) @@ -2496,7 +2503,7 @@ score in `gnus-newsgroup-scored' by SCORE." (defun gnus-score-find-trace () "Find all score rules that applies to the current article." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((old-scored gnus-newsgroup-scored)) (let ((gnus-newsgroup-headers (list (gnus-summary-article-header))) @@ -2611,7 +2618,7 @@ the score file and its full name, including the directory.") (defun gnus-summary-rescore () "Redo the entire scoring process in the current summary." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-score-save) (setq gnus-score-cache nil) (setq gnus-newsgroup-scored nil) @@ -2642,7 +2649,7 @@ the score file and its full name, including the directory.") (defun gnus-summary-raise-same-subject-and-select (score) "Raise articles which has the same subject with SCORE and select the next." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (let ((subject (gnus-summary-article-subject))) (gnus-summary-raise-score score) (while (gnus-summary-find-subject subject) @@ -2651,7 +2658,7 @@ the score file and its full name, including the directory.") (defun gnus-summary-raise-same-subject (score) "Raise articles which has the same subject with SCORE." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (let ((subject (gnus-summary-article-subject))) (gnus-summary-raise-score score) (while (gnus-summary-find-subject subject) @@ -2664,7 +2671,7 @@ the score file and its full name, including the directory.") (defun gnus-summary-raise-thread (&optional score) "Raise the score of the articles in the current thread with SCORE." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (setq score (gnus-score-delta-default score)) (let (e) (save-excursion @@ -2683,17 +2690,17 @@ the score file and its full name, including the directory.") (defun gnus-summary-lower-same-subject-and-select (score) "Raise articles which has the same subject with SCORE and select the next." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (gnus-summary-raise-same-subject-and-select (- score))) (defun gnus-summary-lower-same-subject (score) "Raise articles which has the same subject with SCORE." - (interactive "p") + (interactive "p" gnus-article-mode gnus-summary-mode) (gnus-summary-raise-same-subject (- score))) (defun gnus-summary-lower-thread (&optional score) "Lower score of articles in the current thread with SCORE." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (gnus-summary-raise-thread (- (gnus-score-delta-default score)))) ;;; Finding score files. diff --git a/lisp/gnus/gnus-sieve.el b/lisp/gnus/gnus-sieve.el index 5dcd079fb48..eeedf7ff35c 100644 --- a/lisp/gnus/gnus-sieve.el +++ b/lisp/gnus/gnus-sieve.el @@ -113,7 +113,7 @@ Return nil if no rule could be guessed." ;;;###autoload (defun gnus-sieve-article-add-rule () - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-summary-select-article nil 'force) (with-current-buffer gnus-original-article-buffer (let ((rule (gnus-sieve-guess-rule-for-article)) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index a305e343f69..f66f8427eab 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -409,7 +409,7 @@ The following commands are available: (defun gnus-server-kill-server (server) "Kill the server on the current line." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (unless (gnus-server-goto-server server) (if server (error "No such server: %s" server) (error "No server on the current line"))) @@ -438,7 +438,7 @@ The following commands are available: (defun gnus-server-yank-server () "Yank the previously killed server." - (interactive) + (interactive nil gnus-server-mode) (unless gnus-server-killed-servers (error "No killed servers to be yanked")) (let ((alist gnus-server-alist) @@ -460,14 +460,14 @@ The following commands are available: (defun gnus-server-exit () "Return to the group buffer." - (interactive) + (interactive nil gnus-server-mode) (gnus-run-hooks 'gnus-server-exit-hook) (gnus-kill-buffer (current-buffer)) (gnus-configure-windows 'group t)) (defun gnus-server-list-servers () "List all available servers." - (interactive) + (interactive nil gnus-server-mode) (let ((cur (gnus-server-server-name))) (gnus-server-prepare) (if cur (gnus-server-goto-server cur) @@ -489,7 +489,7 @@ The following commands are available: (defun gnus-server-open-server (server) "Force an open of SERVER." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (let ((method (gnus-server-to-method server))) (unless method (error "No such server: %s" server)) @@ -501,13 +501,13 @@ The following commands are available: (defun gnus-server-open-all-servers () "Open all servers." - (interactive) + (interactive nil gnus-server-mode) (dolist (server gnus-inserted-opened-servers) (gnus-server-open-server (car server)))) (defun gnus-server-close-server (server) "Close SERVER." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (let ((method (gnus-server-to-method server))) (unless method (error "No such server: %s" server)) @@ -519,7 +519,7 @@ The following commands are available: (defun gnus-server-offline-server (server) "Set SERVER to offline." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (let ((method (gnus-server-to-method server))) (unless method (error "No such server: %s" server)) @@ -531,7 +531,7 @@ The following commands are available: (defun gnus-server-close-all-servers () "Close all servers." - (interactive) + (interactive nil gnus-server-mode) (dolist (server gnus-inserted-opened-servers) (gnus-server-close-server (car server))) (dolist (server gnus-server-alist) @@ -539,7 +539,7 @@ The following commands are available: (defun gnus-server-deny-server (server) "Make sure SERVER will never be attempted opened." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (let ((method (gnus-server-to-method server))) (unless method (error "No such server: %s" server)) @@ -550,7 +550,7 @@ The following commands are available: (defun gnus-server-remove-denials () "Make all denied servers into closed servers." - (interactive) + (interactive nil gnus-server-mode) (dolist (server gnus-opened-servers) (when (eq (nth 1 server) 'denied) (setcar (nthcdr 1 server) 'closed))) @@ -558,11 +558,11 @@ The following commands are available: (defun gnus-server-copy-server (from to) "Copy a server definition to a new name." - (interactive - (list - (or (gnus-server-server-name) - (error "No server on the current line")) - (read-string "Copy to: "))) + (interactive (list + (or (gnus-server-server-name) + (error "No server on the current line")) + (read-string "Copy to: ")) + gnus-server-mode) (unless from (error "No server on current line")) (unless (and to (not (string= to ""))) @@ -583,7 +583,8 @@ The following commands are available: (list (intern (gnus-completing-read "Server method" (mapcar #'car gnus-valid-select-methods) t)) - (read-string "Server name: "))) + (read-string "Server name: ")) + gnus-server-mode) (when (assq where gnus-server-alist) (error "Server with that name already defined")) (push (list where how where) gnus-server-killed-servers) @@ -593,7 +594,8 @@ The following commands are available: "Jump to a server line." (interactive (list (gnus-completing-read "Goto server" - (mapcar #'car gnus-server-alist) t))) + (mapcar #'car gnus-server-alist) t)) + gnus-server-mode) (let ((to (text-property-any (point-min) (point-max) 'gnus-server (intern server)))) (when to @@ -602,7 +604,7 @@ The following commands are available: (defun gnus-server-edit-server (server) "Edit the server on the current line." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (unless server (error "No server on current line")) (unless (assoc server gnus-server-alist) @@ -620,7 +622,7 @@ The following commands are available: (defun gnus-server-show-server (server) "Show the definition of the server on the current line." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (unless server (error "No server on current line")) (let ((info (gnus-server-to-method server))) @@ -632,7 +634,7 @@ The following commands are available: (defun gnus-server-scan-server (server) "Request a scan from the current server." - (interactive (list (gnus-server-server-name))) + (interactive (list (gnus-server-server-name)) gnus-server-mode) (let ((method (gnus-server-to-method server))) (if (not (gnus-get-function method 'request-scan)) (error "Server %s can't scan" (car method)) @@ -897,7 +899,7 @@ buffer. (defun gnus-browse-read-group (&optional no-article number) "Enter the group at the current line. If NUMBER, fetch this number of articles." - (interactive "P") + (interactive "P" gnus-browse-mode) (let* ((full-name (gnus-browse-group-name)) (group (if (gnus-native-method-p (gnus-find-method-for-group full-name)) @@ -916,26 +918,26 @@ If NUMBER, fetch this number of articles." (defun gnus-browse-select-group (&optional number) "Select the current group. If NUMBER, fetch this number of articles." - (interactive "P") + (interactive "P" gnus-browse-mode) (gnus-browse-read-group 'no number)) (defun gnus-browse-next-group (n) "Go to the next group." - (interactive "p") + (interactive "p" gnus-browse-mode) (prog1 (forward-line n) (gnus-group-position-point))) (defun gnus-browse-prev-group (n) "Go to the next group." - (interactive "p") + (interactive "p" gnus-browse-mode) (gnus-browse-next-group (- n))) (defun gnus-browse-unsubscribe-current-group (arg) "(Un)subscribe to the next ARG groups. The variable `gnus-browse-subscribe-newsgroup-method' determines how new groups will be entered into the group buffer." - (interactive "p") + (interactive "p" gnus-browse-mode) (when (eobp) (error "No group at current line")) (let ((ward (if (< arg 0) -1 1)) @@ -961,7 +963,7 @@ how new groups will be entered into the group buffer." (defun gnus-browse-describe-group (group) "Describe the current group." - (interactive (list (gnus-browse-group-name))) + (interactive (list (gnus-browse-group-name)) gnus-browse-mode) (gnus-group-describe-group nil group)) (defun gnus-browse-delete-group (group force) @@ -970,8 +972,8 @@ If FORCE (the prefix) is non-nil, all the articles in the group will be deleted. This is \"deleted\" as in \"removed forever from the face of the Earth\". There is no undo. The user will be prompted before doing the deletion." - (interactive (list (gnus-browse-group-name) - current-prefix-arg)) + (interactive (list (gnus-browse-group-name) current-prefix-arg) + gnus-browse-mode) (gnus-group-delete-group group force)) (defun gnus-browse-unsubscribe-group () @@ -1020,7 +1022,7 @@ doing the deletion." (defun gnus-browse-exit () "Quit browsing and return to the group buffer." - (interactive) + (interactive nil gnus-browse-mode) (when (derived-mode-p 'gnus-browse-mode) (gnus-kill-buffer (current-buffer))) ;; Insert the newly subscribed groups in the group buffer. @@ -1032,7 +1034,7 @@ doing the deletion." (defun gnus-browse-describe-briefly () "Give a one line description of the group mode commands." - (interactive) + (interactive nil gnus-browse-mode) (gnus-message 6 "%s" (substitute-command-keys "\\\\[gnus-group-next-group]:Forward \\[gnus-group-prev-group]:Backward \\[gnus-browse-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-browse-describe-briefly]:This help"))) @@ -1089,7 +1091,7 @@ Requesting compaction of %s... (this may take a long time)" (defun gnus-server-toggle-cloud-server () "Toggle whether the server under point is replicated in the Emacs Cloud." - (interactive) + (interactive nil gnus-server-mode) (let ((server (gnus-server-server-name))) (unless server (error "No server on the current line")) @@ -1110,7 +1112,7 @@ Requesting compaction of %s... (this may take a long time)" (defun gnus-server-set-cloud-method-server () "Set the server under point to host the Emacs Cloud." - (interactive) + (interactive nil gnus-server-mode) (let ((server (gnus-server-server-name))) (unless server (error "No server on the current line")) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 1554635a3f2..a3112bdd9fe 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1070,7 +1070,7 @@ With 1 C-u, use the `ask-server' method to query the server for new groups. With 2 C-u's, use most complete method possible to query the server for new groups, and subscribe the new groups as zombies." - (interactive "p") + (interactive "p" gnus-group-mode) (let* ((gnus-subscribe-newsgroup-method gnus-subscribe-newsgroup-method) (check (cond @@ -1405,7 +1405,7 @@ newsgroup." (defun gnus-check-duplicate-killed-groups () "Remove duplicates from the list of killed groups." - (interactive) + (interactive nil gnus-group-mode) (let ((killed gnus-killed-list)) (while killed (gnus-message 9 "%d" (length killed)) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 456e7b0f8c4..4065cf08342 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -73,18 +73,10 @@ (eval-when-compile (require 'subr-x)) -(autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t) +(autoload 'gnus-summary-limit-include-cached "gnus-cache" nil + '(gnus-summary-mode)) (autoload 'gnus-cache-write-active "gnus-cache") -(autoload 'gnus-mailing-list-insinuate "gnus-ml" nil t) -(autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" nil t) (autoload 'gnus-pick-line-number "gnus-salt" nil t) -(autoload 'mm-uu-dissect "mm-uu") -(autoload 'gnus-article-outlook-deuglify-article "deuglify" - "Deuglify broken Outlook (Express) articles and redisplay." - t) -(autoload 'gnus-article-outlook-unwrap-lines "deuglify" nil t) -(autoload 'gnus-article-outlook-repair-attribution "deuglify" nil t) -(autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t) (autoload 'nnselect-article-rsv "nnselect" nil nil) (autoload 'nnselect-article-group "nnselect" nil nil) (autoload 'gnus-nnselect-group-p "nnselect" nil nil) @@ -2525,6 +2517,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) (let ((gnus-summary-show-article-charset-alist `((1 . ,cs)))) (gnus-summary-show-article 1)))) + (put command 'completion-predicate 'ignore) `[,(symbol-name cs) ,command t])) (sort (coding-system-list) #'string<))))) ("Washing" @@ -3149,6 +3142,7 @@ buffer; read the Info manual for more information (`\\[gnus-info-find-node]'). The following commands are available: \\{gnus-summary-mode-map}" + :interactive nil (let ((gnus-summary-local-variables gnus-newsgroup-variables)) (gnus-summary-make-local-variables)) (gnus-summary-make-local-variables) @@ -3479,7 +3473,7 @@ marks of articles." ;; Various summary mode internalish functions. (defun gnus-mouse-pick-article (e) - (interactive "e") + (interactive "e" gnus-summary-mode) (mouse-set-point e) (gnus-summary-next-page nil t)) @@ -4219,7 +4213,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (defun gnus-summary-prepare () "Generate the summary buffer." - (interactive) + (interactive nil gnus-summary-mode) (let ((inhibit-read-only t)) (erase-buffer) (setq gnus-newsgroup-data nil @@ -4268,7 +4262,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (defun gnus-summary-simplify-subject-query () "Query where the respool algorithm would put this article." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-select-article) (message "%s" (gnus-general-simplify-subject (gnus-summary-article-subject)))) @@ -6671,19 +6665,19 @@ executed with point over the summary line of the articles." (defun gnus-summary-save-process-mark () "Push the current set of process marked articles on the stack." - (interactive) + (interactive nil gnus-summary-mode) (push (copy-sequence gnus-newsgroup-processable) gnus-newsgroup-process-stack)) (defun gnus-summary-kill-process-mark () "Push the current set of process marked articles on the stack and unmark." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-save-process-mark) (gnus-summary-unmark-all-processable)) (defun gnus-summary-yank-process-mark () "Pop the last process mark state off the stack and restore it." - (interactive) + (interactive nil gnus-summary-mode) (unless gnus-newsgroup-process-stack (error "Empty mark stack")) (gnus-summary-process-mark-set (pop gnus-newsgroup-process-stack))) @@ -6818,7 +6812,7 @@ articles with that subject. If BACKWARD, search backward instead." (defun gnus-recenter (&optional n) "Center point in window and redisplay frame. Also do horizontal recentering." - (interactive "P") + (interactive "P" gnus-summary-mode) (when (and gnus-auto-center-summary (not (eq gnus-auto-center-summary 'vertical))) (gnus-horizontal-recenter)) @@ -6852,7 +6846,7 @@ If `gnus-auto-center-summary' is nil, or the article buffer isn't displayed, no centering will be performed." ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). ;; Recenter only when requested. Suggested by popovich@park.cs.columbia.edu. - (interactive) + (interactive nil gnus-summary-mode) ;; The user has to want it. (when gnus-auto-center-summary (let* ((top (cond ((< (window-height) 4) 0) @@ -7029,7 +7023,7 @@ displayed, no centering will be performed." "Reconfigure windows to show the article buffer. If `gnus-widen-article-window' is set, show only the article buffer." - (interactive) + (interactive nil gnus-summary-mode) (if (not (gnus-buffer-live-p gnus-article-buffer)) (error "There is no article buffer for this summary buffer") (or (get-buffer-window gnus-article-buffer) @@ -7052,7 +7046,7 @@ buffer." (defun gnus-summary-universal-argument (arg) "Perform any operation on all articles that are process/prefixed." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((articles (gnus-summary-work-articles arg)) func article) (if (eq @@ -7073,7 +7067,7 @@ buffer." (gnus-summary-position-point)) (define-obsolete-function-alias - 'gnus-summary-toggle-truncation #'toggle-truncate-lines "26.1") + 'gnus-summary-toggle-truncation #'toggle-truncate-lines "26.1") (defun gnus-summary-find-for-reselect () "Return the number of an article to stay on across a reselect. @@ -7095,7 +7089,7 @@ insertion from another group. If there's no such then return a dummy 0." (defun gnus-summary-reselect-current-group (&optional all rescan) "Exit and then reselect the current newsgroup. The prefix argument ALL means to select all articles." - (interactive "P") + (interactive "P" gnus-summary-mode) (when (gnus-ephemeral-group-p gnus-newsgroup-name) (error "Ephemeral groups can't be reselected")) (let ((current-subject (gnus-summary-find-for-reselect)) @@ -7113,7 +7107,7 @@ The prefix argument ALL means to select all articles." (defun gnus-summary-rescan-group (&optional all) "Exit the newsgroup, ask for new articles, and select the newsgroup." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((config gnus-current-window-configuration)) (gnus-summary-reselect-current-group all t) (gnus-configure-windows config) @@ -7168,7 +7162,7 @@ The prefix argument ALL means to select all articles." (defun gnus-summary-make-group-from-search () "Make a persistent group from the current ephemeral search group." - (interactive) + (interactive nil gnus-summary-mode) (if (not (gnus-nnselect-group-p gnus-newsgroup-name)) (gnus-message 3 "%s is not a search group" gnus-newsgroup-name) (let ((name (gnus-read-group "Group name: "))) @@ -7185,7 +7179,7 @@ The prefix argument ALL means to select all articles." "Save the current number of read/marked articles in the dribble buffer. The dribble buffer will then be saved. If FORCE (the prefix), also save the .newsrc file(s)." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-update-info t) (if force (gnus-save-newsrc-file) @@ -7197,7 +7191,7 @@ If FORCE (the prefix), also save the .newsrc file(s)." (defun gnus-summary-exit (&optional temporary leave-hidden) "Exit reading current newsgroup, and then return to group selection mode. `gnus-exit-group-hook' is called with no arguments if that value is non-nil." - (interactive) + (interactive nil gnus-summary-mode) (gnus-set-global-variables) (when (gnus-buffer-live-p gnus-article-buffer) (with-current-buffer gnus-article-buffer @@ -7303,7 +7297,7 @@ If FORCE (the prefix), also save the .newsrc file(s)." (defalias 'gnus-summary-quit 'gnus-summary-exit-no-update) (defun gnus-summary-exit-no-update (&optional no-questions) "Quit reading current newsgroup without updating read article info." - (interactive) + (interactive nil gnus-summary-mode) (let* ((group gnus-newsgroup-name) (gnus-group-is-exiting-p t) (gnus-group-is-exiting-without-update-p t) @@ -7457,7 +7451,7 @@ The state which existed when entering the ephemeral is reset." (defun gnus-summary-wake-up-the-dead (&rest _) "Wake up the dead summary buffer." - (interactive) + (interactive nil gnus-summary-mode) (gnus-dead-summary-mode -1) (let ((name (buffer-name))) (when (string-match "Dead " name) @@ -7470,12 +7464,12 @@ The state which existed when entering the ephemeral is reset." ;; Suggested by Per Abrahamsen . (defun gnus-summary-describe-group (&optional force) "Describe the current newsgroup." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-group-describe-group force gnus-newsgroup-name)) (defun gnus-summary-describe-briefly () "Describe summary mode commands briefly." - (interactive) + (interactive nil gnus-summary-mode) (gnus-message 6 "%s" (substitute-command-keys "\\\\[gnus-summary-next-page]:Select \\[gnus-summary-next-unread-article]:Forward \\[gnus-summary-prev-unread-article]:Backward \\[gnus-summary-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-summary-describe-briefly]:This help"))) ;; Walking around group mode buffer from summary mode. @@ -7485,7 +7479,7 @@ The state which existed when entering the ephemeral is reset." If prefix argument NO-ARTICLE is non-nil, no article is selected initially. If TARGET-GROUP, go to this group. If BACKWARD, go to previous group instead." - (interactive "P") + (interactive "P" gnus-summary-mode) ;; Stop pre-fetching. (gnus-async-halt-prefetch) (let ((current-group gnus-newsgroup-name) @@ -7531,7 +7525,7 @@ previous group instead." (defun gnus-summary-prev-group (&optional no-article) "Exit current newsgroup and then select previous unread newsgroup. If prefix argument NO-ARTICLE is non-nil, no article is selected initially." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-next-group no-article nil t)) ;; Walking around summary lines. @@ -7542,7 +7536,7 @@ If UNREAD is non-nil, the article should be unread. If UNDOWNLOADED is non-nil, the article should be undownloaded. If UNSEEN is non-nil, the article should be unseen as well as unread. Returns the article selected or nil if there are no matching articles." - (interactive "P") + (interactive "P" gnus-summary-mode) (cond ;; Empty summary. ((null gnus-newsgroup-data) @@ -7594,7 +7588,7 @@ If N is negative, go to the previous N'th subject line. If UNREAD is non-nil, only unread articles are selected. The difference between N and the actual number of steps taken is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (let ((backward (< n 0)) (n (abs n))) (while (and (> n 0) @@ -7613,18 +7607,18 @@ returned." (defun gnus-summary-next-unread-subject (n) "Go to next N'th unread summary line." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-next-subject n t)) (defun gnus-summary-prev-subject (n &optional unread) "Go to previous N'th summary line. If optional argument UNREAD is non-nil, only unread article is selected." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-next-subject (- n) unread)) (defun gnus-summary-prev-unread-subject (n) "Go to previous N'th unread summary line." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-next-subject (- n) t)) (defun gnus-summary-goto-subjects (articles) @@ -7638,7 +7632,7 @@ If optional argument UNREAD is non-nil, only unread article is selected." (defun gnus-summary-goto-subject (article &optional force silent) "Go to the subject line of ARTICLE. If FORCE, also allow jumping to articles not currently shown." - (interactive "nArticle number: ") + (interactive "nArticle number: " gnus-summary-mode) (unless (numberp article) (error "Article %s is not a number" article)) (let ((b (point)) @@ -7668,7 +7662,7 @@ If FORCE, also allow jumping to articles not currently shown." (defun gnus-summary-expand-window (&optional arg) "Make the summary buffer take up the entire Emacs frame. Given a prefix, will force an `article' buffer configuration." - (interactive "P") + (interactive "P" gnus-summary-mode) (if arg (gnus-configure-windows 'article 'force) (gnus-configure-windows 'summary 'force))) @@ -7751,7 +7745,7 @@ be displayed." (defun gnus-summary-force-verify-and-decrypt () "Display buttons for signed/encrypted parts and verify/decrypt them." - (interactive) + (interactive nil gnus-summary-mode) (let ((mm-verify-option 'known) (mm-decrypt-option 'known) (gnus-article-emulate-mime t) @@ -7765,7 +7759,7 @@ be displayed." If UNREAD, only unread articles are selected. If SUBJECT, only articles with SUBJECT are selected. If BACKWARD, the previous article is selected instead of the next." - (interactive "P") + (interactive "P" gnus-summary-mode) ;; Make sure we are in the summary buffer. (unless (derived-mode-p 'gnus-summary-mode) (set-buffer gnus-summary-buffer)) @@ -7877,7 +7871,7 @@ If BACKWARD, the previous article is selected instead of the next." (defun gnus-summary-next-unread-article () "Select unread article after current one." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-next-article (or (not (eq gnus-summary-goto-unread 'never)) (gnus-summary-last-article-p (gnus-summary-article-number))) @@ -7887,12 +7881,12 @@ If BACKWARD, the previous article is selected instead of the next." (defun gnus-summary-prev-article (&optional unread subject) "Select the article before the current one. If UNREAD is non-nil, only unread articles are selected." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-next-article unread subject t)) (defun gnus-summary-prev-unread-article () "Select unread article before current one." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-prev-article (or (not (eq gnus-summary-goto-unread 'never)) (gnus-summary-first-article-p (gnus-summary-article-number))) @@ -7913,7 +7907,7 @@ article. If STOP is non-nil, just stop when reaching the end of the message. Also see the variable `gnus-article-skip-boring'." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-set-global-variables) (let ((article (gnus-summary-article-number)) (article-window (get-buffer-window gnus-article-buffer t)) @@ -7958,7 +7952,7 @@ Also see the variable `gnus-article-skip-boring'." Argument LINES specifies lines to be scrolled down. If MOVE, move to the previous unread article if point is at the beginning of the buffer." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((article (gnus-summary-article-number)) (article-window (get-buffer-window gnus-article-buffer t)) endp) @@ -7988,14 +7982,14 @@ the beginning of the buffer." "Show previous page of selected article. Argument LINES specifies lines to be scrolled down. If at the beginning of the article, go to the next article." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-prev-page lines t)) (defun gnus-summary-scroll-up (lines) "Scroll up (or down) one line current article. Argument LINES specifies lines to be scrolled up (or down if negative). If no article is selected, then the current article will be selected first." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-configure-windows 'article) (gnus-summary-show-thread) (when (eq (gnus-summary-select-article nil nil 'pseudo) 'old) @@ -8012,33 +8006,33 @@ If no article is selected, then the current article will be selected first." "Scroll down (or up) one line current article. Argument LINES specifies lines to be scrolled down (or up if negative). If no article is selected, then the current article will be selected first." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-scroll-up (- lines))) (defun gnus-summary-next-same-subject () "Select next article which has the same subject as current one." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-next-article nil (gnus-summary-article-subject))) (defun gnus-summary-prev-same-subject () "Select previous article which has the same subject as current one." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-prev-article nil (gnus-summary-article-subject))) (defun gnus-summary-next-unread-same-subject () "Select next unread article which has the same subject as current one." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-next-article t (gnus-summary-article-subject))) (defun gnus-summary-prev-unread-same-subject () "Select previous unread article which has the same subject as current one." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-prev-article t (gnus-summary-article-subject))) (defun gnus-summary-first-unread-article () "Select the first unread article. Return nil if there are no unread articles." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (when (gnus-summary-first-subject t) (gnus-summary-show-thread) @@ -8049,7 +8043,7 @@ Return nil if there are no unread articles." (defun gnus-summary-first-unread-subject () "Place the point on the subject line of the first unread article. Return nil if there are no unread articles." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (when (gnus-summary-first-subject t) (gnus-summary-show-thread) @@ -8058,7 +8052,7 @@ Return nil if there are no unread articles." (defun gnus-summary-next-unseen-article (&optional backward) "Select the next unseen article." - (interactive) + (interactive nil gnus-summary-mode) (let* ((article (gnus-summary-article-number)) (articles (gnus-data-find-list article (gnus-data-list backward)))) (when (or (not gnus-summary-check-current) @@ -8079,13 +8073,13 @@ Return nil if there are no unread articles." (defun gnus-summary-prev-unseen-article () "Select the previous unseen article." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-next-unseen-article t)) (defun gnus-summary-first-unseen-subject () "Place the point on the subject line of the first unseen article. Return nil if there are no unseen articles." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (when (gnus-summary-first-subject nil nil t) (gnus-summary-show-thread) @@ -8096,7 +8090,7 @@ Return nil if there are no unseen articles." "Place the point on the subject line of the first unseen and unread article. If all article have been seen, on the subject line of the first unread article." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (unless (when (gnus-summary-first-subject nil nil t) (gnus-summary-show-thread) @@ -8109,7 +8103,7 @@ article." (defun gnus-summary-first-article () "Select the first article. Return nil if there are no articles." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (when (gnus-summary-first-subject) (gnus-summary-show-thread) @@ -8121,7 +8115,7 @@ Return nil if there are no articles." "Select the unread article with the highest score. If given a prefix argument, select the next unread article that has a score higher than the default score." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((article (if arg (gnus-summary-better-unread-subject) (gnus-summary-best-unread-subject)))) @@ -8131,7 +8125,7 @@ score higher than the default score." (defun gnus-summary-best-unread-subject () "Select the unread subject with the highest score." - (interactive) + (interactive nil gnus-summary-mode) (let ((best -1000000) (data gnus-newsgroup-data) article score) @@ -8150,7 +8144,7 @@ score higher than the default score." (defun gnus-summary-better-unread-subject () "Select the first unread subject that has a score over the default score." - (interactive) + (interactive nil gnus-summary-mode) (let ((data gnus-newsgroup-data) article) (while (and (setq article (gnus-data-number (car data))) @@ -8176,11 +8170,10 @@ If FORCE, go to the article even if it isn't displayed. If FORCE is a number, it is the line the article is to be displayed on." (interactive (list - (gnus-completing-read - "Article number or Message-ID" - (mapcar #'int-to-string gnus-newsgroup-limit)) - current-prefix-arg - t)) + (gnus-completing-read "Article number or Message-ID" + (mapcar #'int-to-string gnus-newsgroup-limit)) + current-prefix-arg t) + gnus-summary-mode) (prog1 (if (and (stringp article) (string-match "@\\|%40" article)) @@ -8194,7 +8187,7 @@ is a number, it is the line the article is to be displayed on." (defun gnus-summary-goto-last-article () "Go to the previously read article." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (when gnus-last-article (gnus-summary-goto-article gnus-last-article nil t)) @@ -8203,7 +8196,7 @@ is a number, it is the line the article is to be displayed on." (defun gnus-summary-pop-article (number) "Pop one article off the history and go to the previous. NUMBER articles will be popped off." - (interactive "p") + (interactive "p" gnus-summary-mode) (let (to) (setq gnus-newsgroup-history (cdr (setq to (nthcdr number gnus-newsgroup-history)))) @@ -8217,7 +8210,7 @@ NUMBER articles will be popped off." (defun gnus-summary-limit-to-articles (n) "Limit the summary buffer to the next N articles. If not given a prefix, use the process marked articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (prog1 (let ((articles (gnus-summary-work-articles n))) (setq gnus-newsgroup-processable nil) @@ -8227,7 +8220,7 @@ If not given a prefix, use the process marked articles instead." (defun gnus-summary-pop-limit (&optional total) "Restore the previous limit. If given a prefix, remove all limits." - (interactive "P") + (interactive "P" gnus-summary-mode) (when total (setq gnus-newsgroup-limits (list (mapcar #'mail-header-number gnus-newsgroup-headers)))) @@ -8241,10 +8234,11 @@ If given a prefix, remove all limits." "Limit the summary buffer to articles that have subjects that match a regexp. If NOT-MATCHING, excluding articles that have subjects that match a regexp." (interactive - (list (read-string (if current-prefix-arg - "Exclude subject (regexp): " - "Limit to subject (regexp): ")) - nil current-prefix-arg)) + (list + (read-string + (if current-prefix-arg "Exclude subject (regexp): " "Limit to subject (regexp): ")) + nil current-prefix-arg) + gnus-summary-mode) (unless header (setq header "subject")) (when (not (equal "" subject)) @@ -8261,18 +8255,25 @@ If NOT-MATCHING, excluding articles that have subjects that match a regexp." "Limit the summary buffer to articles that have authors that match a regexp. If NOT-MATCHING, excluding articles that have authors that match a regexp." (interactive - (list (let* ((header (gnus-summary-article-header)) - (default (and header (car (mail-header-parse-address - (mail-header-from header)))))) - (read-string (concat (if current-prefix-arg - "Exclude author (regexp" - "Limit to author (regexp") - (if default - (concat ", default \"" default "\"): ") - "): ")) - nil nil - default)) - current-prefix-arg)) + (list + (let* + ((header + (gnus-summary-article-header)) + (default + (and header + (car + (mail-header-parse-address + (mail-header-from header)))))) + (read-string + (concat + (if current-prefix-arg + "Exclude author (regexp" "Limit to author (regexp") + (if default + (concat ", default \"" default "\"): ") + "): ")) + nil nil default)) + current-prefix-arg) + gnus-summary-mode) (gnus-summary-limit-to-subject from "from" not-matching)) (defun gnus-summary-limit-to-recipient (recipient &optional not-matching) @@ -8284,9 +8285,12 @@ To and Cc headers are checked. You need to include them in `nnmail-extra-headers'." ;; Unlike `rmail-summary-by-recipients', doesn't include From. (interactive - (list (read-string (format "%s recipient (regexp): " - (if current-prefix-arg "Exclude" "Limit to"))) - current-prefix-arg)) + (list + (read-string + (format "%s recipient (regexp): " + (if current-prefix-arg "Exclude" "Limit to"))) + current-prefix-arg) + gnus-summary-mode) (when (not (equal "" recipient)) (prog1 (let* ((to (if (memq 'To nnmail-extra-headers) @@ -8326,9 +8330,12 @@ If NOT-MATCHING, exclude ADDRESS. To, Cc and From headers are checked. You need to include `To' and `Cc' in `nnmail-extra-headers'." (interactive - (list (read-string (format "%s address (regexp): " - (if current-prefix-arg "Exclude" "Limit to"))) - current-prefix-arg)) + (list + (read-string + (format "%s address (regexp): " + (if current-prefix-arg "Exclude" "Limit to"))) + current-prefix-arg) + gnus-summary-mode) (when (not (equal "" address)) (prog1 (let* ((to (if (memq 'To nnmail-extra-headers) @@ -8415,7 +8422,8 @@ articles that are younger than AGE days." (setq days (* days -1)))) (message "Please enter a number.") (sleep-for 1))) - (list days younger))) + (list days younger)) + gnus-summary-mode) (prog1 (let ((data gnus-newsgroup-data) (cutoff (days-to-time age)) @@ -8439,17 +8447,18 @@ articles that are younger than AGE days." (let ((header (intern (gnus-completing-read - (if current-prefix-arg - "Exclude extra header" - "Limit extra header") + (if current-prefix-arg "Exclude extra header" "Limit extra header") (mapcar #'symbol-name gnus-extra-headers) t nil nil - (symbol-name (car gnus-extra-headers)))))) + (symbol-name + (car gnus-extra-headers)))))) (list header - (read-string (format "%s header %s (regexp): " - (if current-prefix-arg "Exclude" "Limit to") - header)) - current-prefix-arg))) + (read-string + (format "%s header %s (regexp): " + (if current-prefix-arg "Exclude" "Limit to") + header)) + current-prefix-arg)) + gnus-summary-mode) (when (not (equal "" regexp)) (prog1 (let ((articles (gnus-summary-find-matching @@ -8462,7 +8471,7 @@ articles that are younger than AGE days." (defun gnus-summary-limit-to-display-predicate () "Limit the summary buffer to the predicated in the `display' group parameter." - (interactive) + (interactive nil gnus-summary-mode) (unless gnus-newsgroup-display (error "There is no `display' group parameter")) (let (articles) @@ -8475,7 +8484,7 @@ articles that are younger than AGE days." (defun gnus-summary-limit-to-unread (&optional all) "Limit the summary buffer to articles that are not marked as read. If ALL is non-nil, limit strictly to unread articles." - (interactive "P") + (interactive "P" gnus-summary-mode) (if all (gnus-summary-limit-to-marks (char-to-string gnus-unread-mark)) (gnus-summary-limit-to-marks @@ -8491,7 +8500,7 @@ If ALL is non-nil, limit strictly to unread articles." (defun gnus-summary-limit-to-headers (match &optional reverse) "Limit the summary buffer to articles that have headers that match MATCH. If REVERSE (the prefix), limit to articles that don't match." - (interactive "sMatch headers (regexp): \nP") + (interactive "sMatch headers (regexp): \nP" gnus-summary-mode) (gnus-summary-limit-to-bodies match reverse t)) (declare-function article-goto-body "gnus-art" ()) @@ -8499,7 +8508,7 @@ If REVERSE (the prefix), limit to articles that don't match." (defun gnus-summary-limit-to-bodies (match &optional reverse headersp) "Limit the summary buffer to articles that have bodies that match MATCH. If REVERSE (the prefix), limit to articles that don't match." - (interactive "sMatch body (regexp): \nP") + (interactive "sMatch body (regexp): \nP" gnus-summary-mode) (let ((articles nil) (gnus-select-article-hook nil) ;Disable hook. (gnus-article-prepare-hook nil) @@ -8532,7 +8541,7 @@ If REVERSE (the prefix), limit to articles that don't match." (defun gnus-summary-limit-to-singletons (&optional threadsp) "Limit the summary buffer to articles that aren't part on any thread. If THREADSP (the prefix), limit to articles that are in threads." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((articles nil) thread-articles threads) @@ -8556,7 +8565,7 @@ If THREADSP (the prefix), limit to articles that are in threads." (defun gnus-summary-limit-to-replied (&optional unreplied) "Limit the summary buffer to replied articles. If UNREPLIED (the prefix), limit to unreplied articles." - (interactive "P") + (interactive "P" gnus-summary-mode) (if unreplied (gnus-summary-limit (gnus-set-difference gnus-newsgroup-articles @@ -8569,7 +8578,7 @@ If UNREPLIED (the prefix), limit to unreplied articles." If REVERSE, limit the summary buffer to articles that are marked with MARKS. MARKS can either be a string of marks or a list of marks. Returns how many articles were removed." - (interactive "sMarks: ") + (interactive "sMarks: " gnus-summary-mode) (gnus-summary-limit-to-marks marks t)) (defun gnus-summary-limit-to-marks (marks &optional reverse) @@ -8578,7 +8587,7 @@ If REVERSE (the prefix), limit the summary buffer to articles that are not marked with MARKS. MARKS can either be a string of marks or a list of marks. Returns how many articles were removed." - (interactive "sMarks: \nP") + (interactive "sMarks: \nP" gnus-summary-mode) (prog1 (let ((data gnus-newsgroup-data) (marks (if (listp marks) marks @@ -8597,10 +8606,13 @@ Returns how many articles were removed." With a prefix argument, limit to articles with score at or below SCORE." - (interactive (list (string-to-number - (read-string - (format "Limit to articles with score of at %s: " - (if current-prefix-arg "most" "least")))))) + (interactive + (list + (string-to-number + (read-string + (format "Limit to articles with score of at %s: " + (if current-prefix-arg "most" "least"))))) + gnus-summary-mode) (let ((data gnus-newsgroup-data) (compare (if (or below current-prefix-arg) #'<= #'>=)) articles) @@ -8616,7 +8628,7 @@ SCORE." (defun gnus-summary-limit-to-unseen () "Limit to unseen articles." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (gnus-summary-limit gnus-newsgroup-unseen) (gnus-summary-position-point))) @@ -8626,8 +8638,12 @@ SCORE." When called interactively, ID is the Message-ID of the current article. If thread-only is non-nil limit the summary buffer to these articles." - (interactive (list (mail-header-id (gnus-summary-article-header)) - current-prefix-arg)) + (interactive + (list + (mail-header-id + (gnus-summary-article-header)) + current-prefix-arg) + gnus-summary-mode) (let ((articles (gnus-articles-in-thread (gnus-id-to-thread (gnus-root-id id)))) ;;we REALLY want the whole thread---this prevents cut-threads @@ -8653,8 +8669,11 @@ these articles." (defun gnus-summary-limit-include-matching-articles (header regexp) "Display all the hidden articles that have HEADERs that match REGEXP." - (interactive (list (read-string "Match on header: ") - (read-string "Regexp: "))) + (interactive + (list + (read-string "Match on header: ") + (read-string "Regexp: ")) + gnus-summary-mode) (let ((articles (gnus-find-matching-articles header regexp))) (prog1 (gnus-summary-limit (nconc articles gnus-newsgroup-limit)) @@ -8662,7 +8681,7 @@ these articles." (defun gnus-summary-insert-dormant-articles () "Insert all the dormant articles for this group into the current buffer." - (interactive) + (interactive nil gnus-summary-mode) (let ((gnus-verbose (max 6 gnus-verbose))) (if (not gnus-newsgroup-dormant) (gnus-message 3 "No dormant articles for this group") @@ -8670,7 +8689,7 @@ these articles." (defun gnus-summary-insert-ticked-articles () "Insert ticked articles for this group into the current buffer." - (interactive) + (interactive nil gnus-summary-mode) (let ((gnus-verbose (max 6 gnus-verbose))) (if (not gnus-newsgroup-marked) (gnus-message 3 "No ticked articles for this group") @@ -8680,7 +8699,7 @@ these articles." "Display all the hidden articles that are marked as dormant. Note that this command only works on a subset of the articles currently fetched for this group." - (interactive) + (interactive nil gnus-summary-mode) (unless gnus-newsgroup-dormant (error "There are no dormant articles in this group")) (prog1 @@ -8703,14 +8722,14 @@ fetched for this group." (defun gnus-summary-limit-exclude-dormant () "Hide all dormant articles." - (interactive) + (interactive nil gnus-summary-mode) (prog1 (gnus-summary-limit-to-marks (list gnus-dormant-mark) 'reverse) (gnus-summary-position-point))) (defun gnus-summary-limit-exclude-childless-dormant () "Hide all dormant articles that have no children." - (interactive) + (interactive nil gnus-summary-mode) (let ((data (gnus-data-list t)) articles d children) ;; Find all articles that are either not dormant or have @@ -8735,7 +8754,7 @@ fetched for this group." (defun gnus-summary-limit-mark-excluded-as-read (&optional all) "Mark all unread excluded articles as read. If ALL, mark even excluded ticked and dormants as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (setq gnus-newsgroup-limit (sort gnus-newsgroup-limit #'<)) (let ((articles (gnus-sorted-ndifference (sort @@ -8974,7 +8993,7 @@ fetch-old-headers verbiage, and so on." "Refer parent article N times. If N is negative, go to ancestor -N instead. The difference between N and the number of articles fetched is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (let ((skip 1) error header ref) (when (not (natnump n)) @@ -9016,7 +9035,7 @@ The difference between N and the number of articles fetched is returned." (defun gnus-summary-refer-references () "Fetch all articles mentioned in the References header. Return the number of articles fetched." - (interactive) + (interactive nil gnus-summary-mode) (let ((ref (mail-header-references (gnus-summary-article-header))) (current (gnus-summary-article-number)) (n 0)) @@ -9059,7 +9078,7 @@ has the reverse meaning. If no backend-specific `request-thread' function is available fetch LIMIT (the numerical prefix) old headers. If LIMIT is non-numeric or nil fetch the number specified by the `gnus-refer-thread-limit' variable." - (interactive "P") + (interactive "P" gnus-summary-mode) (let* ((header (gnus-summary-article-header)) (id (mail-header-id header)) (gnus-inhibit-demon t) @@ -9114,7 +9133,7 @@ specified by the `gnus-refer-thread-limit' variable." (defun gnus-summary-open-group-with-article (message-id) "Open a group containing the article with the given MESSAGE-ID." - (interactive "sMessage-ID: ") + (interactive "sMessage-ID: " gnus-summary-mode) (require 'nndoc) (with-temp-buffer ;; Prepare a dummy article @@ -9149,7 +9168,7 @@ specified by the `gnus-refer-thread-limit' variable." (defun gnus-summary-refer-article (message-id) "Fetch an article specified by MESSAGE-ID." - (interactive "sMessage-ID: ") + (interactive "sMessage-ID: " gnus-summary-mode) (when (and (stringp message-id) (not (zerop (length message-id)))) (setq message-id (replace-regexp-in-string " " "" message-id)) @@ -9222,12 +9241,12 @@ specified by the `gnus-refer-thread-limit' variable." (defun gnus-summary-edit-parameters () "Edit the group parameters of the current group." - (interactive) + (interactive nil gnus-summary-mode) (gnus-group-edit-group gnus-newsgroup-name 'params)) (defun gnus-summary-customize-parameters () "Customize the group parameters of the current group." - (interactive) + (interactive nil gnus-summary-mode) (gnus-group-customize gnus-newsgroup-name)) (defun gnus-summary-enter-digest-group (&optional force) @@ -9237,7 +9256,7 @@ what the document format is. To control what happens when you exit the group, see the `gnus-auto-select-on-ephemeral-exit' variable." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((conf gnus-current-window-configuration)) (save-window-excursion (save-excursion @@ -9322,7 +9341,7 @@ To control what happens when you exit the group, see the This will allow you to read digests and other similar documents as newsgroups. Obeys the standard process/prefix convention." - (interactive "P") + (interactive "P" gnus-summary-mode) (let* ((ogroup gnus-newsgroup-name) (params (append (gnus-info-params (gnus-get-info ogroup)) (list (cons 'to-group ogroup)))) @@ -9371,7 +9390,7 @@ Obeys the standard process/prefix convention." (defun gnus-summary-button-forward (arg) "Move point to the next field or button in the article. With optional ARG, move across that many fields." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-select-article) (gnus-configure-windows 'article) (let ((win (or (gnus-get-buffer-window gnus-article-buffer t) @@ -9385,7 +9404,7 @@ With optional ARG, move across that many fields." (defun gnus-summary-button-backward (arg) "Move point to the previous field or button in the article. With optional ARG, move across that many fields." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-select-article) (gnus-configure-windows 'article) (let ((win (or (gnus-get-buffer-window gnus-article-buffer t) @@ -9442,7 +9461,7 @@ If only one link is found, browse that directly, otherwise use completion to select a link. The first link marked in the article text with `gnus-collect-urls-primary-text' is the default." - (interactive "P") + (interactive "P" gnus-summary-mode) (let (urls target) (gnus-summary-select-article) (gnus-with-article-buffer @@ -9467,7 +9486,7 @@ default." (defun gnus-summary-isearch-article (&optional regexp-p) "Do incremental search forward on the current article. If REGEXP-P (the prefix) is non-nil, do regexp isearch." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-select-article) (gnus-configure-windows 'article) (gnus-eval-in-buffer-window gnus-article-buffer @@ -9477,14 +9496,14 @@ If REGEXP-P (the prefix) is non-nil, do regexp isearch." (defun gnus-summary-repeat-search-article-forward () "Repeat the previous search forwards." - (interactive) + (interactive nil gnus-summary-mode) (unless gnus-last-search-regexp (error "No previous search")) (gnus-summary-search-article-forward gnus-last-search-regexp)) (defun gnus-summary-repeat-search-article-backward () "Repeat the previous search backwards." - (interactive) + (interactive nil gnus-summary-mode) (unless gnus-last-search-regexp (error "No previous search")) (gnus-summary-search-article-forward gnus-last-search-regexp t)) @@ -9493,13 +9512,15 @@ If REGEXP-P (the prefix) is non-nil, do regexp isearch." "Search for an article containing REGEXP forward. If BACKWARD, search backward instead." (interactive - (list (read-string - (format "Search article %s (regexp%s): " - (if current-prefix-arg "backward" "forward") - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - ""))) - current-prefix-arg)) + (list + (read-string + (format "Search article %s (regexp%s): " + (if current-prefix-arg "backward" "forward") + (if gnus-last-search-regexp + (concat ", default " gnus-last-search-regexp) + ""))) + current-prefix-arg) + gnus-summary-mode) (if (string-equal regexp "") (setq regexp (or gnus-last-search-regexp "")) (setq gnus-last-search-regexp regexp) @@ -9514,11 +9535,13 @@ If BACKWARD, search backward instead." (defun gnus-summary-search-article-backward (regexp) "Search for an article containing REGEXP backward." (interactive - (list (read-string - (format "Search article backward (regexp%s): " - (if gnus-last-search-regexp - (concat ", default " gnus-last-search-regexp) - ""))))) + (list + (read-string + (format "Search article backward (regexp%s): " + (if gnus-last-search-regexp + (concat ", default " gnus-last-search-regexp) + "")))) + gnus-summary-mode) (gnus-summary-search-article-forward regexp 'backward)) (defun gnus-summary-search-article (regexp &optional backward) @@ -9653,18 +9676,20 @@ that not match REGEXP on HEADER." If HEADER is an empty string (or nil), the match is done on the entire article. If BACKWARD (the prefix) is non-nil, search backward instead." (interactive - (list (let ((completion-ignore-case t)) - (gnus-completing-read - "Header name" - (mapcar #'symbol-name - (append - '(Number Subject From Lines Date - Message-ID Xref References Body) - gnus-extra-headers)) - 'require-match)) - (read-string "Regexp: ") - (read-key-sequence "Command: ") - current-prefix-arg)) + (list + (let ((completion-ignore-case t)) + (gnus-completing-read + "Header name" + (mapcar #'symbol-name + (append + '(Number Subject From Lines Date Message-ID + Xref References Body) + gnus-extra-headers)) + 'require-match)) + (read-string "Regexp: ") + (read-key-sequence "Command: ") + current-prefix-arg) + gnus-summary-mode) (when (equal header "Body") (setq header "")) ;; Hidden thread subtrees must be searched as well. @@ -9688,7 +9713,7 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead." (defun gnus-summary-beginning-of-article () "Scroll the article back to the beginning." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-select-article) (gnus-configure-windows 'article) (gnus-eval-in-buffer-window gnus-article-buffer @@ -9699,7 +9724,7 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead." (defun gnus-summary-end-of-article () "Scroll to the end of the article." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-select-article) (gnus-configure-windows 'article) (gnus-eval-in-buffer-window gnus-article-buffer @@ -9732,7 +9757,9 @@ If the optional first argument FILENAME is nil, send the image to the printer. If FILENAME is a string, save the PostScript image in a file with that name. If FILENAME is a number, prompt the user for the name of the file to save in." - (interactive (list (ps-print-preprint current-prefix-arg))) + (interactive + (list (ps-print-preprint current-prefix-arg)) + gnus-summary-mode) (dolist (article (gnus-summary-work-articles n)) (gnus-summary-select-article nil nil 'pseudo article) (gnus-eval-in-buffer-window gnus-article-buffer @@ -9772,7 +9799,7 @@ to save in." "Show a complete version of the current article. This is only useful if you're looking at a partial version of the article currently." - (interactive) + (interactive nil gnus-summary-mode) (let ((gnus-keep-backlog nil) (gnus-use-cache nil) (gnus-agent nil) @@ -9799,7 +9826,7 @@ If ARG (the prefix) is non-nil and not a number, show the article, but without running any of the article treatment functions article. Normally, the keystroke is `C-u g'. When using `C-u C-u g', show the raw article." - (interactive "P") + (interactive "P" gnus-summary-mode) (cond ((numberp arg) (gnus-summary-show-article t) @@ -9875,14 +9902,14 @@ C-u g', show the raw article." (defun gnus-summary-show-raw-article () "Show the raw article without any article massaging functions being run." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-show-article t)) (defun gnus-summary-verbose-headers (&optional arg) "Toggle permanent full header display. If ARG is a positive number, turn header display on. If ARG is a negative number, turn header display off." - (interactive "P") + (interactive "P" gnus-summary-mode) (setq gnus-show-all-headers (cond ((or (not (numberp arg)) (zerop arg)) @@ -9901,7 +9928,7 @@ If ARG is a negative number, turn header display off." "Show the headers if they are hidden, or hide them if they are shown. If ARG is a positive number, show the entire header. If ARG is a negative number, hide the unwanted header lines." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((window (and (gnus-buffer-live-p gnus-article-buffer) (get-buffer-window gnus-article-buffer t)))) (with-current-buffer gnus-article-buffer @@ -9947,14 +9974,14 @@ If ARG is a negative number, hide the unwanted header lines." (defun gnus-summary-show-all-headers () "Make all header lines visible." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-toggle-header 1)) (defun gnus-summary-caesar-message (&optional arg) "Caesar rotate the current article by 13. With a non-numerical prefix, also rotate headers. A numerical prefix specifies how many places to rotate each letter forward." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-select-article) (let ((mail-header-separator "")) (gnus-eval-in-buffer-window gnus-article-buffer @@ -9977,7 +10004,7 @@ invalid IDNA string (`xn--bar' is invalid). You must have GNU Libidn (URL `https://www.gnu.org/software/libidn/') installed for this command to work." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-select-article) (let ((mail-header-separator "")) (gnus-eval-in-buffer-window gnus-article-buffer @@ -9991,7 +10018,7 @@ installed for this command to work." (defun gnus-summary-morse-message (&optional _arg) "Morse decode the current article." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-select-article) (let ((mail-header-separator "")) (gnus-eval-in-buffer-window gnus-article-buffer @@ -10012,7 +10039,7 @@ installed for this command to work." (defun gnus-summary-stop-page-breaking () "Stop page breaking in the current article." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-select-article) (gnus-eval-in-buffer-window gnus-article-buffer (widen) @@ -10042,7 +10069,7 @@ newsgroup that you want to move to have to support the `request-move' and `request-accept' functions. ACTION can be either `move' (the default), `crosspost' or `copy'." - (interactive "P") + (interactive "P" gnus-summary-mode) (unless action (setq action 'move)) ;; Check whether the source group supports the required functions. @@ -10348,13 +10375,13 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." (defun gnus-summary-copy-article (&optional n to-newsgroup select-method) "Copy the current article to some other group. Arguments have the same meanings as in `gnus-summary-move-article'." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-move-article n to-newsgroup select-method 'copy)) (defun gnus-summary-crosspost-article (&optional n) "Crosspost the current article to some other group. Arguments have the same meanings as in `gnus-summary-move-article'." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-move-article n nil nil 'crosspost)) (defcustom gnus-summary-respool-default-method nil @@ -10398,7 +10425,8 @@ latter case, they will be copied into the relevant groups." (t (let ((ms-alist (mapcar (lambda (m) (cons (cadr m) m)) ms))) (cdr (assoc (gnus-completing-read "Server name" ms-alist t) - ms-alist)))))))) + ms-alist))))))) + gnus-summary-mode) (unless method (error "No method given for respooling")) (if (assoc (symbol-name @@ -10409,7 +10437,7 @@ latter case, they will be copied into the relevant groups." (defun gnus-summary-import-article (file &optional edit) "Import an arbitrary file into a mail newsgroup." - (interactive "fImport file: \nP") + (interactive "fImport file: \nP" gnus-summary-mode) (let ((group gnus-newsgroup-name) atts lines group-art) (unless (gnus-check-backend-function 'request-accept-article group) @@ -10453,7 +10481,7 @@ latter case, they will be copied into the relevant groups." (defun gnus-summary-create-article () "Create an article in a mail newsgroup." - (interactive) + (interactive nil gnus-summary-mode) (let ((group gnus-newsgroup-name) (now (current-time)) group-art) @@ -10477,7 +10505,7 @@ latter case, they will be copied into the relevant groups." (defun gnus-summary-article-posted-p () "Say whether the current (mail) article is available from news as well. This will be the case if the article has both been mailed and posted." - (interactive) + (interactive nil gnus-summary-mode) (let ((id (mail-header-references (gnus-summary-article-header))) (gnus-override-method (car (gnus-refer-article-methods)))) (if (gnus-request-head id "") @@ -10489,7 +10517,7 @@ This will be the case if the article has both been mailed and posted." (defun gnus-summary-expire-articles (&optional now) "Expire all articles that are marked as expirable in the current group." - (interactive) + (interactive nil gnus-summary-mode) (when (and (not gnus-group-is-exiting-without-update-p) (gnus-check-backend-function 'request-expire-articles gnus-newsgroup-name)) @@ -10558,7 +10586,7 @@ This will be the case if the article has both been mailed and posted." "Expunge all expirable articles in the current group. This means that *all* articles that are marked as expirable will be deleted forever, right now." - (interactive) + (interactive nil gnus-summary-mode) (or gnus-expert-user (gnus-yes-or-no-p "Are you really, really sure you want to delete all expirable messages? ") @@ -10578,7 +10606,7 @@ delete these instead. If `gnus-novice-user' is non-nil you will be asked for confirmation before the articles are deleted." - (interactive "P") + (interactive "P" gnus-summary-mode) (unless (gnus-check-backend-function 'request-expire-articles gnus-newsgroup-name) (error "The current newsgroup does not support article deletion")) @@ -10628,7 +10656,7 @@ If ARG is 2, edit the raw articles even in read-only groups. If ARG is 3, edit the articles with the current handles. Otherwise, allow editing of articles even in read-only groups." - (interactive "P") + (interactive "P" gnus-summary-mode) (let (force raw current-handles) (cond ((null arg)) @@ -10708,7 +10736,7 @@ groups." (defun gnus-summary-edit-article-done (&optional references read-only buffer no-highlight) "Make edits to the current article permanent." - (interactive) + (interactive nil gnus-summary-mode) (save-excursion ;; The buffer restriction contains the entire article if it exists. (when (article-goto-body) @@ -10796,7 +10824,8 @@ groups." (list (progn (message "%s" (concat (this-command-keys) "- ")) - (read-char)))) + (read-char))) + gnus-summary-mode) (message "") (gnus-summary-edit-article) (execute-kbd-macro (concat (this-command-keys) key)) @@ -10809,7 +10838,7 @@ groups." (defun gnus-summary-respool-query (&optional silent trace) "Query where the respool algorithm would put this article." - (interactive) + (interactive nil gnus-summary-mode) (let (gnus-mark-article-hook) (gnus-summary-select-article) (with-current-buffer gnus-original-article-buffer @@ -10839,7 +10868,7 @@ groups." (defun gnus-summary-respool-trace () "Trace where the respool algorithm would put this article. Display a buffer showing all fancy splitting patterns which matched." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-respool-query nil t)) ;; Summary marking commands. @@ -10848,7 +10877,7 @@ Display a buffer showing all fancy splitting patterns which matched." "Mark articles which has the same subject as read, and then select the next. If UNMARK is positive, remove any kind of mark. If UNMARK is negative, tick articles." - (interactive "P") + (interactive "P" gnus-summary-mode) (when unmark (setq unmark (prefix-numeric-value unmark))) (let ((count @@ -10866,7 +10895,7 @@ If UNMARK is negative, tick articles." "Mark articles which has the same subject as read. If UNMARK is positive, remove any kind of mark. If UNMARK is negative, tick articles." - (interactive "P") + (interactive "P" gnus-summary-mode) (when unmark (setq unmark (prefix-numeric-value unmark))) (let ((count @@ -10916,7 +10945,7 @@ If optional argument UNMARK is negative, mark articles as unread instead." If N is negative, mark backward instead. If UNMARK is non-nil, remove the process mark instead. The difference between N and the actual number of articles marked is returned." - (interactive "P") + (interactive "P" gnus-summary-mode) (if (and (null n) (and transient-mark-mode mark-active)) (gnus-uu-mark-region (region-beginning) (region-end) unmark) (setq n (prefix-numeric-value n)) @@ -10940,12 +10969,12 @@ number of articles marked is returned." "Remove the process mark from the next N articles. If N is negative, unmark backward instead. The difference between N and the actual number of articles unmarked is returned." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-mark-as-processable n t)) (defun gnus-summary-unmark-all-processable () "Remove the process mark from all articles." - (interactive) + (interactive nil gnus-summary-mode) (save-excursion (while gnus-newsgroup-processable (gnus-summary-remove-process-mark (car gnus-newsgroup-processable)))) @@ -10969,20 +10998,21 @@ the actual number of articles unmarked is returned." "Mark N articles forward as expirable. If N is negative, mark backward instead. The difference between N and the actual number of articles marked is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward n gnus-expirable-mark)) (defun gnus-summary-mark-as-spam (n) "Mark N articles forward as spam. If N is negative, mark backward instead. The difference between N and the actual number of articles marked is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward n gnus-spam-mark)) (defun gnus-summary-mark-article-as-replied (article) "Mark ARTICLE as replied to and update the summary line. ARTICLE can also be a list of articles." - (interactive (list (gnus-summary-article-number))) + (interactive (list (gnus-summary-article-number)) + gnus-summary-mode) (let ((articles (if (listp article) article (list article)))) (dolist (article articles) (unless (numberp article) @@ -11004,7 +11034,8 @@ ARTICLE can also be a list of articles." (defun gnus-summary-set-bookmark (article) "Set a bookmark in current article." - (interactive (list (gnus-summary-article-number))) + (interactive (list (gnus-summary-article-number)) + gnus-summary-mode) (when (or (not (get-buffer gnus-article-buffer)) (not gnus-current-article) (not gnus-article-current) @@ -11028,7 +11059,8 @@ ARTICLE can also be a list of articles." (defun gnus-summary-remove-bookmark (article) "Remove the bookmark from the current article." - (interactive (list (gnus-summary-article-number))) + (interactive (list (gnus-summary-article-number)) + gnus-summary-mode) ;; Remove old bookmark, if one exists. (if (not (assq article gnus-newsgroup-bookmarks)) (gnus-message 6 "No bookmark in current article.") @@ -11040,7 +11072,7 @@ ARTICLE can also be a list of articles." "Mark N articles forward as dormant. If N is negative, mark backward instead. The difference between N and the actual number of articles marked is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward n gnus-dormant-mark)) (defun gnus-summary-set-process-mark (article) @@ -11075,7 +11107,7 @@ If N is negative, mark backwards instead. Mark with MARK, ?r by default. The difference between N and the actual number of articles marked is returned. If NO-EXPIRE, auto-expiry will be inhibited." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-show-thread) (let ((backward (< n 0)) (gnus-summary-goto-unread @@ -11339,20 +11371,20 @@ If NO-EXPIRE, auto-expiry will be inhibited." "Tick N articles forwards. If N is negative, tick backwards instead. The difference between N and the number of articles ticked is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward n gnus-ticked-mark)) (defun gnus-summary-tick-article-backward (n) "Tick N articles backwards. The difference between N and the number of articles ticked is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward (- n) gnus-ticked-mark)) (defun gnus-summary-tick-article (&optional article clear-mark) "Mark current article as unread. Optional 1st argument ARTICLE specifies article number to be marked as unread. Optional 2nd argument CLEAR-MARK remove any kinds of mark." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-mark-article article (if clear-mark gnus-unread-mark gnus-ticked-mark))) @@ -11361,14 +11393,14 @@ Optional 2nd argument CLEAR-MARK remove any kinds of mark." If N is negative, mark backwards instead. The difference between N and the actual number of articles marked is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward n gnus-del-mark gnus-inhibit-user-auto-expire)) (defun gnus-summary-mark-as-read-backward (n) "Mark the N articles as read backwards. The difference between N and the actual number of articles marked is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward (- n) gnus-del-mark gnus-inhibit-user-auto-expire)) @@ -11382,13 +11414,13 @@ MARK specifies a string to be inserted at the beginning of the line." "Clear marks from N articles forward. If N is negative, clear backward instead. The difference between N and the number of marks cleared is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward n gnus-unread-mark)) (defun gnus-summary-clear-mark-backward (n) "Clear marks from N articles backward. The difference between N and the number of marks cleared is returned." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-mark-forward (- n) gnus-unread-mark)) (defun gnus-summary-mark-unread-as-read () @@ -11421,7 +11453,7 @@ The difference between N and the number of marks cleared is returned." "Mark all unread articles between point and mark as read. If given a prefix, mark all articles between point and mark as read, even ticked and dormant ones." - (interactive "r\nP") + (interactive "r\nP" gnus-summary-mode) (save-excursion (let (article) (goto-char point) @@ -11438,7 +11470,7 @@ even ticked and dormant ones." (defun gnus-summary-mark-below (score mark) "Mark articles with score less than SCORE with MARK." - (interactive "P\ncMark: ") + (interactive "P\ncMark: " gnus-summary-mode) (setq score (if score (prefix-numeric-value score) (or gnus-summary-default-score 0))) @@ -11452,22 +11484,22 @@ even ticked and dormant ones." (defun gnus-summary-kill-below (&optional score) "Mark articles with score below SCORE as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-mark-below score gnus-killed-mark)) (defun gnus-summary-clear-above (&optional score) "Clear all marks from articles with score above SCORE." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-mark-above score gnus-unread-mark)) (defun gnus-summary-tick-above (&optional score) "Tick all articles with score above SCORE." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-mark-above score gnus-ticked-mark)) (defun gnus-summary-mark-above (score mark) "Mark articles with score over SCORE with MARK." - (interactive "P\ncMark: ") + (interactive "P\ncMark: " gnus-summary-mode) (setq score (if score (prefix-numeric-value score) (or gnus-summary-default-score 0))) @@ -11483,7 +11515,7 @@ even ticked and dormant ones." (defalias 'gnus-summary-show-all-expunged 'gnus-summary-limit-include-expunged) (defun gnus-summary-limit-include-expunged (&optional no-error) "Display all the hidden articles that were expunged for low scores." - (interactive) + (interactive nil gnus-summary-mode) (let ((inhibit-read-only t)) (let ((scored gnus-newsgroup-scored) headers h) @@ -11520,7 +11552,7 @@ Note that this function will only catch up the unread article in the current summary buffer limitation. The number of articles marked as read is returned." - (interactive "P") + (interactive "P" gnus-summary-mode) (prog1 (save-excursion (when (or quietly @@ -11569,7 +11601,7 @@ The number of articles marked as read is returned." (defun gnus-summary-catchup-to-here (&optional all) "Mark all unticked articles before the current one as read. If ALL is non-nil, also mark ticked and dormant articles as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (save-excursion (gnus-save-hidden-threads (let ((beg (point))) @@ -11581,7 +11613,7 @@ If ALL is non-nil, also mark ticked and dormant articles as read." (defun gnus-summary-catchup-from-here (&optional all) "Mark all unticked articles after (and including) the current one as read. If ALL is non-nil, also mark ticked and dormant articles as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (save-excursion (gnus-save-hidden-threads (let ((beg (point))) @@ -11594,14 +11626,14 @@ If ALL is non-nil, also mark ticked and dormant articles as read." "Mark all articles in this newsgroup as read. This command is dangerous. Normally, you want \\[gnus-summary-catchup] instead, which marks only unread articles as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-catchup t quietly)) (defun gnus-summary-catchup-and-exit (&optional all quietly) "Mark all unread articles in this group as read, then exit. If prefix argument ALL is non-nil, all articles are marked as read. If QUIETLY is non-nil, no questions will be asked." - (interactive "P") + (interactive "P" gnus-summary-mode) (when (gnus-summary-catchup all quietly nil 'fast) ;; Select next newsgroup or exit. (if (and (not (gnus-group-quit-config gnus-newsgroup-name)) @@ -11613,14 +11645,14 @@ If QUIETLY is non-nil, no questions will be asked." "Mark all articles in this newsgroup as read, and then exit. This command is dangerous. Normally, you want \\[gnus-summary-catchup-and-exit] instead, which marks only unread articles as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-catchup-and-exit t quietly)) (defun gnus-summary-catchup-and-goto-next-group (&optional all) "Mark all articles in this group as read and select the next group. If given a prefix, mark all articles, unread as well as ticked, as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (save-excursion (gnus-summary-catchup all)) (gnus-summary-next-group)) @@ -11629,7 +11661,7 @@ read." "Mark all articles in this group as read and select the previous group. If given a prefix, mark all articles, unread as well as ticked, as read." - (interactive "P") + (interactive "P" gnus-summary-mode) (save-excursion (gnus-summary-catchup all)) (gnus-summary-next-group nil nil t)) @@ -11705,7 +11737,7 @@ with that article." (defun gnus-summary-rethread-current () "Rethread the thread the current article is part of." - (interactive) + (interactive nil gnus-summary-mode) (let* ((gnus-show-threads t) (article (gnus-summary-article-number)) (id (mail-header-id (gnus-summary-article-header))) @@ -11720,7 +11752,7 @@ with that article." Note that the re-threading will only work if `gnus-thread-ignore-subject' is non-nil or the Subject: of both articles are the same." - (interactive) + (interactive nil gnus-summary-mode) (unless (not (gnus-group-read-only-p)) (error "The current newsgroup does not support article editing")) (unless (<= (length gnus-newsgroup-processable) 1) @@ -11739,9 +11771,10 @@ is non-nil or the Subject: of both articles are the same." "Make PARENT the parent of CHILDREN. When called interactively, PARENT is the current article and CHILDREN are the process-marked articles." - (interactive - (list (gnus-summary-article-number) - (gnus-summary-work-articles nil))) + (interactive (list + (gnus-summary-article-number) + (gnus-summary-work-articles nil)) + gnus-summary-mode) (dolist (child children) (save-window-excursion (let ((gnus-article-buffer " *reparent*")) @@ -11774,7 +11807,7 @@ are the process-marked articles." (defun gnus-summary-toggle-threads (&optional arg) "Toggle showing conversation threads. If ARG is positive number, turn showing conversation threads on." - (interactive "P") + (interactive "P" gnus-summary-mode) (let ((current (or (gnus-summary-article-number) gnus-newsgroup-end))) (setq gnus-show-threads (if (null arg) (not gnus-show-threads) @@ -11786,7 +11819,7 @@ If ARG is positive number, turn showing conversation threads on." (defun gnus-summary-show-all-threads () "Show all threads." - (interactive) + (interactive nil gnus-summary-mode) (remove-overlays (point-min) (point-max) 'invisible 'gnus-sum) (gnus-summary-position-point)) @@ -11796,7 +11829,7 @@ If ARG is positive number, turn showing conversation threads on." (defun gnus-summary-show-thread () "Show thread subtrees. Returns nil if no thread was there to be shown." - (interactive) + (interactive nil gnus-summary-mode) (let* ((orig (point)) (end (point-at-eol)) (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end)))) @@ -11837,7 +11870,7 @@ Returns nil if no thread was there to be shown." "Hide all thread subtrees. If PREDICATE is supplied, threads that satisfy this predicate will not be hidden." - (interactive) + (interactive nil gnus-summary-mode) (save-excursion (goto-char (point-min)) (let ((end nil) @@ -11856,7 +11889,7 @@ will not be hidden." (defun gnus-summary-hide-thread () "Hide thread subtrees. Returns nil if no threads were there to be hidden." - (interactive) + (interactive nil gnus-summary-mode) (beginning-of-line) (let ((start (point)) (starteol (line-end-position)) @@ -11908,7 +11941,7 @@ Returns the difference between N and the number of skips actually done. If SILENT, don't output messages." - (interactive "p") + (interactive "p" gnus-summary-mode) (let ((backward (< n 0)) (n (abs n))) (while (and (> n 0) @@ -11924,7 +11957,7 @@ If SILENT, don't output messages." "Go to the same level previous N'th thread. Returns the difference between N and the number of skips actually done." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-next-thread (- n))) (defun gnus-summary-go-down-thread () @@ -11944,7 +11977,7 @@ done." If N is negative, go up instead. Returns the difference between N and how many steps down that were taken." - (interactive "p") + (interactive "p" gnus-summary-mode) (let ((up (< n 0)) (n (abs n))) (while (and (> n 0) @@ -11961,18 +11994,18 @@ taken." If N is negative, go down instead. Returns the difference between N and how many steps down that were taken." - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-down-thread (- n))) (defun gnus-summary-top-thread () "Go to the top of the thread." - (interactive) + (interactive nil gnus-summary-mode) (while (gnus-summary-go-up-thread)) (gnus-summary-article-number)) (defun gnus-summary-expire-thread () "Mark articles under current thread as expired." - (interactive) + (interactive nil gnus-summary-mode) (gnus-summary-kill-thread 0)) (defun gnus-summary-kill-thread (&optional unmark) @@ -11980,7 +12013,7 @@ taken." If the prefix argument is positive, remove any kinds of marks. If the prefix argument is zero, mark thread as expired. If the prefix argument is negative, tick articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (when unmark (setq unmark (prefix-numeric-value unmark))) (let ((articles (gnus-summary-articles-in-thread)) @@ -12015,82 +12048,82 @@ If the prefix argument is negative, tick articles instead." (defun gnus-summary-sort-by-number (&optional reverse) "Sort the summary buffer by article number. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'number reverse)) (defun gnus-summary-sort-by-most-recent-number (&optional reverse) "Sort the summary buffer by most recent article number. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'most-recent-number reverse)) (defun gnus-summary-sort-by-random (&optional reverse) "Randomize the order in the summary buffer. Argument REVERSE means to randomize in reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'random reverse)) (defun gnus-summary-sort-by-author (&optional reverse) "Sort the summary buffer by author name alphabetically. If `case-fold-search' is non-nil, case of letters is ignored. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'author reverse)) (defun gnus-summary-sort-by-recipient (&optional reverse) "Sort the summary buffer by recipient name alphabetically. If `case-fold-search' is non-nil, case of letters is ignored. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'recipient reverse)) (defun gnus-summary-sort-by-subject (&optional reverse) "Sort the summary buffer by subject alphabetically. `Re:'s are ignored. If `case-fold-search' is non-nil, case of letters is ignored. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'subject reverse)) (defun gnus-summary-sort-by-date (&optional reverse) "Sort the summary buffer by date. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'date reverse)) (defun gnus-summary-sort-by-most-recent-date (&optional reverse) "Sort the summary buffer by most recent date. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'most-recent-date reverse)) (defun gnus-summary-sort-by-score (&optional reverse) "Sort the summary buffer by score. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'score reverse)) (defun gnus-summary-sort-by-lines (&optional reverse) "Sort the summary buffer by the number of lines. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'lines reverse)) (defun gnus-summary-sort-by-chars (&optional reverse) "Sort the summary buffer by article length. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'chars reverse)) (defun gnus-summary-sort-by-marks (&optional reverse) "Sort the summary buffer by article marks. Argument REVERSE means reverse order." - (interactive "P") + (interactive "P" gnus-summary-mode) (gnus-summary-sort 'marks reverse)) (defun gnus-summary-sort-by-original (&optional _reverse) "Sort the summary buffer using the default sorting method. Argument REVERSE means reverse order." - (interactive) + (interactive nil gnus-summary-mode) (let* ((inhibit-read-only t) (gnus-summary-prepare-hook nil)) ;; We do the sorting by regenerating the threads. @@ -12139,7 +12172,7 @@ will not be marked as saved. The `gnus-prompt-before-saving' variable says how prompting is performed." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let* ((articles (gnus-summary-work-articles n)) (save-buffer (save-excursion @@ -12208,7 +12241,7 @@ is neither omitted nor the symbol `r', force including all headers regardless of the `:headers' property. If it is the symbol `r', articles that are not decoded and include all headers will be piped no matter what the properties `:decode' and `:headers' are." - (interactive (gnus-interactive "P\ny")) + (interactive (gnus-interactive "P\ny") gnus-summary-mode) (require 'gnus-art) (let* ((articles (gnus-summary-work-articles n)) (result-buffer shell-command-buffer-name) @@ -12260,7 +12293,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-mail)) (gnus-summary-save-article arg))) @@ -12271,7 +12304,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-rmail)) (gnus-summary-save-article arg))) @@ -12282,7 +12315,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-file)) (gnus-summary-save-article arg))) @@ -12293,7 +12326,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-write-to-file)) (gnus-summary-save-article arg))) @@ -12304,7 +12337,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file)) (gnus-summary-save-article arg))) @@ -12315,7 +12348,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-write-body-to-file)) (gnus-summary-save-article arg))) @@ -12326,14 +12359,14 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-pipe-to-muttprint)) (gnus-summary-save-article arg t))) (defun gnus-summary-pipe-message (program) "Pipe the current article through PROGRAM." - (interactive "sProgram: ") + (interactive "sProgram: " gnus-summary-mode) (gnus-summary-select-article) (let ((mail-header-separator "")) (gnus-eval-in-buffer-window gnus-article-buffer @@ -12451,7 +12484,8 @@ If REVERSE, save parts that do not match TYPE." (read-directory-name "Save to directory: " gnus-summary-save-parts-last-directory nil t)) - current-prefix-arg)) + current-prefix-arg) + gnus-summary-mode) (gnus-summary-iterate n (let ((gnus-display-mime-function nil) gnus-article-prepare-hook @@ -12590,12 +12624,12 @@ If REVERSE, save parts that do not match TYPE." (defun gnus-summary-edit-global-kill (article) "Edit the \"global\" kill file." - (interactive (list (gnus-summary-article-number))) + (interactive (list (gnus-summary-article-number)) gnus-summary-mode) (gnus-group-edit-global-kill article)) (defun gnus-summary-edit-local-kill () "Edit a local kill file applied to the current newsgroup." - (interactive) + (interactive nil gnus-summary-mode) (setq gnus-current-headers (gnus-summary-article-header)) (gnus-group-edit-local-kill (gnus-summary-article-number) gnus-newsgroup-name)) @@ -12893,7 +12927,7 @@ UNREAD is a sorted list." "Display the current article buffer fully MIME-buttonized. If SHOW-ALL-PARTS (the prefix) is non-nil, all multipart/* parts are treated as multipart/mixed." - (interactive "P") + (interactive "P" gnus-summary-mode) (require 'gnus-art) (let ((gnus-unbuttonized-mime-types nil) (gnus-mime-display-multipart-as-mixed show-all-parts)) @@ -12901,7 +12935,7 @@ treated as multipart/mixed." (defun gnus-summary-repair-multipart (article) "Add a Content-Type header to a multipart article without one." - (interactive (list (gnus-summary-article-number))) + (interactive (list (gnus-summary-article-number)) gnus-summary-mode) (gnus-with-article article (message-narrow-to-head) (message-remove-header "Mime-Version") @@ -12921,7 +12955,7 @@ treated as multipart/mixed." (defun gnus-summary-toggle-display-buttonized () "Toggle the buttonizing of the article buffer." - (interactive) + (interactive nil gnus-summary-mode) (require 'gnus-art) (if (setq gnus-inhibit-mime-unbuttonizing (not gnus-inhibit-mime-unbuttonizing)) @@ -12976,7 +13010,7 @@ If N is negative, move in reverse order. The difference between N and the actual number of articles marked is returned." name (cadr lway)) - (interactive "p") + (interactive "p" gnus-summary-mode) (gnus-summary-generic-mark n ,mark ',(nth 2 lway) ,(nth 3 lway)))) (defun gnus-summary-generic-mark (n mark move unread) @@ -13059,7 +13093,7 @@ returned." "Insert all old articles in this group. If ALL is non-nil, already read articles become readable. If ALL is a number, fetch this number of articles." - (interactive "P") + (interactive "P" gnus-summary-mode) (prog1 (let ((old (sort (mapcar #'gnus-data-number gnus-newsgroup-data) #'<)) older len) @@ -13133,7 +13167,7 @@ If ALL is a number, fetch this number of articles." (defun gnus-summary-insert-new-articles () "Insert all new articles in this group." - (interactive) + (interactive nil gnus-summary-mode) (let ((old (sort (mapcar #'gnus-data-number gnus-newsgroup-data) #'<)) (old-high gnus-newsgroup-highest) (nnmail-fetched-sources (list t)) diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index 3253b7853dc..b3d17bc03fb 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -146,7 +146,8 @@ See Info node `(gnus)Formatting Variables'." (defun gnus-topic-jump-to-topic (topic) "Go to TOPIC." (interactive - (list (gnus-completing-read "Go to topic" (gnus-topic-list) t))) + (list (gnus-completing-read "Go to topic" (gnus-topic-list) t)) + gnus-topic-mode) (let ((inhibit-read-only t)) (dolist (topic (gnus-current-topics topic)) (unless (gnus-topic-goto-topic topic) @@ -235,12 +236,12 @@ If RECURSIVE is t, return groups in its subtopics too." (defun gnus-topic-goto-previous-topic (n) "Go to the N'th previous topic." - (interactive "p") + (interactive "p" gnus-topic-mode) (gnus-topic-goto-next-topic (- n))) (defun gnus-topic-goto-next-topic (n) "Go to the N'th next topic." - (interactive "p") + (interactive "p" gnus-topic-mode) (let ((backward (< n 0)) (n (abs n)) (topic (gnus-current-topic))) @@ -661,7 +662,7 @@ articles in the topic and its subtopics." (defun gnus-topic-update-topics-containing-group (group) "Update all topics that have GROUP as a member." - (when (and (eq major-mode 'gnus-group-mode) + (when (and (eq major-mode 'gnus-topic-mode) gnus-topic-mode) (save-excursion (let ((alist gnus-topic-alist)) @@ -677,7 +678,7 @@ articles in the topic and its subtopics." (defun gnus-topic-update-topic () "Update all parent topics to the current group." - (when (and (eq major-mode 'gnus-group-mode) + (when (and (eq major-mode 'gnus-topic-mode) gnus-topic-mode) (let ((group (gnus-group-group-name)) (m (point-marker)) @@ -1122,7 +1123,9 @@ articles in the topic and its subtopics." (define-minor-mode gnus-topic-mode "Minor mode for topicsifying Gnus group buffers." - :lighter " Topic" :keymap gnus-topic-mode-map + :lighter " Topic" + :keymap gnus-topic-mode-map + :interactive (gnus-group-mode) (if (not (derived-mode-p 'gnus-group-mode)) (setq gnus-topic-mode nil) ;; Infest Gnus with topics. @@ -1172,7 +1175,7 @@ articles in the group. If ALL is a negative number, fetch this number of the earliest articles in the group. If performed over a topic line, toggle folding the topic." - (interactive "P") + (interactive "P" gnus-topic-mode) (when (and (eobp) (not (gnus-group-group-name))) (forward-line -1)) (if (gnus-group-topic-p) @@ -1184,13 +1187,13 @@ If performed over a topic line, toggle folding the topic." (defun gnus-mouse-pick-topic (e) "Select the group or topic under the mouse pointer." - (interactive "e") + (interactive "e" gnus-topic-mode) (mouse-set-point e) (gnus-topic-read-group nil)) (defun gnus-topic-expire-articles (topic) "Expire articles in this topic or group." - (interactive (list (gnus-group-topic-name))) + (interactive (list (gnus-group-topic-name)) gnus-topic-mode) (if (not topic) (call-interactively 'gnus-group-expire-articles) (save-excursion @@ -1205,7 +1208,7 @@ If performed over a topic line, toggle folding the topic." (defun gnus-topic-catchup-articles (topic) "Catchup this topic or group. Also see `gnus-group-catchup'." - (interactive (list (gnus-group-topic-name))) + (interactive (list (gnus-group-topic-name)) gnus-topic-mode) (if (not topic) (call-interactively 'gnus-group-catchup-current) (save-excursion @@ -1232,7 +1235,7 @@ be auto-selected upon group entry. If GROUP is non-nil, fetch that group. If performed over a topic line, toggle folding the topic." - (interactive "P") + (interactive "P" gnus-topic-mode) (when (and (eobp) (not (gnus-group-group-name))) (forward-line -1)) (if (gnus-group-topic-p) @@ -1247,7 +1250,8 @@ When used interactively, PARENT will be the topic under point." (interactive (list (read-string "New topic: ") - (gnus-current-topic))) + (gnus-current-topic)) + gnus-topic-mode) ;; Check whether this topic already exists. (when (gnus-topic-find-topology topic) (error "Topic already exists")) @@ -1284,7 +1288,8 @@ If COPYP, copy the groups instead." (interactive (list current-prefix-arg (gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t - nil 'gnus-topic-history))) + nil 'gnus-topic-history)) + gnus-topic-mode) (let ((use-marked (and (not n) (not (and transient-mark-mode mark-active)) gnus-group-marked t)) (groups (gnus-group-process-prefix n)) @@ -1309,7 +1314,7 @@ If COPYP, copy the groups instead." (defun gnus-topic-remove-group (&optional n) "Remove the current group from the topic." - (interactive "P") + (interactive "P" gnus-topic-mode) (let ((use-marked (and (not n) (not (and transient-mark-mode mark-active)) gnus-group-marked t)) (groups (gnus-group-process-prefix n))) @@ -1331,12 +1336,13 @@ If COPYP, copy the groups instead." (interactive (list current-prefix-arg (gnus-completing-read - "Copy to topic" (mapcar #'car gnus-topic-alist) t))) + "Copy to topic" (mapcar #'car gnus-topic-alist) t)) + gnus-topic-mode) (gnus-topic-move-group n topic t)) (defun gnus-topic-kill-group (&optional n discard) "Kill the next N groups." - (interactive "P") + (interactive "P" gnus-topic-mode) (if (gnus-group-topic-p) (let ((topic (gnus-group-topic-name))) (push (cons @@ -1356,7 +1362,7 @@ If COPYP, copy the groups instead." (defun gnus-topic-yank-group (&optional arg) "Yank the last topic." - (interactive "p") + (interactive "p" gnus-topic-mode) (if gnus-topic-killed-topics (let* ((previous (or (gnus-group-topic-name) @@ -1405,7 +1411,7 @@ If COPYP, copy the groups instead." (defun gnus-topic-hide-topic (&optional permanent) "Hide the current topic. If PERMANENT, make it stay hidden in subsequent sessions as well." - (interactive "P") + (interactive "P" gnus-topic-mode) (when (gnus-current-topic) (gnus-topic-goto-topic (gnus-current-topic)) (if permanent @@ -1418,7 +1424,7 @@ If PERMANENT, make it stay hidden in subsequent sessions as well." (defun gnus-topic-show-topic (&optional permanent) "Show the hidden topic. If PERMANENT, make it stay shown in subsequent sessions as well." - (interactive "P") + (interactive "P" gnus-topic-mode) (when (gnus-group-topic-p) (if (not permanent) (gnus-topic-remove-topic t nil) @@ -1433,9 +1439,11 @@ If PERMANENT, make it stay shown in subsequent sessions as well." (defun gnus-topic-mark-topic (topic &optional unmark non-recursive) "Mark all groups in the TOPIC with the process mark. If NON-RECURSIVE (which is the prefix) is t, don't mark its subtopics." - (interactive (list (gnus-group-topic-name) - nil - (and current-prefix-arg t))) + (interactive + (list (gnus-group-topic-name) + nil + (and current-prefix-arg t)) + gnus-topic-mode) (if (not topic) (call-interactively 'gnus-group-mark-group) (save-excursion @@ -1450,14 +1458,15 @@ If NON-RECURSIVE (which is the prefix) is t, don't mark its subtopics." If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics." (interactive (list (gnus-group-topic-name) nil - (and current-prefix-arg t))) + (and current-prefix-arg t)) + gnus-topic-mode) (if (not topic) (call-interactively 'gnus-group-unmark-group) (gnus-topic-mark-topic topic t non-recursive))) (defun gnus-topic-get-new-news-this-topic (&optional n) "Check for new news in the current topic." - (interactive "P") + (interactive "P" gnus-topic-mode) (if (not (gnus-group-topic-p)) (gnus-group-get-new-news-this-group n) (let* ((topic (gnus-group-topic-name)) @@ -1475,7 +1484,8 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics." (list (setq topic (gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t)) - (read-string (format "Move to %s (regexp): " topic)))))) + (read-string (format "Move to %s (regexp): " topic))))) + gnus-topic-mode) (gnus-group-mark-regexp regexp) (gnus-topic-move-group nil topic copyp)) @@ -1486,12 +1496,13 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics." (mapcar #'car gnus-topic-alist) t))) (nreverse (list topic - (read-string (format "Copy to %s (regexp): " topic)))))) + (read-string (format "Copy to %s (regexp): " topic))))) + gnus-topic-mode) (gnus-topic-move-matching regexp topic t)) (defun gnus-topic-delete (topic) "Delete a topic." - (interactive (list (gnus-group-topic-name))) + (interactive (list (gnus-group-topic-name)) gnus-topic-mode) (unless topic (error "No topic to be deleted")) (let ((entry (assoc topic gnus-topic-alist)) @@ -1512,7 +1523,8 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics." (interactive (let ((topic (gnus-current-topic))) (list topic - (read-string (format "Rename %s to: " topic) topic)))) + (read-string (format "Rename %s to: " topic) topic))) + gnus-topic-mode) ;; Check whether the new name exists. (when (gnus-topic-find-topology new-name) (error "Topic `%s' already exists" new-name)) @@ -1535,7 +1547,7 @@ If NON-RECURSIVE (which is the prefix) is t, don't unmark its subtopics." (defun gnus-topic-indent (&optional unindent) "Indent a topic -- make it a sub-topic of the previous topic. If UNINDENT, remove an indentation." - (interactive "P") + (interactive "P" gnus-topic-mode) (if unindent (gnus-topic-unindent) (let* ((topic (gnus-current-topic)) @@ -1555,7 +1567,7 @@ If UNINDENT, remove an indentation." (defun gnus-topic-unindent () "Unindent a topic." - (interactive) + (interactive nil gnus-topic-mode) (let* ((topic (gnus-current-topic)) (parent (gnus-topic-parent-topic topic)) (grandparent (gnus-topic-parent-topic parent))) @@ -1574,7 +1586,7 @@ If UNINDENT, remove an indentation." (defun gnus-topic-list-active (&optional force) "List all groups that Gnus knows about in a topicsified fashion. If FORCE, always re-read the active file." - (interactive "P") + (interactive "P" gnus-topic-mode) (when force (gnus-get-killed-groups)) (gnus-topic-grok-active force) @@ -1585,7 +1597,7 @@ If FORCE, always re-read the active file." (defun gnus-topic-toggle-display-empty-topics () "Show/hide topics that have no unread articles." - (interactive) + (interactive nil gnus-topic-mode) (setq gnus-topic-display-empty-topics (not gnus-topic-display-empty-topics)) (gnus-group-list-groups) @@ -1598,7 +1610,7 @@ If FORCE, always re-read the active file." (defun gnus-topic-edit-parameters (group) "Edit the group parameters of GROUP. If performed on a topic, edit the topic parameters instead." - (interactive (list (gnus-group-group-name))) + (interactive (list (gnus-group-group-name)) gnus-topic-mode) (if group (gnus-group-edit-group-parameters group) (if (not (gnus-group-topic-p)) @@ -1642,7 +1654,8 @@ If performed on a topic, edit the topic parameters instead." (defun gnus-topic-sort-groups (func &optional reverse) "Sort the current topic according to FUNC. If REVERSE, reverse the sorting order." - (interactive (list gnus-group-sort-function current-prefix-arg)) + (interactive (list gnus-group-sort-function current-prefix-arg) + gnus-topic-mode) (let ((topic (assoc (gnus-current-topic) gnus-topic-alist))) (gnus-topic-sort-topic topic (gnus-make-sort-function func) reverse) @@ -1651,43 +1664,43 @@ If REVERSE, reverse the sorting order." (defun gnus-topic-sort-groups-by-alphabet (&optional reverse) "Sort the current topic alphabetically by group name. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-topic-mode) (gnus-topic-sort-groups 'gnus-group-sort-by-alphabet reverse)) (defun gnus-topic-sort-groups-by-unread (&optional reverse) "Sort the current topic by number of unread articles. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-topic-mode) (gnus-topic-sort-groups 'gnus-group-sort-by-unread reverse)) (defun gnus-topic-sort-groups-by-level (&optional reverse) "Sort the current topic by group level. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-topic-mode) (gnus-topic-sort-groups 'gnus-group-sort-by-level reverse)) (defun gnus-topic-sort-groups-by-score (&optional reverse) "Sort the current topic by group score. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-topic-mode) (gnus-topic-sort-groups 'gnus-group-sort-by-score reverse)) (defun gnus-topic-sort-groups-by-rank (&optional reverse) "Sort the current topic by group rank. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-topic-mode) (gnus-topic-sort-groups 'gnus-group-sort-by-rank reverse)) (defun gnus-topic-sort-groups-by-method (&optional reverse) "Sort the current topic alphabetically by backend name. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-topic-mode) (gnus-topic-sort-groups 'gnus-group-sort-by-method reverse)) (defun gnus-topic-sort-groups-by-server (&optional reverse) "Sort the current topic alphabetically by server name. If REVERSE, sort in reverse order." - (interactive "P") + (interactive "P" gnus-topic-mode) (gnus-topic-sort-groups 'gnus-group-sort-by-server reverse)) (defun gnus-topic-sort-topics-1 (top reverse) @@ -1708,7 +1721,8 @@ If REVERSE, reverse the sorting order." (list (gnus-completing-read "Sort topics in" (mapcar #'car gnus-topic-alist) t (gnus-current-topic)) - current-prefix-arg)) + current-prefix-arg) + gnus-topic-mode) (let ((topic-topology (or (and topic (cdr (gnus-topic-find-topology topic))) gnus-topic-topology))) (gnus-topic-sort-topics-1 topic-topology reverse) @@ -1721,7 +1735,8 @@ If REVERSE, reverse the sorting order." (interactive (list (gnus-group-topic-name) - (gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t))) + (gnus-completing-read "Move to topic" (mapcar #'car gnus-topic-alist) t)) + gnus-topic-mode) (unless (and current to) (error "Can't find topic")) (let ((current-top (cdr (gnus-topic-find-topology current))) diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index 32a87851549..bd9a1a33ec3 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -355,7 +355,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defun gnus-uu-decode-uu (&optional n) "Uudecodes the current article." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (gnus-uu-decode-with-method #'gnus-uu-uustrip-article n)) (defun gnus-uu-decode-uu-and-save (n dir) @@ -364,13 +364,14 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (list current-prefix-arg (file-name-as-directory (read-directory-name "Uudecode and save in dir: " - gnus-uu-default-dir - gnus-uu-default-dir t)))) + gnus-uu-default-dir + gnus-uu-default-dir t))) + gnus-article-mode gnus-summary-mode) (gnus-uu-decode-with-method #'gnus-uu-uustrip-article n dir nil nil t)) (defun gnus-uu-decode-unshar (&optional n) "Unshars the current article." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (gnus-uu-decode-with-method #'gnus-uu-unshar-article n nil nil 'scan t)) (defun gnus-uu-decode-unshar-and-save (n dir) @@ -379,8 +380,9 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (list current-prefix-arg (file-name-as-directory (read-directory-name "Unshar and save in dir: " - gnus-uu-default-dir - gnus-uu-default-dir t)))) + gnus-uu-default-dir + gnus-uu-default-dir t))) + gnus-article-mode gnus-summary-mode) (gnus-uu-decode-with-method #'gnus-uu-unshar-article n dir nil 'scan t)) (defun gnus-uu-decode-save (n file) @@ -391,7 +393,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (read-directory-name "Save articles in dir: " gnus-uu-default-dir gnus-uu-default-dir) (read-file-name - "Save article in file: " gnus-uu-default-dir gnus-uu-default-dir)))) + "Save article in file: " gnus-uu-default-dir gnus-uu-default-dir))) + gnus-article-mode gnus-summary-mode) (setq gnus-uu-saved-article-name file) (gnus-uu-decode-with-method #'gnus-uu-save-article n nil t)) @@ -401,8 +404,9 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (list current-prefix-arg (file-name-as-directory (read-directory-name "Unbinhex and save in dir: " - gnus-uu-default-dir - gnus-uu-default-dir)))) + gnus-uu-default-dir + gnus-uu-default-dir))) + gnus-article-mode gnus-summary-mode) (gnus-uu-initialize) (setq gnus-uu-binhex-article-name (make-temp-file (expand-file-name "binhex" gnus-uu-work-dir))) @@ -414,14 +418,15 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (list current-prefix-arg (file-name-as-directory (read-directory-name "yEnc decode and save in dir: " - gnus-uu-default-dir - gnus-uu-default-dir)))) + gnus-uu-default-dir + gnus-uu-default-dir))) + gnus-article-mode gnus-summary-mode) (setq gnus-uu-yenc-article-name nil) (gnus-uu-decode-with-method #'gnus-uu-yenc-article n dir nil t)) (defun gnus-uu-decode-uu-view (&optional n) "Uudecodes and views the current article." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-uu n))) @@ -431,13 +436,14 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (list current-prefix-arg (read-file-name "Uudecode, view and save in dir: " gnus-uu-default-dir - gnus-uu-default-dir t))) + gnus-uu-default-dir t)) + gnus-article-mode gnus-summary-mode) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-uu-and-save n dir))) (defun gnus-uu-decode-unshar-view (&optional n) "Unshars and views the current article." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-unshar n))) @@ -447,7 +453,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (list current-prefix-arg (read-file-name "Unshar, view and save in dir: " gnus-uu-default-dir - gnus-uu-default-dir t))) + gnus-uu-default-dir t)) + gnus-article-mode gnus-summary-mode) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-unshar-and-save n dir))) @@ -459,7 +466,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (read-directory-name "Save articles in dir: " gnus-uu-default-dir gnus-uu-default-dir) (read-file-name "Save articles in file: " - gnus-uu-default-dir gnus-uu-default-dir)))) + gnus-uu-default-dir gnus-uu-default-dir))) + gnus-article-mode gnus-summary-mode) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-save n file))) @@ -468,7 +476,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (interactive (list current-prefix-arg (read-file-name "Unbinhex, view and save in dir: " - gnus-uu-default-dir gnus-uu-default-dir))) + gnus-uu-default-dir gnus-uu-default-dir)) + gnus-article-mode gnus-summary-mode) (gnus-uu-initialize) (setq gnus-uu-binhex-article-name (make-temp-file (expand-file-name "binhex" gnus-uu-work-dir))) @@ -480,7 +489,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defun gnus-uu-digest-mail-forward (&optional n post) "Digests and forwards all articles in this series." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (gnus-uu-initialize) (let ((gnus-uu-save-in-digest t) (file (make-temp-file (nnheader-concat gnus-uu-work-dir "forward"))) @@ -546,7 +555,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defun gnus-uu-digest-post-forward (&optional n) "Digest and forward to a newsgroup." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (gnus-uu-digest-mail-forward n t)) ;; Process marking. @@ -576,7 +585,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." "Set the process mark on articles whose subjects match REGEXP. When called interactively, prompt for REGEXP. Optional UNMARK non-nil means unmark instead of mark." - (interactive "sMark (regexp): \nP") + (interactive "sMark (regexp): \nP" gnus-article-mode gnus-summary-mode) (save-excursion (let* ((articles (gnus-uu-find-articles-matching regexp)) (new-marked (gnus-new-processable unmark articles))) @@ -590,12 +599,12 @@ Optional UNMARK non-nil means unmark instead of mark." (defun gnus-uu-unmark-by-regexp (regexp) "Remove the process mark from articles whose subjects match REGEXP. When called interactively, prompt for REGEXP." - (interactive "sUnmark (regexp): ") + (interactive "sUnmark (regexp): " gnus-article-mode gnus-summary-mode) (gnus-uu-mark-by-regexp regexp t)) (defun gnus-uu-mark-series (&optional silent) "Mark the current series with the process mark." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let* ((articles (gnus-uu-find-articles-matching)) (l (length articles))) (while articles @@ -608,7 +617,7 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-mark-region (beg end &optional unmark) "Set the process mark on all articles between point and mark." - (interactive "r") + (interactive "r" gnus-article-mode gnus-summary-mode) (save-excursion (goto-char beg) (while (< (point) end) @@ -620,22 +629,22 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-unmark-region (beg end) "Remove the process mark from all articles between point and mark." - (interactive "r") + (interactive "r" gnus-article-mode gnus-summary-mode) (gnus-uu-mark-region beg end t)) (defun gnus-uu-mark-buffer () "Set the process mark on all articles in the buffer." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-uu-mark-region (point-min) (point-max))) (defun gnus-uu-unmark-buffer () "Remove the process mark on all articles in the buffer." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-uu-mark-region (point-min) (point-max) t)) (defun gnus-uu-mark-thread () "Marks all articles downwards in this thread." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (gnus-save-hidden-threads (let ((level (gnus-summary-thread-level))) (while (and (gnus-summary-set-process-mark (gnus-summary-article-number)) @@ -646,7 +655,7 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-unmark-thread () "Unmarks all articles downwards in this thread." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((level (gnus-summary-thread-level))) (while (and (gnus-summary-remove-process-mark (gnus-summary-article-number)) @@ -656,7 +665,7 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-invert-processable () "Invert the list of process-marked articles." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((data gnus-newsgroup-data) number) (save-excursion @@ -669,7 +678,7 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-mark-over (&optional score) "Mark all articles with a score over SCORE (the prefix)." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (let ((score (or score gnus-summary-default-score 0)) (data gnus-newsgroup-data)) (save-excursion @@ -684,7 +693,7 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-mark-sparse () "Mark all series that have some articles marked." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (let ((marked (nreverse gnus-newsgroup-processable)) subject articles total headers) (unless marked @@ -708,7 +717,7 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-mark-all () "Mark all articles in \"series\" order." - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (setq gnus-newsgroup-processable nil) (save-excursion (let ((data gnus-newsgroup-data) @@ -728,33 +737,33 @@ When called interactively, prompt for REGEXP." (defun gnus-uu-decode-postscript (&optional n) "Gets PostScript of the current article." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (gnus-uu-decode-with-method #'gnus-uu-decode-postscript-article n)) (defun gnus-uu-decode-postscript-view (&optional n) "Gets and views the current article." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-postscript n))) (defun gnus-uu-decode-postscript-and-save (n dir) "Extracts PostScript and saves the current article." - (interactive - (list current-prefix-arg - (file-name-as-directory - (read-directory-name "Save in dir: " - gnus-uu-default-dir - gnus-uu-default-dir t)))) + (interactive (list current-prefix-arg + (file-name-as-directory + (read-directory-name "Save in dir: " + gnus-uu-default-dir + gnus-uu-default-dir t))) + gnus-article-mode gnus-summary-mode) (gnus-uu-decode-with-method #'gnus-uu-decode-postscript-article n dir nil nil t)) (defun gnus-uu-decode-postscript-and-save-view (n dir) "Decodes, views and saves the resulting file." - (interactive - (list current-prefix-arg - (read-file-name "Where do you want to save the file(s)? " - gnus-uu-default-dir - gnus-uu-default-dir t))) + (interactive (list current-prefix-arg + (read-file-name "Where do you want to save the file(s)? " + gnus-uu-default-dir + gnus-uu-default-dir t)) + gnus-article-mode gnus-summary-mode) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) (gnus-uu-decode-postscript-and-save n dir))) diff --git a/lisp/gnus/gnus-vm.el b/lisp/gnus/gnus-vm.el index b7e6b2a8890..ec3601109e9 100644 --- a/lisp/gnus/gnus-vm.el +++ b/lisp/gnus/gnus-vm.el @@ -72,7 +72,7 @@ If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." - (interactive "P") + (interactive "P" gnus-article-mode gnus-summary-mode) (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-vm)) (gnus-summary-save-article arg))) @@ -80,7 +80,7 @@ save those articles instead." (declare-function vm-save-message "ext:vm-save" (folder &optional count)) (defun gnus-summary-save-in-vm (&optional folder) - (interactive) + (interactive nil gnus-article-mode gnus-summary-mode) (require 'vm) (setq folder (gnus-read-save-file-name diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 7b94c64ae7b..0334b81f0be 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -2513,7 +2513,7 @@ are always t.") '(("info" :interactive t Info-goto-node) ("qp" quoted-printable-decode-region quoted-printable-decode-string) ("ps-print" ps-print-preprint) - ("message" :interactive t + ("message" :interactive (message-mode) message-send-and-exit message-yank-original) ("babel" babel-as-string) ("nnmail" nnmail-split-fancy nnmail-article-group) @@ -2530,7 +2530,7 @@ are always t.") ("score-mode" :interactive t gnus-score-mode) ("gnus-mh" gnus-summary-save-article-folder gnus-Folder-save-name gnus-folder-save-name) - ("gnus-mh" :interactive t gnus-summary-save-in-folder) + ("gnus-mh" :interactive (gnus-summary-mode) gnus-summary-save-in-folder) ("gnus-demon" gnus-demon-add-scanmail gnus-demon-add-rescan gnus-demon-add-scan-timestamps gnus-demon-add-disconnection gnus-demon-add-handler @@ -2545,7 +2545,7 @@ are always t.") ("gnus-srvr" gnus-enter-server-buffer gnus-server-set-info gnus-server-server-name) ("gnus-srvr" gnus-browse-foreign-server) - ("gnus-cite" :interactive t + ("gnus-cite" :interactive (gnus-article-mode gnus-summary-mode) gnus-article-highlight-citation gnus-article-hide-citation-maybe gnus-article-hide-citation gnus-article-fill-cited-article gnus-article-hide-citation-in-followups @@ -2561,29 +2561,34 @@ are always t.") gnus-cache-enter-remove-article gnus-cached-article-p gnus-cache-open gnus-cache-close gnus-cache-update-article gnus-cache-articles-in-group) - ("gnus-cache" :interactive t gnus-jog-cache gnus-cache-enter-article + ("gnus-cache" :interactive (gnus-summary-mode) + gnus-summary-insert-cached-articles gnus-cache-enter-article gnus-cache-remove-article gnus-summary-insert-cached-articles) + ("gnus-cache" :interactive t gnus-jog-cache) ("gnus-score" :interactive t + gnus-score-flush-cache gnus-score-close) + ("gnus-score" :interactive (gnus-summary-mode) gnus-summary-increase-score gnus-summary-set-score gnus-summary-raise-thread gnus-summary-raise-same-subject gnus-summary-raise-score gnus-summary-raise-same-subject-and-select gnus-summary-lower-thread gnus-summary-lower-same-subject gnus-summary-lower-score gnus-summary-lower-same-subject-and-select gnus-summary-current-score gnus-score-delta-default - gnus-score-flush-cache gnus-score-close gnus-possibly-score-headers gnus-score-followup-article gnus-score-followup-thread) ("gnus-score" (gnus-summary-score-map keymap) gnus-score-save gnus-score-headers gnus-current-score-file-nondirectory gnus-score-adaptive gnus-score-find-trace gnus-score-file-name) - ("gnus-cus" :interactive t gnus-group-customize gnus-score-customize) - ("gnus-topic" :interactive t gnus-topic-mode) + ("gnus-cus" :interactive (gnus-group-mode) gnus-group-customize) + ("gnus-cus" :interactive (gnus-summary-mode) gnus-score-customize) + ("gnus-topic" :interactive (gnus-group-mode) gnus-topic-mode) ("gnus-topic" gnus-topic-remove-group gnus-topic-set-parameters gnus-subscribe-topics) - ("gnus-salt" :interactive t gnus-pick-mode gnus-binary-mode) + ("gnus-salt" :interactive (gnus-summary-mode) + gnus-pick-mode gnus-binary-mode) ("gnus-uu" (gnus-uu-extract-map keymap) (gnus-uu-mark-map keymap)) - ("gnus-uu" :interactive t + ("gnus-uu" :interactive (gnus-article-mode gnus-summary-mode) gnus-uu-digest-mail-forward gnus-uu-digest-post-forward gnus-uu-mark-series gnus-uu-mark-region gnus-uu-mark-buffer gnus-uu-mark-by-regexp gnus-uu-mark-all @@ -2598,12 +2603,13 @@ are always t.") ("gnus-uu" gnus-uu-delete-work-dir gnus-uu-unmark-thread) ("gnus-msg" (gnus-summary-send-map keymap) gnus-article-mail gnus-copy-article-buffer gnus-extended-version) - ("gnus-msg" :interactive t - gnus-group-post-news gnus-group-mail gnus-group-news + ("gnus-msg" :interactive (gnus-group-mode) + gnus-group-post-news gnus-group-mail gnus-group-news) + ("gnus-msg" :interactive (gnus-summary-mode) gnus-summary-post-news gnus-summary-news-other-window gnus-summary-followup gnus-summary-followup-with-original gnus-summary-cancel-article gnus-summary-supersede-article - gnus-post-news gnus-summary-reply gnus-summary-reply-with-original + gnus-summary-reply gnus-summary-reply-with-original gnus-summary-mail-forward gnus-summary-mail-other-window gnus-summary-resend-message gnus-summary-resend-bounced-mail gnus-summary-wide-reply gnus-summary-followup-to-mail @@ -2611,7 +2617,9 @@ are always t.") gnus-summary-wide-reply-with-original gnus-summary-post-forward gnus-summary-wide-reply-with-original gnus-summary-post-forward) - ("gnus-picon" :interactive t gnus-treat-from-picon) + ("gnus-msg" gnus-post-news) + ("gnus-picon" :interactive (gnus-article-mode gnus-summary-mode) + gnus-treat-from-picon) ("smiley" :interactive t smiley-region) ("gnus-win" gnus-configure-windows gnus-add-configuration) ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group @@ -2634,7 +2642,7 @@ are always t.") gnus-request-article-this-buffer gnus-article-mode gnus-article-setup-buffer gnus-narrow-to-page gnus-article-delete-invisible-text gnus-treat-article) - ("gnus-art" :interactive t + ("gnus-art" :interactive (gnus-summary-mode gnus-article-mode) gnus-article-hide-headers gnus-article-hide-boring-headers gnus-article-treat-overstrike gnus-article-remove-cr gnus-article-remove-trailing-blank-lines @@ -2646,7 +2654,6 @@ are always t.") gnus-article-hide-pem gnus-article-hide-signature gnus-article-strip-leading-blank-lines gnus-article-date-local gnus-article-date-original gnus-article-date-lapsed - ;;gnus-article-show-all-headers gnus-article-edit-mode gnus-article-edit-article gnus-article-edit-done gnus-article-decode-encoded-words gnus-start-date-timer gnus-stop-date-timer @@ -2671,12 +2678,13 @@ are always t.") gnus-agent-store-article gnus-agent-group-covered-p) ("gnus-agent" :interactive t gnus-unplugged gnus-agentize gnus-agent-batch) - ("gnus-vm" :interactive t gnus-summary-save-in-vm + ("gnus-vm" :interactive (gnus-summary-mode) gnus-summary-save-in-vm gnus-summary-save-article-vm) ("compface" uncompface) - ("gnus-draft" :interactive t gnus-draft-mode gnus-group-send-queue) + ("gnus-draft" :interactive (gnus-summary-mode) gnus-draft-mode) + ("gnus-draft" :interactive t gnus-group-send-queue) ("gnus-mlspl" gnus-group-split gnus-group-split-fancy) - ("gnus-mlspl" :interactive t gnus-group-split-setup + ("gnus-mlspl" :interactive (gnus-group-mode) gnus-group-split-setup gnus-group-split-update) ("gnus-delay" gnus-delay-initialize)))) -- cgit v1.2.3 From 98533555de42f2bded824130466cf0aefc648292 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 7 Mar 2021 05:36:11 +0100 Subject: Remove some items obsolete since Emacs 22/23 from Gnus * lisp/gnus/gnus-art.el (gnus-article-hide-pgp-hook) (gnus-treat-strip-pgp, gnus-treat-display-xface): * lisp/gnus/gnus-msg.el (gnus-inews-mark-gcc-as-read): * lisp/gnus/gnus-start.el (nnmail-spool-file): * lisp/gnus/nnmail.el (nnmail-spool-file) (nnmail-fix-eudora-headers): Remove items obsolete since 22.1. * lisp/gnus/gnus-art.el (gnus-treat-display-x-face): * lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Don't use above obsolete symbols. * doc/misc/gnus.texi (Washing Mail, Not Reading Mail): Don't refer to above obsolete variables. ; * etc/NEWS: List removed items. * lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal): * lisp/gnus/nnimap.el (nnimap-split-rule): * lisp/gnus/nntp.el (nntp-authinfo-file): Fix obsolete variable version format. --- doc/misc/gnus.texi | 6 ++---- etc/NEWS | 18 ++++++++++++------ lisp/gnus/gnus-art.el | 21 +-------------------- lisp/gnus/gnus-msg.el | 7 +------ lisp/gnus/gnus-start.el | 1 - lisp/gnus/gnus.el | 4 ++-- lisp/gnus/nnimap.el | 2 +- lisp/gnus/nnmail.el | 8 -------- lisp/gnus/nntp.el | 2 +- 9 files changed, 20 insertions(+), 49 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index fef066db8fd..faf5366e2ba 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -16269,7 +16269,6 @@ Translate all @samp{@key{TAB}} characters into @samp{@key{SPC}} characters. @item nnmail-ignore-broken-references @findex nnmail-ignore-broken-references -@c @findex nnmail-fix-eudora-headers @cindex Eudora @cindex Pegasus Some mail user agents (e.g., Eudora and Pegasus) produce broken @@ -16359,9 +16358,8 @@ If you start using any of the mail back ends, they have the annoying habit of assuming that you want to read mail with them. This might not be unreasonable, but it might not be what you want. -If you set @code{mail-sources} and @code{nnmail-spool-file} to -@code{nil}, none of the back ends will ever attempt to read incoming -mail, which should help. +If you set @code{mail-sources} to @code{nil}, none of the back ends +will ever attempt to read incoming mail, which should help. @vindex nnbabyl-get-new-mail @vindex nnmbox-get-new-mail diff --git a/etc/NEWS b/etc/NEWS index d2b84d733db..d36771377e8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2347,12 +2347,12 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el. 'minibuffer-local-must-match-filename-map', 'mouse-choose-completion', 'mouse-major-mode-menu', 'mouse-popup-menubar', 'mouse-popup-menubar-stuff', 'newsticker-groups-filename', -'non-iso-charset-alist', 'nonascii-insert-offset', -'nonascii-translation-table', 'password-read-and-add', -'pre-abbrev-expand-hook', 'princ-list', 'print-help-return-message', -'process-filter-multibyte-p', 'read-file-name-predicate', -'remember-buffer', 'rmail-highlight-face', 'rmail-message-filter', -'semantic-after-idle-scheduler-reparse-hooks', +'nnmail-fix-eudora-headers', 'non-iso-charset-alist', +'nonascii-insert-offset', 'nonascii-translation-table', +'password-read-and-add', 'pre-abbrev-expand-hook', 'princ-list', +'print-help-return-message', 'process-filter-multibyte-p', +'read-file-name-predicate', 'remember-buffer', 'rmail-highlight-face', +'rmail-message-filter', 'semantic-after-idle-scheduler-reparse-hooks', 'semantic-after-toplevel-bovinate-hook', 'semantic-before-idle-scheduler-reparse-hooks', 'semantic-before-toplevel-bovination-hook', @@ -2387,6 +2387,12 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el. 'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font', 'wisent-lex-make-token-table'. +--- +** Some functions and variables obsolete since Emacs 22 have been removed: +'gnus-article-hide-pgp-hook', 'gnus-inews-mark-gcc-as-read', +'gnus-treat-display-xface', 'gnus-treat-strip-pgp', +'nnmail-spool-file'. + ** The WHEN argument of 'make-obsolete' and related functions is mandatory. The use of those functions without a WHEN argument was marked obsolete back in Emacs 23.1. The affected functions are: 'make-obsolete', diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 435ccab7403..ad323089ad0 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -728,9 +728,6 @@ Each element is a regular expression." :type '(repeat regexp) :group 'gnus-article-various) -(make-obsolete-variable 'gnus-article-hide-pgp-hook nil - "Gnus 5.10 (Emacs 22.1)") - (defface gnus-button '((t (:weight bold))) "Face used for highlighting a button in the article buffer." @@ -1264,9 +1261,6 @@ Any symbol is used to look up a regular expression to match the banner in `gnus-list-identifiers'. A string is used as a regular expression to match the identifier directly.") -(make-obsolete-variable 'gnus-treat-strip-pgp nil - "Gnus 5.10 (Emacs 22.1)") - (defcustom gnus-treat-strip-pem nil "Strip PEM signatures. Valid values are nil, t, `head', `first', `last', an integer or a @@ -1396,9 +1390,6 @@ predicate. See Info node `(gnus)Customizing Articles'." :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) -(make-obsolete-variable 'gnus-treat-display-xface - 'gnus-treat-display-x-face "Emacs 22.1") - (defcustom gnus-treat-display-x-face (and (not noninteractive) (gnus-image-type-available-p 'xbm) @@ -1423,17 +1414,7 @@ See Info node `(gnus)Customizing Articles' and Info node symbol (cond ((or (boundp symbol) (get symbol 'saved-value)) value) - ((boundp 'gnus-treat-display-xface) - (message "\ -** gnus-treat-display-xface is an obsolete variable;\ - use gnus-treat-display-x-face instead") - (default-value 'gnus-treat-display-xface)) - ((get 'gnus-treat-display-xface 'saved-value) - (message "\ -** gnus-treat-display-xface is an obsolete variable;\ - use gnus-treat-display-x-face instead") - (eval (car (get 'gnus-treat-display-xface 'saved-value)) t)) - (t + (t value))))) (put 'gnus-treat-display-x-face 'highlight t) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index d7851f26290..f1181d40910 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -143,9 +143,6 @@ See Info node `(gnus)Posting Styles'." :group 'gnus-message :type 'boolean) -(make-obsolete-variable 'gnus-inews-mark-gcc-as-read - 'gnus-gcc-mark-as-read "Emacs 22.1") - (defcustom gnus-gcc-externalize-attachments nil "Should local-file attachments be included as external parts in Gcc copies? If it is `all', attach files as external parts; @@ -1659,9 +1656,7 @@ this is a reply." ;; FIXME: Should gcc-mark-as-read work when ;; Gnus is not running? (gnus-alive-p)) - (if (or gnus-gcc-mark-as-read - (and (boundp 'gnus-inews-mark-gcc-as-read) - (symbol-value 'gnus-inews-mark-gcc-as-read))) + (if gnus-gcc-mark-as-read (gnus-group-mark-article-read group (cdr group-art)) (with-current-buffer gnus-group-buffer (let ((gnus-group-marked (list group)) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index a3112bdd9fe..a6b362e0834 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -663,7 +663,6 @@ the first newsgroup." (defvar mail-sources) (defvar nnmail-scan-directory-mail-source-once) (defvar nnmail-split-history) -(defvar nnmail-spool-file) (defun gnus-close-all-servers () "Close all servers." diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 0334b81f0be..2f2b2061b97 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1138,7 +1138,7 @@ no need to set this variable." :group 'gnus-message :type '(choice (const :tag "default" nil) string)) -(make-obsolete-variable 'gnus-local-domain nil "Emacs 24.1") +(make-obsolete-variable 'gnus-local-domain nil "24.1") ;; Customization variables @@ -2310,7 +2310,7 @@ automatically cache the article in the agent cache." ;; The carpal mode has been removed, but define the variable for ;; backwards compatibility. (defvar gnus-carpal nil) -(make-obsolete-variable 'gnus-carpal nil "Emacs 24.1") +(make-obsolete-variable 'gnus-carpal nil "24.1") (defvar gnus-agent-fetching nil "Whether Gnus agent is in fetching mode.") diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index f4f4ef89a9e..93e1c47be70 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -95,7 +95,7 @@ Uses the same syntax as `nnmail-split-methods'.") "Articles with the flags in the list will not be considered when splitting.") (make-obsolete-variable 'nnimap-split-rule "see `nnimap-split-methods'." - "Emacs 24.1") + "24.1") (defvoo nnimap-authenticator nil "How nnimap authenticate itself to the server. diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 9826bc6172c..bcf01cfa9e7 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -240,11 +240,6 @@ If non-nil, also update the cache when copy or move articles." :group 'nnmail :type 'boolean) -(make-obsolete-variable 'nnmail-spool-file 'mail-sources - "Gnus 5.9 (Emacs 22.1)") -;; revision 5.29 / p0-85 / Gnus 5.9 -;; Variable removed in No Gnus v0.7 - (defcustom nnmail-resplit-incoming nil "If non-nil, re-split incoming procmail sorted mail." :group 'nnmail-procmail @@ -1321,9 +1316,6 @@ Eudora has a broken References line, but an OK In-Reply-To." (when (re-search-forward "^\\(In-Reply-To:[^\n]+\\)\n[ \t]+" nil t) (replace-match "\\1" t)))) -(defalias 'nnmail-fix-eudora-headers #'nnmail-ignore-broken-references) -(make-obsolete 'nnmail-fix-eudora-headers #'nnmail-ignore-broken-references "Emacs 23.1") - (custom-add-option 'nnmail-prepare-incoming-header-hook 'nnmail-ignore-broken-references) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 1eb604d6754..1fd2ed06eba 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -233,7 +233,7 @@ server there that you can connect to. See also (const :format "" "password") (string :format "Password: %v"))))))) -(make-obsolete 'nntp-authinfo-file nil "Emacs 24.1") +(make-obsolete 'nntp-authinfo-file nil "24.1") -- cgit v1.2.3 From 8b07994e201e478df8a3431cbae5187b4cde1791 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 24 Mar 2021 09:28:32 +0100 Subject: Convert many more links to use HTTPS --- ChangeLog.3 | 4 +- doc/misc/gnus-faq.texi | 4 +- doc/misc/nxml-mode.texi | 2 +- doc/misc/texinfo.tex | 4 +- lib/pipe2.c | 2 +- lisp/allout-widgets.el | 4 +- lisp/allout.el | 4 +- lisp/auth-source-pass.el | 4 +- lisp/calendar/cal-bahai.el | 2 +- lisp/calendar/icalendar.el | 2 +- lisp/calendar/iso8601.el | 2 +- lisp/emacs-lisp/lisp-mode.el | 2 +- lisp/emacs-lisp/smie.el | 2 +- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/message.el | 2 +- lisp/gnus/mml-sec.el | 2 +- lisp/gnus/nnmaildir.el | 2 +- lisp/gnus/smime.el | 2 +- lisp/image-dired.el | 6 +-- lisp/international/mule-cmds.el | 2 +- lisp/international/mule-conf.el | 6 +-- lisp/json.el | 2 +- lisp/language/cyrillic.el | 2 +- lisp/ldefs-boot.el | 2 +- lisp/leim/quail/ipa-praat.el | 2 +- lisp/leim/quail/ipa.el | 4 +- lisp/leim/quail/latin-post.el | 2 +- lisp/leim/quail/latin-pre.el | 2 +- lisp/leim/quail/programmer-dvorak.el | 2 +- lisp/mail/feedmail.el | 2 +- lisp/mh-e/mh-e.el | 42 +++++++++--------- lisp/mh-e/mh-xface.el | 2 +- lisp/net/gnutls.el | 2 +- lisp/net/newst-backend.el | 10 ++--- lisp/net/newst-plainview.el | 2 +- lisp/net/nsm.el | 2 +- lisp/nxml/rng-cmpct.el | 2 +- lisp/nxml/rng-xsd.el | 6 +-- lisp/obsolete/bruce.el | 2 +- lisp/obsolete/inversion.el | 2 +- lisp/obsolete/nnir.el | 4 +- lisp/obsolete/terminal.el | 2 +- lisp/obsolete/vc-arch.el | 2 +- lisp/org/ob-clojure.el | 2 +- lisp/org/ob-ocaml.el | 2 +- lisp/pcmpl-x.el | 2 +- lisp/play/doctor.el | 2 +- lisp/play/morse.el | 2 +- lisp/printing.el | 85 +++++++++++++++++------------------- lisp/progmodes/antlr-mode.el | 2 +- lisp/progmodes/ebnf-abn.el | 4 -- lisp/progmodes/ebnf-iso.el | 2 +- lisp/progmodes/ebnf2ps.el | 4 +- lisp/progmodes/octave.el | 4 +- lisp/progmodes/ruby-mode.el | 2 +- lisp/progmodes/scheme.el | 2 +- lisp/progmodes/sql.el | 2 +- lisp/progmodes/vera-mode.el | 4 +- lisp/progmodes/vhdl-mode.el | 2 +- lisp/repeat.el | 2 +- lisp/textmodes/artist.el | 2 +- lisp/textmodes/bibtex-style.el | 2 +- lisp/textmodes/bibtex.el | 2 +- lisp/textmodes/css-mode.el | 2 +- lisp/textmodes/sgml-mode.el | 2 +- lisp/textmodes/table.el | 6 +-- lisp/url/ChangeLog.1 | 2 +- lisp/url/url-cookie.el | 2 +- lisp/vc/diff-mode.el | 2 +- lisp/vc/vc-git.el | 2 +- 70 files changed, 150 insertions(+), 161 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/ChangeLog.3 b/ChangeLog.3 index ed7704e47ff..83e5001e522 100644 --- a/ChangeLog.3 +++ b/ChangeLog.3 @@ -76935,7 +76935,7 @@ * lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): Highlight the Common Lisp conventional names as described in - http://www.cliki.net/Naming+conventions. + https://www.cliki.net/Naming+conventions. (lisp-el-font-lock-keywords-2): Remove the already commented out code for `do-' and `with-' because Emacs Lisp does not have a similar convention. @@ -122126,7 +122126,7 @@ I roughly followed the Bordeaux threads API: - http://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation + https://sionescu.github.io/bordeaux-threads/ ... but not identically. In particular I chose not to implement interrupt-thread or destroy-thread, but instead a thread-signaling diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 35a25262115..d3db940dd92 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -1935,13 +1935,13 @@ when you're online. Let's talk about Unix systems first: For the news part, the easiest solution is a small nntp server like -@uref{http://www.leafnode.org/, Leafnode} or +@uref{https://www.leafnode.org/, Leafnode} or @uref{http://patrik.iki.fi/sn/, sn}, of course you can also install a full featured news server like @uref{https://www.isc.org/othersoftware/, inn}. Then you want to fetch your Mail, popular choices -are @uref{http://www.fetchmail.info/, fetchmail} +are @uref{https://www.fetchmail.info/, fetchmail} and @uref{http://pyropus.ca/software/getmail/, getmail}. You should tell those to write the mail to your disk and Gnus to read it from there. Last but not least the mail diff --git a/doc/misc/nxml-mode.texi b/doc/misc/nxml-mode.texi index 3671ac8f3d2..4ca223d46c4 100644 --- a/doc/misc/nxml-mode.texi +++ b/doc/misc/nxml-mode.texi @@ -82,7 +82,7 @@ documents. To get validation and schema-sensitive editing, you need a RELAX NG Compact Syntax (RNC) schema for your document (@pxref{Locating a schema}). The @file{etc/schema} directory includes some schemas for popular document -types. See @url{http://relaxng.org/} for more information on RELAX NG@. +types. See @url{https://relaxng.org/} for more information on RELAX NG@. You can use the @samp{Trang} program from @url{http://www.thaiopensource.com/relaxng/trang.html} to automatically create RNC schemas. This program can: diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index dac7ae3d199..a91181b116e 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -1181,7 +1181,7 @@ where each line of input produces a line of output.} % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % -% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% See https://mailman.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to @@ -3539,7 +3539,7 @@ $$% % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). -% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% It is available from https://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular diff --git a/lib/pipe2.c b/lib/pipe2.c index 41493aa4307..adbaa4a1021 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -41,7 +41,7 @@ pipe2 (int fd[2], int flags) { /* Mingw _pipe() corrupts fd on failure; also, if we succeed at creating the pipe but later fail at changing fcntl, we want - to leave fd unchanged: http://austingroupbugs.net/view.php?id=467 */ + to leave fd unchanged: https://austingroupbugs.net/view.php?id=467 */ int tmp[2]; tmp[0] = fd[0]; tmp[1] = fd[1]; diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index f251be8dfb9..a642af2dae1 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -6,7 +6,7 @@ ;; Version: 1.0 ;; Created: Dec 2005 ;; Keywords: outlines -;; Website: http://myriadicity.net/software-and-systems/craft/emacs-allout +;; Website: https://myriadicity.net/software-and-systems/craft/emacs-allout ;; This file is part of GNU Emacs. @@ -38,7 +38,7 @@ ;; See the `allout-widgets-mode' docstring for more details. ;; ;; Info about allout and allout-widgets development are available at -;; http://myriadicity.net/Sundry/EmacsAllout +;; https://myriadicity.net/software-and-systems/craft/emacs-allout ;; ;; The graphics include: ;; diff --git a/lisp/allout.el b/lisp/allout.el index 3981fdd785f..18762357530 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -6,7 +6,7 @@ ;; Created: Dec 1991 -- first release to usenet ;; Version: 2.3 ;; Keywords: outlines, wp, languages, PGP, GnuPG -;; Website: http://myriadicity.net/software-and-systems/craft/emacs-allout +;; Website: https://myriadicity.net/software-and-systems/craft/emacs-allout ;; This file is part of GNU Emacs. @@ -57,7 +57,7 @@ ;; mode. ;; ;; Directions to the latest development version and helpful notes are -;; available at http://myriadicity.net/Sundry/EmacsAllout . +;; available at https://myriadicity.net/software-and-systems/craft/emacs-allout . ;; ;; The outline menubar additions provide quick reference to many of the ;; features. See the docstring of the variables `allout-layout' and diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el index 39db1a710bd..bd3070dcfe1 100644 --- a/lisp/auth-source-pass.el +++ b/lisp/auth-source-pass.el @@ -27,7 +27,7 @@ ;;; Commentary: -;; Integrates password-store (http://passwordstore.org/) within +;; Integrates password-store (https://passwordstore.org/) within ;; auth-source. ;;; Code: @@ -123,7 +123,7 @@ ENTRY is the name of a password-store entry. The key used to retrieve the password is the symbol `secret'. The convention used as the format for a password-store file is -the following (see http://www.passwordstore.org/#organization): +the following (see https://www.passwordstore.org/#organization): secret key1: value1 diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index c2e4205c0bc..ff419c72f6f 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -27,7 +27,7 @@ ;; This collection of functions implements the features of calendar.el ;; and diary-lib.el that deal with the Bahá’í calendar. -;; The Bahá’í (http://www.bahai.org) calendar system is based on a +;; The Bahá’í (https://www.bahai.org) calendar system is based on a ;; solar cycle of 19 months with 19 days each. The four remaining ;; "intercalary" days are called the Ayyám-i-Há (days of Há), and are ;; placed between the 18th and 19th months. They are meant as a time diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 8f4dbf0c5e5..d9cd21e3cd2 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -66,7 +66,7 @@ ;; 0.02: ;; - Should work in XEmacs now. Thanks to Len Trigg for the XEmacs patches! ;; - Added exporting from Emacs diary to ical. -;; - Some bugfixes, after testing with calendars from http://icalshare.com. +;; - Some bugfixes, after testing with calendars from https://icalshare.com. ;; - Tested with Emacs 21.3.2 and XEmacs 21.4.12 ;; 0.01: (2003-03-21) diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el index 5a109a73cd9..44c48119845 100644 --- a/lisp/calendar/iso8601.el +++ b/lisp/calendar/iso8601.el @@ -41,7 +41,7 @@ ;; ;; The standard can be found at: ;; -;; http://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf +;; https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf ;; ;; The Wikipedia page on the standard is also informative: ;; diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 4aa8ddcfa11..67b75460941 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -527,7 +527,7 @@ This will generate compile-time constants from BINDINGS." ;; This is too general -- rms. ;; A user complained that he has functions whose names start with `do' ;; and that they get the wrong color. - ;; That user has violated the http://www.cliki.net/Naming+conventions: + ;; That user has violated the https://www.cliki.net/Naming+conventions: ;; CL (but not EL!) `with-' (context) and `do-' (iteration) (,(concat "(\\(\\(do-\\|with-\\)" lisp-mode-symbol-regexp "\\)") (1 font-lock-keyword-face)) diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 44be9afbfae..994433063ce 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -63,7 +63,7 @@ ;; building the 2D precedence tables and then computing the precedence levels ;; from it) can be found in pages 187-194 of "Parsing techniques" by Dick Grune ;; and Ceriel Jacobs (BookBody.pdf available at -;; http://dickgrune.com/Books/PTAPG_1st_Edition/). +;; https://dickgrune.com/Books/PTAPG_1st_Edition/). ;; ;; OTOH we had to kill many chickens, read many coffee grounds, and practice ;; untold numbers of black magic spells, to come up with the indentation code. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index ad323089ad0..c1071c1c68c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -971,7 +971,7 @@ see http://www.cs.indiana.edu/picons/ftp/index.html" :version "22.1" :type '(repeat directory) :link '(url-link :tag "download" - "http://www.cs.indiana.edu/picons/ftp/index.html") + "http://www.cs.indiana.edu/picons/ftp/index.html") :link '(custom-manual "(gnus)Picons") :group 'gnus-picon) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 1e0362a3bfa..fad4ef3dcf6 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -382,7 +382,7 @@ Archives \(such as groups.google.com) respect this header." :group 'message-various) (defcustom message-archive-note - "X-No-Archive: Yes - save http://groups.google.com/" + "X-No-Archive: Yes - save https://groups.google.com/" "Note to insert why you wouldn't want this posting archived. If nil, don't insert any text in the body." :version "22.1" diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index a32eed44196..15157e6fbc8 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -140,7 +140,7 @@ by default identifies the used encryption keys, giving away the Bcc'ed identities. Clearly, this contradicts the original goal of *blind* copies. For an academic paper explaining the problem, see URL -`http://crypto.stanford.edu/portia/papers/bb-bcc.pdf'. +`https://crypto.stanford.edu/portia/papers/bb-bcc.pdf'. Use this variable to specify e-mail addresses whose owners do not mind if they are identifiable as recipients. This may be useful if you use Bcc headers to encrypt e-mails to yourself." diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 46691e3494b..4867455393a 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -21,7 +21,7 @@ ;;; Commentary: -;; Maildir format is documented at . +;; Maildir format is documented at . ;; nnmaildir also stores extra information in the .nnmaildir/ directory ;; within a maildir. ;; diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 2446577c6ad..e9f703e90c6 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -42,7 +42,7 @@ ;; reflect this. ;; ;; The home of this file is in Gnus, but also available from -;; http://josefsson.org/smime.html. +;; https://josefsson.org/smime.html. ;;; Quick introduction: diff --git a/lisp/image-dired.el b/lisp/image-dired.el index e4b53bd2751..2509ecf8f82 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -67,9 +67,9 @@ ;; ;; * For `image-dired-get-exif-data' and `image-dired-set-exif-data' to work, ;; the command line tool `exiftool' is needed. It can be found here: -;; http://www.sno.phy.queensu.ca/~phil/exiftool/. These two functions -;; are, among other things, used for writing comments to image files -;; using `image-dired-thumbnail-set-image-description' and to create +;; https://exiftool.org/. These two functions are, among other +;; things, used for writing comments to image files using +;; `image-dired-thumbnail-set-image-description' and to create ;; "unique" file names using `image-dired-get-exif-file-name' (used by ;; `image-dired-copy-with-exif-file-name'). ;; diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index e4bdf50f526..57958b87278 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2245,7 +2245,7 @@ See `set-language-info-alist' for use in programs." ;; LANGUAGE is a language code taken from ISO 639:1988 (E/F) ;; with additions from ISO 639/RA Newsletter No.1/1989; ;; see Internet RFC 2165 (1997-06) and - ;; http://www.evertype.com/standards/iso639/iso639-en.html + ;; https://www.evertype.com/standards/iso639/iso639-en.html ;; TERRITORY is a country code taken from ISO 3166 ;; http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/en_listp1.html. ;; CODESET and MODIFIER are implementation-dependent. diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 64aac46fcee..2d36dab6320 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -41,7 +41,7 @@ ;; Standards docs equivalent to iso-2022 and iso-8859 are at ;; https://www.ecma.ch/. -;; FWIW, http://www.microsoft.com/globaldev/ lists the following for +;; FWIW, https://www.microsoft.com/globaldev/ lists the following for ;; MS Windows, which are presumably the only charsets we really need ;; to worry about on such systems: ;; `OEM codepages': 437, 720, 737, 775, 850, 852, 855, 857, 858, 862, 866 @@ -358,7 +358,7 @@ :code-offset #x130000 :unify-map "BIG5") ;; Fixme: AKA cp950 according to -;; . Is +;; . Is ;; that correct? (define-charset 'chinese-big5-1 @@ -708,7 +708,7 @@ ;; Original name for cp1125, says Serhii Hlodin (define-charset-alias 'cp866u 'cp1125) -;; Fixme: C.f. iconv, http://czyborra.com/charsets/codepages.html +;; Fixme: C.f. iconv, https://czyborra.com/charsets/codepages.html ;; shows this as not ASCII compatible, with various graphics in ;; 0x01-0x1F. (define-charset 'cp437 diff --git a/lisp/json.el b/lisp/json.el index 6677c3b1b37..0e61e1ad90c 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -26,7 +26,7 @@ ;; This is a library for parsing and generating JSON (JavaScript Object ;; Notation). -;; Learn all about JSON here: . +;; Learn all about JSON here: . ;; The user-serviceable entry points for the parser are the functions ;; `json-read' and `json-read-from-string'. The encoder has a single diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index c12096f95eb..b64a237cf73 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el @@ -33,7 +33,7 @@ ;; are converted to Unicode internally. See ;; . For more info ;; on Cyrillic charsets, see -;; . The KOI and +;; . The KOI and ;; Alternativnyj coding systems should live in code-pages.el, but ;; they've always been preloaded and the coding system autoload ;; mechanism didn't get accepted, so they have to stay here and diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index fa971b33c7b..c9210c62514 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -36007,7 +36007,7 @@ Add a description of the problem and include a reproducible test case. Feel free to send questions and enhancement requests to . Official distribution is at -URL `http://www.iis.ee.ethz.ch/~zimmi/emacs/vera-mode.html' +URL `https://www.iis.ee.ethz.ch/~zimmi/emacs/vera-mode.html' The Vera Mode Maintainer diff --git a/lisp/leim/quail/ipa-praat.el b/lisp/leim/quail/ipa-praat.el index 0920bc79009..1a95395fd74 100644 --- a/lisp/leim/quail/ipa-praat.el +++ b/lisp/leim/quail/ipa-praat.el @@ -35,7 +35,7 @@ "ipa-praat" "IPA" "IPAP" t "International Phonetic Alphabet input method. This follows the input method of the phonetic analysis program -Praat (http://www.fon.hum.uva.nl/praat/). +Praat (https://www.fon.hum.uva.nl/praat/). * Vowels diff --git a/lisp/leim/quail/ipa.el b/lisp/leim/quail/ipa.el index e805c6ad3b2..c25687574ed 100644 --- a/lisp/leim/quail/ipa.el +++ b/lisp/leim/quail/ipa.el @@ -336,12 +336,12 @@ exchange in environments where Unicode is not available. This input method uses this transliteration to allow you to produce the IPA in your editor with a keyboard that's limited to ASCII. -See http://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf for a full definition +See https://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf for a full definition of the mapping.") (quail-define-rules ;; Table taken from https://en.wikipedia.org/wiki/X-SAMPA, checked with - ;; http://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf + ;; https://www.phon.ucl.ac.uk/home/sampa/ipasam-x.pdf ("d`" "ɖ") ;; Voiced retroflex plosive U+0256 ("g" "ɡ") ;; Voiced velar plosive U+0261 diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el index 8e21ed80130..10408776a2a 100644 --- a/lisp/leim/quail/latin-post.el +++ b/lisp/leim/quail/latin-post.el @@ -744,7 +744,7 @@ Doubling the postfix separates the letter and postfix: e.g. a\\='\\=' -> a\\=' ;;; correctly on most displays. ;;; This reference is an authoritative guide to Hawaiian orthography: -;;; http://www2.hawaii.edu/~strauch/tips/HawaiianOrthography.html +;;; https://www2.hawaii.edu/~strauch/tips/HawaiianOrthography.html ;;; Initial coding 2018-09-08 Bob Newell, Honolulu, Hawaiʻi ;;; Comments to bobnewell@bobnewell.net diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el index 22006547c45..b8b0fabfa84 100644 --- a/lisp/leim/quail/latin-pre.el +++ b/lisp/leim/quail/latin-pre.el @@ -1294,7 +1294,7 @@ of characters from a single Latin-N charset. ;;; correctly on most displays. ;;; This reference is an authoritative guide to Hawaiian orthography: -;;; http://www2.hawaii.edu/~strauch/tips/HawaiianOrthography.html +;;; https://www2.hawaii.edu/~strauch/tips/HawaiianOrthography.html ;;; Initial coding 2018-09-08 Bob Newell, Honolulu, Hawaiʻi ;;; Comments to bobnewell@bobnewell.net diff --git a/lisp/leim/quail/programmer-dvorak.el b/lisp/leim/quail/programmer-dvorak.el index 49f9d82bc0d..9e1e23c04bb 100644 --- a/lisp/leim/quail/programmer-dvorak.el +++ b/lisp/leim/quail/programmer-dvorak.el @@ -24,7 +24,7 @@ ;;; Commentary: ;;; This file provides an input method for the programmers Dvorak keyboard -;;; layout by Roland Kaufman (). +;;; layout by Roland Kaufman (). ;;; Code: diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index d76017b9944..cec573642ec 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -163,7 +163,7 @@ ;; (autoload 'feedmail-buffer-to-smtpmail "feedmail" nil t) ;; (setq feedmail-buffer-eating-function 'feedmail-buffer-to-smtpmail) ;; -;; Alternatively, the FLIM project +;; Alternatively, the FLIM project ;; provides a library called smtp.el. If you want to use that, the above lines ;; would be: ;; diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 11296a53b9d..1aac3374153 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -1907,7 +1907,7 @@ white image, can be generated using the \"compface\" command (see URL `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). The \"Online X-Face Converter\" is a useful resource for quick conversion of images into \"X-Face:\" header fields (see URL -`http://www.dairiki.org/xface/'). +`https://www.dairiki.org/xface/'). Use the \"make-face\" script to convert a JPEG image to the higher resolution, color, \"Face:\" header field (see URL @@ -2466,9 +2466,9 @@ of citations entirely, choose \"None\"." "Disposition-Notification-Options:" ; RFC 2298 "Disposition-Notification-To:" ; RFC 2298 "Distribution:" ; RFC 1036 - "DKIM-" ; http://antispam.yahoo.com/domainkeys + "DKIM-" ; https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail "DL-Expansion-History:" ; RFC 2156 - "DomainKey-" ; http://antispam.yahoo.com/domainkeys + "DomainKey-" ; https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail "DomainKey-Signature:" "Encoding:" ; RFC 1505 "Envelope-to:" @@ -2555,7 +2555,7 @@ of citations entirely, choose \"None\"." "X-Abuse-Info:" "X-Accept-Language:" ; Netscape/Mozilla "X-Ack:" - "X-ACL-Warn:" ; http://www.exim.org + "X-ACL-Warn:" ; https://www.exim.org "X-Admin:" ; https://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Administrivia-To:" "X-AMAZON" ; Amazon.com @@ -2579,8 +2579,8 @@ of citations entirely, choose \"None\"." "X-BFI:" "X-Bigfish:" "X-Bogosity:" ; bogofilter - "X-BPS1:" ; http://www.boggletools.com - "X-BPS2:" ; http://www.boggletools.com + "X-BPS1:" ; http://www.boggletools.com [dead link?] + "X-BPS2:" ; http://www.boggletools.com [dead link?] "X-Brightmail-Tracker:" ; Brightmail "X-BrightmailFiltered:" ; Brightmail "X-Bugzilla-" ; Bugzilla @@ -2596,12 +2596,12 @@ of citations entirely, choose \"None\"." "X-Confirm-Reading-To:" ; https://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Content-Filtered-By:" "X-ContentStamp:" ; NetZero - "X-Country-Chain:" ; http://www.declude.com/x-note.htm + "X-Country-Chain:" ; http://www.declude.com/x-note.htm [dead link?] "X-Cr-Hashedpuzzle:" "X-Cr-Puzzleid:" "X-Cron-Env:" "X-DCC-" ; SpamAssassin - "X-Declude-" ; http://www.declude.com/x-note.htm + "X-Declude-" ; http://www.declude.com/x-note.htm [dead link?] "X-Dedicated:" "X-Delivered" "X-Destination-ID:" @@ -2616,7 +2616,7 @@ of citations entirely, choose \"None\"." "X-EID:" "X-ELNK-Trace:" ; Earthlink mailer "X-EM-" ; Some ecommerce software - "X-Email-Type-Id:" ; Paypal http://www.paypal.com + "X-Email-Type-Id:" ; Paypal https://www.paypal.com "X-Enigmail-Version:" "X-Envelope-Date:" ; GNU mailutils "X-Envelope-From:" ; https://people.dsv.su.se/~jpalme/ietf/mail-headers/ @@ -2632,21 +2632,21 @@ of citations entirely, choose \"None\"." "X-Folder:" ; Spam "X-Forwarded-" ; Google+ "X-From-Line" - "X-FuHaFi:" ; http://www.gmx.net/ + "X-FuHaFi:" ; https://www.gmx.net/ "X-Generated-By:" ; launchpad.net "X-Gmail-" ; Gmail "X-Gnus-Mail-Source:" ; gnus "X-Google-" ; Google mail "X-Google-Sender-Auth:" "X-Greylist:" ; milter-greylist-1.2.1 - "X-Habeas-" ; http://www.returnpath.net + "X-Habeas-" ; https://www.returnpath.net "X-Hashcash:" ; hashcash "X-Headers-End:" ; SpamCop "X-HPL-" "X-HR-" "X-HTTP-UserAgent:" "X-Hz" ; Hertz - "X-Identity:" ; http://www.declude.com/x-note.htm + "X-Identity:" ; http://www.declude.com/x-note.htm [dead link?] "X-IEEE-UCE-" ; IEEE spam filter "X-Image-URL:" "X-IMAP:" ; https://people.dsv.su.se/~jpalme/ietf/mail-headers/ @@ -2667,7 +2667,7 @@ of citations entirely, choose \"None\"." "X-Loop:" ; https://people.dsv.su.se/~jpalme/ietf/mail-headers/ "X-Lrde-Mailscanner:" "X-Lumos-SenderID:" ; Roving ConstantContact - "X-mail_abuse_inquiries:" ; http://www.salesforce.com + "X-mail_abuse_inquiries:" ; https://www.salesforce.com "X-Mail-from:" ; fastmail.fm "X-MAIL-INFO:" ; NetZero "X-Mailer_" @@ -2680,11 +2680,11 @@ of citations entirely, choose \"None\"." "X-Mailutils-Message-Id" ; GNU Mailutils "X-Majordomo:" ; Majordomo mailing list manager "X-Match:" - "X-MaxCode-Template:" ; Paypal http://www.paypal.com + "X-MaxCode-Template:" ; Paypal https://www.paypal.com "X-MB-Message-" ; AOL WebMail "X-MDaemon-Deliver-To:" "X-MDRemoteIP:" - "X-ME-Bayesian:" ; http://www.newmediadevelopment.net/page.cfm/parent/Client-Area/content/Managing-spam/ + "X-ME-Bayesian:" ; https://www.newmediadevelopment.net/page.cfm/parent/Client-Area/content/Managing-spam/ "X-Message-Id" "X-Message-Type:" "X-MessageWall-Score:" ; Unknown mailing list manager, AUC TeX @@ -2755,7 +2755,7 @@ of citations entirely, choose \"None\"." "X-Server-Date:" "X-Server-Uuid:" "X-Service-Code:" - "X-SFDC-" ; http://www.salesforce.com + "X-SFDC-" ; https://www.salesforce.com "X-Sieve:" ; Sieve filtering "X-SMFBL:" "X-SMHeaderMap:" @@ -2770,7 +2770,7 @@ of citations entirely, choose \"None\"." "X-Submissions-To:" "X-Sun-Charset:" "X-Telecom-Digest" - "X-TM-IMSS-Message-ID:" ; http://www.trendmicro.com + "X-TM-IMSS-Message-ID:" ; https://www.trendmicro.com "X-Trace:" "X-UID" "X-UIDL:" ; https://people.dsv.su.se/~jpalme/ietf/mail-headers/ @@ -2790,10 +2790,10 @@ of citations entirely, choose \"None\"." "X-WebTV-Signature:" "X-Wss-Id:" ; Worldtalk gateways "X-X-Sender:" ; https://people.dsv.su.se/~jpalme/ietf/mail-headers/ - "X-XPT-XSL-Name:" ; Paypal http://www.paypal.com + "X-XPT-XSL-Name:" ; Paypal https://www.paypal.com "X-xsi-" - "X-XWALL-" ; http://www.dataenter.co.at/doc/xwall_undocumented_config.htm - "X-Y-GMX-Trusted:" ; http://www.gmx.net/ + "X-XWALL-" ; https://www.dataenter.co.at/doc/xwall_undocumented_config.htm + "X-Y-GMX-Trusted:" ; https://www.gmx.net/ "X-Yahoo" "X-Yahoo-Newman-" "X-YMail-" @@ -3039,7 +3039,7 @@ XEmacs. For more information, see URL `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent versions of XEmacs have internal support for \"X-Face:\" images. If your version of XEmacs does not, then you'll need both \"uncompface\" -and the x-face package (see URL `http://www.jpl.org/ftp/pub/elisp/'). +and the x-face package (see URL `https://www.jpl.org/ftp/pub/elisp/'). Finally, MH-E will display images referenced by the \"X-Image-URL:\" header field if neither the \"Face:\" nor the \"X-Face:\" fields are diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el index bf704c18577..0b53829b056 100644 --- a/lisp/mh-e/mh-xface.el +++ b/lisp/mh-e/mh-xface.el @@ -365,7 +365,7 @@ Replace the ?/ character with a ?! character and append .png. Also replaces special characters with `mh-url-hexify-string' since not all characters, such as :, are valid within Windows filenames. In addition, replaces * with %2a. See URL -`http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/iitemnamelimits/GetValidCharacters.asp'." +`https://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/ifaces/iitemnamelimits/GetValidCharacters.asp'." (format "%s/%s.png" mh-x-image-cache-directory (mh-replace-regexp-in-string "\\*" "%2a" diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 9c7bcdc261a..683abaaa04a 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -4,7 +4,7 @@ ;; Author: Ted Zlatanov ;; Keywords: comm, tls, ssl, encryption -;; Originally-By: Simon Josefsson (See http://josefsson.org/emacs-security/) +;; Originally-By: Simon Josefsson (See https://josefsson.org/emacs-security/) ;; Thanks-To: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index c5488650b99..1d3a5e0f7da 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -67,9 +67,9 @@ considered to be running if the newsticker timer list is not empty." ;; Hard-coding URLs like this is a recipe for propagating obsolete info. (defconst newsticker--raw-url-list-defaults '(("Debian Security Advisories" - "http://www.debian.org/security/dsa.en.rdf") + "https://www.debian.org/security/dsa.en.rdf") ("Debian Security Advisories - Long format" - "http://www.debian.org/security/dsa-long.en.rdf") + "https://www.debian.org/security/dsa-long.en.rdf") ("Emacs Wiki" "https://www.emacswiki.org/emacs?action=rss" nil @@ -77,7 +77,7 @@ considered to be running if the newsticker timer list is not empty." ("LWN (Linux Weekly News)" "https://lwn.net/headlines/rss") ("Quote of the day" - "http://feeds.feedburner.com/quotationspage/qotd" + "https://feeds.feedburner.com/quotationspage/qotd" "07:00" 86400) ("The Register" @@ -1012,7 +1012,7 @@ Argument BUFFER is the buffer of the retrieval process." ;; And another one (20050702)! If description is HTML ;; encoded and starts with a `<', wrap the whole ;; description in a CDATA expression. This happened for - ;; http://www.thefreedictionary.com/_/WoD/rss.aspx?type=quote + ;; https://www.thefreedictionary.com/_/WoD/rss.aspx?type=quote (goto-char (point-min)) (while (re-search-forward "\\(" nil t) @@ -1176,7 +1176,7 @@ URL `http://www.atompub.org/2005/08/17/draft-ietf-atompub-format-11.html'" ;; unxml the content or the summary node. Atom ;; allows for integrating (x)html into the atom ;; structure but we need the raw html string. - ;; e.g. http://www.heise.de/open/news/news-atom.xml + ;; e.g. https://www.heise.de/open/news/news-atom.xml ;; http://feeds.feedburner.com/ru_nix_blogs (or (newsticker--unxml (car (xml-node-children diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index 705bff666af..76b1ef37640 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el @@ -4,7 +4,7 @@ ;; Author: Ulf Jasper ;; Filename: newst-plainview.el -;; URL: http://www.nongnu.org/newsticker +;; URL: https://www.nongnu.org/newsticker ;; Package: newsticker ;; ====================================================================== diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el index 0ce65a35ead..1d9ee6db86c 100644 --- a/lisp/net/nsm.el +++ b/lisp/net/nsm.el @@ -640,7 +640,7 @@ References: [1]: Sotirov A, Stevens M et al (2008). \"MD5 considered harmful today - Creating a rogue CA certificate\", -`http://www.win.tue.nl/hashclash/rogue-ca/' +`https://www.win.tue.nl/hashclash/rogue-ca/' [2]: Turner S, Chen L (2011). \"Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms\", `https://tools.ietf.org/html/rfc6151'" diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index 45a69a73f35..3d4b9f87414 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el @@ -26,7 +26,7 @@ ;; specified in rng-pttrn.el. ;; ;; RELAX NG Compact Syntax is specified by -;; http://relaxng.org/compact.html +;; https://relaxng.org/compact.html ;; ;; This file uses the prefix "rng-c-". diff --git a/lisp/nxml/rng-xsd.el b/lisp/nxml/rng-xsd.el index 81314b85ca9..9941aba6eb1 100644 --- a/lisp/nxml/rng-xsd.el +++ b/lisp/nxml/rng-xsd.el @@ -24,14 +24,14 @@ ;; The main entry point is `rng-xsd-compile'. The validator ;; knows to use this for the datatype library with URI -;; http://www.w3.org/2001/XMLSchema-datatypes because it +;; https://www.w3.org/2001/XMLSchema-datatypes because it ;; is the value of the rng-dt-compile property on that URI ;; as a symbol. ;; ;; W3C XML Schema Datatypes are specified by -;; http://www.w3.org/TR/xmlschema-2/ +;; https://www.w3.org/TR/xmlschema-2/ ;; Guidelines for using them with RELAX NG are described in -;; http://relaxng.org/xsd.html +;; https://relaxng.org/xsd.html ;;; Code: diff --git a/lisp/obsolete/bruce.el b/lisp/obsolete/bruce.el index 4aa6cd200e7..1c3581f7d05 100644 --- a/lisp/obsolete/bruce.el +++ b/lisp/obsolete/bruce.el @@ -30,7 +30,7 @@ ;; Decency Act of 1996. This Act bans "indecent speech", whatever that is, ;; from the Internet. For more on the CDA, see Richard Stallman's essay on ;; censorship, included in the etc directory of emacs distributions 19.34 -;; and up. See also http://www.eff.org/blueribbon.html. +;; and up. See also https://www.eff.org/blueribbon.html. ;; For many years, emacs has included a program called Spook. This program ;; adds a series of "keywords" to email just before it goes out. On the diff --git a/lisp/obsolete/inversion.el b/lisp/obsolete/inversion.el index e61b36cd88b..ac7749af5e8 100644 --- a/lisp/obsolete/inversion.el +++ b/lisp/obsolete/inversion.el @@ -454,7 +454,7 @@ If it is a URL, wget will be used for download. Optional argument VERSION will restrict the list of available versions to the file matching VERSION exactly, or nil." ;;DIRECTORY should also allow a URL: -;; \"http://ftp1.sourceforge.net/PACKAGE\" +;; \"https://ftp1.sourceforge.net/PACKAGE\" ;; but then I can get file listings easily. (if (symbolp package) (setq package (symbol-name package))) (directory-files directory t diff --git a/lisp/obsolete/nnir.el b/lisp/obsolete/nnir.el index fef76ba327d..f2ea5c67ceb 100644 --- a/lisp/obsolete/nnir.el +++ b/lisp/obsolete/nnir.el @@ -274,7 +274,7 @@ that it is for swish++, not Namazu." :type '(regexp)) ;; Swish-E. -;; URL: http://swish-e.org/ +;; URL: http://swish-e.org/ [dead link?] ;; Variables `nnir-swish-e-index-files', `nnir-swish-e-program' and ;; `nnir-swish-e-additional-switches' @@ -311,7 +311,7 @@ that it is for swish-e, not Namazu. This could be a server parameter." :type '(regexp)) -;; HyREX engine, see +;; HyREX engine, see [dead link?] (defcustom nnir-hyrex-program "nnir-search" "Name of the nnir-search executable." diff --git a/lisp/obsolete/terminal.el b/lisp/obsolete/terminal.el index d28c4a172fd..dbfc79bf913 100644 --- a/lisp/obsolete/terminal.el +++ b/lisp/obsolete/terminal.el @@ -32,7 +32,7 @@ ;; For information on US government censorship of the Internet, and ;; what you can do to bring back freedom of the press, see the web -;; site http://www.vtw.org/ +;; site https://www.eff.org/ [used to be vtw.org but that link is dead] ;;; Code: diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el index 00e7d26cd75..cfbf981d3c8 100644 --- a/lisp/obsolete/vc-arch.el +++ b/lisp/obsolete/vc-arch.el @@ -26,7 +26,7 @@ ;; The home page of the Arch version control system is at ;; -;; http://www.gnuarch.org/ +;; https://www.gnu.org/software/gnu-arch/ ;; ;; This is derived from vc-mcvs.el as follows: ;; - cp vc-mcvs.el vc-arch.el and then M-% mcvs RET arch RET diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index df2d691f68b..9834509fb03 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el @@ -38,7 +38,7 @@ ;; For SLIME, the best way to install these components is by following ;; the directions as set out by Phil Hagelberg (Technomancy) on the -;; web page: http://technomancy.us/126 +;; web page: https://technomancy.us/126 ;;; Code: (require 'ob) diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el index 0aa91afdb24..5fd6d1e09ff 100644 --- a/lisp/org/ob-ocaml.el +++ b/lisp/org/ob-ocaml.el @@ -32,7 +32,7 @@ ;;; Requirements: -;; - tuareg-mode :: http://www-rocq.inria.fr/~acohen/tuareg/ +;; - tuareg-mode :: https://www-rocq.inria.fr/~acohen/tuareg/ ;;; Code: (require 'ob) diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el index 084f0e66bc8..fd147101b69 100644 --- a/lisp/pcmpl-x.el +++ b/lisp/pcmpl-x.el @@ -27,7 +27,7 @@ (require 'pcomplete) -;;;; tlmgr - http://www.tug.org/texlive/tlmgr.html +;;;; tlmgr - https://www.tug.org/texlive/tlmgr.html (defcustom pcmpl-x-tlmgr-program "tlmgr" "Name of the tlmgr program." diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 46fd852b4c5..bf923f4f2e5 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -1583,7 +1583,7 @@ Hack on previous word, setting global variable DOCTOR-OWNER to correct result." E-mail: jo@samaritans.org or\, at your option\, anonymous E-mail: samaritans@anon.twwells.com\ \. or find a Befrienders crisis center at - http://www.befrienders.org/\ \. + https://www.befrienders.org/\ \. (doc$ doctor--please) (doc$ doctor--continue) \.))) (t (doctor-type (doc$ doctor--deathlst))))) diff --git a/lisp/play/morse.el b/lisp/play/morse.el index 8e09c225059..91dc687d195 100644 --- a/lisp/play/morse.el +++ b/lisp/play/morse.el @@ -146,7 +146,7 @@ "NATO phonetic alphabet. See “International Code of Signals” (INTERCO), United States Edition, 1969 Edition (Revised 2003) available from National -Geospatial-Intelligence Agency at URL `http://www.nga.mil/'") +Geospatial-Intelligence Agency at URL `https://www.nga.mil/'") ;;;###autoload (defun morse-region (beg end) diff --git a/lisp/printing.el b/lisp/printing.el index f5d3c82ae95..b9a2e33994a 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -264,7 +264,7 @@ Please send all bug fixes and enhancements to ;; Also the gsprint utility comes together with gsview distribution. ;; ;; For more information about gsprint see -;; `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. +;; `https://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. ;; ;; As an example of gsprint declaration: ;; @@ -950,18 +950,18 @@ Please send all bug fixes and enhancements to ;; * For GNU or Unix system: ;; ;; gs, gv `https://www.gnu.org/software/ghostscript/ghostscript.html' -;; enscript `http://people.ssh.fi/mtr/genscript/' +;; enscript `https://people.ssh.fi/mtr/genscript/' ;; psnup `http://www.knackered.org/angus/psutils/' -;; mpage `http://www.mesa.nl/pub/mpage/' +;; mpage `https://www.mesa.nl/pub/mpage/' ;; ;; * For Windows system: ;; ;; gswin32, gsview32 ;; `https://www.gnu.org/software/ghostscript/ghostscript.html' -;; gsprint `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. -;; enscript `http://people.ssh.fi/mtr/genscript/' +;; gsprint `https://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. +;; enscript `https://people.ssh.fi/mtr/genscript/' ;; psnup `http://gnuwin32.sourceforge.net/packages/psutils.htm' -;; redmon `http://www.cs.wisc.edu/~ghost/redmon/' +;; redmon `http://www.ghostgum.com.au/software/redmon.htm' ;; ;; ;; Acknowledgments @@ -1520,22 +1520,19 @@ Examples: Useful links: * Information about the print command (print.exe) - `http://www.computerhope.com/printhlp.htm' + `https://www.computerhope.com/printhlp.htm' * RedMon - Redirection Port Monitor (redpr.exe) - `http://www.cs.wisc.edu/~ghost/redmon/index.htm' + `http://www.ghostgum.com.au/software/redmon.htm' * Redirection Port Monitor (redpr.exe on-line help) - `http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' + `https://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' * UNIX man pages: lpr (or type `man lpr') - `http://bama.ua.edu/cgi-bin/man-cgi?lpr' - `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lpr' + `https://linux.die.net/man/1/lpr-cups' * UNIX man pages: lp (or type `man lp') - `http://bama.ua.edu/cgi-bin/man-cgi?lp' - `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' -" + `https://linux.die.net/man/1/lp'" :type '(repeat (list :tag "Text Printer" (symbol :tag "Printer Symbol Name") @@ -1760,30 +1757,28 @@ are not printed. Useful links: * GSPRINT - Ghostscript print to Windows printer - `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm' + `https://www.cs.wisc.edu/~ghost/gsview/gsprint.htm' * Introduction to Ghostscript - `http://www.cs.wisc.edu/~ghost/doc/intro.htm' + `https://www.cs.wisc.edu/~ghost/doc/intro.htm' * How to use Ghostscript - `http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' + `https://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' * Information about the print command (print.exe) - `http://www.computerhope.com/printhlp.htm' + `https://www.computerhope.com/printhlp.htm' * RedMon - Redirection Port Monitor (redpr.exe) - `http://www.cs.wisc.edu/~ghost/redmon/index.htm' + `http://www.ghostgum.com.au/software/redmon.htm' * Redirection Port Monitor (redpr.exe on-line help) - `http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' + `https://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' * UNIX man pages: lpr (or type `man lpr') - `http://bama.ua.edu/cgi-bin/man-cgi?lpr' - `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lpr' + `https://linux.die.net/man/1/lpr-cups' * UNIX man pages: lp (or type `man lp') - `http://bama.ua.edu/cgi-bin/man-cgi?lp' - `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' + `https://linux.die.net/man/1/lp' * GNU utilities for w32 (cp.exe) `http://unxutils.sourceforge.net/' @@ -1873,28 +1868,28 @@ Useful links: `https://www.gnu.org/software/gv/manual/gv.html' * GSview Help - `http://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm' + `https://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm' * GSview Help - Common Problems - `http://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm#Common_Problems' + `https://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm#Common_Problems' * GSview Readme (compilation & installation) - `http://www.cs.wisc.edu/~ghost/gsview/Readme.htm' + `https://www.cs.wisc.edu/~ghost/gsview/Readme.htm' * GSview (main site) - `http://www.cs.wisc.edu/~ghost/gsview/index.htm' + `https://www.cs.wisc.edu/~ghost/gsview/index.htm' * Ghostscript, Ghostview and GSview - `http://www.cs.wisc.edu/~ghost/' + `https://www.cs.wisc.edu/~ghost/' * Ghostview - `http://www.cs.wisc.edu/~ghost/gv/index.htm' + `https://www.cs.wisc.edu/~ghost/gv/index.htm' * gv 3.5, June 1997 - `http://www.cs.wisc.edu/~ghost/gv/gv_doc/gv.html' + `http://pages.cs.wisc.edu/~ghost/gv/gv_doc/gv.html' * MacGSView (Mac OS) - `http://www.cs.wisc.edu/~ghost/macos/index.htm' + `http://pages.cs.wisc.edu/~ghost/macos/index.htm' " :type '(string :tag "Ghostview Utility")) @@ -1910,16 +1905,16 @@ See also `pr-path-alist'. Useful links: * Ghostscript, Ghostview and GSview - `http://www.cs.wisc.edu/~ghost/' + `https://www.cs.wisc.edu/~ghost/' * Introduction to Ghostscript - `http://www.cs.wisc.edu/~ghost/doc/intro.htm' + `https://www.cs.wisc.edu/~ghost/doc/intro.htm' * How to use Ghostscript - `http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' + `https://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' * Printer compatibility - `http://www.cs.wisc.edu/~ghost/doc/printer.htm' + `https://www.cs.wisc.edu/~ghost/doc/printer.htm' " :type '(string :tag "Ghostscript Utility")) @@ -1954,13 +1949,13 @@ To see ghostscript documentation for more information: Useful links: * Introduction to Ghostscript - `http://www.cs.wisc.edu/~ghost/doc/intro.htm' + `https://www.cs.wisc.edu/~ghost/doc/intro.htm' * How to use Ghostscript - `http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' + `https://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' * Printer compatibility - `http://www.cs.wisc.edu/~ghost/doc/printer.htm' + `https://www.cs.wisc.edu/~ghost/doc/printer.htm' " :type '(repeat (string :tag "Ghostscript Switch"))) @@ -2407,11 +2402,10 @@ Examples: Useful links: * mpage download (GNU or Unix) - `http://www.mesa.nl/pub/mpage/' + `https://www.mesa.nl/pub/mpage/' * mpage documentation (GNU or Unix - or type `man mpage') - `http://www.cs.umd.edu/faq/guides/manual_unix/node48.html' - `http://www.rt.com/man/mpage.1.html' + `https://linux.die.net/man/1/mpage' * psnup (Windows, GNU or Unix) `http://www.knackered.org/angus/psutils/' @@ -2421,14 +2415,13 @@ Useful links: `http://gnuwin32.sourceforge.net/packages/psutils.htm' * psnup documentation (GNU or Unix - or type `man psnup') - `http://linux.about.com/library/cmd/blcmdl1_psnup.htm' - `http://amath.colorado.edu/computing/software/man/psnup.html' + `https://linux.die.net/man/1/psnup' * GNU Enscript (Windows, GNU or Unix) - `http://people.ssh.com/mtr/genscript/' + `https://people.ssh.com/mtr/genscript/' * GNU Enscript documentation (Windows, GNU or Unix) - `http://people.ssh.com/mtr/genscript/enscript.man.html' + `https://people.ssh.com/mtr/genscript/enscript.man.html' (on GNU or Unix, type `man enscript') " :type '(repeat diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 8a1d441773a..2a4b3482831 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -33,7 +33,7 @@ ;; the manual style, follow all commands mentioned in the documentation of ;; `antlr-mode'. ANTLR is a LL(k)-based recognition tool which generates ;; lexers, parsers and tree transformers in Java, C++ or Sather and can be -;; found at . +;; found at . ;; Bug fixes, bug reports, improvements, and suggestions for the newest version ;; are strongly appreciated. diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el index 99b339e2237..2a37110f6ae 100644 --- a/lisp/progmodes/ebnf-abn.el +++ b/lisp/progmodes/ebnf-abn.el @@ -39,10 +39,6 @@ ;; ;; See the URL: ;; `https://www.ietf.org/rfc/rfc2234.txt' -;; or -;; `http://www.faqs.org/rfcs/rfc2234.html' -;; or -;; `http://www.rnp.br/ietf/rfc/rfc2234.txt' ;; ("Augmented BNF for Syntax Specifications: ABNF"). ;; ;; diff --git a/lisp/progmodes/ebnf-iso.el b/lisp/progmodes/ebnf-iso.el index 12cc72ce1c7..b4532c76251 100644 --- a/lisp/progmodes/ebnf-iso.el +++ b/lisp/progmodes/ebnf-iso.el @@ -38,7 +38,7 @@ ;; --------------- ;; ;; See the URL: -;; `http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' +;; `https://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' ;; ("International Standard of the ISO EBNF Notation"). ;; ;; diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index c95b351d0c7..7092d2c1d1f 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -330,7 +330,7 @@ Please send all bug fixes and enhancements to ;; ("Augmented BNF for Syntax Specifications: ABNF"). ;; ;; `iso-ebnf' ebnf2ps recognizes the syntax described in the URL: -;; `http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' +;; `https://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' ;; ("International Standard of the ISO EBNF Notation"). ;; The following variables *ONLY* have effect with this ;; setting: @@ -1783,7 +1783,7 @@ Valid values are: (\"Augmented BNF for Syntax Specifications: ABNF\"). `iso-ebnf' ebnf2ps recognizes the syntax described in the URL: - `http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' + `https://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' (\"International Standard of the ISO EBNF Notation\"). The following variables *ONLY* have effect with this setting: diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index a8a86478d8b..196f2de3440 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -491,8 +491,8 @@ Non-nil means always go to the next Octave code line after sending." 'font-lock-keyword-face) ;; Note: 'end' also serves as the last index in an indexing expression, ;; and 'enumerate' is also a function. - ;; Ref: http://www.mathworks.com/help/matlab/ref/end.html - ;; Ref: http://www.mathworks.com/help/matlab/ref/enumeration.html + ;; Ref: https://www.mathworks.com/help/matlab/ref/end.html + ;; Ref: https://www.mathworks.com/help/matlab/ref/enumeration.html (list (lambda (limit) (while (re-search-forward "\\_" limit 'move) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 3f8afd97050..84ac8fdb281 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -331,7 +331,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." (require 'smie) ;; Here's a simplified BNF grammar, for reference: -;; http://www.cse.buffalo.edu/~regan/cse305/RubyBNF.pdf +;; https://www.cse.buffalo.edu/~regan/cse305/RubyBNF.pdf (defconst ruby-smie-grammar (smie-prec2->grammar (smie-merge-prec2s diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 72ac2d95a21..b6972846cde 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -28,7 +28,7 @@ ;; the Lisp mode documented in the Emacs manual. `dsssl-mode' is a ;; variant of scheme-mode for editing DSSSL specifications for SGML ;; documents. [As of Apr 1997, some pointers for DSSSL may be found, -;; for instance, at .] +;; for instance, at .] ;; All these Lisp-ish modes vary basically in details of the language ;; syntax they highlight/indent/index, but dsssl-mode uses "^;;;" as ;; the page-delimiter since ^L isn't normally a valid SGML character. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index f1f4d61324b..6224b3b5f3f 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2992,7 +2992,7 @@ displayed." ;; (defconst sql-smie-grammar ;; (smie-prec2->grammar ;; (smie-bnf->prec2 -;; ;; Partly based on http://www.h2database.com/html/grammar.html +;; ;; Partly based on https://www.h2database.com/html/grammar.html ;; '((cmd ("SELECT" select-exp "FROM" select-table-exp) ;; ) ;; (select-exp ("*") (exp) (exp "AS" column-alias)) diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el index 036b2f447bf..4622256bb9c 100644 --- a/lisp/progmodes/vera-mode.el +++ b/lisp/progmodes/vera-mode.el @@ -5,7 +5,7 @@ ;; Author: Reto Zimmermann ;; Version: 2.28 ;; Keywords: languages vera -;; WWW: http://www.iis.ee.ethz.ch/~zimmi/emacs/vera-mode.html +;; WWW: https://guest.iis.ee.ethz.ch/~zimmi/emacs/vera-mode.html ;; Yoni Rabkin contacted the maintainer of this ;; file on 18/3/2008, and the maintainer agreed that when a bug is @@ -249,7 +249,7 @@ Add a description of the problem and include a reproducible test case. Feel free to send questions and enhancement requests to . Official distribution is at -URL `http://www.iis.ee.ethz.ch/~zimmi/emacs/vera-mode.html' +URL `https://www.iis.ee.ethz.ch/~zimmi/emacs/vera-mode.html' The Vera Mode Maintainer diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index c8e55da642f..856432ccf10 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -6,7 +6,7 @@ ;; Rodney J. Whitby ;; Maintainer: Reto Zimmermann ;; Keywords: languages vhdl -;; WWW: http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html +;; WWW: https://guest.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html ;; Yoni Rabkin contacted the maintainer of this ;; file on 18/3/2008, and the maintainer agreed that when a bug is diff --git a/lisp/repeat.el b/lisp/repeat.el index 84a613da0cf..a2b04b81b03 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -180,7 +180,7 @@ this function is always whether the value of `this-command' would've been (= repeat-num-input-keys-at-repeat num-input-keys)) ;; An example of the use of (repeat-is-really-this-command) may still be -;; available in ; search for +;; available in ; search for ;; "defun wm-switch-buffer". ;;;;; ******************* THE REPEAT COMMAND ITSELF ******************* ;;;;; diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 3d081220910..dc45a7306d8 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -6,7 +6,7 @@ ;; Keywords: mouse ;; Old-Version: 1.2.6 ;; Release-date: 6-Aug-2004 -;; Location: http://www.lysator.liu.se/~tab/artist/ +;; Location: https://www.lysator.liu.se/~tab/artist/ ;; Yoni Rabkin contacted the maintainer of this ;; file on 19/3/2008, and the maintainer agreed that when a bug is filed in diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el index 820033486dc..6d01871bc52 100644 --- a/lisp/textmodes/bibtex-style.el +++ b/lisp/textmodes/bibtex-style.el @@ -49,7 +49,7 @@ "REVERSE" "SORT" "STRINGS")) (defconst bibtex-style-functions - ;; From http://www.eeng.dcu.ie/local-docs/btxdocs/btxhak/btxhak/node4.html. + ;; From https://www.eeng.dcu.ie/local-docs/btxdocs/btxhak/btxhak/node4.html. '("<" ">" "=" "+" "-" "*" ":=" "add.period$" "call.type$" "change.case$" "chr.to.int$" "cite$" "duplicate$" "empty$" "format.name$" "if$" "int.to.chr$" "int.to.str$" diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 301f7017e41..f01c66b1584 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1431,7 +1431,7 @@ If `bibtex-expand-strings' is non-nil, BibTeX strings are expanded for generating the URL. Set this variable before loading BibTeX mode. -The following is a complex example, see URL `http://link.aps.org/'. +The following is a complex example, see URL `https://link.aps.org/'. (((\"journal\" . \"\\\\=<\\(PR[ABCDEL]?\\|RMP\\)\\\\=>\") \"http://link.aps.org/abstract/%s/v%s/p%s\" diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 622853da456..47b0b517ae0 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -427,7 +427,7 @@ "paged-y" "paged-x-controls" "paged-y-controls" "fragments") ;; CSS Text Decoration Module Level 3 - ;; (http://dev.w3.org/csswg/css-text-decor-3/#property-index) + ;; (https://dev.w3.org/csswg/css-text-decor-3/#property-index) ("text-decoration" text-decoration-line text-decoration-style text-decoration-color) ("text-decoration-color" color) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 7de5317b025..6958ab8f658 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -2368,7 +2368,7 @@ or Edit/Text Properties/Face commands. Pages can have named points and can link other points to them with see also somename. In the same way see also URL where URL is a filename relative to current -directory, or absolute as in `http://www.cs.indiana.edu/elisp/w3/docs.html'. +directory, or absolute as in `https://www.cs.indiana.edu/elisp/w3/docs.html'. Images in many formats can be inlined with . diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index a9f066c4da4..13b4a6d05b0 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -2911,11 +2911,11 @@ HTML: URL `https://www.w3.org' LaTeX: - URL `http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html' + URL `https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html' CALS (DocBook DTD): - URL `http://www.oasis-open.org/html/a502.htm' - URL `http://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751' + URL `https://www.oasis-open.org/html/a502.htm' + URL `https://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751' " (interactive (let* ((_ (unless (table--probe-cell) (error "Table not found here"))) diff --git a/lisp/url/ChangeLog.1 b/lisp/url/ChangeLog.1 index 5a3bf3afd1a..cdd37a64cdd 100644 --- a/lisp/url/ChangeLog.1 +++ b/lisp/url/ChangeLog.1 @@ -2337,7 +2337,7 @@ recurse when retrieving the property lists. Returns an assoc list keyed off of the resource, the cdr of which is a property list. (url-dav-datatype-attribute): We support the XML-Data note - (http://www.w3.org/TR/1998/NOTE-XML-data) to figure out what the + (https://www.w3.org/TR/1998/NOTE-XML-data) to figure out what the datatypes of attributes are. Currently only date, dateTime, int, number, float, boolean, and uri are supported. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 085159cb500..27f4f88cb89 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -60,7 +60,7 @@ (defcustom url-cookie-multiple-line nil "If nil, HTTP requests put all cookies for the server on one line. -Some web servers, such as http://www.hotmail.com/, only accept cookies +Some web servers, such as https://www.hotmail.com/, only accept cookies when they are on one line. This is broken behavior, but just try telling Microsoft that." :type 'boolean diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 342b4cc32b1..2c72c45f4b2 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2826,7 +2826,7 @@ hunk text is not found in the source file." ;;; Support for converting a diff to diff3 markers via `wiggle'. -;; Wiggle can be found at http://neil.brown.name/wiggle/ or in your nearest +;; Wiggle can be found at https://neil.brown.name/wiggle/ or in your nearest ;; Debian repository. (defun diff-wiggle () diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 465ed8735c2..fda8605c679 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -252,7 +252,7 @@ included in the completions." ;; Do not use the `file-name-directory' here: git-ls-files ;; sometimes fails to return the correct status for relative ;; path specs. - ;; See also: http://marc.info/?l=git&m=125787684318129&w=2 + ;; See also: https://marc.info/?l=git&m=125787684318129&w=2 (name (file-relative-name file dir)) (str (with-demoted-errors "Error: %S" (cd dir) -- cgit v1.2.3 From 1760029b092724271f9527543dbd9830b377704f Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 5 Apr 2021 01:13:54 +0200 Subject: Replace local intersection functions with seq-intersection * lisp/doc-view.el (doc-view-intersection): * lisp/gnus/gnus-range.el (gnus-intersection): * lisp/htmlfontify.el (hfy-interq): * lisp/loadhist.el (file-set-intersect): * lisp/mail/smtpmail.el (smtpmail-intersection): Make obsolete in favor of seq-intersection. Update all callers. * lisp/url/url-dav.el (url-intersection): Redefine as obsolete function alias for seq-intersection. Update callers. * lisp/mpc.el (mpc-intersection, mpc-cmd-list, mpc-reorder): Use seq-intersection. --- lisp/doc-view.el | 13 +++++++------ lisp/gnus/gnus-art.el | 5 +++-- lisp/gnus/gnus-range.el | 8 ++------ lisp/gnus/gnus-uu.el | 2 +- lisp/gnus/nndiary.el | 2 +- lisp/htmlfontify.el | 20 ++++++++++---------- lisp/loadhist.el | 15 ++++++++------- lisp/mail/smtpmail.el | 18 +++++++++--------- lisp/mpc.el | 14 ++++++-------- lisp/net/newst-backend.el | 1 + lisp/url/url-dav.el | 17 ++++------------- 11 files changed, 52 insertions(+), 63 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/lisp/doc-view.el b/lisp/doc-view.el index cef09009d95..0ae22934b2c 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1802,11 +1802,6 @@ If BACKWARD is non-nil, jump to the previous match." (remove-overlays (point-min) (point-max) 'doc-view t) (if (consp image-mode-winprops-alist) (setq image-mode-winprops-alist nil))) -(defun doc-view-intersection (l1 l2) - (let ((l ())) - (dolist (x l1) (if (memq x l2) (push x l))) - l)) - (defun doc-view-set-doc-type () "Figure out the current document type (`doc-view-doc-type')." (let ((name-types @@ -1841,7 +1836,7 @@ If BACKWARD is non-nil, jump to the previous match." ((looking-at "AT&TFORM") '(djvu)))))) (setq-local doc-view-doc-type - (car (or (doc-view-intersection name-types content-types) + (car (or (nreverse (seq-intersection name-types content-types #'eq)) (when (and name-types content-types) (error "Conflicting types: name says %s but content says %s" name-types content-types)) @@ -2146,6 +2141,12 @@ See the command `doc-view-mode' for more information on this mode." (add-hook 'bookmark-after-jump-hook show-fn-sym) (bookmark-default-handler bmk))) +;; Obsolete. + +(defun doc-view-intersection (l1 l2) + (declare (obsolete seq-intersection "28.1")) + (nreverse (seq-intersection l1 l2 #'eq))) + (provide 'doc-view) ;; Local Variables: diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c1071c1c68c..d989a4d5bb5 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6648,9 +6648,10 @@ not have a face in `gnus-article-boring-faces'." (catch 'only-boring (while (re-search-forward "\\b\\w\\w" nil t) (forward-char -1) - (when (not (gnus-intersection + (when (not (seq-intersection (gnus-faces-at (point)) - (symbol-value 'gnus-article-boring-faces))) + (symbol-value 'gnus-article-boring-faces) + #'eq)) (throw 'only-boring nil))) (throw 'only-boring t)))))) diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el index 6cc60cb49b3..456209f3d9a 100644 --- a/lisp/gnus/gnus-range.el +++ b/lisp/gnus/gnus-range.el @@ -179,12 +179,8 @@ Both lists have to be sorted over <." ;;;###autoload (defun gnus-intersection (list1 list2) - (let ((result nil)) - (while list2 - (when (memq (car list2) list1) - (setq result (cons (car list2) result))) - (setq list2 (cdr list2))) - result)) + (declare (obsolete seq-intersection "28.1")) + (nreverse (seq-intersection list1 list2 #'eq))) ;;;###autoload (defun gnus-sorted-intersection (list1 list2) diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index bd9a1a33ec3..5cbe8495d31 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -578,7 +578,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defun gnus-new-processable (unmarkp articles) (if unmarkp - (gnus-intersection gnus-newsgroup-processable articles) + (nreverse (seq-intersection gnus-newsgroup-processable articles #'eq)) (gnus-set-difference articles gnus-newsgroup-processable))) (defun gnus-uu-mark-by-regexp (regexp &optional unmark) diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 15003fabcd2..adf4427523f 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -558,7 +558,7 @@ all. This may very well take some time.") (nnmail-activate 'nndiary) ;; Articles not listed in active-articles are already gone, ;; so don't try to expire them. - (setq articles (gnus-intersection articles active-articles)) + (setq articles (nreverse (seq-intersection articles active-articles #'eq))) (while articles (setq article (nndiary-article-to-file (setq number (pop articles)))) (if (and (nndiary-deletable-article-p group number) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 550083d0e28..b453061388f 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -528,15 +528,6 @@ therefore no longer care about) will be invalid at any time.\n (group xdigit xdigit) (group xdigit xdigit))) -(defun hfy-interq (set-a set-b) - "Return the intersection (using `eq') of two lists SET-A and SET-B." - (let ((sa set-a) (interq nil) (elt nil)) - (while sa - (setq elt (car sa) - sa (cdr sa)) - (if (memq elt set-b) (setq interq (cons elt interq)))) - interq)) - (defun hfy-color-vals (color) "Where COLOR is a color name or #XXXXXX style triplet, return a list of three (16 bit) rgb values for said color.\n @@ -884,7 +875,9 @@ See also `hfy-display-class' for details of valid values for CLASS." (setq score 0) (ignore "t match")) ((not (cdr (assq key face-class))) ;Neither good nor bad. nil (ignore "non match, non collision")) - ((setq x (hfy-interq val (cdr (assq key face-class)))) + ((setq x (nreverse + (seq-intersection val (cdr (assq key face-class)) + #'eq))) (setq score (+ score (length x))) (ignore "intersection")) (t ;; nope. @@ -2352,6 +2345,13 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'." (let ((file (hfy-initfile))) (load file 'NOERROR nil nil) )) +;; Obsolete. + +(defun hfy-interq (set-a set-b) + "Return the intersection (using `eq') of two lists SET-A and SET-B." + (declare (obsolete seq-intersection "28.1")) + (nreverse (seq-intersection set-a set-b #'eq))) + (provide 'htmlfontify) ;;; htmlfontify.el ends here diff --git a/lisp/loadhist.el b/lisp/loadhist.el index a60d6b29095..59c002d3078 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -82,12 +82,6 @@ A library name is equivalent to the file name that `load-library' would load." (when (eq (car-safe x) 'require) (push (cdr x) requires))))) -(defsubst file-set-intersect (p q) - "Return the set intersection of two lists." - (let (ret) - (dolist (x p ret) - (when (memq x q) (push x ret))))) - (defun file-dependents (file) "Return the list of loaded libraries that depend on FILE. This can include FILE itself. @@ -97,7 +91,7 @@ A library name is equivalent to the file name that `load-library' would load." (dependents nil)) (dolist (x load-history dependents) (when (and (stringp (car x)) - (file-set-intersect provides (file-requires (car x)))) + (seq-intersection provides (file-requires (car x)) #'eq)) (push (car x) dependents))))) (defun read-feature (prompt &optional loaded-p) @@ -322,6 +316,13 @@ something strange, such as redefining an Emacs function." ;; Don't return load-history, it is not useful. nil) +;; Obsolete. + +(defsubst file-set-intersect (p q) + "Return the set intersection of two lists." + (declare (obsolete seq-intersection "28.1")) + (nreverse (seq-intersection p q #'eq))) + (provide 'loadhist) ;;; loadhist.el ends here diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index ac5e8c3b6fb..ab58aa455e9 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -489,13 +489,6 @@ for `smtpmail-try-auth-method'.") recipient (concat recipient "@" smtpmail-sendto-domain))) -(defun smtpmail-intersection (list1 list2) - (let ((result nil)) - (dolist (el2 list2) - (when (memq el2 list1) - (push el2 result))) - (nreverse result))) - (defun smtpmail-command-or-throw (process string &optional code) (let (ret) (smtpmail-send-command process string) @@ -512,9 +505,10 @@ for `smtpmail-try-auth-method'.") (if port (format "%s" port) "smtp")) - (let* ((mechs (smtpmail-intersection + (let* ((mechs (seq-intersection + smtpmail-auth-supported (cdr-safe (assoc 'auth supported-extensions)) - smtpmail-auth-supported)) + #'eq)) (auth-source-creation-prompts '((user . "SMTP user name for %h: ") (secret . "SMTP password for %u@%h: "))) @@ -1087,6 +1081,12 @@ many continuation lines." (while (and (looking-at "^[ \t].*\n") (< (point) header-end)) (replace-match "")))))) +;; Obsolete. + +(defun smtpmail-intersection (list1 list2) + (declare (obsolete seq-intersection "28.1")) + (seq-intersection list2 list1 #'eq)) + (provide 'smtpmail) ;;; smtpmail.el ends here diff --git a/lisp/mpc.el b/lisp/mpc.el index 827f8aacdd6..315d8c0626d 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -129,12 +129,10 @@ "Return L1 after removing all elements not found in L2. If SELECTFUN is non-nil, elements aren't compared directly, but instead they are passed through SELECTFUN before comparison." - (let ((res ())) - (if selectfun (setq l2 (mapcar selectfun l2))) - (dolist (elem l1) - (when (member (if selectfun (funcall selectfun elem) elem) l2) - (push elem res))) - (nreverse res))) + (when selectfun + (setq l1 (mapcar selectfun l1)) + (setq l2 (mapcar selectfun l2))) + (seq-intersection l1 l2)) (defun mpc-event-set-point (event) (condition-case nil (posn-set-point (event-end event)) @@ -698,7 +696,7 @@ The songs are returned as alists." (let* ((osongs (mpc-cmd-find other-tag value)) (ofiles (mpc-assq-all 'file (apply 'append osongs))) (plfiles (mpc-assq-all 'file (apply 'append plsongs)))) - (when (mpc-intersection plfiles ofiles) + (when (seq-intersection plfiles ofiles) (push pl pls))))))) pls)) @@ -1669,7 +1667,7 @@ Return non-nil if a selection was deactivated." (mpc-cmd-list mpc-tag (car cst) val)) (cdr cst))))) (setq active - (if (listp active) (mpc-intersection active vals) vals)))) + (if (listp active) (seq-intersection active vals) vals)))) (when (listp active) ;; Remove the selections if they are all in conflict with diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index 1d3a5e0f7da..e623dab26df 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -1680,6 +1680,7 @@ Sat, 07 Sep 2002 00:00:01 GMT nil)))) nil)) +;; FIXME: Can this be replaced by seq-intersection? (defun newsticker--lists-intersect-p (list1 list2) "Return t if LIST1 and LIST2 share elements." (let ((result nil)) diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index edb1c1de9fc..192b1ac4f41 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -43,22 +43,11 @@ (defvar url-http-response-status) (defvar url-http-end-of-headers) -(defun url-intersection (l1 l2) - "Return a list of the elements occurring in both of the lists L1 and L2." - (if (null l2) - l2 - (let (result) - (while l1 - (if (member (car l1) l2) - (setq result (cons (pop l1) result)) - (pop l1))) - (nreverse result)))) - ;;;###autoload (defun url-dav-supported-p (url) "Return WebDAV protocol version supported by URL. Returns nil if WebDAV is not supported." - (url-intersection url-dav-supported-protocols + (seq-intersection url-dav-supported-protocols (plist-get (url-http-options url) 'dav))) (defun url-dav-node-text (node) @@ -910,7 +899,9 @@ Returns nil if URL contains no name starting with FILE." t))) -;;; Miscellaneous stuff. +;;; Obsolete. + +(define-obsolete-function-alias 'url-intersection #'seq-intersection "28.1") (provide 'url-dav) -- cgit v1.2.3 From 8e083440e10fb6415cecce4f2536e5c33e06dc27 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 30 Apr 2021 10:41:18 +0200 Subject: Alter `gnus-article-show-images' to re-display with images installed * lisp/gnus/gnus-art.el (gnus-article-show-images): Reselect to display HTML images. --- lisp/gnus/gnus-art.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp/gnus/gnus-art.el') diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index d989a4d5bb5..5ce03db1b9b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2221,6 +2221,10 @@ unfolded." "Show any images that are in the HTML-rendered article buffer. This only works if the article in question is HTML." (interactive nil gnus-article-mode gnus-summary-mode) + ;; Reselect for image display. + (let ((gnus-blocked-images nil) + (gnus-inhibit-images nil)) + (gnus-summary-select-article)) (gnus-with-article-buffer (save-restriction (widen) -- cgit v1.2.3 From 3d954dee9cb030384c54a5d3b87d45573cfa8f70 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 1 Jun 2021 09:14:53 -0400 Subject: * lisp/gnus/gnus-art.el: Don't sneak dynbound code via quoting Make sure we don't accidentally quote lambdas by embedding them within quoted data. (gnus-visible-headers, gnus-emphasis-alist) (gnus-mime-display-alternative, gnus-article-describe-bindings): Unquote lambdas. --- lisp/gnus/gnus-art.el | 144 ++++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 68 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 5ce03db1b9b..f2ec9462c5e 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -170,12 +170,17 @@ If `gnus-visible-headers' is non-nil, this variable will be ignored." "All headers that do not match this regexp will be hidden. This variable can also be a list of regexp of headers to remain visible. If this variable is non-nil, `gnus-ignored-headers' will be ignored." - :type '(choice - (repeat :value-to-internal (lambda (widget value) - (custom-split-regexp-maybe value)) - :match (lambda (widget value) - (or (stringp value) - (widget-editable-list-match widget value))) + :type `(choice + (repeat :value-to-internal + ,(lambda (_widget value) + ;; FIXME: Are we sure this can't be used without + ;; loading cus-edit? + (declare-function custom-split-regexp-maybe + "cus-edit" (regexp)) + (custom-split-regexp-maybe value)) + :match ,(lambda (widget value) + (or (stringp value) + (widget-editable-list-match widget value))) regexp) (const :tag "Use gnus-ignored-headers" nil) regexp) @@ -402,14 +407,14 @@ the entire emphasized word. The third is a number that says what regexp grouping should be displayed and highlighted. The fourth is the face used for highlighting." :type - '(repeat + `(repeat (menu-choice :format "%[Customizing Style%]\n%v" :indent 2 (group :tag "Default" :value ("" 0 0 default) :value-create - (lambda (widget) + ,(lambda (widget) (let ((value (widget-get (cadr (widget-get (widget-get widget :parent) :args)) @@ -3738,7 +3743,7 @@ is to run." (setq n 1)) (gnus-stop-date-timer) (setq article-lapsed-timer - (run-at-time 1 n 'article-update-date-lapsed))) + (run-at-time 1 n #'article-update-date-lapsed))) (defun gnus-stop-date-timer () "Stop the Date timer." @@ -4405,7 +4410,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is "\M-g" gnus-article-read-summary-keys) (substitute-key-definition - 'undefined 'gnus-article-read-summary-keys gnus-article-mode-map) + #'undefined #'gnus-article-read-summary-keys gnus-article-mode-map) (defvar gnus-article-send-map) (gnus-define-keys (gnus-article-send-map "S" gnus-article-mode-map) @@ -4483,12 +4488,12 @@ commands: (make-local-variable 'gnus-article-image-alist) (make-local-variable 'gnus-article-charset) (make-local-variable 'gnus-article-ignored-charsets) - (setq-local bookmark-make-record-function 'gnus-summary-bookmark-make-record) + (setq-local bookmark-make-record-function #'gnus-summary-bookmark-make-record) ;; Prevent Emacs from displaying non-break space with ;; `nobreak-space' face. (setq-local nobreak-char-display nil) ;; Enable `gnus-article-remove-images' to delete images shr.el renders. - (setq-local shr-put-image-function 'gnus-shr-put-image) + (setq-local shr-put-image-function #'gnus-shr-put-image) (unless gnus-article-show-cursor (setq cursor-in-non-selected-windows nil)) (gnus-set-default-directory) @@ -4723,16 +4728,17 @@ If ALL-HEADERS is non-nil, no headers are hidden." (define-derived-mode gnus-sticky-article-mode gnus-article-mode "StickyArticle" "Mode for sticky articles." ;; Release bindings that won't work. - (substitute-key-definition 'gnus-article-read-summary-keys 'undefined + (substitute-key-definition #'gnus-article-read-summary-keys #'undefined gnus-sticky-article-mode-map) - (substitute-key-definition 'gnus-article-refer-article 'undefined + (substitute-key-definition #'gnus-article-refer-article #'undefined gnus-sticky-article-mode-map) (dolist (k '("e" "h" "s" "F" "R")) (define-key gnus-sticky-article-mode-map k nil)) - (define-key gnus-sticky-article-mode-map "k" 'gnus-kill-sticky-article-buffer) - (define-key gnus-sticky-article-mode-map "q" 'bury-buffer) - (define-key gnus-sticky-article-mode-map "\C-hc" 'describe-key-briefly) - (define-key gnus-sticky-article-mode-map "\C-hk" 'describe-key)) + (define-key gnus-sticky-article-mode-map "k" + #'gnus-kill-sticky-article-buffer) + (define-key gnus-sticky-article-mode-map "q" #'bury-buffer) + (define-key gnus-sticky-article-mode-map "\C-hc" #'describe-key-briefly) + (define-key gnus-sticky-article-mode-map "\C-hk" #'describe-key)) (defun gnus-sticky-article (arg) "Make the current article sticky. @@ -4863,9 +4869,9 @@ General format specifiers can also be used. See Info node (defvar gnus-mime-button-map (let ((map (make-sparse-keymap))) - (define-key map "\r" 'gnus-article-push-button) - (define-key map [mouse-2] 'gnus-article-push-button) - (define-key map [down-mouse-3] 'gnus-mime-button-menu) + (define-key map "\r" #'gnus-article-push-button) + (define-key map [mouse-2] #'gnus-article-push-button) + (define-key map [down-mouse-3] #'gnus-mime-button-menu) (dolist (c gnus-mime-button-commands) (define-key map (cadr c) (car c))) map)) @@ -6138,7 +6144,7 @@ If nil, don't show those extra buttons." (let* ((preferred (or preferred (mm-preferred-alternative handles))) (ihandles handles) (point (point)) - handle (inhibit-read-only t) begend not-pref) ;; from + (inhibit-read-only t) begend not-pref) ;; from (save-window-excursion (save-restriction (when ibegend @@ -6152,8 +6158,8 @@ If nil, don't show those extra buttons." (mm-remove-parts handles)) (setq begend (list (point-marker))) ;; Do the toggle. - (unless (setq not-pref (cadr (member preferred ihandles))) - (setq not-pref (car ihandles))) + (setq not-pref (or (cadr (member preferred ihandles)) + (car ihandles))) (when (or ibegend (not preferred) (not (gnus-unbuttonized-mime-type-p @@ -6164,22 +6170,22 @@ If nil, don't show those extra buttons." (progn (insert (format "%d. " id)) (point)) - `(gnus-callback - (lambda (handles) - (unless ,(not ibegend) - (setq gnus-article-mime-handle-alist - ',gnus-article-mime-handle-alist)) - (gnus-mime-display-alternative - ',ihandles ',not-pref ',begend ,id)) - keymap ,gnus-mime-button-map - mouse-face ,gnus-article-mouse-face - face ,gnus-article-button-face - follow-link t - gnus-part ,id - article-type multipart - rear-nonsticky t)) + (let ((gamha gnus-article-mime-handle-alist)) + `(gnus-callback + ,(lambda (_handles) + (unless (not ibegend) + (setq gnus-article-mime-handle-alist gamha)) + (gnus-mime-display-alternative + ihandles not-pref begend id)) + keymap ,gnus-mime-button-map + mouse-face ,gnus-article-mouse-face + face ,gnus-article-button-face + follow-link t + gnus-part ,id + article-type multipart + rear-nonsticky t))) ;; Do the handles - (while (setq handle (pop handles)) + (dolist (handle handles) (add-text-properties ;; (setq from (point) ;; ) @@ -6188,22 +6194,22 @@ If nil, don't show those extra buttons." (if (equal handle preferred) ?* ? ) (mm-handle-media-type handle))) (point)) - `(gnus-callback - (lambda (handles) - (unless ,(not ibegend) - (setq gnus-article-mime-handle-alist - ',gnus-article-mime-handle-alist)) - (gnus-mime-display-alternative - ',ihandles ',handle ',begend ,id)) - keymap ,gnus-mime-button-map - mouse-face ,gnus-article-mouse-face - face ,gnus-article-button-face - follow-link t - gnus-part ,id - button t - category t - gnus-data ,handle - rear-nonsticky t)) + (let ((gamha gnus-article-mime-handle-alist)) + `(gnus-callback + ,(lambda (_handles) + (unless (not ibegend) + (setq gnus-article-mime-handle-alist gamha)) + (gnus-mime-display-alternative + ihandles handle begend id)) + keymap ,gnus-mime-button-map + mouse-face ,gnus-article-mouse-face + face ,gnus-article-button-face + follow-link t + gnus-part ,id + button t + category t + gnus-data ,handle + rear-nonsticky t))) (insert " ")) (insert "\n\n")) (when preferred @@ -6308,7 +6314,8 @@ is the string to use when it is inactive.") (setq gnus-article-image-alist (delq entry gnus-article-image-alist)) (gnus-delete-wash-type category))) -(defalias 'gnus-article-hide-headers-if-wanted 'gnus-article-maybe-hide-headers) +(defalias 'gnus-article-hide-headers-if-wanted + #'gnus-article-maybe-hide-headers) (defun gnus-article-maybe-hide-headers () "Hide unwanted headers if `gnus-have-all-headers' is nil. @@ -6874,7 +6881,7 @@ then we display only bindings that start with that prefix." parent agent draft) (define-key keymap "S" map) (define-key map [t] nil) - (define-key summap [t] 'undefined) + (define-key summap [t] #'undefined) (with-current-buffer gnus-article-current-summary (dolist (key sumkeys) (define-key summap key (key-binding key (current-local-map)))) @@ -6910,10 +6917,11 @@ then we display only bindings that start with that prefix." (setq-local gnus-agent-summary-mode agent) (setq-local gnus-draft-mode draft) (describe-bindings prefix)) - (let ((item `((lambda (prefix) - (with-current-buffer ,(current-buffer) - (gnus-article-describe-bindings prefix))) - ,prefix))) + (let* ((cb (current-buffer)) + (item `(,(lambda (prefix) + (with-current-buffer cb + (gnus-article-describe-bindings prefix))) + ,prefix))) ;; Loading `help-mode' here is necessary if `describe-bindings' ;; is replaced with something, e.g. `helm-descbinds'. (require 'help-mode) @@ -8394,14 +8402,14 @@ url is put as the `gnus-button-url' overlay property on the button." (defvar gnus-prev-page-map (let ((map (make-sparse-keymap))) - (define-key map [mouse-2] 'gnus-button-prev-page) - (define-key map "\r" 'gnus-button-prev-page) + (define-key map [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))) - (define-key map [mouse-2] 'gnus-button-next-page) - (define-key map "\r" 'gnus-button-next-page) + (define-key map [mouse-2] #'gnus-button-next-page) + (define-key map "\r" #'gnus-button-next-page) map)) (defun gnus-insert-prev-page-button () @@ -8705,9 +8713,9 @@ For example: (defvar gnus-mime-security-button-map (let ((map (make-sparse-keymap))) - (define-key map "\r" 'gnus-article-push-button) - (define-key map [mouse-2] 'gnus-article-push-button) - (define-key map [down-mouse-3] 'gnus-mime-security-button-menu) + (define-key map "\r" #'gnus-article-push-button) + (define-key map [mouse-2] #'gnus-article-push-button) + (define-key map [down-mouse-3] #'gnus-mime-security-button-menu) (dolist (c gnus-mime-security-button-commands) (define-key map (cadr c) (car c))) map)) -- cgit v1.2.3 From 748bf7b93edcfd1707fa3f593a330979e280eb49 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 6 Jul 2021 16:33:25 +0200 Subject: Allow using `mm-inline-message' from other mail clients than Gnus * lisp/gnus/mm-view.el (mm-inline-message-prepare-function): New variable (bug#49380). (mm-inline-message): Use it to separate out the Gnus-specific code. * lisp/gnus/gnus-art.el (gnus-mime-display-single): ... which has been moved here. --- lisp/gnus/gnus-art.el | 23 ++++++++++++++++++++++- lisp/gnus/mm-view.el | 27 +++++++++------------------ 2 files changed, 31 insertions(+), 19 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index f2ec9462c5e..b989446792b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6039,7 +6039,28 @@ If nil, don't show those extra buttons." (ignored gnus-ignored-mime-types) (mm-inline-font-lock (gnus-visual-p 'article-highlight 'highlight)) (not-attachment t) - display text) + ;; Arrange a callback from `mm-inline-message' if we're + ;; displaying a message/rfc822 part. + (mm-inline-message-prepare-function + (lambda (charset) + (let ((handles + (let (gnus-article-mime-handles + ;; disable prepare hook + gnus-article-prepare-hook + (gnus-newsgroup-charset + ;; mm-uu might set it. + (unless (eq charset 'gnus-decoded) + (or charset gnus-newsgroup-charset)))) + (let ((gnus-original-article-buffer + (mm-handle-buffer handle))) + (run-hooks 'gnus-article-decode-hook)) + (gnus-article-prepare-display) + gnus-article-mime-handles))) + (when handles + (setq gnus-article-mime-handles + (mm-merge-handles gnus-article-mime-handles handles)))))) + display text + gnus-displaying-mime) (catch 'ignored (progn (while ignored diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 3e36d6724ea..2ec75a0bc59 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -418,16 +418,18 @@ This is only used if `mm-inline-large-images' is set to (fundamental-mode) (goto-char (point-min))) -(defvar gnus-original-article-buffer) -(defvar gnus-article-prepare-hook) -(defvar gnus-displaying-mime) +(defvar mm-inline-message-prepare-function nil + "Function called by `mm-inline-message' to do client specific setup. +It is called with one parameter -- the charset.") (defun mm-inline-message (handle) + "Insert HANDLE (a message/rfc822 part) into the current buffer. +This function will call `mm-inline-message-prepare-function' +after inserting the part." (let ((b (point)) (bolp (bolp)) (charset (mail-content-type-get - (mm-handle-type handle) 'charset)) - gnus-displaying-mime handles) + (mm-handle-type handle) 'charset))) (when (and charset (stringp charset)) (setq charset (intern (downcase charset))) @@ -437,16 +439,8 @@ This is only used if `mm-inline-large-images' is set to (save-restriction (narrow-to-region b b) (mm-insert-part handle) - (let (gnus-article-mime-handles - ;; disable prepare hook - gnus-article-prepare-hook - (gnus-newsgroup-charset - (unless (eq charset 'gnus-decoded) ;; mm-uu might set it. - (or charset gnus-newsgroup-charset)))) - (let ((gnus-original-article-buffer (mm-handle-buffer handle))) - (run-hooks 'gnus-article-decode-hook)) - (gnus-article-prepare-display) - (setq handles gnus-article-mime-handles)) + (when mm-inline-message-prepare-function + (funcall mm-inline-message-prepare-function charset)) (goto-char (point-min)) (unless bolp (insert "\n")) @@ -454,9 +448,6 @@ This is only used if `mm-inline-large-images' is set to (unless (bolp) (insert "\n")) (insert "----------\n\n") - (when handles - (setq gnus-article-mime-handles - (mm-merge-handles gnus-article-mime-handles handles))) (mm-handle-set-undisplayer handle (let ((beg (point-min-marker)) -- cgit v1.2.3 From 0bd1346318fe9ef4eba91905172d30a030d7da18 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 30 Jul 2021 13:32:54 +0200 Subject: Fix issue with mml-preview from outside Gnus * lisp/gnus/gnus-art.el (gnus-mime-display-alternative): Be more resilient when running from outside Gnus. --- lisp/gnus/gnus-art.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b989446792b..fb0295d0703 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6238,8 +6238,9 @@ If nil, don't show those extra buttons." (gnus-display-mime preferred) (let ((mail-parse-charset gnus-newsgroup-charset) (mail-parse-ignored-charsets - (with-current-buffer gnus-summary-buffer - gnus-newsgroup-ignored-charsets))) + (and (buffer-live-p gnus-summary-buffer) + (with-current-buffer gnus-summary-buffer + gnus-newsgroup-ignored-charsets)))) (gnus-bind-mm-vars (mm-display-part preferred)) ;; Do highlighting. (save-excursion -- cgit v1.2.3 From 051434fdefd6418bf1f0cd28c087b31cb3921f48 Mon Sep 17 00:00:00 2001 From: Mattias Engdegård Date: Sun, 8 Aug 2021 18:58:46 +0200 Subject: Use string-replace instead of replace-regexp-in-string `string-replace` is easier to understand, less error-prone, much faster, and results in shorter Lisp and byte code. Use it where applicable and obviously safe (erring on the conservative side). * admin/authors.el (authors-scan-change-log): * lisp/autoinsert.el (auto-insert-alist): * lisp/calc/calc-prog.el (calc-edit-macro-combine-alg-ent) (calc-edit-macro-combine-ext-command) (calc-edit-macro-combine-var-name): * lisp/calc/calc-units.el (math-make-unit-string): * lisp/calendar/cal-html.el (cal-html-comment): * lisp/calendar/cal-tex.el (cal-tex-comment): * lisp/calendar/icalendar.el (icalendar--convert-string-for-export) (icalendar--convert-string-for-import): * lisp/calendar/iso8601.el (iso8601--concat-regexps) (iso8601--full-time-match, iso8601--combined-match): * lisp/calendar/time-date.el (format-seconds): * lisp/calendar/todo-mode.el (todo-filter-items-filename): * lisp/cedet/cedet-files.el (cedet-directory-name-to-file-name) (cedet-file-name-to-directory-name): * lisp/comint.el (comint-watch-for-password-prompt): * lisp/dired-aux.el (dired-do-chmod): * lisp/dired-x.el (dired-man): * lisp/dired.el (dired-insert-directory, dired-goto-file-1): * lisp/emacs-lisp/comp.el (comp-c-func-name): * lisp/emacs-lisp/re-builder.el (reb-copy): * lisp/erc/erc-dcc.el (erc-dcc-unquote-filename): * lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy) (erc-update-mode-line-buffer, erc-message-english-PART): * lisp/files.el (make-backup-file-name-1, files--transform-file-name) (read-file-modes): * lisp/fringe.el (fringe-mode): * lisp/gnus/gnus-art.el (gnus-button-handle-info-url): * lisp/gnus/gnus-group.el (gnus-group-completing-read): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical): * lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy): * lisp/gnus/gnus-search.el (gnus-search-query-parse-date) (gnus-search-transform-expression, gnus-search-run-search): * lisp/gnus/gnus-start.el (gnus-dribble-enter): * lisp/gnus/gnus-sum.el (gnus-summary-refer-article): * lisp/gnus/gnus-util.el (gnus-mode-string-quote): * lisp/gnus/message.el (message-put-addresses-in-ecomplete) (message-parse-mailto-url, message-mailto-1): * lisp/gnus/mml-sec.el (mml-secure-epg-sign): * lisp/gnus/mml-smime.el (mml-smime-epg-verify): * lisp/gnus/mml2015.el (mml2015-epg-verify): * lisp/gnus/nnmaildir.el (nnmaildir--system-name) (nnmaildir-request-list, nnmaildir-retrieve-groups) (nnmaildir-request-group, nnmaildir-retrieve-headers): * lisp/gnus/nnrss.el (nnrss-node-text): * lisp/gnus/spam-report.el (spam-report-gmane-internal) (spam-report-user-mail-address): * lisp/ibuffer.el (name): * lisp/image-dired.el (image-dired-pngnq-thumb) (image-dired-pngcrush-thumb, image-dired-optipng-thumb) (image-dired-create-thumb-1): * lisp/info.el (Info-set-mode-line): * lisp/international/mule-cmds.el (describe-language-environment): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rfc2368.el (rfc2368-parse-mailto-url): * lisp/mail/rmail.el (rmail-insert-inbox-text) (rmail-simplified-subject-regexp): * lisp/mail/rmailout.el (rmail-output-body-to-file): * lisp/mail/undigest.el (rmail-digest-rfc1153): * lisp/man.el (Man-default-man-entry): * lisp/mouse.el (minor-mode-menu-from-indicator): * lisp/mpc.el (mpc--debug): * lisp/net/browse-url.el (browse-url-mail): * lisp/net/eww.el (eww-update-header-line-format): * lisp/net/newst-backend.el (newsticker-save-item): * lisp/net/rcirc.el (rcirc-sentinel): * lisp/net/soap-client.el (soap-decode-date-time): * lisp/nxml/rng-cmpct.el (rng-c-literal-2-re): * lisp/nxml/xmltok.el (let*): * lisp/obsolete/nnir.el (nnir-run-swish-e, nnir-run-hyrex) (nnir-run-find-grep): * lisp/play/dunnet.el (dun-doassign): * lisp/play/handwrite.el (handwrite): * lisp/proced.el (proced-format-args): * lisp/profiler.el (profiler-report-header-line-format): * lisp/progmodes/gdb-mi.el (gdb-mi-quote): * lisp/progmodes/make-mode.el (makefile-bsdmake-rule-action-regex) (makefile-make-font-lock-keywords): * lisp/progmodes/prolog.el (prolog-guess-fill-prefix): * lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes): * lisp/progmodes/sql.el (sql-remove-tabs-filter, sql-str-literal): * lisp/progmodes/which-func.el (which-func-current): * lisp/replace.el (query-replace-read-from) (occur-engine, replace-quote): * lisp/select.el (xselect--encode-string): * lisp/ses.el (ses-export-tab): * lisp/subr.el (shell-quote-argument): * lisp/term/pc-win.el (msdos-show-help): * lisp/term/w32-win.el (w32--set-selection): * lisp/term/xterm.el (gui-backend-set-selection): * lisp/textmodes/picture.el (picture-tab-search): * lisp/thumbs.el (thumbs-call-setroot-command): * lisp/tooltip.el (tooltip-show-help-non-mode): * lisp/transient.el (transient-format-key): * lisp/url/url-mailto.el (url-mailto): * lisp/vc/log-edit.el (log-edit-changelog-ours-p): * lisp/vc/vc-bzr.el (vc-bzr-status): * lisp/vc/vc-hg.el (vc-hg--glob-to-pcre): * lisp/vc/vc-svn.el (vc-svn-after-dir-status): * lisp/xdg.el (xdg-desktop-strings): * test/lisp/electric-tests.el (defun): * test/lisp/term-tests.el (term-simple-lines): * test/lisp/time-stamp-tests.el (formatz-mod-del-colons): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-unfinished-edit-01): * test/src/json-tests.el (json-parse-with-custom-null-and-false-objects): Use `string-replace` instead of `replace-regexp-in-string`. --- admin/authors.el | 2 +- lisp/autoinsert.el | 4 ++-- lisp/calc/calc-prog.el | 8 ++++---- lisp/calc/calc-units.el | 2 +- lisp/calendar/cal-html.el | 2 +- lisp/calendar/cal-tex.el | 2 +- lisp/calendar/icalendar.el | 12 ++++++------ lisp/calendar/iso8601.el | 6 +++--- lisp/calendar/time-date.el | 2 +- lisp/calendar/todo-mode.el | 2 +- lisp/cedet/cedet-files.el | 4 ++-- lisp/comint.el | 2 +- lisp/dired-aux.el | 2 +- lisp/dired-x.el | 2 +- lisp/dired.el | 14 +++++++------- lisp/emacs-lisp/comp.el | 2 +- lisp/emacs-lisp/re-builder.el | 2 +- lisp/erc/erc-dcc.el | 4 ++-- lisp/erc/erc.el | 8 ++++---- lisp/files.el | 6 +++--- lisp/fringe.el | 2 +- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-group.el | 2 +- lisp/gnus/gnus-icalendar.el | 8 ++++---- lisp/gnus/gnus-mlspl.el | 2 +- lisp/gnus/gnus-search.el | 10 +++++----- lisp/gnus/gnus-start.el | 2 +- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/gnus-util.el | 2 +- lisp/gnus/message.el | 8 ++++---- lisp/gnus/mml-sec.el | 2 +- lisp/gnus/mml-smime.el | 2 +- lisp/gnus/mml2015.el | 2 +- lisp/gnus/nnmaildir.el | 18 ++++++++---------- lisp/gnus/nnrss.el | 2 +- lisp/gnus/spam-report.el | 4 ++-- lisp/ibuffer.el | 2 +- lisp/image-dired.el | 8 ++++---- lisp/info.el | 4 ++-- lisp/international/mule-cmds.el | 2 +- lisp/mail/rfc2231.el | 2 +- lisp/mail/rfc2368.el | 2 +- lisp/mail/rmail.el | 4 ++-- lisp/mail/rmailout.el | 4 ++-- lisp/mail/undigest.el | 2 +- lisp/man.el | 2 +- lisp/mouse.el | 2 +- lisp/mpc.el | 4 ++-- lisp/net/browse-url.el | 2 +- lisp/net/eww.el | 2 +- lisp/net/newst-backend.el | 2 +- lisp/net/rcirc.el | 2 +- lisp/net/soap-client.el | 2 +- lisp/nxml/rng-cmpct.el | 2 +- lisp/nxml/xmltok.el | 2 +- lisp/obsolete/nnir.el | 12 ++++++------ lisp/play/dunnet.el | 2 +- lisp/play/handwrite.el | 2 +- lisp/proced.el | 2 +- lisp/profiler.el | 2 +- lisp/progmodes/gdb-mi.el | 2 +- lisp/progmodes/make-mode.el | 7 +++---- lisp/progmodes/prolog.el | 2 +- lisp/progmodes/ruby-mode.el | 4 ++-- lisp/progmodes/sql.el | 4 ++-- lisp/progmodes/which-func.el | 2 +- lisp/replace.el | 14 ++++++-------- lisp/select.el | 2 +- lisp/ses.el | 2 +- lisp/subr.el | 2 +- lisp/term/pc-win.el | 2 +- lisp/term/w32-win.el | 2 +- lisp/term/xterm.el | 5 ++--- lisp/textmodes/picture.el | 4 ++-- lisp/thumbs.el | 6 +++--- lisp/tooltip.el | 2 +- lisp/transient.el | 12 ++++++------ lisp/url/url-mailto.el | 2 +- lisp/vc/log-edit.el | 4 ++-- lisp/vc/vc-bzr.el | 2 +- lisp/vc/vc-hg.el | 4 ++-- lisp/vc/vc-svn.el | 2 +- lisp/xdg.el | 4 ++-- test/lisp/electric-tests.el | 2 +- test/lisp/term-tests.el | 2 +- test/lisp/time-stamp-tests.el | 2 +- test/lisp/wdired-tests.el | 4 ++-- test/src/json-tests.el | 2 +- 88 files changed, 164 insertions(+), 170 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/admin/authors.el b/admin/authors.el index 6c81c7872fc..a400b1327af 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -1475,7 +1475,7 @@ Suggested\\|Trivial\\|Version\\|Originally\\|From:\\|Patch[ \t]+[Bb]y\\)"))) (when (string-match ":" line) (setq line (substring line 0 (match-beginning 0))) (setq line (replace-regexp-in-string "[[(<{].*$" "" line)) - (setq line (replace-regexp-in-string "," "" line)) + (setq line (string-replace "," "" line)) (dolist (file (split-string line)) (when (setq file (authors-canonical-file-name file log-file pos (car authors))) (dolist (author authors) diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 0392903c332..995d9e2e0fe 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -93,8 +93,8 @@ If this contains a %s, that will be replaced by the matching rule." '((("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header") (replace-regexp-in-string "[^A-Z0-9]" "_" - (replace-regexp-in-string - "\\+" "P" + (string-replace + "+" "P" (upcase (file-name-nondirectory buffer-file-name)))) "#ifndef " str \n "#define " str "\n\n" diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 4e27d7671e2..6f1e5c782df 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -802,8 +802,8 @@ (when match (kill-line 1) (setq line (concat line (substring curline 0 match)))) - (setq line (replace-regexp-in-string "SPC" " SPC " - (replace-regexp-in-string " " "" line))) + (setq line (string-replace "SPC" " SPC " + (string-replace " " "" line))) (insert line "\t\t\t") (if (> (current-column) 24) (delete-char -1)) @@ -830,7 +830,7 @@ (when match (kill-line 1) (setq line (concat line (substring curline 0 match)))) - (setq line (replace-regexp-in-string " " "" line)) + (setq line (string-replace " " "" line)) (insert cmdbeg " " line "\t\t\t") (if (> (current-column) 24) (delete-char -1)) @@ -857,7 +857,7 @@ (when match (kill-line 1) (setq line (concat line (substring curline 0 match)))) - (setq line (replace-regexp-in-string " " "" line)) + (setq line (string-replace " " "" line)) (insert line "\t\t\t") (if (> (current-column) 24) (delete-char -1)) diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index c3adc3db02a..8b6f0637035 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -406,7 +406,7 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).") If EXPR is nil, return nil." (if expr (let ((cexpr (math-compose-expr expr 0))) - (replace-regexp-in-string + (string-replace " / " "/" (if (stringp cexpr) cexpr diff --git a/lisp/calendar/cal-html.el b/lisp/calendar/cal-html.el index e5810c3f027..58a5a0f83a5 100644 --- a/lisp/calendar/cal-html.el +++ b/lisp/calendar/cal-html.el @@ -151,7 +151,7 @@ (defun cal-html-comment (string) "Return STRING as html comment." (format "\n" - (replace-regexp-in-string "--" "++" string))) + (string-replace "--" "++" string))) (defun cal-html-href (link string) "Return a hyperlink to url LINK with text STRING." diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index f5932014dd9..3830024ef3d 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -1755,7 +1755,7 @@ current contents." COMMENT may contain newlines, which are prefixed by \"% \" in the output." (insert (format "%% %s\n" (if comment - (replace-regexp-in-string "\n" "\n% " comment) + (string-replace "\n" "\n% " comment) "")))) (defun cal-tex-banner (comment) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index d18ec5e798f..cf37331394c 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -998,15 +998,15 @@ TIMESTRING and has the same result as \"9:00\"." (defun icalendar--convert-string-for-export (string) "Escape comma and other critical characters in STRING." - (replace-regexp-in-string "," "\\\\," string)) + (string-replace "," "\\," string)) (defun icalendar--convert-string-for-import (string) "Remove escape chars for comma, semicolon etc. from STRING." - (replace-regexp-in-string - "\\\\n" "\n " (replace-regexp-in-string - "\\\\\"" "\"" (replace-regexp-in-string - "\\\\;" ";" (replace-regexp-in-string - "\\\\," "," string))))) + (string-replace + "\\n" "\n " (string-replace + "\\\"" "\"" (string-replace + "\\;" ";" (string-replace + "\\," "," string))))) ;; ====================================================================== ;; Export -- convert emacs-diary to iCalendar diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el index f22f060e205..1de1796a054 100644 --- a/lisp/calendar/iso8601.el +++ b/lisp/calendar/iso8601.el @@ -57,7 +57,7 @@ (defun iso8601--concat-regexps (regexps) (mapconcat (lambda (regexp) (concat "\\(?:" - (replace-regexp-in-string "(" "(?:" regexp) + (string-replace "(" "(?:" regexp) "\\)")) regexps "\\|")) @@ -92,13 +92,13 @@ "\\(Z\\|\\([+-]\\)\\([0-9][0-9]\\):?\\([0-9][0-9]\\)?\\)") (defconst iso8601--full-time-match - (concat "\\(" (replace-regexp-in-string "(" "(?:" iso8601--time-match) "\\)" + (concat "\\(" (string-replace "(" "(?:" iso8601--time-match) "\\)" "\\(" iso8601--zone-match "\\)?")) (defconst iso8601--combined-match (concat "\\(" iso8601--date-match "\\)" "\\(?:T\\(" - (replace-regexp-in-string "(" "(?:" iso8601--time-match) + (string-replace "(" "(?:" iso8601--time-match) "\\)" "\\(" iso8601--zone-match "\\)?\\)?")) diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 1c169b78fd6..0aa38166bc1 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -357,7 +357,7 @@ is output until the first non-zero unit is encountered." (format " %s%s" name (if (= num 1) "" "s")))) t t string)))))) - (replace-regexp-in-string "%%" "%" string)) + (string-replace "%%" "%" string)) (defvar seconds-to-string (list (list 1 "ms" 0.001) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 680beb85aff..371d10631c5 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -4546,7 +4546,7 @@ its priority has changed, and `same' otherwise." (let ((bufname (buffer-name))) (string-match "\"\\([^\"]+\\)\"" bufname) (let* ((filename-str (substring bufname (match-beginning 1) (match-end 1))) - (filename-base (replace-regexp-in-string ", " "-" filename-str)) + (filename-base (string-replace ", " "-" filename-str)) (top-priorities (string-match "top priorities" bufname)) (diary-items (string-match "diary items" bufname)) (regexp-items (string-match "regexp items" bufname))) diff --git a/lisp/cedet/cedet-files.el b/lisp/cedet/cedet-files.el index c9d557f5974..f540fb5540f 100644 --- a/lisp/cedet/cedet-files.el +++ b/lisp/cedet/cedet-files.el @@ -59,7 +59,7 @@ to the file's truename, and dodging platform tricks." ;; doubling `!'s in the original name... (setq file (subst-char-in-string ?/ ?! - (replace-regexp-in-string "!" "!!" file))) + (string-replace "!" "!!" file))) file)) (defun cedet-file-name-to-directory-name (referencefile &optional testmode) @@ -71,7 +71,7 @@ specific conversions during tests." ;; Replace the ! with / (setq file (subst-char-in-string ?! ?/ file)) ;; Occurrences of // meant there was once a single !. - (setq file (replace-regexp-in-string "//" "!" file)) + (setq file (string-replace "//" "!" file)) ;; Handle Windows special cases (when (or (memq system-type '(windows-nt ms-dos)) testmode) diff --git a/lisp/comint.el b/lisp/comint.el index 40f58f2da7b..7af8e8fd2a5 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2439,7 +2439,7 @@ carriage returns (\\r) in STRING. This function could be in the list `comint-output-filter-functions'." (when (let ((case-fold-search t)) (string-match comint-password-prompt-regexp - (replace-regexp-in-string "\r" "" string))) + (string-replace "\r" "" string))) (let ((comint--prompt-recursion-depth (1+ comint--prompt-recursion-depth))) (if (> comint--prompt-recursion-depth 10) (message "Password prompt recursion too deep") diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 060f3a84111..72969dd96e2 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -508,7 +508,7 @@ has no effect on MS-Windows." (default (and (stringp modestr) (string-match "^.\\(...\\)\\(...\\)\\(...\\)$" modestr) - (replace-regexp-in-string + (string-replace "-" "" (format "u=%s,g=%s,o=%s" (match-string 1 modestr) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index a7bfae759ed..a990bd3fec3 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -1193,7 +1193,7 @@ NOSELECT the files are merely found but not selected." (interactive) (require 'man) (let* ((file (dired-get-filename)) - (manual-program (replace-regexp-in-string "\\*" "%s" + (manual-program (string-replace "*" "%s" (dired-guess-shell-command "Man command: " (list file))))) (Man-getpage-in-background file))) diff --git a/lisp/dired.el b/lisp/dired.el index 28448be06ce..e577df510ad 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1587,8 +1587,8 @@ see `dired-use-ls-dired' for more details.") ;; because newlines in dirnames are uncommon, and people may ;; have gotten used to seeing unescaped "\" in the headers. ;; Note: adjust dired-build-subdir-alist if you change this. - (setq dir (replace-regexp-in-string "\\\\" "\\\\" dir nil t) - dir (replace-regexp-in-string "\n" "\\n" dir nil t))) + (setq dir (string-replace "\\" "\\\\" dir) + dir (string-replace "\n" "\\n" dir))) ;; If we used --dired and it worked, the lines are already indented. ;; Otherwise, indent them. (unless (save-excursion @@ -3167,15 +3167,15 @@ the quoted forms of those characters. FULL-NAME specifies the actual file name the listing must have, as returned by `dired-get-filename'. LIMIT is the search limit." (let (str) - (setq str (replace-regexp-in-string "\^m" "\\^m" file nil t)) - (setq str (replace-regexp-in-string "\\\\" "\\\\" str nil t)) + (setq str (string-replace "\^m" "\\^m" file)) + (setq str (string-replace "\\" "\\\\" str)) (and (dired-switches-escape-p dired-actual-switches) (string-match-p "[ \t\n]" str) ;; FIXME: to fix this for embedded control characters etc, we ;; should escape everything that `ls -b' does. - (setq str (replace-regexp-in-string " " "\\ " str nil t) - str (replace-regexp-in-string "\t" "\\t" str nil t) - str (replace-regexp-in-string "\n" "\\n" str nil t))) + (setq str (string-replace " " "\\ " str) + str (string-replace "\t" "\\t" str) + str (string-replace "\n" "\\n" str))) (let ((found nil) ;; filenames are preceded by SPC, this makes the search faster ;; (e.g. for the filename "-"). diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index a04413b6f00..ed75bf2bfa9 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1171,7 +1171,7 @@ clashes." do (aset str j (aref byte 0)) (aset str (1+ j) (aref byte 1)) finally return str)) - (human-readable (replace-regexp-in-string + (human-readable (string-replace "-" "_" orig-name)) (human-readable (replace-regexp-in-string (rx (not (any "0-9a-z_"))) "" human-readable))) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 396949d59a2..aec438ed994 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -436,7 +436,7 @@ provided in the Commentary section of this library." (let ((re (with-output-to-string (print (reb-target-binding reb-regexp))))) (setq re (substring re 1 (1- (length re)))) - (setq re (replace-regexp-in-string "\n" "\\n" re nil t)) + (setq re (string-replace "\n" "\\n" re)) (kill-new re) (message "Copied regexp `%s' to kill-ring" re))) diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 219af3741fa..fcdb8df2032 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -630,8 +630,8 @@ that subcommand." (define-inline erc-dcc-unquote-filename (filename) (inline-quote - (replace-regexp-in-string "\\\\\\\\" "\\" - (replace-regexp-in-string "\\\\\"" "\"" ,filename t t) t t))) + (string-replace "\\\\" "\\" + (string-replace "\\\"" "\"" ,filename)))) (defun erc-dcc-handle-ctcp-send (proc query nick login host to) "This is called if a CTCP DCC SEND subcommand is sent to the client. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 026c6f84164..c66b03d2e4e 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -3597,7 +3597,7 @@ If S is non-nil, it will be used as the quit reason." If S is non-nil, it will be used as the quit reason." (or s (if (fboundp 'yow) - (replace-regexp-in-string "\n" "" (yow)) + (string-replace "\n" "" (yow)) (erc-quit/part-reason-default)))) (make-obsolete 'erc-quit-reason-zippy "it will be removed." "24.4") @@ -3624,7 +3624,7 @@ If S is non-nil, it will be used as the part reason." If S is non-nil, it will be used as the quit reason." (or s (if (fboundp 'yow) - (replace-regexp-in-string "\n" "" (yow)) + (string-replace "\n" "" (yow)) (erc-quit/part-reason-default)))) (make-obsolete 'erc-part-reason-zippy "it will be removed." "24.4") @@ -6528,7 +6528,7 @@ if `erc-away' is non-nil." (fill-region (point-min) (point-max)) (buffer-string)))) (setq header-line-format - (replace-regexp-in-string + (string-replace "%" "%%" (if face @@ -6804,7 +6804,7 @@ functions." nick user host channel (if (not (string= reason "")) (format ": %s" - (replace-regexp-in-string "%" "%%" reason)) + (string-replace "%" "%%" reason)) ""))))) diff --git a/lisp/files.el b/lisp/files.el index 89ee13eb686..54d0b919e1d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5201,7 +5201,7 @@ The function `find-backup-file-name' also uses this." (expand-file-name (subst-char-in-string ?/ ?! - (replace-regexp-in-string "!" "!!" file)) + (string-replace "!" "!!" file)) backup-directory)) (expand-file-name (file-name-nondirectory file) (file-name-as-directory abs-backup-directory)))))) @@ -6876,7 +6876,7 @@ the resulting file name, and SUFFIX is appended." (file-name-directory result) (subst-char-in-string ?/ ?! - (replace-regexp-in-string + (string-replace "!" "!!" filename)))) (t result)))) (setq result @@ -7989,7 +7989,7 @@ based on existing mode bits, as in \"og+rX-w\"." (default (and (stringp modestr) (string-match "^.\\(...\\)\\(...\\)\\(...\\)$" modestr) - (replace-regexp-in-string + (string-replace "-" "" (format "u=%s,g=%s,o=%s" (match-string 1 modestr) diff --git a/lisp/fringe.el b/lisp/fringe.el index d73aae0459e..82cfacc6b6f 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -189,7 +189,7 @@ fringes." :type `(choice ,@ (mapcar (lambda (style) (let ((name - (replace-regexp-in-string "-" " " (car style)))) + (string-replace "-" " " (car style)))) `(const :tag ,(concat (capitalize (substring name 0 1)) (substring name 1)) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index fb0295d0703..d65e75e44c2 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -8288,7 +8288,7 @@ url is put as the `gnus-button-url' overlay property on the button." ")" (gnus-url-unhex-string (match-string 2 url))))) ((string-match "([^)\"]+)[^\"]+" url) (setq url - (replace-regexp-in-string + (string-replace "\"" "" (replace-regexp-in-string "[\n\t ]+" " " url))) (gnus-info-find-node url)) (t (error "Can't parse %s" url)))) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 6202567344f..b1134397e55 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -2186,7 +2186,7 @@ handle COLLECTION as a list, hash table, or vector." require-match initial-input (or hist 'gnus-group-history) def))) - (replace-regexp-in-string "\n" "" group))) + (string-replace "\n" "" group))) ;;;###autoload (defun gnus-fetch-group (group &optional articles) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 1b2743c1484..56f4fdf6d33 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -252,10 +252,10 @@ ;; ugly, but cannot get ;;replace-regexp-in-string work with "\\" as ;;REP, plus we should also handle "\\;" - (replace-regexp-in-string - "\\\\," "," - (replace-regexp-in-string - "\\\\n" "\n" (substring-no-properties value)))))) + (string-replace + "\\," "," + (string-replace + "\\n" "\n" (substring-no-properties value)))))) (accumulate-args (mapping) (cl-destructuring-bind (slot . ical-property) mapping diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el index d42f0971259..664027f0164 100644 --- a/lisp/gnus/gnus-mlspl.el +++ b/lisp/gnus/gnus-mlspl.el @@ -209,7 +209,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: "\\)")) ;; Now create the new SPLIT (let ((split-regexp-with-list-ids - (replace-regexp-in-string "@" "[@.]" split-regexp t t)) + (string-replace "@" "[@.]" split-regexp)) (exclude ;; Generate RESTRICTs for SPLIT-EXCLUDEs. (if (listp split-exclude) diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 8182630dfed..59b8efaa3ac 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -572,7 +572,7 @@ nil. If VALUE is a relative time, interpret it as relative to REL-DATE, or (current-time) if REL-DATE is nil." ;; Time parsing doesn't seem to work with slashes. - (let ((value (replace-regexp-in-string "/" "-" value)) + (let ((value (string-replace "/" "-" value)) (now (append '(0 0 0) (seq-subseq (decode-time (or rel-date (current-time))) @@ -1669,7 +1669,7 @@ cross our fingers for the rest of it." Mairix negation requires a \"~\" preceding string search terms, and \"-\" before marks." (let ((next (gnus-search-transform-expression engine (cadr expr)))) - (replace-regexp-in-string + (string-replace ":" (if (eql (caadr expr) 'mark) ":-" @@ -1863,9 +1863,9 @@ Assume \"size\" key is equal to \"larger\"." group (if (file-directory-p (setq group - (replace-regexp-in-string - "\\." "/" - group nil t))) + (string-replace + "." "/" + group))) group)))))) (unless group (signal 'gnus-search-config-error diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 44e97d54846..02bbe19e7fe 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -854,7 +854,7 @@ If REGEXP is given, lines that match it will be deleted." (goto-char (point-max)) ;; Make sure that each dribble entry is a single line, so that ;; the "remove" code above works. - (insert (replace-regexp-in-string "\n" "\\\\n" string) "\n") + (insert (string-replace "\n" "\\n" string) "\n") (bury-buffer gnus-dribble-buffer) (with-current-buffer gnus-group-buffer (gnus-group-set-mode-line))))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 4bdc2023eb4..dc004927b67 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -9191,7 +9191,7 @@ specified by the `gnus-refer-thread-limit' variable." (interactive "sMessage-ID: " gnus-summary-mode) (when (and (stringp message-id) (not (zerop (length message-id)))) - (setq message-id (replace-regexp-in-string " " "" message-id)) + (setq message-id (string-replace " " "" message-id)) ;; Construct the correct Message-ID if necessary. ;; Suggested by tale@pawl.rpi.edu. (unless (string-match "^<" message-id) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index be0284515dc..7a5e00c5ec9 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -408,7 +408,7 @@ Cache the result as a text property stored in DATE." (defun gnus-mode-string-quote (string) "Quote all \"%\"'s in STRING." - (replace-regexp-in-string "%" "%%" string)) + (string-replace "%" "%%" string)) (defsubst gnus-make-hashtable (&optional size) "Make a hash table of SIZE, testing on `equal'." diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index bcbf7476715..a3ffaec3ff3 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -8599,7 +8599,7 @@ From headers in the original article." (let ((value (message-field-value header))) (dolist (string (mail-header-parse-addresses value 'raw)) (setq string - (replace-regexp-in-string + (string-replace "\n" "" (replace-regexp-in-string "^ +\\| +$" "" string))) (ecomplete-add-item 'mail (car (mail-header-parse-address string)) @@ -8889,7 +8889,7 @@ used to take the screenshot." (defun message-parse-mailto-url (url) "Parse a mailto: url." - (setq url (replace-regexp-in-string "\n" " " url)) + (setq url (string-replace "\n" " " url)) (when (string-match "mailto:/*\\(.*\\)" url) (setq url (substring url (match-beginning 1) nil))) (setq url (if (string-match "^\\?" url) @@ -8931,9 +8931,9 @@ will then start up Emacs ready to compose mail. For emacsclient use (dolist (arg args) (unless (equal (car arg) "body") (message-position-on-field (capitalize (car arg))) - (insert (replace-regexp-in-string + (insert (string-replace "\r\n" "\n" - (mapconcat #'identity (reverse (cdr arg)) ", ") nil t)))) + (mapconcat #'identity (reverse (cdr arg)) ", "))))) (when (assoc "body" args) (message-goto-body) (dolist (body (cdr (assoc "body" args))) diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 15157e6fbc8..b49793509fc 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -1022,7 +1022,7 @@ Returns non-nil if the user has chosen to use SENDER." (if (eq 'OpenPGP protocol) (epg-sign-string context (buffer-string) mode) (epg-sign-string context - (replace-regexp-in-string + (string-replace "\n" "\r\n" (buffer-string)) t)) mml-secure-secret-key-id-list nil) diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 5c133e680af..959de0902e2 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -404,7 +404,7 @@ Content-Disposition: attachment; filename=smime.p7m nil t))))) (mm-sec-error 'gnus-info "Corrupted") (throw 'error handle)) - (setq part (replace-regexp-in-string "\n" "\r\n" part) + (setq part (string-replace "\n" "\r\n" part) context (epg-make-context 'CMS)) (condition-case error ;; (setq plain diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 1af7d10d055..8c40fc79f00 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -863,7 +863,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." nil t)))) (mm-sec-error 'gnus-info "Corrupted") (throw 'error handle)) - (setq part (replace-regexp-in-string "\n" "\r\n" part) + (setq part (string-replace "\n" "\r\n" part) signature (mm-get-part signature) context (epg-make-context)) (condition-case error diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 4867455393a..372df64e2e5 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -637,13 +637,11 @@ This variable is set by `nnmaildir-request-article'.") (funcall func (cdr entry))))))) (defun nnmaildir--system-name () - (replace-regexp-in-string + (string-replace ":" "\\072" - (replace-regexp-in-string + (string-replace "/" "\\057" - (replace-regexp-in-string "\\\\" "\\134" (system-name) nil 'literal) - nil 'literal) - nil 'literal)) + (string-replace "\\" "\\134" (system-name))))) (defun nnmaildir-request-type (_group &optional _article) 'mail) @@ -937,9 +935,9 @@ This variable is set by `nnmaildir-request-article'.") (setq pgname (nnmaildir--pgname nnmaildir--cur-server gname) ro (nnmaildir--param pgname 'read-only)) - (insert (replace-regexp-in-string + (insert (string-replace " " "\\ " - (nnmaildir--grp-name group) nil t) + (nnmaildir--grp-name group)) " ") (princ (nnmaildir--group-maxnum nnmaildir--cur-server group) nntp-server-buffer) @@ -968,7 +966,7 @@ This variable is set by `nnmaildir-request-article'.") (princ (nnmaildir--group-maxnum nnmaildir--cur-server group) nntp-server-buffer) (insert " " - (replace-regexp-in-string " " "\\ " gname nil t) + (string-replace " " "\\ " gname) "\n"))))) 'group) @@ -1098,7 +1096,7 @@ This variable is set by `nnmaildir-request-article'.") (insert " ") (princ (nnmaildir--group-maxnum nnmaildir--cur-server group) nntp-server-buffer) - (insert " " (replace-regexp-in-string " " "\\ " gname nil t) "\n") + (insert " " (string-replace " " "\\ " gname) "\n") t)))) (defun nnmaildir-request-create-group (gname &optional server _args) @@ -1262,7 +1260,7 @@ This variable is set by `nnmaildir-request-article'.") (insert "\t" (nnmaildir--nov-get-beg nov) "\t" (nnmaildir--art-msgid article) "\t" (nnmaildir--nov-get-mid nov) "\tXref: nnmaildir " - (replace-regexp-in-string " " "\\ " gname nil t) ":") + (string-replace " " "\\ " gname) ":") (princ num nntp-server-buffer) (insert "\t" (nnmaildir--nov-get-end nov) "\n")))) (catch 'return diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index a40fa88631f..8cd8cbe84f1 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -785,7 +785,7 @@ It is useful when `(setq nnrss-use-local t)'." (nnrss-node-just-text node) node)) (cleaned-text (if text - (replace-regexp-in-string + (string-replace "\r\n" "\n" (replace-regexp-in-string "^[\000-\037\177]+\\|^ +\\| +$" "" diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index a4234f84001..5fa280ea058 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -159,7 +159,7 @@ submitted at once. Internal variable.") rpt-host (concat "/" - (replace-regexp-in-string + (string-replace "/" ":" (replace-regexp-in-string "^.*article.gmane.org/" "" @@ -224,7 +224,7 @@ the function specified by `spam-report-url-ping-function'." (defcustom spam-report-user-mail-address (and (stringp user-mail-address) - (replace-regexp-in-string "@" "" user-mail-address)) + (string-replace "@" "" user-mail-address)) "Mail address of this user used for spam reports to Gmane. This is initialized based on `user-mail-address'." :type '(choice string diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 9088f31053b..6c0180590b9 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1719,7 +1719,7 @@ If point is on a group name, this function operates on that group." (ibuffer-buffer-name-face buffer mark)))) (if (not (seq-position string ?\n)) string - (replace-regexp-in-string + (string-replace "\n" (propertize "^J" 'font-lock-face 'escape-glyph) string)))) (define-ibuffer-column size diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 2509ecf8f82..74985b9e56d 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -704,7 +704,7 @@ Increase at own risk.") (thumb (cdr (assq ?t spec)))) (rename-file nq8 thumb t))) (message "command %S %s" (process-command process) - (replace-regexp-in-string "\n" "" status))))) + (string-replace "\n" "" status))))) process)) (defun image-dired-pngcrush-thumb (spec) @@ -726,7 +726,7 @@ Increase at own risk.") (unless (and (eq (process-status process) 'exit) (zerop (process-exit-status process))) (message "command %S %s" (process-command process) - (replace-regexp-in-string "\n" "" status))) + (string-replace "\n" "" status))) (when (memq (process-status process) '(exit signal)) (let ((temp (cdr (assq ?q spec)))) (delete-file temp))))) @@ -744,7 +744,7 @@ Increase at own risk.") (unless (and (eq (process-status process) 'exit) (zerop (process-exit-status process))) (message "command %S %s" (process-command process) - (replace-regexp-in-string "\n" "" status))))) + (string-replace "\n" "" status))))) process)) (defun image-dired-create-thumb-1 (original-file thumbnail-file) @@ -794,7 +794,7 @@ Increase at own risk.") (zerop (process-exit-status process)))) (message "Thumb could not be created for %s: %s" (abbreviate-file-name original-file) - (replace-regexp-in-string "\n" "" status)) + (string-replace "\n" "" status)) (set-file-modes thumbnail-file #o600) (clear-image-cache thumbnail-file) ;; PNG thumbnail has been created since we are diff --git a/lisp/info.el b/lisp/info.el index b65728ba41b..1c477a7082f 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1732,14 +1732,14 @@ escaped (\\\",\\\\)." (concat " (" (if (stringp Info-current-file) - (replace-regexp-in-string + (string-replace "%" "%%" (file-name-sans-extension (file-name-nondirectory Info-current-file))) (format "*%S*" Info-current-file)) ") " (if Info-current-node - (propertize (replace-regexp-in-string + (propertize (string-replace "%" "%%" Info-current-node) 'face 'mode-line-buffer-id 'help-echo diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 55accf5beee..71e2653ffe9 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2166,7 +2166,7 @@ See `set-language-info-alist' for use in programs." (let ((str (eval (get-language-info language-name 'sample-text)))) (if (stringp str) (insert "Sample text:\n " - (replace-regexp-in-string "\n" "\n " str) + (string-replace "\n" "\n " str) "\n\n"))) (error nil)) (let ((input-method (get-language-info language-name 'input-method)) diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el index 6fb4502b23b..db34fd2cb9e 100644 --- a/lisp/mail/rfc2231.el +++ b/lisp/mail/rfc2231.el @@ -63,7 +63,7 @@ must never cause a Lisp error." (let (mod) (when (and (string-match "\\\\\"" string) (not (string-match "\\`\"\\|[^\\]\"" string))) - (setq string (replace-regexp-in-string "\\\\\"" "\"" string) + (setq string (string-replace "\\\"" "\"" string) mod t)) (when (and (string-match "\\\\(" string) (string-match "\\\\)" string) diff --git a/lisp/mail/rfc2368.el b/lisp/mail/rfc2368.el index 553f3cc3a54..b96f15d3e68 100644 --- a/lisp/mail/rfc2368.el +++ b/lisp/mail/rfc2368.el @@ -91,7 +91,7 @@ Note: make sure MAILTO-URL has been \"unhtmlized\" (e.g., & -> &), before calling this function." (let ((case-fold-search t) prequery query headers-alist) - (setq mailto-url (replace-regexp-in-string "\n" " " mailto-url)) + (setq mailto-url (string-replace "\n" " " mailto-url)) (if (string-match rfc2368-mailto-regexp mailto-url) (progn (setq prequery diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index e479a8e9b4a..8a38337773e 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1960,7 +1960,7 @@ Value is the size of the newly read mail after conversion." (file-name-nondirectory (if (memq system-type '(windows-nt cygwin ms-dos)) ;; cannot have colons in file name - (replace-regexp-in-string ":" "-" file) + (string-replace ":" "-" file) file))) ;; Use the directory of this rmail file ;; because it's a nuisance to use the homedir @@ -3374,7 +3374,7 @@ The idea is to match it against simplified subjects of other messages." ;; Hide commas so it will work ok if parsed as a comma-separated list ;; of regexps. (setq subject - (replace-regexp-in-string "," "\054" subject t t)) + (string-replace "," "\054" subject)) (concat "\\`" subject "\\'"))) (defun rmail-next-same-subject (n) diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index eb8590f1f73..4c23686909c 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -678,9 +678,9 @@ than appending to it. Deletes the message after writing if (or (mail-fetch-field "Subject") rmail-default-body-file))) (setq default-file - (replace-regexp-in-string ":" "-" default-file)) + (string-replace ":" "-" default-file)) (setq default-file - (replace-regexp-in-string " " "-" default-file)) + (string-replace " " "-" default-file)) (list (setq rmail-default-body-file (read-file-name "Output message body to file: " diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el index bf57ed6fa6f..0760a477296 100644 --- a/lisp/mail/undigest.el +++ b/lisp/mail/undigest.el @@ -125,7 +125,7 @@ See rmail-digest-methods." ;; Undo masking of separators inside digestified messages (goto-char (point-min)) (while (search-forward - (replace-regexp-in-string "\n-" "\n " separator) nil t) + (string-replace "\n-" "\n " separator) nil t) (replace-match separator)) ;; Return the list of marker pairs (nreverse result)))))) diff --git a/lisp/man.el b/lisp/man.el index 9b941a2b3d2..54b6ffe9836 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -802,7 +802,7 @@ POS defaults to `point'." ;; added by troff, and remove it. (or (not (eq (string-to-char (substring 1st-part -1)) ?-)) (string-match-p "-" (substring 1st-part 0 -1)) - (setq word (replace-regexp-in-string "-" "" word)))) + (setq word (string-replace "-" "" word)))) ;; Make sure the section number gets included by the code below. (goto-char (match-end 1))) (when (string-match "[-._‐]+$" word) diff --git a/lisp/mouse.el b/lisp/mouse.el index 89e5d7c48a3..cf7c17be28f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -180,7 +180,7 @@ items `Turn Off' and `Help'." `(keymap ,(format "%s - %s" indicator (capitalize - (replace-regexp-in-string + (string-replace "-" " " (format "%S" minor-mode)))) (turn-off menu-item "Turn off minor mode" ,mm-fun) (help menu-item "Help for minor mode" diff --git a/lisp/mpc.el b/lisp/mpc.el index ab572aa539a..e04ffa49747 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -214,8 +214,8 @@ defaults to 6600 and HOST defaults to localhost." (with-current-buffer "*MPC-debug*" (goto-char (point-max)) (insert-before-markers ;So it scrolls. - (replace-regexp-in-string "\n" "\n " - (apply #'format-message format args)) + (string-replace "\n" "\n " + (apply #'format-message format args)) "\n")))) (defun mpc--proc-filter (proc string) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 6d64100be17..f739cd72cc3 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1644,7 +1644,7 @@ used instead of `browse-url-new-window-flag'." (insert "\n")) (goto-char (prog1 (point) - (insert (replace-regexp-in-string "\r\n" "\n" body)) + (insert (string-replace "\r\n" "\n" body)) (unless (bolp) (insert "\n")))))))) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index eec3ec7ba8b..2a81d2e0c8c 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -779,7 +779,7 @@ Currently this means either text/html or application/xhtml+xml." (propertize "...: " 'face 'variable-pitch)))) (propertize "..." 'face 'variable-pitch))))))) - (replace-regexp-in-string + (string-replace "%" "%%" (format-spec eww-header-line-format diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el index e623dab26df..dc541943587 100644 --- a/lisp/net/newst-backend.el +++ b/lisp/net/newst-backend.el @@ -610,7 +610,7 @@ This does NOT start the retrieval timers." (interactive) (let ((filename (read-string "Filename: " (concat feed ":_" - (replace-regexp-in-string + (string-replace " " "_" (newsticker--title item)) ".html")))) (with-temp-buffer diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index f11f36e8096..e7aec505b0b 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -800,7 +800,7 @@ When 0, do not auto-reconnect." (defun rcirc-sentinel (process sentinel) "Called when PROCESS receives SENTINEL." - (let ((sentinel (replace-regexp-in-string "\n" "" sentinel))) + (let ((sentinel (string-replace "\n" "" sentinel))) (rcirc-debug process (format "SENTINEL: %S %S\n" process sentinel)) (with-rcirc-process-buffer process (dolist (buffer (cons nil (mapcar 'cdr rcirc-buffer-alist))) diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 821ef4af8e0..f5480afb698 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -659,7 +659,7 @@ representing leap seconds." (if second (if second-fraction (let* ((second-fraction-significand - (replace-regexp-in-string "\\." "" second-fraction)) + (string-replace "." "" second-fraction)) (hertz (expt 10 (length second-fraction-significand))) (ticks (+ (* hertz (string-to-number second)) diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index 1314ade9e31..d820d1b99b5 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el @@ -100,7 +100,7 @@ Return a pattern." "Regular expression to match a single-quoted literal.") (defconst rng-c-literal-2-re - (replace-regexp-in-string "'" "\"" rng-c-literal-1-re) + (string-replace "'" "\"" rng-c-literal-1-re) "Regular expression to match a double-quoted literal.") (defconst rng-c-ncname-re "\\w+") diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el index 9824eebbd8b..38bc2e141e6 100644 --- a/lisp/nxml/xmltok.el +++ b/lisp/nxml/xmltok.el @@ -479,7 +479,7 @@ and VALUE-END, otherwise a STRING giving the value." "[^<'&\r\n\t]*" (xmltok-g complex1 "[&\r\n\t][^<']*") opt "'")) - (lit2 (cons (replace-regexp-in-string "'" "\"" (car lit1)) + (lit2 (cons (string-replace "'" "\"" (car lit1)) '(complex2))) (literal (xmltok-g literal lit1 or lit2)) (name (xmltok+ open (xmltok-g xmlns "xmlns") or ncname close diff --git a/lisp/obsolete/nnir.el b/lisp/obsolete/nnir.el index 40a8ec57b98..caeca988810 100644 --- a/lisp/obsolete/nnir.el +++ b/lisp/obsolete/nnir.el @@ -920,10 +920,10 @@ Tested with swish-e-2.0.1 on Windows NT 4.0." ;; eliminate all ".", "/", "\" from beginning. Always matches. (string-match "^[./\\]*\\(.*\\)$" dirnam) ;; "/" -> "." - (setq group (replace-regexp-in-string + (setq group (string-replace "/" "." (match-string 1 dirnam))) ;; Windows "\\" -> "." - (setq group (replace-regexp-in-string "\\\\" "." group)) + (setq group (string-replace "\\" "." group)) (push (vector (gnus-group-full-name group server) (string-to-number artno) @@ -996,7 +996,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0." (when (string-match prefix dirnam) (setq dirnam (replace-match "" t t dirnam))) (push (vector (gnus-group-full-name - (replace-regexp-in-string "/" "." dirnam) server) + (string-replace "/" "." dirnam) server) (string-to-number artno) (string-to-number score)) artlist)) @@ -1205,9 +1205,9 @@ construct path: search terms (see the variable group (if (file-directory-p (setq group - (replace-regexp-in-string - "\\." "/" - group nil t))) + (string-replace + "." "/" + group))) group)))))) (unless group (error "Cannot locate directory for group")) diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index c3be029a658..3bb8bf0c82b 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -2373,7 +2373,7 @@ Also prints current score to let user know he has scored." (dun-mprincl "Incorrect."))) (let (varname epoint afterq i value) - (setq varname (replace-regexp-in-string " " "" (substring line 0 esign))) + (setq varname (string-replace " " "" (substring line 0 esign))) (if (or (= (length varname) 0) (< (- (length line) esign) 2)) (progn diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el index cc058230751..2aec408e11b 100644 --- a/lisp/play/handwrite.el +++ b/lisp/play/handwrite.el @@ -200,7 +200,7 @@ Variables: `handwrite-linespace' (default 12) (concat "\\\\" (cdr trans)) line))) (switch-to-buffer ps-buf-name) - (insert (replace-regexp-in-string "\n" "" line)) + (insert (string-replace "\n" "" line)) (message "write write write...") (setq ps-ypos (+ ps-ypos handwrite-linespace)) (end-of-line) diff --git a/lisp/proced.el b/lisp/proced.el index d1a243df8e0..2fafdcc58e5 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -1389,7 +1389,7 @@ The return string is always 6 characters wide." (defun proced-format-args (args) "Format attribute ARGS. Replace newline characters by \"^J\" (two characters)." - (replace-regexp-in-string "\n" "^J" args)) + (string-replace "\n" "^J" args)) (defun proced-format (process-alist format) "Display PROCESS-ALIST using FORMAT." diff --git a/lisp/profiler.el b/lisp/profiler.el index 8145e51d75d..4c427692cb8 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -499,7 +499,7 @@ RET: expand or collapse")) (defun profiler-report-header-line-format (fmt &rest args) (let* ((header (apply #'profiler-format fmt args)) - (escaped (replace-regexp-in-string "%" "%%" header))) + (escaped (string-replace "%" "%%" header))) (concat (propertize " " 'display '(space :align-to 0) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index b9c8305bed0..97596d0d278 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1963,7 +1963,7 @@ commands to be prefixed by \"-interpreter-exec console\".") The string is enclosed in double quotes. All embedded quotes, newlines, and backslashes are preceded with a backslash." (setq string (replace-regexp-in-string "\\([\"\\]\\)" "\\\\\\&" string)) - (setq string (replace-regexp-in-string "\n" "\\n" string t t)) + (setq string (string-replace "\n" "\\n" string)) (concat "\"" string "\"")) (defun gdb-input (command handler-function &optional trigger-name) diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 4d277755aeb..df17b87c013 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -257,7 +257,7 @@ not be enclosed in { } or ( )." "Regex used to highlight makepp rule action lines in font lock mode.") (defconst makefile-bsdmake-rule-action-regex - (replace-regexp-in-string "-@" "-+@" makefile-rule-action-regex) + (string-replace "-@" "-+@" makefile-rule-action-regex) "Regex used to highlight BSD rule action lines in font lock mode.") ;; Note that the first and second subexpression is used by font lock. Note @@ -358,11 +358,10 @@ not be enclosed in { } or ( )." ,@(if keywords ;; Fontify conditionals and includes. `((,(concat "^\\(?: [ \t]*\\)?" - (replace-regexp-in-string + (string-replace " " "[ \t]+" (if (eq (car keywords) t) - (replace-regexp-in-string "-" "[_-]" - (regexp-opt (cdr keywords) t)) + (string-replace "-" "[_-]" (regexp-opt (cdr keywords) t)) (regexp-opt keywords t))) "\\>[ \t]*\\([^: \t\n#]*\\)") (1 font-lock-keyword-face) (2 font-lock-variable-name-face)))) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 0b520e39074..2e23c2e2cab 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -2277,7 +2277,7 @@ between them)." ;(goto-char beg) (if (search-forward-regexp "^[ \t]*\\(%+\\|\\*+\\|/\\*+\\)[ \t]*" end t) - (replace-regexp-in-string "/" " " (buffer-substring beg (point))) + (string-replace "/" " " (buffer-substring beg (point))) (beginning-of-line) (when (search-forward-regexp "^[ \t]+" end t) (buffer-substring beg (point))))))))) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 01fb044161b..74b48ca4bde 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1788,8 +1788,8 @@ If the result is do-end block, it will always be multiline." (buffer-substring-no-properties (1+ min) (1- max)))) (setq content (if (equal string-quote "'") - (replace-regexp-in-string "\\\\\"" "\"" (replace-regexp-in-string "\\(\\`\\|[^\\]\\)'" "\\1\\\\'" content)) - (replace-regexp-in-string "\\\\'" "'" (replace-regexp-in-string "\\(\\`\\|[^\\]\\)\"" "\\1\\\\\"" content)))) + (string-replace "\\\"" "\"" (replace-regexp-in-string "\\(\\`\\|[^\\]\\)'" "\\1\\\\'" content)) + (string-replace "\\'" "'" (replace-regexp-in-string "\\(\\`\\|[^\\]\\)\"" "\\1\\\\\"" content)))) (let ((orig-point (point))) (delete-region min max) (insert diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index f144549cf6d..b9012166a52 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -3843,7 +3843,7 @@ to avoid deleting non-prompt output." (defun sql-remove-tabs-filter (str) "Replace tab characters with spaces." - (replace-regexp-in-string "\t" " " str nil t)) + (string-replace "\t" " " str)) (defun sql-toggle-pop-to-buffer-after-send-region (&optional value) "Toggle `sql-pop-to-buffer-after-send-region'. @@ -3864,7 +3864,7 @@ If given the optional parameter VALUE, sets "If non-nil, display messages related to the use of redirection.") (defun sql-str-literal (s) - (concat "'" (replace-regexp-in-string "[']" "''" s) "'")) + (concat "'" (string-replace "[']" "''" s) "'")) (defun sql-redirect (sqlbuf command &optional outbuf save-prior) "Execute the SQL command and send output to OUTBUF. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 02a8d72758c..eb170baa5d8 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -175,7 +175,7 @@ and you want to simplify them for the mode line (defvar which-func-table (make-hash-table :test 'eq :weakness 'key)) (defconst which-func-current - '(:eval (replace-regexp-in-string + '(:eval (string-replace "%" "%%" (or (gethash (selected-window) which-func-table) which-func-unknown)))) diff --git a/lisp/replace.el b/lisp/replace.el index ee46286a75f..c67877efd5d 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -213,7 +213,7 @@ wants to replace FROM with TO." (when query-replace-from-to-separator ;; Check if the first non-whitespace char is displayable (if (char-displayable-p - (string-to-char (replace-regexp-in-string + (string-to-char (string-replace " " "" query-replace-from-to-separator))) query-replace-from-to-separator " -> "))) @@ -2101,7 +2101,7 @@ See also `multi-occur'." ;; Add non-numeric prefix to all non-first lines ;; of multi-line matches. (concat - (replace-regexp-in-string + (string-replace "\n" (if prefix-face (propertize @@ -2506,12 +2506,10 @@ a string, it is first passed through `prin1-to-string' with the `noescape' argument set. `match-data' is preserved across the call." - (save-match-data - (replace-regexp-in-string "\\\\" "\\\\" - (if (stringp replacement) - replacement - (prin1-to-string replacement t)) - t t))) + (string-replace "\\" "\\\\" + (if (stringp replacement) + replacement + (prin1-to-string replacement t)))) (defun replace-loop-through-replacements (data count) ;; DATA is a vector containing the following values: diff --git a/lisp/select.el b/lisp/select.el index eaa74cebd80..15e171c13f9 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -496,7 +496,7 @@ two markers or an overlay. Otherwise, it is nil." (error "Unknown selection type: %S" type))))) ;; Most programs are unable to handle NUL bytes in strings. - (setq str (replace-regexp-in-string "\0" "\\0" str t t)) + (setq str (string-replace "\0" "\\0" str)) (setq next-selection-coding-system nil) (cons type str)))) diff --git a/lisp/ses.el b/lisp/ses.el index ca515f829dc..81c27144a54 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -3357,7 +3357,7 @@ is non-nil. Newlines and tabs in the export text are escaped." (push "'" result) (setq item (cadr item))) (setq item (ses-prin1 item)) - (setq item (replace-regexp-in-string "\t" "\\\\t" item)) + (setq item (string-replace "\t" "\\t" item)) (push item result) (cond ((< col maxcol) diff --git a/lisp/subr.el b/lisp/subr.el index b8286600664..87298b5cfde 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3681,7 +3681,7 @@ See Info node `(elisp)Security Considerations'." "''" ;; Quote everything except POSIX filename characters. ;; This should be safe enough even for really weird shells. - (replace-regexp-in-string + (string-replace "\n" "'\n'" (replace-regexp-in-string "[^-0-9a-zA-Z_./\n]" "\\\\\\&" argument)))) )) diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 8cff2ceaeec..9e7b360b9c6 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -290,7 +290,7 @@ This is used by `msdos-show-help'.") (not cursor-in-echo-area)) ;Don't overwrite a prompt. (cond ((stringp help) - (setq help (replace-regexp-in-string "\n" ", " help)) + (setq help (string-replace "\n" ", " help)) (unless (or msdos-previous-message (string-equal help (current-message)) (and (stringp msdos-last-help-message) diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 6b849164aec..80afcb36040 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -410,7 +410,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;;; Fix interface to (X-specific) mouse.el (defun w32--set-selection (type value) (if (eq type 'CLIPBOARD) - (w32-set-clipboard-data (replace-regexp-in-string "\0" "\\0" value t t)) + (w32-set-clipboard-data (string-replace "\0" "\\0" value)) (put 'x-selections (or type 'PRIMARY) value))) (defun w32--get-selection (&optional type data-type) diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 8bcae37afe4..868b33ea9c5 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -1015,10 +1015,9 @@ hitting screen's max DCS length." 'terminal-init-screen)) (bytes (encode-coding-string data 'utf-8-unix)) (base-64 (if screen - (replace-regexp-in-string + (string-replace "\n" "\e\\\eP" - (base64-encode-string bytes) - :fixedcase :literal) + (base64-encode-string bytes)) (base64-encode-string bytes :no-line-break))) (length (length base-64))) (if (> length xterm-max-cut-length) diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 1368af01bac..1d5d1caeabc 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -449,8 +449,8 @@ If no such character is found, move to beginning of line." (progn (beginning-of-line) (skip-chars-backward - (concat "^" (replace-regexp-in-string - "\\\\" "\\\\" picture-tab-chars nil t)) + (concat "^" (string-replace + "\\" "\\\\" picture-tab-chars)) (point-min)) (not (bobp)))) (move-to-column target)) diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 5710b8c353b..4c863883ba4 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -434,10 +434,10 @@ Open another window." (defun thumbs-call-setroot-command (img) "Call the setroot program for IMG." (run-hooks 'thumbs-before-setroot-hook) - (shell-command (replace-regexp-in-string - "\\*" + (shell-command (string-replace + "*" (shell-quote-argument (expand-file-name img)) - thumbs-setroot-command nil t)) + thumbs-setroot-command)) (run-hooks 'thumbs-after-setroot-hook)) (defun thumbs-set-image-at-point-to-root-window () diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 03d9f54ea6c..23b67ee2cab 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -346,7 +346,7 @@ It is also called if Tooltip mode is on, for text-only displays." (not cursor-in-echo-area)) ;Don't overwrite a prompt. (cond ((stringp help) - (setq help (replace-regexp-in-string "\n" ", " help)) + (setq help (string-replace "\n" ", " help)) (unless (or tooltip-previous-message (equal-including-properties help (current-message)) (and (stringp tooltip-help-message) diff --git a/lisp/transient.el b/lisp/transient.el index 5f66a13094b..4087a0c68a6 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3064,18 +3064,18 @@ Optional support for popup buttons is also implemented here." ((equal (seq-take seq len) transient--redisplay-key) (let ((pre (key-description (vconcat (seq-take seq len)))) (suf (key-description (vconcat (seq-drop seq len))))) - (setq pre (replace-regexp-in-string "RET" "C-m" pre t)) - (setq pre (replace-regexp-in-string "TAB" "C-i" pre t)) - (setq suf (replace-regexp-in-string "RET" "C-m" suf t)) - (setq suf (replace-regexp-in-string "TAB" "C-i" suf t)) + (setq pre (string-replace "RET" "C-m" pre)) + (setq pre (string-replace "TAB" "C-i" pre)) + (setq suf (string-replace "RET" "C-m" suf)) + (setq suf (string-replace "TAB" "C-i" suf)) ;; We use e.g. "-k" instead of the more correct "- k", ;; because the former is prettier. If we did that in ;; the definition, then we want to drop the space that ;; is reinserted above. False-positives are possible ;; for silly bindings like "-C-c C-c". (unless (string-match-p " " key) - (setq pre (replace-regexp-in-string " " "" pre)) - (setq suf (replace-regexp-in-string " " "" suf))) + (setq pre (string-replace " " "" pre)) + (setq suf (string-replace " " "" suf))) (concat (propertize pre 'face 'default) (and (string-prefix-p (concat pre " ") key) " ") (transient--colorize-key suf cmd) diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index 29c2780121a..4fd631d2955 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el @@ -105,7 +105,7 @@ (goto-char (point-max))) (insert (mapconcat (lambda (string) - (replace-regexp-in-string "\r\n" "\n" string)) + (string-replace "\r\n" "\n" string)) (cdar args) "\n"))) (url-mail-goto-field (caar args)) ;; (setq func (intern-soft (concat "mail-" (caar args)))) diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 4a44787bb03..46e9c97eb0a 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -974,8 +974,8 @@ Return non-nil if it is." (not (looking-at (format ".+ .+ <%s>" (regexp-quote mail)))) (looking-at ".+ \\(.+ <.+>\\) *\\((tiny change)\\)?")) - (let ((author (replace-regexp-in-string " " " " - (match-string 1)))) + (let ((author (string-replace " " " " + (match-string 1)))) (unless (and log-edit-author (string-match (regexp-quote author) (car log-edit-author))) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index de5a90dc602..5144b5d0bbb 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -467,7 +467,7 @@ in the branch repository (or whose status not be determined)." ;; Erase the status text that matched. (delete-region (match-beginning 0) (match-end 0)) (setq status - (intern (replace-regexp-in-string " " "" statusword))))) + (intern (string-replace " " "" statusword))))) (when status (goto-char (point-min)) (skip-chars-forward " \n\t") ;Throw away spaces. diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index c9c1e91d483..4a64caa36b8 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -851,8 +851,8 @@ if we don't understand a construct, we signal (push "\\[" parts)) (t (let ((x (substring glob i j))) - (setf x (replace-regexp-in-string - "\\\\" "\\\\" x t t)) + (setf x (string-replace + "\\" "\\\\" x)) (setf i (1+ j)) (cond ((eq (aref x 0) ?!) (setf (aref x 0) ?^)) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index c30920dd157..544a6c769fc 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -192,7 +192,7 @@ switches." (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) (propstat (cdr (assq (aref (match-string 2) 0) state-map))) (filename (if (memq system-type '(windows-nt ms-dos)) - (replace-regexp-in-string "\\\\" "/" (match-string 4)) + (string-replace "\\" "/" (match-string 4)) (match-string 4)))) (and (memq propstat '(conflict edited)) (not (eq state 'conflict)) ; conflict always wins diff --git a/lisp/xdg.el b/lisp/xdg.el index 0bdfd114c48..e5165bbd86a 100644 --- a/lisp/xdg.el +++ b/lisp/xdg.el @@ -208,8 +208,8 @@ Optional argument GROUP defaults to the string \"Desktop Entry\"." "Partition VALUE into elements delimited by unescaped semicolons." (let (res) (setq value (string-trim-left value)) - (dolist (x (split-string (replace-regexp-in-string "\\\\;" "\0" value) ";")) - (push (replace-regexp-in-string "\0" ";" x) res)) + (dolist (x (split-string (string-replace "\\;" "\0" value) ";")) + (push (string-replace "\0" ";" x) res)) (when (null (string-match-p "[^[:blank:]]" (car res))) (pop res)) (nreverse res))) diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el index 235c02f8e8b..ea856ab311c 100644 --- a/test/lisp/electric-tests.el +++ b/test/lisp/electric-tests.el @@ -146,7 +146,7 @@ The buffer's contents should %s: "") char (if (string= fixture expected-string) "stay" "become") - (replace-regexp-in-string "\n" "\\\\n" expected-string) + (string-replace "\n" "\\n" expected-string) expected-point))) `(ert-deftest ,(intern (format "electric-pair-%s-at-point-%s-in-%s%s" name diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el index 503cb5d7aab..50ac370b5b5 100644 --- a/test/lisp/term-tests.el +++ b/test/lisp/term-tests.el @@ -56,7 +56,7 @@ first line\r next line\r\n")) (should (equal (term-test-screen-from-input 40 12 str) - (replace-regexp-in-string "\r" "" str))))) + (string-replace "\r" "" str))))) (ert-deftest term-carriage-return () (skip-unless (not (memq system-type '(windows-nt ms-dos)))) diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index 0d64320496d..4e6fbbba923 100644 --- a/test/lisp/time-stamp-tests.el +++ b/test/lisp/time-stamp-tests.el @@ -849,7 +849,7 @@ The functions in `pattern-mod' are composed left to right." (defun formatz-mod-del-colons (string) "Returns STRING with any colons removed." - (replace-regexp-in-string ":" "" string)) + (string-replace ":" "" string)) (defun formatz-mod-add-00 (string) "Returns STRING with \"00\" appended." diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el index ba276e24d96..96a01fc2c7b 100644 --- a/test/lisp/wdired-tests.el +++ b/test/lisp/wdired-tests.el @@ -31,7 +31,7 @@ Partially modifying a file name should succeed." (let* ((test-dir (make-temp-file "test-dir-" t)) (test-file (concat (file-name-as-directory test-dir) "foo.c")) (replace "bar") - (new-file (replace-regexp-in-string "foo" replace test-file)) + (new-file (string-replace "foo" replace test-file)) (wdired-use-interactive-rename t)) (write-region "" nil test-file nil 'silent) (advice-add 'dired-query ; Don't ask confirmation to overwrite a file. @@ -109,7 +109,7 @@ wdired-mode." (let* ((test-dir (make-temp-file "test-dir-" t)) (test-file (concat (file-name-as-directory test-dir) "foo.c")) (replace "bar") - (new-file (replace-regexp-in-string "foo" replace test-file))) + (new-file (string-replace "foo" replace test-file))) (write-region "" nil test-file nil 'silent) (let ((buf (find-file-noselect test-dir))) (unwind-protect diff --git a/test/src/json-tests.el b/test/src/json-tests.el index 908945fcb08..8dc0a744aa0 100644 --- a/test/src/json-tests.el +++ b/test/src/json-tests.el @@ -252,7 +252,7 @@ Test with both unibyte and multibyte strings." (let* ((input "{ \"abc\" : [9, false] , \"def\" : null }") (output - (replace-regexp-in-string " " "" input))) + (string-replace " " "" input))) (should (equal (json-parse-string input :object-type 'plist :null-object :json-null -- cgit v1.2.3 From 3b7b181bded1bddb2505eda1224a5631cbf04c1b Mon Sep 17 00:00:00 2001 From: Mattias Engdegård Date: Mon, 9 Aug 2021 11:20:00 +0200 Subject: Use string-search instead of string-match[-p] `string-search` is easier to understand, less error-prone, much faster, does not pollute the regexp cache, and does not mutate global state. Use it where applicable and obviously safe (erring on the conservative side). * admin/authors.el (authors-canonical-file-name) (authors-scan-change-log): * lisp/apropos.el (apropos-command) (apropos-documentation-property, apropos-symbols-internal): * lisp/arc-mode.el (archive-arc-summarize) (archive-zoo-summarize): * lisp/calc/calc-aent.el (math-read-factor): * lisp/calc/calc-ext.el (math-read-big-expr) (math-format-nice-expr, math-format-number-fancy): * lisp/calc/calc-forms.el (math-read-angle-brackets): * lisp/calc/calc-graph.el (calc-graph-set-range): * lisp/calc/calc-keypd.el (calc-keypad-press): * lisp/calc/calc-lang.el (tex, latex, math-read-big-rec): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-user-define-permanent, math-define-exp): * lisp/calc/calc.el (calc-record, calcDigit-key) (calc-count-lines): * lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots) (math-do-integral): * lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum) (calc-get-fit-variables): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/java.el (semantic-java-expand-tag): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/cedet/semantic/wisent/python.el (semantic-python-instance-variable-p): * lisp/cus-edit.el (get): * lisp/descr-text.el (describe-text-sexp): * lisp/dired-aux.el (dired-compress-file): * lisp/dired-x.el (dired-make-relative-symlink): * lisp/dired.el (dired-glob-regexp): * lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename): * lisp/edmacro.el (edmacro-format-keys): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/emulation/viper-ex.el (viper-ex-read-file-name) (ex-print-display-lines): * lisp/env.el (read-envvar-name, setenv): * lisp/epa-mail.el (epa-mail-encrypt): * lisp/epg.el (epg--start): * lisp/erc/erc-backend.el (erc-parse-server-response): * lisp/erc/erc-dcc.el (erc-dcc-member): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-server) (erc-speedbar-expand-channel, erc-speedbar-expand-user): * lisp/erc/erc.el (erc-send-input): * lisp/eshell/em-glob.el (eshell-glob-entries): * lisp/eshell/esh-proc.el (eshell-needs-pipe-p): * lisp/eshell/esh-util.el (eshell-convert): * lisp/eshell/esh-var.el (eshell-envvar-names): * lisp/faces.el (x-resolve-font-name): * lisp/ffap.el (ffap-file-at-point): * lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern): * lisp/forms.el (forms--update): * lisp/frameset.el (frameset-filter-unshelve-param): * lisp/gnus/gnus-art.el (article-decode-charset): * lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file): * lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy): * lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc) (gnus-inews-insert-gcc): * lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body): * lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output) (gnus-search--complete-key-data): * lisp/gnus/gnus-spec.el (gnus-parse-simple-format): * lisp/gnus/gnus-sum.el (gnus-summary-refer-article): * lisp/gnus/gnus-util.el (gnus-extract-address-components) (gnus-newsgroup-directory-form): * lisp/gnus/gnus-uu.el (gnus-uu-grab-view): * lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name): * lisp/gnus/message.el (message-check-news-header-syntax) (message-make-message-id, message-user-mail-address) (message-make-fqdn, message-get-reply-headers, message-followup): * lisp/gnus/mm-decode.el (mm-dissect-buffer): * lisp/gnus/nnheader.el (nnheader-insert): * lisp/gnus/nnimap.el (nnimap-process-quirk) (nnimap-imap-ranges-to-gnus-ranges): * lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix): * lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path): * lisp/gnus/nnrss.el (nnrss-match-macro): * lisp/gnus/nntp.el (nntp-find-group-and-number): * lisp/help-fns.el (help--symbol-completion-table-affixation): * lisp/help.el (help-function-arglist): * lisp/hippie-exp.el (he-concat-directory-file-name): * lisp/htmlfontify.el (hfy-relstub): * lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word) (ido-exhibit): * lisp/image/image-converter.el (image-convert-p): * lisp/info-xref.el (info-xref-docstrings): * lisp/info.el (Info-toc-build, Info-follow-reference) (Info-backward-node, Info-finder-find-node) (Info-speedbar-expand-node): * lisp/international/mule-diag.el (print-fontset-element): * lisp/language/korea-util.el (default-korean-keyboard): * lisp/linum.el (linum-after-change): * lisp/mail/ietf-drums.el (ietf-drums-parse-address): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rmailkwd.el (rmail-set-label): * lisp/mail/rmailsum.el (rmail-header-summary): * lisp/mail/smtpmail.el (smtpmail-maybe-append-domain) (smtpmail-user-mail-address): * lisp/mail/uce.el (uce-reply-to-uce): * lisp/man.el (Man-default-man-entry): * lisp/mh-e/mh-alias.el (mh-alias-gecos-name) (mh-alias-minibuffer-confirm-address): * lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): * lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output): * lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter) (mh-folder-completion-function): * lisp/minibuffer.el (completion--make-envvar-table) (completion-file-name-table, completion-flex-try-completion) (completion-flex-all-completions): * lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p) (mpc-constraints-tag-lookup): * lisp/net/ange-ftp.el (ange-ftp-send-cmd) (ange-ftp-allow-child-lookup): * lisp/net/mailcap.el (mailcap-mime-types): * lisp/net/mairix.el (mairix-search-thread-this-article): * lisp/net/pop3.el (pop3-open-server): * lisp/net/soap-client.el (soap-decode-xs-complex-type): * lisp/net/socks.el (socks-filter): * lisp/nxml/nxml-outln.el (nxml-highlighted-qname): * lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype): * lisp/nxml/rng-uri.el (rng-uri-file-name-1): * lisp/obsolete/complete.el (partial-completion-mode) (PC-do-completion): * lisp/obsolete/longlines.el (longlines-encode-string): * lisp/obsolete/nnir.el (nnir-compose-result): * lisp/obsolete/terminal.el (te-quote-arg-for-sh): * lisp/obsolete/tpu-edt.el (tpu-check-search-case): * lisp/obsolete/url-ns.el (isPlainHostName): * lisp/pcmpl-unix.el (pcomplete/scp): * lisp/play/dunnet.el (dun-listify-string2, dun-get-path) (dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface): * lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment): * lisp/progmodes/gdb-mi.el (gdb-var-delete) (gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result): * lisp/progmodes/gud.el (gud-find-expr): * lisp/progmodes/idlw-help.el (idlwave-do-context-help1): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-filter-hidden-output, idlwave-shell-filter): * lisp/progmodes/idlwave.el (idlwave-skip-label-or-case) (idlwave-routine-info): * lisp/progmodes/octave.el (inferior-octave-completion-at-point): * lisp/progmodes/sh-script.el (sh-add-completer): * lisp/progmodes/sql.el (defun): * lisp/progmodes/xscheme.el (xscheme-process-filter): * lisp/replace.el (query-replace-compile-replacement) (map-query-replace-regexp): * lisp/shell.el (shell--command-completion-data) (shell-environment-variable-completion): * lisp/simple.el (display-message-or-buffer): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/subr.el (split-string-and-unquote): * lisp/tar-mode.el (tar-extract): * lisp/term.el (term-command-hook, serial-read-name): * lisp/textmodes/bibtex.el (bibtex-print-help-message): * lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter) (ispell-parse-output, ispell-buffer-local-parsing): * lisp/textmodes/reftex-cite.el (reftex-do-citation): * lisp/textmodes/reftex-parse.el (reftex-notice-new): * lisp/textmodes/reftex-ref.el (reftex-show-entry): * lisp/textmodes/reftex.el (reftex-compile-variables): * lisp/textmodes/tex-mode.el (tex-send-command) (tex-start-tex, tex-append): * lisp/thingatpt.el (thing-at-point-url-at-point): * lisp/tmm.el (tmm-add-one-shortcut): * lisp/transient.el (transient-format-key): * lisp/url/url-auth.el (url-basic-auth) (url-digest-auth-directory-id-assoc): * lisp/url/url-news.el (url-news): * lisp/url/url-util.el (url-parse-query-string): * lisp/vc/vc-cvs.el (vc-cvs-parse-entry): * lisp/wid-browse.el (widget-browse-sexp): * lisp/woman.el (woman-parse-colon-path, woman-mini-help) (WoMan-getpage-in-background, woman-negative-vertical-space): * lisp/xml.el: * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-warn): * test/lisp/files-tests.el (files-tests-file-name-non-special-dired-compress-handler): * test/lisp/net/network-stream-tests.el (server-process-filter): * test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode): Use `string-search` instead of `string-match` and `string-match-p`. --- admin/authors.el | 4 ++-- lisp/apropos.el | 8 ++++---- lisp/arc-mode.el | 4 ++-- lisp/calc/calc-aent.el | 4 ++-- lisp/calc/calc-ext.el | 6 +++--- lisp/calc/calc-forms.el | 2 +- lisp/calc/calc-graph.el | 2 +- lisp/calc/calc-keypd.el | 2 +- lisp/calc/calc-lang.el | 8 ++++---- lisp/calc/calc-prog.el | 8 ++++---- lisp/calc/calc.el | 6 +++--- lisp/calc/calcalg2.el | 6 +++--- lisp/calc/calcalg3.el | 6 +++--- lisp/cedet/ede/speedbar.el | 4 ++-- lisp/cedet/semantic/java.el | 2 +- lisp/cedet/semantic/sb.el | 8 ++++---- lisp/cedet/semantic/wisent/python.el | 2 +- lisp/cus-edit.el | 2 +- lisp/descr-text.el | 2 +- lisp/dired-aux.el | 2 +- lisp/dired-x.el | 6 +++--- lisp/dired.el | 2 +- lisp/dos-fns.el | 12 ++++++------ lisp/edmacro.el | 2 +- lisp/emacs-lisp/eieio-opt.el | 4 ++-- lisp/emacs-lisp/eieio-speedbar.el | 4 ++-- lisp/emacs-lisp/lisp-mnt.el | 2 +- lisp/emacs-lisp/warnings.el | 2 +- lisp/emulation/viper-ex.el | 6 +++--- lisp/env.el | 4 ++-- lisp/epa-mail.el | 2 +- lisp/epg.el | 2 +- lisp/erc/erc-backend.el | 10 +++++----- lisp/erc/erc-dcc.el | 2 +- lisp/erc/erc-speedbar.el | 12 ++++++------ lisp/erc/erc.el | 2 +- lisp/eshell/em-glob.el | 2 +- lisp/eshell/esh-proc.el | 2 +- lisp/eshell/esh-util.el | 2 +- lisp/eshell/esh-var.el | 2 +- lisp/faces.el | 2 +- lisp/ffap.el | 2 +- lisp/files.el | 4 ++-- lisp/forms.el | 2 +- lisp/frameset.el | 2 +- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-kill.el | 2 +- lisp/gnus/gnus-mlspl.el | 2 +- lisp/gnus/gnus-msg.el | 10 +++++----- lisp/gnus/gnus-rfc1843.el | 2 +- lisp/gnus/gnus-search.el | 4 ++-- lisp/gnus/gnus-spec.el | 2 +- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/gnus-util.el | 4 ++-- lisp/gnus/gnus-uu.el | 2 +- lisp/gnus/gnus.el | 8 ++++---- lisp/gnus/message.el | 26 +++++++++++++------------- lisp/gnus/mm-decode.el | 2 +- lisp/gnus/nnheader.el | 2 +- lisp/gnus/nnimap.el | 4 ++-- lisp/gnus/nnmaildir.el | 2 +- lisp/gnus/nnmairix.el | 2 +- lisp/gnus/nnrss.el | 2 +- lisp/gnus/nntp.el | 4 ++-- lisp/help-fns.el | 2 +- lisp/help.el | 2 +- lisp/hippie-exp.el | 4 ++-- lisp/htmlfontify.el | 2 +- lisp/ido.el | 10 +++++----- lisp/image/image-converter.el | 2 +- lisp/info-xref.el | 2 +- lisp/info.el | 12 ++++++------ lisp/international/mule-diag.el | 4 ++-- lisp/language/korea-util.el | 2 +- lisp/linum.el | 2 +- lisp/mail/ietf-drums.el | 2 +- lisp/mail/mail-utils.el | 2 +- lisp/mail/rfc2047.el | 4 ++-- lisp/mail/rfc2231.el | 6 +++--- lisp/mail/rmailkwd.el | 2 +- lisp/mail/rmailsum.el | 2 +- lisp/mail/smtpmail.el | 4 ++-- lisp/mail/uce.el | 8 ++++---- lisp/man.el | 2 +- lisp/mh-e/mh-alias.el | 6 +++--- lisp/mh-e/mh-comp.el | 4 ++-- lisp/mh-e/mh-speed.el | 2 +- lisp/mh-e/mh-utils.el | 4 ++-- lisp/minibuffer.el | 8 ++++---- lisp/mpc.el | 6 +++--- lisp/net/ange-ftp.el | 6 +++--- lisp/net/mailcap.el | 2 +- lisp/net/mairix.el | 2 +- lisp/net/pop3.el | 4 ++-- lisp/net/soap-client.el | 2 +- lisp/net/socks.el | 2 +- lisp/nxml/nxml-outln.el | 2 +- lisp/nxml/rng-cmpct.el | 4 ++-- lisp/nxml/rng-uri.el | 4 ++-- lisp/obsolete/complete.el | 4 ++-- lisp/obsolete/longlines.el | 4 ++-- lisp/obsolete/nnir.el | 2 +- lisp/obsolete/terminal.el | 2 +- lisp/obsolete/tpu-edt.el | 6 +++--- lisp/obsolete/url-ns.el | 2 +- lisp/pcmpl-unix.el | 2 +- lisp/play/dunnet.el | 18 +++++++++--------- lisp/progmodes/ebnf2ps.el | 2 +- lisp/progmodes/gdb-mi.el | 8 ++++---- lisp/progmodes/gud.el | 2 +- lisp/progmodes/idlw-help.el | 2 +- lisp/progmodes/idlw-shell.el | 10 +++++----- lisp/progmodes/idlwave.el | 8 ++++---- lisp/progmodes/octave.el | 2 +- lisp/progmodes/sh-script.el | 2 +- lisp/progmodes/sql.el | 2 +- lisp/progmodes/xscheme.el | 4 ++-- lisp/replace.el | 8 ++++---- lisp/shell.el | 4 ++-- lisp/simple.el | 4 ++-- lisp/speedbar.el | 12 ++++++------ lisp/subr.el | 2 +- lisp/tar-mode.el | 2 +- lisp/term.el | 6 +++--- lisp/textmodes/bibtex.el | 2 +- lisp/textmodes/ispell.el | 10 +++++----- lisp/textmodes/reftex-cite.el | 2 +- lisp/textmodes/reftex-parse.el | 2 +- lisp/textmodes/reftex-ref.el | 2 +- lisp/textmodes/reftex.el | 2 +- lisp/textmodes/tex-mode.el | 6 +++--- lisp/thingatpt.el | 2 +- lisp/tmm.el | 2 +- lisp/transient.el | 2 +- lisp/url/url-auth.el | 8 ++++---- lisp/url/url-news.el | 2 +- lisp/url/url-util.el | 2 +- lisp/vc/vc-cvs.el | 2 +- lisp/wid-browse.el | 2 +- lisp/woman.el | 10 +++++----- lisp/xml.el | 4 ++-- test/lisp/emacs-lisp/check-declare-tests.el | 10 +++++----- test/lisp/files-tests.el | 2 +- test/lisp/net/network-stream-tests.el | 2 +- test/src/coding-tests.el | 2 +- 145 files changed, 299 insertions(+), 299 deletions(-) (limited to 'lisp/gnus/gnus-art.el') diff --git a/admin/authors.el b/admin/authors.el index a400b1327af..b4e6c934b67 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -1330,7 +1330,7 @@ to print a message if FILE is not found." (unless (or valid (member file authors-ignored-files) (authors-obsolete-file-p file) - (string-match "[*]" file) + (string-search "*" file) (string-match "^[0-9.]+$" file) laxlog) (setq authors-invalid-file-names @@ -1465,7 +1465,7 @@ Suggested\\|Trivial\\|Version\\|Originally\\|From:\\|Patch[ \t]+[Bb]y\\)"))) ((looking-at "^[ \t]+\\*") (let ((line (buffer-substring-no-properties (match-end 0) (line-end-position)))) - (while (and (not (string-match ":" line)) + (while (and (not (string-search ":" line)) (forward-line 1) (not (looking-at ":\\|^[ \t]*$"))) (setq line (concat line diff --git a/lisp/apropos.el b/lisp/apropos.el index 376c1b2cbc5..a1470537d9a 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -616,7 +616,7 @@ while a list of strings is used as a word list." (if (eq doc 'error) "(documentation error)" (setq score (+ score (apropos-score-doc doc))) - (substring doc 0 (string-match "\n" doc))) + (substring doc 0 (string-search "\n" doc))) "(not documented)"))) (and var-predicate (funcall var-predicate symbol) @@ -625,7 +625,7 @@ while a list of strings is used as a word list." (progn (setq score (+ score (apropos-score-doc doc))) (substring doc 0 - (string-match "\n" doc))))))) + (string-search "\n" doc))))))) (setcar (cdr (car p)) score) (setq p (cdr p)))) (and (let ((apropos-multi-type do-all)) @@ -639,7 +639,7 @@ while a list of strings is used as a word list." "Like (documentation-property SYMBOL PROPERTY RAW) but handle errors." (condition-case () (let ((doc (documentation-property symbol property raw))) - (if doc (substring doc 0 (string-match "\n" doc)) + (if doc (substring doc 0 (string-search "\n" doc)) "(not documented)")) (error "(error retrieving documentation)"))) @@ -767,7 +767,7 @@ the output includes key-bindings of commands." "(alias for undefined function)") (error "(can't retrieve function documentation)"))) - (substring doc 0 (string-match "\n" doc)) + (substring doc 0 (string-search "\n" doc)) "(not documented)")) (when (boundp symbol) (apropos-documentation-property diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 83c516100ab..71ad7bd0c5d 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1707,7 +1707,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (= (get-byte p) ?\C-z) (> (get-byte (1+ p)) 0)) (let* ((namefld (buffer-substring (+ p 2) (+ p 2 13))) - (fnlen (or (string-match "\0" namefld) 13)) + (fnlen (or (string-search "\0" namefld) 13)) (efnname (decode-coding-string (substring namefld 0 fnlen) archive-file-name-coding-system)) (csize (archive-l-e (+ p 15) 4)) @@ -2089,7 +2089,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (dirtype (get-byte (+ p 4))) (lfnlen (if (= dirtype 2) (get-byte (+ p 56)) 0)) (ldirlen (if (= dirtype 2) (get-byte (+ p 57)) 0)) - (fnlen (or (string-match "\0" namefld) 13)) + (fnlen (or (string-search "\0" namefld) 13)) (efnname (let ((str (concat (if (> ldirlen 0) diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 1e31c3cadc0..db4751a9fbb 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -1139,7 +1139,7 @@ If the current Calc language does not use placeholders, return nil." 0) (setq sym (intern (substring (symbol-name sym) 1)))) - (or (string-match "-" (symbol-name sym)) + (or (string-search "-" (symbol-name sym)) (setq sym (intern (concat "calcFunc-" (symbol-name sym)))))) @@ -1149,7 +1149,7 @@ If the current Calc language does not use placeholders, return nil." (let ((val (list 'var (intern (math-remove-dashes (symbol-name sym))) - (if (string-match "-" (symbol-name sym)) + (if (string-search "-" (symbol-name sym)) sym (intern (concat "var-" (symbol-name sym))))))) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index e85ecf03906..45337e187be 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -3088,7 +3088,7 @@ If X is not an error form, return 1." (math-read-big-err-msg nil) math-read-big-baseline math-read-big-h2 new-pos p) - (while (setq new-pos (string-match "\n" str pos)) + (while (setq new-pos (string-search "\n" str pos)) (setq math-read-big-lines (cons (substring str pos new-pos) math-read-big-lines) pos (1+ new-pos))) @@ -3249,7 +3249,7 @@ If X is not an error form, return 1." (t (let ((str (math-format-flat-expr x 0)) (pos 0) p) - (or (string-match "\"" str) + (or (string-search "\"" str) (while (<= (setq p (+ pos w)) (length str)) (while (and (> (setq p (1- p)) pos) (not (= (aref str p) ? )))) @@ -3278,7 +3278,7 @@ If X is not an error form, return 1." (math-format-radix-float a prec)) (format "%d#%s" calc-number-radix (math-format-radix-float a prec))))) - (if (and prec (> prec 191) (string-match "\\*" str)) + (if (and prec (> prec 191) (string-search "*" str)) (concat "(" str ")") str)))) ((eq (car a) 'frac) diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index ee53b94cd64..ac57011da04 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -2238,7 +2238,7 @@ and ends on the last Sunday of October at 2 a.m." (if (eq (car-safe str2) 'error) str2 (append '(calcFunc-lambda) (cdr str1) (list str2))))) - (if (string-match "#" str) + (if (string-search "#" str) (let ((calc-hashes-used 0)) (and (setq str (math-read-expr str)) (if (eq (car-safe str) 'error) diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 423d1e64126..9ac24bf1889 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -1025,7 +1025,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0." (calc-pop-stack 1)))) (if (string-match "\\[.+\\]" range) (setq range (substring range 1 -1))) - (if (and (not (string-match ":" range)) + (if (and (not (string-search ":" range)) (or (string-match "," range) (string-match " " range))) (aset range (match-beginning 0) ?\:)) diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index 1902a4f3f29..acbef27a1da 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el @@ -481,7 +481,7 @@ ":" (if (and (equal cmd "e") (or (not input) - (string-match + (string-search "#" input)) (> radix 14)) (format "*%d.^" radix) diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 0117f449dd5..aef3173f5c0 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -660,7 +660,7 @@ (setq math-exp-pos (match-end 0) math-exp-token 'punc math-expr-data "[") - (let ((right (string-match "}" math-exp-str math-exp-pos))) + (let ((right (string-search "}" math-exp-str math-exp-pos))) (and right (setq math-exp-str (copy-sequence math-exp-str)) (aset math-exp-str right ?\])))))))))) @@ -899,7 +899,7 @@ (setq math-exp-pos (match-end 0) math-exp-token 'punc math-expr-data "[") - (let ((right (string-match "}" math-exp-str math-exp-pos))) + (let ((right (string-search "}" math-exp-str math-exp-pos))) (and right (setq math-exp-str (copy-sequence math-exp-str)) (aset math-exp-str right ?\])))))))))) @@ -2342,7 +2342,7 @@ order to Calc's." (math-read-big-emptyp math-rb-h1 (1+ v) h math-rb-v2 nil t) (if (= (math-read-big-char widest v) ?\() (progn - (setq line (if (string-match "-" p) + (setq line (if (string-search "-" p) (intern p) (intern (concat "calcFunc-" p))) h (1+ widest) @@ -2362,7 +2362,7 @@ order to Calc's." (setq p (cons line (nreverse p)))) (setq p (list 'var (intern (math-remove-dashes p)) - (if (string-match "-" p) + (if (string-search "-" p) (intern p) (intern (concat "var-" p))))))) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 6f1e5c782df..f9dd9eb98a9 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -604,7 +604,7 @@ ((equal name "#") (search-backward "#") (error "Token `#' is reserved")) - ((and unquoted (string-match "#" name)) + ((and unquoted (string-search "#" name)) (error "Tokens containing `#' must be quoted")) ((not (string-match "[^ ]" name)) (search-backward "\"" nil t) @@ -1068,7 +1068,7 @@ Redefine the corresponding command." (insert (setq str (prin1-to-string (cons 'defun (cons cmd (cdr fcmd))))) "\n") - (or (and (string-match "\"" str) (not q-ok)) + (or (and (string-search "\"" str) (not q-ok)) (fill-region pt (point))) (indent-rigidly pt (point) 2) (delete-region pt (1+ pt)) @@ -1087,7 +1087,7 @@ Redefine the corresponding command." (cons 'defun (cons func (cdr ffunc))))) "\n") - (or (and (string-match "\"" str) (not q-ok)) + (or (and (string-search "\"" str) (not q-ok)) (fill-region pt (point))) (indent-rigidly pt (point) 2) (delete-region pt (1+ pt)) @@ -2132,7 +2132,7 @@ Redefine the corresponding command." (cdr prim)) ((memq exp math-exp-env) exp) - ((string-match "-" name) + ((string-search "-" name) exp) (t (intern (concat "var-" name)))))) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 1e7d5e7766c..a10b3178302 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -2126,7 +2126,7 @@ the United States." (goto-char (point-max)) (cond ((null prefix) (insert " ")) ((and (> (length prefix) 4) - (string-match " " prefix 4)) + (string-search " " prefix 4)) (insert (substring prefix 0 4) " ")) (t (insert (format "%4s " prefix)))) (insert fval "\n") @@ -2469,7 +2469,7 @@ the United States." (calc-minibuffer-contains "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9]+\\.?0*[@oh] *\\)?\\([0-9]+\\.?0*['m] *\\)?[0-9]*\\(\\.?[0-9]*\\(e[-+]?[0-3]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?\\)?\\|[0-9]:\\([0-9]+:\\)?[0-9]*\\)?[\"s]?\\'")) (if (and (memq last-command-event '(?@ ?o ?h ?\' ?m)) - (string-match " " calc-hms-format)) + (string-search " " calc-hms-format)) (insert " ")) (if (and (memq last-command '(calcDigit-start calcDigit-key)) (eq last-command-event ?.)) @@ -3059,7 +3059,7 @@ the United States." (defun calc-count-lines (s) (let ((pos 0) (num 1)) - (while (setq pos (string-match "\n" s pos)) + (while (setq pos (string-search "\n" s pos)) (setq pos (1+ pos) num (1+ num))) num)) diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 94b99aa29d8..8d93ae987a1 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -158,7 +158,7 @@ (calc-top-n 2) (calc-top-n 1))) (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var) - (not (string-match "\\[" var))) + (not (string-search "[" var))) (math-read-expr (concat "[" var "]")) (math-read-expr var)))) (if (eq (car-safe var) 'error) @@ -175,7 +175,7 @@ (calc-top-n 2) (calc-top-n 1))) (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var) - (not (string-match "\\[" var))) + (not (string-search "[" var))) (math-read-expr (concat "[" var "]")) (math-read-expr var)))) (if (eq (car-safe var) 'error) @@ -1028,7 +1028,7 @@ (fset 'calcFunc-integ math-old-integ)))) ;; See if the function is a symbolic derivative. - (and (string-match "'" (symbol-name (car expr))) + (and (string-search "'" (symbol-name (car expr))) (let ((name (symbol-name (car expr))) (p expr) (n 0) (which nil) (bad nil)) (while (setq n (1+ n) p (cdr p)) diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index ee3ae0a4c1f..3cb1886f3bd 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el @@ -56,7 +56,7 @@ (calc-top-n 1) (calc-top-n 2))) (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var) - (not (string-match "\\[" var))) + (not (string-search "[" var))) (math-read-expr (concat "[" var "]")) (math-read-expr var)))) (if (eq (car-safe var) 'error) @@ -81,7 +81,7 @@ (calc-top-n 1) (calc-top-n 2))) (let ((var (if (and (string-match ",\\|[^ ] +[^ ]" var) - (not (string-match "\\[" var))) + (not (string-search "[" var))) (math-read-expr (concat "[" var "]")) (math-read-expr var)))) (if (eq (car-safe var) 'error) @@ -490,7 +490,7 @@ defc) ","))))) (coefs nil)) - (setq vars (if (string-match "\\[" vars) + (setq vars (if (string-search "[" vars) (math-read-expr vars) (math-read-expr (concat "[" vars "]")))) (if (eq (car-safe vars) 'error) diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index 01d4f943df5..b321cb637bc 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -276,7 +276,7 @@ INDENT is the current indentation level." Etags does not support this feature. TEXT will be the button string. TOKEN will be the list, and INDENT is the current indentation level." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -284,7 +284,7 @@ level." (speedbar-insert-generic-list indent token 'ede-tag-expand 'ede-tag-find)))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) diff --git a/lisp/cedet/semantic/java.el b/lisp/cedet/semantic/java.el index f48b835fe39..0c2fb843f0b 100644 --- a/lisp/cedet/semantic/java.el +++ b/lisp/cedet/semantic/java.el @@ -141,7 +141,7 @@ corresponding compound declaration." (semantic-tag-put-attribute clone :dereference (+ dim0 (cdr dim))) (semantic-tag-set-bounds clone start end))) - ((and (eq class 'type) (string-match "\\." (semantic-tag-name tag))) + ((and (eq class 'type) (string-search "." (semantic-tag-name tag))) ;; javap outputs files where the package name is stuck onto the class or interface ;; name. To make this more regular, we extract the package name into a package statement, ;; then make the class name regular. diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el index debdfd1dc04..fe981d34fb7 100644 --- a/lisp/cedet/semantic/sb.el +++ b/lisp/cedet/semantic/sb.el @@ -279,7 +279,7 @@ Optional MODIFIERS is additional text needed for variables." (defun semantic-sb-show-extra (text token indent) "Display additional information about the token as an expansion. TEXT TOKEN and INDENT are the details." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -288,7 +288,7 @@ TEXT TOKEN and INDENT are the details." (narrow-to-region (point) (point)) ;; Add in stuff specific to this type of token. (semantic-sb-insert-details token (1+ indent)))))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) @@ -325,7 +325,7 @@ TEXT TOKEN and INDENT are the details." (defun semantic-sb-expand-group (text token indent) "Expand a group which has semantic tokens. TEXT TOKEN and INDENT are the details." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -333,7 +333,7 @@ TEXT TOKEN and INDENT are the details." (save-restriction (narrow-to-region (point-min) (point)) (semantic-sb-buttons-plain (1+ indent) token))))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el index 9ac4ed9f518..fb878dde712 100644 --- a/lisp/cedet/semantic/wisent/python.el +++ b/lisp/cedet/semantic/wisent/python.el @@ -555,7 +555,7 @@ SELF or the instance name \"self\" if SELF is nil." (rx-to-string `(seq string-start ,(or self "self") ".")) name) - (not (string-match "\\." (substring name 5))))))) + (not (string-search "." (substring name 5))))))) (defun semantic-python-docstring-p (tag) "Return non-nil, when TAG is a Python documentation string." diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 980a1cc7179..7eae2e416bb 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1910,7 +1910,7 @@ item in another window.\n\n")) (widget-put (get 'editable-field 'widget-type) :custom-show (lambda (_widget value) (let ((pp (pp-to-string value))) - (cond ((string-match-p "\n" pp) + (cond ((string-search "\n" pp) nil) ((> (length pp) 40) nil) diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 85017de5d5e..f5e467d37e7 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -50,7 +50,7 @@ (when (string-match-p "\n\\'" pp) (setq pp (substring pp 0 (1- (length pp))))) - (if (and (not (string-match-p "\n" pp)) + (if (and (not (string-search "\n" pp)) (<= (length pp) (- (window-width) (current-column)))) (insert pp) (insert-text-button diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 5dbd55849e9..0b8c693b29f 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1288,7 +1288,7 @@ Return nil if no change in files." nil t) nil t))) ;; We found an uncompression rule. - (let ((match (string-match " " command)) + (let ((match (string-search " " command)) (msg (concat "Uncompressing " file))) (unless (if match (dired-check-process msg diff --git a/lisp/dired-x.el b/lisp/dired-x.el index a990bd3fec3..380e47786fc 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -1044,11 +1044,11 @@ results in len2 (length file2)) ;; Find common initial file name components: (let (next) - (while (and (setq next (string-match "/" file1 index)) + (while (and (setq next (string-search "/" file1 index)) (< (setq next (1+ next)) (min len1 len2)) ;; For the comparison, both substrings must end in ;; `/', so NEXT is *one plus* the result of the - ;; string-match. + ;; string-search. ;; E.g., consider the case of linking "/tmp/a/abc" ;; to "/tmp/abc" erroneously giving "/tmp/a" instead ;; of "/tmp/" as common initial component @@ -1066,7 +1066,7 @@ results in (start 0) (count 0)) ;; Count number of slashes we must compensate for ... - (while (setq start (string-match "/" tem start)) + (while (setq start (string-search "/" tem start)) (setq count (1+ count) start (1+ start))) ;; ... and prepend a "../" for each slash found: diff --git a/lisp/dired.el b/lisp/dired.el index 816b8b69881..ff822506bf1 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2909,7 +2909,7 @@ dired-buffers." (if (= (aref pattern (1+ set-start)) ?^) (+ 3 set-start) (+ 2 set-start))) - (set-end (string-match-p "]" pattern set-cont)) + (set-end (string-search "]" pattern set-cont)) (set (substring pattern set-start (1+ set-end)))) (setq regexp (concat regexp set)) (setq matched-in-pattern (1+ set-end)))) diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el index 255edd0f371..e0a533c637a 100644 --- a/lisp/dos-fns.el +++ b/lisp/dos-fns.el @@ -86,7 +86,7 @@ sure to obey the 8.3 limitations." ;; close to the beginning, change that to a period. This ;; is so we could salvage more characters of the original ;; name by pushing them into the extension. - (if (and (not (string-match "\\." string)) + (if (and (not (string-search "." string)) (> (length string) 8) ;; We don't gain anything if we put the period closer ;; than 5 chars from the beginning (5 + 3 = 8). @@ -100,21 +100,21 @@ sure to obey the 8.3 limitations." ;; If we don't have a period in the first 8 chars, insert one. ;; This enables having 3 more characters from the original ;; name in the extension. - (if (> (or (string-match "\\." string) (length string)) + (if (> (or (string-search "." string) (length string)) 8) (setq string (concat (substring string 0 8) "." (substring string 8)))) - (setq firstdot (or (string-match "\\." string) + (setq firstdot (or (string-search "." string) (1- (length string)))) ;; Truncate to 3 chars after the first period. (if (> (length string) (+ firstdot 4)) (setq string (substring string 0 (+ firstdot 4)))) ;; Change all periods except the first one into underscores. ;; (DOS doesn't allow more than one period.) - (while (string-match "\\." string (1+ firstdot)) - (setq i (string-match "\\." string (1+ firstdot))) + (while (string-search "." string (1+ firstdot)) + (setq i (string-search "." string (1+ firstdot))) (aset string i ?_)) ;; If the last character of the original filename was `~' or `#', ;; make sure the munged name ends with it also. This is so that @@ -160,7 +160,7 @@ sure to obey the 8.3 limitations." (strlen (length string)) (lastchar (aref string (1- strlen))) firstdot) - (setq firstdot (string-match "\\." string)) + (setq firstdot (string-search "." string)) (cond (firstdot ;; Truncate the extension to 3 characters. diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 84de69a2ce1..9e4a71c336e 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -559,7 +559,7 @@ doubt, use whitespace." (or fkey key) " ")))) (if prefix (setq desc (concat (edmacro-sanitize-for-string prefix) desc))) - (unless (string-match " " desc) + (unless (string-search " " desc) (let ((times 1) (pos bind-len)) (while (not (cl-mismatch rest-mac rest-mac :start1 0 :end1 bind-len diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 08a6debc203..9c842f46829 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -323,7 +323,7 @@ current expansion depth." (defun eieio-sb-expand (text class indent) "For button TEXT, expand CLASS at the current location. Argument INDENT is the depth of indentation." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -332,7 +332,7 @@ Argument INDENT is the depth of indentation." (while subclasses (eieio-class-button (car subclasses) (1+ indent)) (setq subclasses (cdr subclasses))))))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) diff --git a/lisp/emacs-lisp/eieio-speedbar.el b/lisp/emacs-lisp/eieio-speedbar.el index 3f2a6537ab8..86b22cad73b 100644 --- a/lisp/emacs-lisp/eieio-speedbar.el +++ b/lisp/emacs-lisp/eieio-speedbar.el @@ -344,14 +344,14 @@ The object is at indentation level INDENT." (defun eieio-speedbar-object-expand (text token indent) "Expand object represented by TEXT. TOKEN is the object. INDENT is the current indentation level." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (speedbar-change-expand-button-char ?-) (oset token expanded t) (speedbar-with-writable (save-excursion (end-of-line) (forward-char 1) (eieio-speedbar-expand token (1+ indent))))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (oset token expanded nil) (speedbar-delete-subblock indent)) diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 83da495edf0..d6a6a5f0442 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -458,7 +458,7 @@ each line." "Return list of keywords given in file FILE." (let ((keywords (lm-keywords file))) (if keywords - (if (string-match-p "," keywords) + (if (string-search "," keywords) (split-string keywords ",[ \t\n]*" t "[ ]+") (split-string keywords "[ \t\n]+" t "[ ]+"))))) diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 67de690e67d..36b275e2d3c 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -307,7 +307,7 @@ entirely by setting `warning-suppress-types' or 'type 'warning-suppress-log-warning 'warning-type type)) (funcall newline) - (when (and warning-fill-prefix (not (string-match "\n" message))) + (when (and warning-fill-prefix (not (string-search "\n" message))) (let ((fill-prefix warning-fill-prefix) (fill-column warning-fill-column)) (fill-region start (point)))) diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index 5b2fa048a09..55930e7e6bc 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -1100,7 +1100,7 @@ reversed." (setq viper-keep-reading-filename nil val (read-file-name (concat prompt str) nil default-directory)) (setq val (expand-file-name val)) - (if (and (string-match " " val) + (if (and (string-search " " val) (ex-cmd-accepts-multiple-files-p ex-token)) (setq val (concat "\"" val "\""))) (setq str (concat str (if (equal val "") "" " ") @@ -2300,10 +2300,10 @@ Type `mak ' (including the space) to run make with no args." (defun ex-print-display-lines (lines) (cond ;; String doesn't contain a newline. - ((not (string-match "\n" lines)) + ((not (string-search "\n" lines)) (message "%s" lines)) ;; String contains only one newline at the end. Strip it off. - ((= (string-match "\n" lines) (1- (length lines))) + ((= (string-search "\n" lines) (1- (length lines))) (message "%s" (substring lines 0 -1))) ;; String spans more than one line. Use a temporary buffer. (t diff --git a/lisp/env.el b/lisp/env.el index 51247f1ff84..83f43d1006b 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -44,7 +44,7 @@ If it is also not t, RET does not exit if it does non-null completion." (completing-read prompt (mapcar (lambda (enventry) (let ((str (substring enventry 0 - (string-match "=" enventry)))) + (string-search "=" enventry)))) (if (multibyte-string-p str) (decode-coding-string str locale-coding-system t) @@ -184,7 +184,7 @@ a side-effect." (setq variable (encode-coding-string variable locale-coding-system))) (if (and value (multibyte-string-p value)) (setq value (encode-coding-string value locale-coding-system))) - (if (string-match-p "=" variable) + (if (string-search "=" variable) (error "Environment variable name `%s' contains `='" variable)) (if (string-equal "TZ" variable) (set-time-zone-rule value)) diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index bed0c065aea..b9dd437ed12 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -219,7 +219,7 @@ If no one is selected, symmetric encryption will be performed. " (epa-mail--find-usable-key (epg-list-keys (epg-make-context epa-protocol) - (if (string-match "@" recipient) + (if (string-search "@" recipient) (concat "<" recipient ">") recipient)) 'encrypt))) diff --git a/lisp/epg.el b/lisp/epg.el index 36515ef4e5f..9d6295594fd 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -573,7 +573,7 @@ callback data (if any)." "--status-fd" "1" "--yes") (if (and (not (eq (epg-context-protocol context) 'CMS)) - (string-match ":" (or agent-info ""))) + (string-search ":" (or agent-info ""))) '("--use-agent")) (if (and (not (eq (epg-context-protocol context) 'CMS)) (epg-context-progress-callback context)) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 7a17ee233fd..6d84665873e 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -950,15 +950,15 @@ PROCs `process-buffer' is `current-buffer' when this function is called." (unless (string= string "") ;; Ignore empty strings (save-match-data (let* ((tag-list (when (eq (aref string 0) ?@) - (substring string 1 (string-match " " string)))) + (substring string 1 (string-search " " string)))) (msg (make-erc-response :unparsed string :tags (when tag-list (erc-parse-tags tag-list)))) (string (if tag-list - (substring string (+ 1 (string-match " " string))) + (substring string (+ 1 (string-search " " string))) string)) (posn (if (eq (aref string 0) ?:) - (string-match " " string) + (string-search " " string) 0))) (setf (erc-response.sender msg) @@ -968,7 +968,7 @@ PROCs `process-buffer' is `current-buffer' when this function is called." (setf (erc-response.command msg) (let* ((bposn (string-match "[^ \n]" string posn)) - (eposn (string-match " " string bposn))) + (eposn (string-search " " string bposn))) (setq posn (and eposn (string-match "[^ \n]" string eposn))) (substring string bposn eposn))) @@ -976,7 +976,7 @@ PROCs `process-buffer' is `current-buffer' when this function is called." (while (and posn (not (eq (aref string posn) ?:))) (push (let* ((bposn posn) - (eposn (string-match " " string bposn))) + (eposn (string-search " " string bposn))) (setq posn (and eposn (string-match "[^ \n]" string eposn))) (substring string bposn eposn)) diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index fcdb8df2032..de72624aaa1 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -187,7 +187,7 @@ compared with `erc-nick-equal-p' which is IRC case-insensitive." (plist-get elt prop))) ;; if the property exists and is equal, we continue, else, try the ;; next element of the list - (or (and (eq prop :nick) (string-match "!" val) + (or (and (eq prop :nick) (string-search "!" val) test (string-equal test val)) (and (eq prop :nick) test val diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index bb858445235..e61e741302d 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el @@ -139,7 +139,7 @@ This will add a speedbar major display mode." t)))) (defun erc-speedbar-expand-server (text server indent) - (cond ((string-match "\\+" text) + (cond ((string-search "+" text) (speedbar-change-expand-button-char ?-) (if (speedbar-with-writable (save-excursion @@ -147,7 +147,7 @@ This will add a speedbar major display mode." (erc-speedbar-channel-buttons nil (1+ indent) server))) (speedbar-change-expand-button-char ?-) (speedbar-change-expand-button-char ??))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) @@ -184,7 +184,7 @@ This will add a speedbar major display mode." "For the line matching TEXT, in CHANNEL, expand or contract a line. INDENT is the current indentation level." (cond - ((string-match "\\+" text) + ((string-search "+" text) (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -233,7 +233,7 @@ INDENT is the current indentation level." (speedbar-with-writable (dolist (entry names) (erc-speedbar-insert-user entry ?+ (1+ indent)))))))))) - ((string-match "-" text) + ((string-search "-" text) (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) @@ -284,7 +284,7 @@ The update is only done when the channel is actually expanded already." (erc-speedbar-expand-channel "+" buffer 1))))) (defun erc-speedbar-expand-user (text token indent) - (cond ((string-match "\\+" text) + (cond ((string-search "+" text) (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion @@ -307,7 +307,7 @@ The update is only done when the channel is actually expanded already." nil nil nil nil info nil nil nil (1+ indent))))))) - ((string-match "-" text) + ((string-search "-" text) (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index c66b03d2e4e..73202016ba7 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -5587,7 +5587,7 @@ This returns non-nil only if we actually send anything." (when (and (erc-input-sendp state) erc-send-this) (let ((string (erc-input-string state))) - (if (or (string-match "\n" string) + (if (or (string-search "\n" string) (not (string-match erc-command-regexp string))) (mapc (lambda (line) diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index 316094b17e4..e36f2d0c7fe 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -291,7 +291,7 @@ the form: (let ((index 1)) (setq incl glob) (while (and (eq incl glob) - (setq index (string-match "~" glob index))) + (setq index (string-search "~" glob index))) (if (or (get-text-property index 'escaped glob) (or (= (1+ index) len))) (setq index (1+ index)) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 96c9a60deab..7a0b26a0658 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -266,7 +266,7 @@ See `eshell-needs-pipe'." ;; neither 'first nor 'last? See bug#1388 discussion. (catch 'found (dolist (exe eshell-needs-pipe) - (if (string-equal exe (if (string-match "/" exe) + (if (string-equal exe (if (string-search "/" exe) command (file-name-nondirectory command))) (throw 'found t)))))) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 30104816f07..72de6b13e2e 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -204,7 +204,7 @@ then quoting is done by a backslash, rather than a doubled delimiter." string (if (eq (aref string (1- len)) ?\n) (setq string (substring string 0 (1- len)))) - (if (string-match "\n" string) + (if (string-search "\n" string) (split-string string "\n") (if (and eshell-convert-numeric-arguments (string-match diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 9fccc6b1c9d..5dc6a193050 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -381,7 +381,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'." (defun eshell-envvar-names (&optional environment) "Return a list of currently visible environment variable names." (mapcar (lambda (x) - (substring x 0 (string-match "=" x))) + (substring x 0 (string-search "=" x))) (or environment process-environment))) (defun eshell-environment-variables () diff --git a/lisp/faces.el b/lisp/faces.el index 4bb3a2b00fc..a3a6f1b78dd 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -3062,7 +3062,7 @@ also the same size as FACE on FRAME, or fail." (let ((fonts (x-list-fonts pattern face frame 1))) (or fonts (if face - (if (string-match-p "\\*" pattern) + (if (string-search "*" pattern) (if (null (face-font face)) (error "No matching fonts are the same height as the frame default font") (error "No matching fonts are the same height as face `%s'" face)) diff --git a/lisp/ffap.el b/lisp/ffap.el index 9be9c2906ea..0069af25974 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1418,7 +1418,7 @@ which may actually result in an URL rather than a filename." (string (ffap-string-at-point)) ; uses mode alist (name (or (condition-case nil - (and (not (string-match "//" string)) ; foo.com://bar + (and (not (string-search "//" string)) ; foo.com://bar (substitute-in-file-name string)) (error nil)) string)) diff --git a/lisp/files.el b/lisp/files.el index 54d0b919e1d..6c366177ce8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6979,7 +6979,7 @@ by `sh' are supported." (prog1 ; copy everything upto next `]'. (substring wildcard i - (setq j (string-match + (setq j (string-search "]" wildcard i))) (setq i (if j (1- j) (1- len))))))) ((eq ch ?.) "\\.") @@ -7105,7 +7105,7 @@ need to be passed verbatim to shell commands." ;; DOS/Windows don't allow `"' in file names. So if the ;; argument has quotes, we can safely assume it is already ;; quoted by the caller. - (if (or (string-match "[\"]" pattern) + (if (or (string-search "\"" pattern) ;; We quote [&()#$`'] in case their shell is a port of a ;; Unixy shell. We quote [,=+] because stock DOS and ;; Windows shells require that in some cases, such as diff --git a/lisp/forms.el b/lisp/forms.el index 8696aea98ee..46f4df9b6c4 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -1576,7 +1576,7 @@ As a side effect: sets `forms--the-record-list'." (forms--trans the-record "\n" forms-multi-line)) ;; A final sanity check before updating. - (if (string-match-p "\n" the-record) + (if (string-search "\n" the-record) (error "Multi-line fields in this record - update refused")) (with-current-buffer forms--file-buffer diff --git a/lisp/frameset.el b/lisp/frameset.el index e698d5401db..6aa94f8be5a 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el @@ -636,7 +636,7 @@ see `frameset-filter-alist'." (not (frameset-switch-to-gui-p parameters)) (let* ((prefix:p (symbol-name (car current))) (p (intern (substring prefix:p - (1+ (string-match-p ":" prefix:p))))) + (1+ (string-search ":" prefix:p))))) (val (cdr current)) (found (assq p filtered))) (if (not found) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index d65e75e44c2..3c1403e1551 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2519,7 +2519,7 @@ If PROMPT (the prefix), prompt for a coding system to use." format (and ctl (mail-content-type-get ctl 'format))) (when cte (setq cte (mail-header-strip-cte cte))) - (if (and ctl (not (string-match "/" (car ctl)))) + (if (and ctl (not (string-search "/" (car ctl)))) (setq ctl nil)) (goto-char (point-max))) (forward-line 1) diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el index f73627a6480..525823e72ce 100644 --- a/lisp/gnus/gnus-kill.el +++ b/lisp/gnus/gnus-kill.el @@ -435,7 +435,7 @@ Returns the number of articles marked as read." ;; The "f:+" command marks everything *but* the matches as read, ;; so we simply first match everything as read, and then unmark ;; PATTERN later. - (when (string-match "\\+" commands) + (when (string-search "+" commands) (gnus-kill "from" ".") (setq commands "m")) diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el index 664027f0164..6adda2ed147 100644 --- a/lisp/gnus/gnus-mlspl.el +++ b/lisp/gnus/gnus-mlspl.el @@ -169,7 +169,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: (when (not (null params)) (let ((split-spec (assoc 'split-spec params)) group-clean) ;; Remove backend from group name - (setq group-clean (string-match ":" group)) + (setq group-clean (string-search ":" group)) (setq group-clean (if group-clean (substring group (1+ group-clean)) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index db54237a767..ef89e6e9fcb 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1323,7 +1323,7 @@ For the \"inline\" alternatives, also see the variable ((stringp self) (insert "Gcc: " (encode-coding-string - (if (string-match " " self) + (if (string-search " " self) (concat "\"" self "\"") self) (gnus-group-name-charset (gnus-inews-group-method self) @@ -1681,7 +1681,7 @@ this is a reply." (gnus-group-find-parameter group 'gcc-self t))) (gcc-self-get (lambda (gcc-self-val group) (if (stringp gcc-self-val) - (if (string-match " " gcc-self-val) + (if (string-search " " gcc-self-val) (concat "\"" gcc-self-val "\"") gcc-self-val) ;; In nndoc groups, we use the parent group name @@ -1689,7 +1689,7 @@ this is a reply." (let ((group (or (gnus-group-find-parameter gnus-newsgroup-name 'parent-group) group))) - (if (string-match " " group) + (if (string-search " " group) (concat "\"" group "\"") group))))) result @@ -1752,11 +1752,11 @@ this is a reply." (gnus-delete-line))) ;; Use the list of groups. (while (setq name (pop groups)) - (let ((str (if (string-match ":" name) + (let ((str (if (string-search ":" name) name (gnus-group-prefixed-name name gnus-message-archive-method)))) - (insert (if (string-match " " str) + (insert (if (string-search " " str) (concat "\"" str "\"") str))) (when groups diff --git a/lisp/gnus/gnus-rfc1843.el b/lisp/gnus/gnus-rfc1843.el index 5697c870888..c135ecea369 100644 --- a/lisp/gnus/gnus-rfc1843.el +++ b/lisp/gnus/gnus-rfc1843.el @@ -44,7 +44,7 @@ (case-fold-search t) (ct (message-fetch-field "Content-Type" t)) (ctl (and ct (mail-header-parse-content-type ct)))) - (if (and ctl (not (string-match "/" (car ctl)))) + (if (and ctl (not (string-search "/" (car ctl)))) (setq ctl nil)) (goto-char (point-max)) (widen) diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 59b8efaa3ac..2a8069d400c 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -1392,7 +1392,7 @@ Returns a list of [group article score] vectors." (if (string-match-p "\\`[[:digit:]]+\\'" article) (string-to-number article) (nnmaildir-base-name-to-article-number - (substring article 0 (string-match ":" article)) + (substring article 0 (string-search ":" article)) group (string-remove-prefix "nnmaildir:" server)))) (when (and (numberp article) (or (null groups) @@ -2136,7 +2136,7 @@ article came from is also searched." ;; If the value contains spaces, make sure it's ;; quoted. (when (and (memql status '(exact finished)) - (or (string-match-p " " str) + (or (string-search " " str) in-string)) (unless (looking-at-p "\\s\"") (insert "\"")) diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index cb60108ea9c..59c6956ac2f 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -582,7 +582,7 @@ or to characters when given a pad value." ((string= fstring "") nil) ;; Not a format string. - ((not (string-match "%" fstring)) + ((not (string-search "%" fstring)) (list fstring)) ;; A format string with just a single string spec. ((string= fstring "%s") diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index dc004927b67..856e95c0ba0 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -9199,7 +9199,7 @@ specified by the `gnus-refer-thread-limit' variable." (unless (string-match ">$" message-id) (setq message-id (concat message-id ">"))) ;; People often post MIDs from URLs, so unhex it: - (unless (string-match "@" message-id) + (unless (string-search "@" message-id) (setq message-id (gnus-url-unhex-string message-id))) (let* ((header (gnus-id-to-header message-id)) (sparse (and header diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 7a5e00c5ec9..70ae81d95ea 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -154,7 +154,7 @@ is slower." (and (string-match "(.+)" from) (setq name (substring from (1+ (match-beginning 0)) (1- (match-end 0))))) - (and (string-match "()" from) + (and (string-search "()" from) (setq name address)) ;; XOVER might not support folded From headers. (and (string-match "(.*" from) @@ -265,7 +265,7 @@ If END is non-nil, use the end of the span instead." (defun gnus-newsgroup-directory-form (newsgroup) "Make hierarchical directory name from NEWSGROUP name." (let* ((newsgroup (gnus-newsgroup-savable-name newsgroup)) - (idx (string-match ":" newsgroup))) + (idx (string-search ":" newsgroup))) (concat (if idx (substring newsgroup 0 idx)) (if idx "/") diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index ceb2ebcdcb1..6c926384c97 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -1434,7 +1434,7 @@ When called interactively, prompt for REGEXP." "View FILE using the gnus-uu methods." (let ((action (gnus-uu-get-action file))) (gnus-execute-command - (if (string-match "%" action) + (if (string-search "%" action) (format action file) (concat action " " file)) (eq gnus-view-pseudos 'not-confirm)))) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 8b93accccad..d52bd26a2cb 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3526,7 +3526,7 @@ You should probably use `gnus-find-method-for-group' instead." (defun gnus-group-native-p (group) "Say whether the group is native or not." - (not (string-match ":" group))) + (not (string-search ":" group))) (defun gnus-group-secondary-p (group) "Say whether the group is secondary or not." @@ -3742,13 +3742,13 @@ just the host name." ;; Separate foreign select method from group name and collapse. ;; If method contains a server, collapse to non-domain server name, ;; otherwise collapse to select method. - (let* ((colon (string-match ":" group)) + (let* ((colon (string-search ":" group)) (server (and colon (substring group 0 colon))) - (plus (and server (string-match "\\+" server)))) + (plus (and server (string-search "+" server)))) (when server (if plus (setq foreign (substring server (+ 1 plus) - (string-match "\\." server)) + (string-search "." server)) group (substring group (+ 1 colon))) (setq foreign server group (substring group (+ 1 colon)))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index a3ffaec3ff3..bff1b2a60d9 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -5340,7 +5340,7 @@ Otherwise, generate and save a value for `canlock-password' first." (followup-to (message-fetch-field "followup-to")) to) (when (and newsgroups - (string-match "," newsgroups) + (string-search "," newsgroups) (not followup-to) (not (zerop @@ -5371,11 +5371,11 @@ Otherwise, generate and save a value for `canlock-password' first." (message-id (message-fetch-field "message-id" t))) (or (not message-id) ;; Is there an @ in the ID? - (and (string-match "@" message-id) + (and (string-search "@" message-id) ;; Is there a dot in the ID? (string-match "@[^.]*\\." message-id) ;; Does the ID end with a dot? - (not (string-match "\\.>" message-id))) + (not (string-search ".>" message-id))) (y-or-n-p (format "The Message-ID looks strange: \"%s\". Really post? " message-id))))) @@ -5497,8 +5497,8 @@ Otherwise, generate and save a value for `canlock-password' first." "@[^\\.]*\\." (setq ad (nth 1 (mail-extract-address-components from))))) ;larsi@ifi - (string-match "\\.\\." ad) ;larsi@ifi..uio - (string-match "@\\." ad) ;larsi@.ifi.uio + (string-search ".." ad) ;larsi@ifi..uio + (string-search "@." ad) ;larsi@.ifi.uio (string-match "\\.$" ad) ;larsi@ifi.uio. (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio (string-match "(.*).*(.*)" from)) ;(lars) (lars) @@ -5523,7 +5523,7 @@ Otherwise, generate and save a value for `canlock-password' first." (cond ((not reply-to) t) - ((string-match "," reply-to) + ((string-search "," reply-to) (y-or-n-p (format "Multiple Reply-To addresses: \"%s\". Really post? " reply-to))) @@ -5531,8 +5531,8 @@ Otherwise, generate and save a value for `canlock-password' first." "@[^\\.]*\\." (setq ad (nth 1 (mail-extract-address-components reply-to))))) ;larsi@ifi - (string-match "\\.\\." ad) ;larsi@ifi..uio - (string-match "@\\." ad) ;larsi@.ifi.uio + (string-search ".." ad) ;larsi@ifi..uio + (string-search "@." ad) ;larsi@.ifi.uio (string-match "\\.$" ad) ;larsi@ifi.uio. (not (string-match "^[^@]+@[^@]+$" ad)) ;larsi.ifi.uio (string-match "(.*).*(.*)" reply-to)) ;(lars) (lars) @@ -5806,7 +5806,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'." (mail-header-subject message-reply-headers)) (message-strip-subject-re psubject)))) (and psupersedes - (string-match "_-_@" psupersedes))) + (string-search "_-_@" psupersedes))) "_-_" "")) "@" (message-make-fqdn) ">")) @@ -6022,7 +6022,7 @@ give as trustworthy answer as possible." "Return the pertinent part of `user-mail-address'." (when (and user-mail-address (string-match "@.*\\." user-mail-address)) - (if (string-match " " user-mail-address) + (if (string-search " " user-mail-address) (nth 1 (mail-extract-address-components user-mail-address)) user-mail-address))) @@ -6053,7 +6053,7 @@ give as trustworthy answer as possible." message-user-fqdn) ;; A system name without any dots is unlikely to be a good fully ;; qualified domain name. - ((and (string-match "[.]" sysname) + ((and (string-search "." sysname) (not (string-match message-bogus-system-names sysname))) ;; `system-name' returned the right result. sysname) @@ -7053,7 +7053,7 @@ article, it has the value of " mft " -which directs your response to " (if (string-match "," mft) +which directs your response to " (if (string-search "," mft) "the specified addresses" "that address only") ". @@ -7357,7 +7357,7 @@ want to get rid of this query permanently.")) You should normally obey the Followup-To: header. `Followup-To: " followup-to "' -directs your response to " (if (string-match "," followup-to) +directs your response to " (if (string-search "," followup-to) "the specified newsgroups" "that newsgroup only") ". diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 02cd6af0c98..82d1de25f3d 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -649,7 +649,7 @@ MIME-Version header before proceeding." (setq description (mail-decode-encoded-word-string description))))) (if (or (not ctl) - (not (string-match "/" (car ctl)))) + (not (string-search "/" (car ctl)))) (mm-dissect-singlepart (list mm-dissect-default-type) (and cte (intern (downcase (mail-header-strip-cte cte)))) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 708887cb9c7..c35e89289a2 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -803,7 +803,7 @@ If FORMAT isn't a format string, it and all ARGS will be inserted without formatting." (with-current-buffer nntp-server-buffer (erase-buffer) - (if (string-match "%" format) + (if (string-search "%" format) (insert (apply #'format format args)) (apply #'insert format args)) t)) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 3cf65453f3b..8a48cd87dba 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1299,7 +1299,7 @@ If LIMIT, first try to limit the search to the N last articles." (when (and (nnimap-greeting nnimap-object) (string-match greeting-match (nnimap-greeting nnimap-object)) (eq type 'append) - (string-match "\000" data)) + (string-search "\000" data)) (let ((choice (gnus-multiple-choice "Message contains NUL characters. Delete, continue, abort? " '((?d "Delete NUL characters") @@ -1761,7 +1761,7 @@ If LIMIT, first try to limit the search to the N last articles." (let ((result nil)) (dolist (elem (split-string irange ",")) (push - (if (string-match ":" elem) + (if (string-search ":" elem) (let ((numbers (split-string elem ":"))) (cons (string-to-number (car numbers)) (string-to-number (cadr numbers)))) diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 372df64e2e5..171f0813b38 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -87,7 +87,7 @@ See `nnmaildir-flag-mark-mapping'." (defun nnmaildir--ensure-suffix (filename) "Ensure that FILENAME contains the suffix \":2,\"." - (if (string-match-p ":2," filename) + (if (string-search ":2," filename) filename (concat filename ":2,"))) diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index c6aaf460ece..92944887f44 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el @@ -1629,7 +1629,7 @@ SERVER." (while (string-match "[<>]" mid) (setq mid (replace-match "" t t mid))) ;; mairix somehow does not like '$' in message-id - (when (string-match "\\$" mid) + (when (string-search "$" mid) (setq mid (concat mid "="))) (while (string-match "\\$" mid) (setq mid (replace-match "=," t t mid))) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 8cd8cbe84f1..0f12ee0e9d2 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -849,7 +849,7 @@ DATA should be the output of `xml-parse-region'." (defmacro nnrss-match-macro (base-uri item onsite-list offsite-list) `(cond ((or (string-match (concat "^" ,base-uri) ,item) - (not (string-match "://" ,item))) + (not (string-search "://" ,item))) (setq ,onsite-list (append ,onsite-list (list ,item)))) (t (setq ,offsite-list (append ,offsite-list (list ,item)))))) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 1fd2ed06eba..615a3c931bf 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1697,7 +1697,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the ;; article comes from that group, I'd say. ((and (setq newsgroups (mail-fetch-field "newsgroups")) - (not (string-match "," newsgroups))) + (not (string-search "," newsgroups))) newsgroups) ;; If there is more than one group in the ;; Newsgroups header, then the Xref header should @@ -1725,7 +1725,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the number (string-to-number (match-string 2 xref)))) ((and (setq newsgroups (mail-fetch-field "newsgroups")) - (not (string-match "," newsgroups))) + (not (string-search "," newsgroups))) (setq group newsgroups)) (group) (t (setq group "")))) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d7fb038f45a..2c7956d9680 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -154,7 +154,7 @@ with the current prefix. The files are chosen according to (mapcar (lambda (c) (let* ((s (intern c)) (doc (condition-case nil (documentation s) (error nil))) - (doc (and doc (substring doc 0 (string-match "\n" doc))))) + (doc (and doc (substring doc 0 (string-search "\n" doc))))) (list c (propertize (format "%-4s" (help--symbol-class s)) 'face 'completions-annotations) diff --git a/lisp/help.el b/lisp/help.el index ba27fc5810f..29ae3404813 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1912,7 +1912,7 @@ the same names as used in the original source code, when possible." (let ((name (symbol-name arg))) (if (eq (aref name 0) ?&) (memq arg '(&rest &optional)) - (not (string-match "\\." name))))) + (not (string-search "." name))))) (setq valid nil))) (when valid arglist))) (let* ((arity (func-arity def)) diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el index cbb69b206d4..4fadbbe4180 100644 --- a/lisp/hippie-exp.el +++ b/lisp/hippie-exp.el @@ -507,8 +507,8 @@ otherwise." "Try to slam together two parts of a file specification, system dependently." (cond ((null dir-part) name-part) ((eq system-type 'ms-dos) - (if (and (string-match "\\\\" dir-part) - (not (string-match "/" dir-part)) + (if (and (string-search "\\" dir-part) + (not (string-search "/" dir-part)) (= (aref name-part (1- (length name-part))) ?/)) (aset name-part (1- (length name-part)) ?\\)) (concat dir-part name-part)) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index b453061388f..3b961989e3e 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1902,7 +1902,7 @@ tree depth, as determined from FILE (a filename). START is the offset at which to start looking for the / character in FILE." ;;(message "hfy-relstub");;DBUG (let ((c "")) - (while (setq start (string-match "/" file start)) + (while (setq start (string-search "/" file start)) (setq start (1+ start)) (setq c (concat c "../"))) c)) diff --git a/lisp/ido.el b/lisp/ido.el index ea5ff32b8d7..b81a9db5eb9 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1770,7 +1770,7 @@ is enabled then some keybindings are changed in the keymap." (let ((l (length dirname))) (if (and max-width (> max-width 0) (> l max-width)) (let* ((s (substring dirname (- max-width))) - (i (string-match "/" s))) + (i (string-search "/" s))) (concat "..." (if i (substring s i) s))) dirname))))) (t prompt))) @@ -2516,7 +2516,7 @@ If cursor is not at the end of the user input, move to end of input." ;; Do nothing ) ((and (memq ido-cur-item '(file dir)) - (string-match "[$]" ido-text)) + (string-search "$" ido-text)) (let ((evar (substitute-in-file-name (concat ido-current-directory ido-text)))) (if (not (file-exists-p (file-name-directory evar))) (message "Expansion generates non-existing directory name") @@ -3089,7 +3089,7 @@ If repeated, insert text from buffer instead." (setq ido-text-init word ido-try-merged-list nil ido-exit 'chdir)) - ((string-match "/" word) + ((string-search "/" word) (setq ido-text-init (concat ido-current-directory word) ido-try-merged-list nil ido-exit 'chdir)) @@ -4559,7 +4559,7 @@ For details of keybindings, see `ido-find-file'." (setq try-single-dir-match t)))) ((and (string-equal (substring contents -2 -1) "/") - (not (string-match "[$]" contents))) + (not (string-search "$" contents))) (ido-set-current-directory (cond ((= (length contents) 2) @@ -4656,7 +4656,7 @@ For details of keybindings, see `ido-find-file'." (memq ido-cur-item '(file dir)) (not (ido-is-root-directory)) (> (length contents) 1) - (not (string-match "[$]" contents)) + (not (string-search "$" contents)) (not ido-directory-nonreadable) (not ido-directory-too-big)) (ido-trace "merge?") diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el index 97bf1ac058c..75d2e6692c0 100644 --- a/lisp/image/image-converter.el +++ b/lisp/image/image-converter.el @@ -78,7 +78,7 @@ is a string, it should be a MIME format string like (string-match image-converter-regexp source)) (and data-p (symbolp data-p) - (string-match "/" (symbol-name data-p)) + (string-search "/" (symbol-name data-p)) (string-match image-converter-regexp (concat "foo." (image-converter--mime-type data-p))))) diff --git a/lisp/info-xref.el b/lisp/info-xref.el index 538a017f3c0..e2e3e30ca21 100644 --- a/lisp/info-xref.el +++ b/lisp/info-xref.el @@ -547,7 +547,7 @@ the sources handy." ;; skip nodes with "%" as probably `format' strings such as in ;; info-look.el - (unless (string-match "%" node) + (unless (string-search "%" node) ;; "(emacs)" is the default manual for docstring hyperlinks, ;; per `help-make-xrefs' diff --git a/lisp/info.el b/lisp/info.el index 1c477a7082f..3718a1eb83f 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2483,7 +2483,7 @@ Table of contents is created from the tree structure of menus." (match-string-no-properties 1))) (section "Top") menu-items) - (when (and upnode (string-match "(" upnode)) (setq upnode nil)) + (when (and upnode (string-search "(" upnode)) (setq upnode nil)) (when (and (not (Info-index-node nodename file)) (re-search-forward "^\\* Menu:" bound t)) (forward-line 1) @@ -2616,7 +2616,7 @@ new buffer." (let (target i (str (concat "\\*note " (regexp-quote footnotename))) (case-fold-search t)) - (while (setq i (string-match " " str i)) + (while (setq i (string-search " " str i)) (setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+ i)))) (setq i (+ i 6))) (save-excursion @@ -2933,7 +2933,7 @@ last sub-node, if any; otherwise go \"up\" to the parent node." (let ((prevnode (Info-extract-pointer "prev[ious]*" t)) (upnode (Info-extract-pointer "up" t)) (case-fold-search t)) - (cond ((and upnode (string-match "(" upnode)) + (cond ((and upnode (string-search "(" upnode)) (user-error "First node in file")) ((and upnode (or (null prevnode) ;; Use string-equal, not equal, @@ -3778,7 +3778,7 @@ Build a menu of the possible matches." "The following packages match the keyword ‘" nodename "’:\n\n") (insert "* Menu:\n\n") (let ((keywords - (mapcar #'intern (if (string-match-p "," nodename) + (mapcar #'intern (if (string-search "," nodename) (split-string nodename ",[ \t\n]*" t) (list nodename)))) hits desc) @@ -5244,7 +5244,7 @@ The INDENT level is ignored." TEXT is the text of the button we clicked on, a + or - item. TOKEN is data related to this node (NAME . FILE). INDENT is the current indentation depth." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (speedbar-change-expand-button-char ?-) (if (speedbar-with-writable (save-excursion @@ -5252,7 +5252,7 @@ INDENT is the current indentation depth." (Info-speedbar-hierarchy-buttons nil (1+ indent) token))) (speedbar-change-expand-button-char ?-) (speedbar-change-expand-button-char ??))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 2d3cd25b4a4..02169ceb689 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -905,13 +905,13 @@ The IGNORED argument is ignored." (setq family "*-*") (if (symbolp family) (setq family (symbol-name family))) - (or (string-match "-" family) + (or (string-search "-" family) (setq family (concat "*-" family)))) (if (not registry) (setq registry "*-*") (if (symbolp registry) (setq registry (symbol-name registry))) - (or (string-match "-" registry) + (or (string-search "-" registry) (= (aref registry (1- (length registry))) ?*) (setq registry (concat registry "*")))) (insert (format"\n -%s-%s-%s-%s-%s-*-*-*-*-*-*-%s" diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el index b999eff662f..121a4c542e7 100644 --- a/lisp/language/korea-util.el +++ b/lisp/language/korea-util.el @@ -29,7 +29,7 @@ ;;;###autoload (defvar default-korean-keyboard - (purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) + (purecopy (if (string-search "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "")) "The kind of Korean keyboard for Korean (Hangul) input method. diff --git a/lisp/linum.el b/lisp/linum.el index b0281d366cd..c78f596d768 100644 --- a/lisp/linum.el +++ b/lisp/linum.el @@ -219,7 +219,7 @@ Linum mode is a buffer-local minor mode." ;; update overlays on deletions, and after newlines are inserted (when (or (= beg end) (= end (point-max)) - (string-match-p "\n" (buffer-substring-no-properties beg end))) + (string-search "\n" (buffer-substring-no-properties beg end))) (linum-update-current))) (defun linum-after-scroll (win _start) diff --git a/lisp/mail/ietf-drums.el b/lisp/mail/ietf-drums.el index 2d683574743..b1682cf78a2 100644 --- a/lisp/mail/ietf-drums.el +++ b/lisp/mail/ietf-drums.el @@ -236,7 +236,7 @@ If DECODE, the DISPLAY-NAME will have RFC2047 decoding performed (setq display-string (ietf-drums-get-comment string))) (if (not mailbox) (when (and display-string - (string-match "@" display-string)) + (string-search "@" display-string)) (cons (mapconcat #'identity (nreverse display-name) "") (ietf-drums-get-comment string))) diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index bb1f8f13bac..3eb3ccb93de 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -252,7 +252,7 @@ comma-separated list, and return the pruned list." (setq cur-pos (string-match "[,\"]" destinations cur-pos)) (if (and cur-pos (equal (match-string 0 destinations) "\"")) ;; Search for matching quote. - (let ((next-pos (string-match "\"" destinations (1+ cur-pos)))) + (let ((next-pos (string-search "\"" destinations (1+ cur-pos)))) (if next-pos (setq cur-pos (1+ next-pos)) ;; If the open-quote has no close-quote, diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el index 5b08713949f..c442913d282 100644 --- a/lisp/mail/rfc2047.el +++ b/lisp/mail/rfc2047.el @@ -612,7 +612,7 @@ should not change this value.") (setq next prev prev nil) (if (or (< index limit) - (<= (+ len (or (string-match "\n" tail) + (<= (+ len (or (string-search "\n" tail) (length tail))) rfc2047-encode-max-chars)) (setq prev next @@ -1111,7 +1111,7 @@ strings are stripped." "Decode MIME-encoded STRING and return the result. If ADDRESS-MIME is non-nil, strip backslashes which precede characters other than `\"' and `\\' in quoted strings." - (if (string-match "=\\?" string) + (if (string-search "=?" string) (with-temp-buffer ;; We used to only call mm-enable-multibyte if `m' is non-nil, ;; but this can't be the right criterion. Don't just revert this diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el index db34fd2cb9e..a398ce0e9cc 100644 --- a/lisp/mail/rfc2231.el +++ b/lisp/mail/rfc2231.el @@ -61,12 +61,12 @@ must never cause a Lisp error." ;; make it parsable. Let's try... (error (let (mod) - (when (and (string-match "\\\\\"" string) + (when (and (string-search "\\\"" string) (not (string-match "\\`\"\\|[^\\]\"" string))) (setq string (string-replace "\\\"" "\"" string) mod t)) - (when (and (string-match "\\\\(" string) - (string-match "\\\\)" string) + (when (and (string-search "\\(" string) + (string-search "\\)" string) (not (string-match "\\`(\\|[^\\][()]" string))) (setq string (replace-regexp-in-string "\\\\\\([()]\\)" "\\1" string) diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el index acbb5880b5c..58a8eb7a370 100644 --- a/lisp/mail/rmailkwd.el +++ b/lisp/mail/rmailkwd.el @@ -93,7 +93,7 @@ according to the choice made, and returns a symbol." "Set LABEL as present or absent according to STATE in message MSG. LABEL may be a symbol or string." (or (stringp label) (setq label (symbol-name label))) - (if (string-match "," label) + (if (string-search "," label) (error "More than one label specified")) (with-current-buffer rmail-buffer (rmail-maybe-set-message-counters) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index ac933b9706d..9dd9573a9fc 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -759,7 +759,7 @@ the message being processed." ;; If there are multiple lines in FROM, ;; discard up to the last newline in it. (while (and (stringp from) - (setq newline (string-match "\n" from))) + (setq newline (string-search "\n" from))) (setq from (substring from (1+ newline)))) (if (or (null from) (string-match diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 8e3927cdcf2..ec9f340db86 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -516,7 +516,7 @@ for `smtpmail-try-auth-method'.") (defun smtpmail-maybe-append-domain (recipient) (if (or (not smtpmail-sendto-domain) - (string-match "@" recipient)) + (string-search "@" recipient)) recipient (concat recipient "@" smtpmail-sendto-domain))) @@ -700,7 +700,7 @@ Returns an error if the server cannot be contacted." (let ((parts (split-string user-mail-address "@"))) (and (= (length parts) 2) ;; There's a dot in the domain name. - (string-match "\\." (cadr parts)) + (string-search "." (cadr parts)) user-mail-address)))) (defun smtpmail-via-smtp (recipient smtpmail-text-buffer diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el index 9ebffef2e59..b07004de38c 100644 --- a/lisp/mail/uce.el +++ b/lisp/mail/uce.el @@ -246,10 +246,10 @@ You might need to set `uce-mail-reader' before using this." (if reply-to (setq to (format "%s, %s" to (mail-strip-quoted-names reply-to)))) (let (first-at-sign end-of-hostname sender-host) - (setq first-at-sign (string-match "@" to) + (setq first-at-sign (string-search "@" to) end-of-hostname (string-match "[ ,>]" to first-at-sign) sender-host (substring to first-at-sign end-of-hostname)) - (if (string-match "\\." sender-host) + (if (string-search "." sender-host) (setq to (format "%s, postmaster%s, abuse%s" to sender-host sender-host)))) (setq mail-send-actions nil) @@ -291,7 +291,7 @@ You might need to set `uce-mail-reader' before using this." (search-forward " ") (forward-char -1) ;; And add its postmaster to the list of addresses. - (if (string-match "\\." (buffer-substring temp (point))) + (if (string-search "." (buffer-substring temp (point))) (setq to (format "%s, postmaster@%s" to (buffer-substring temp (point))))) ;; Also look at the message-id, it helps *very* often. @@ -302,7 +302,7 @@ You might need to set `uce-mail-reader' before using this." (setq temp (point)) (search-forward ">") (forward-char -1) - (if (string-match "\\." (buffer-substring temp (point))) + (if (string-search "." (buffer-substring temp (point))) (setq to (format "%s, postmaster@%s" to (buffer-substring temp (point))))))) (when (eq uce-mail-reader 'gnus) diff --git a/lisp/man.el b/lisp/man.el index 54b6ffe9836..6009a319198 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -801,7 +801,7 @@ POS defaults to `point'." ;; doesn't include a hyphen, we consider the hyphen to be ;; added by troff, and remove it. (or (not (eq (string-to-char (substring 1st-part -1)) ?-)) - (string-match-p "-" (substring 1st-part 0 -1)) + (string-search "-" (substring 1st-part 0 -1)) (setq word (string-replace "-" "" word)))) ;; Make sure the section number gets included by the code below. (goto-char (match-end 1))) diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 415e9848258..37fdb166011 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -111,10 +111,10 @@ COMMA-SEPARATOR is non-nil." (string-match "^\\([^,]+\\)," res)) (setq res (match-string 1 res))) ;; Replace "&" with capitalized username - (if (string-match "&" res) + (if (string-search "&" res) (setq res (mh-replace-regexp-in-string "&" (capitalize username) res))) ;; Remove " character - (if (string-match "\"" res) + (if (string-search "\"" res) (setq res (mh-replace-regexp-in-string "\"" "" res))) ;; If empty string, use username instead (if (string-equal "" res) @@ -285,7 +285,7 @@ Blind aliases or users from /etc/passwd are not expanded." (message "%s -> %s" the-name (mh-alias-expand the-name)) ;; Check if it was a single word likely to be an alias (if (and (equal mh-alias-flash-on-comma 1) - (not (string-match " " the-name))) + (not (string-search " " the-name))) (message "No alias for %s" the-name)))))) (self-insert-command 1)) diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index b64bbfb6f3b..4fae69defaf 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -637,8 +637,8 @@ See also `mh-compose-forward-as-mime-flag', (defun mh-forwarded-letter-subject (from subject) "Return a Subject suitable for a forwarded message. Original message has headers FROM and SUBJECT." - (let ((addr-start (string-match "<" from)) - (comment (string-match "(" from))) + (let ((addr-start (string-search "<" from)) + (comment (string-search "(" from))) (cond ((and addr-start (> addr-start 0)) ;; Full Name (setq from (substring from 0 (1- addr-start)))) diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index 3af840c3a31..76ef990d825 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -441,7 +441,7 @@ be handled next." (position 0) line-end line folder unseen total) (unwind-protect - (while (setq line-end (string-match "\n" output position)) + (while (setq line-end (string-search "\n" output position)) (setq line (format "%s%s" mh-speed-partial-line (substring output position line-end)) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 8e900dc0113..bbce17013b1 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -378,7 +378,7 @@ names and the function is called when OUTPUT is available." (prevailing-match-data (match-data)) line-end folder) (unwind-protect - (while (setq line-end (string-match "\n" output position)) + (while (setq line-end (string-search "\n" output position)) (setq folder (format "+%s%s" mh-flists-partial-line (substring output position line-end))) @@ -702,7 +702,7 @@ See Info node `(elisp) Programmed Completion' for details." (let ((slash (mh-search-from-end ?/ orig-name))) (if slash (1+ slash) (if (string-match "\\`\\+" orig-name) 1 0))) - (if (cdr flag) (string-match "/" (cdr flag))))) + (if (cdr flag) (string-search "/" (cdr flag))))) ((eq flag nil) (let ((try-res (try-completion diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 2c6340e1c3e..9f327df28f5 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2741,7 +2741,7 @@ Useful to give the user default values that won't be substituted." (defun completion--make-envvar-table () (mapcar (lambda (enventry) - (substring enventry 0 (string-match-p "=" enventry))) + (substring enventry 0 (string-search "=" enventry))) process-environment)) (defconst completion--embedded-envvar-re @@ -2810,7 +2810,7 @@ same as `substitute-in-file-name'." pred action)) ((eq (car-safe action) 'boundaries) (let ((start (length (file-name-directory string))) - (end (string-match-p "/" (cdr action)))) + (end (string-search "/" (cdr action)))) `(boundaries ;; if `string' is "C:" in w32, (file-name-directory string) ;; returns "C:/", so `start' is 3 rather than 2. @@ -3988,7 +3988,7 @@ which is at the core of flex logic. The extra (defun completion-flex-try-completion (string table pred point) "Try to flex-complete STRING in TABLE given PRED and POINT." - (unless (and completion-flex-nospace (string-match-p " " string)) + (unless (and completion-flex-nospace (string-search " " string)) (pcase-let ((`(,all ,pattern ,prefix ,suffix ,_carbounds) (completion-substring--all-completions string table pred point @@ -4005,7 +4005,7 @@ which is at the core of flex logic. The extra (defun completion-flex-all-completions (string table pred point) "Get flex-completions of STRING in TABLE, given PRED and POINT." - (unless (and completion-flex-nospace (string-match-p " " string)) + (unless (and completion-flex-nospace (string-search " " string)) (pcase-let ((`(,all ,pattern ,prefix ,_suffix ,_carbounds) (completion-substring--all-completions string table pred point diff --git a/lisp/mpc.el b/lisp/mpc.el index e04ffa49747..029f0ca8f42 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -305,7 +305,7 @@ defaults to 6600 and HOST defaults to localhost." (defun mpc--proc-quote-string (s) (if (numberp s) (number-to-string s) (setq s (replace-regexp-in-string "[\"\\]" "\\\\\\&" s)) - (if (string-match " " s) (concat "\"" s "\"") s))) + (if (string-search " " s) (concat "\"" s "\"") s))) (defconst mpc--proc-alist-to-alists-starters '(file directory)) @@ -611,7 +611,7 @@ Any call to `mpc-status-refresh' may cause it to be restarted." (defun mpc-cmd-special-tag-p (tag) (or (memq tag '(Playlist Search Directory)) - (string-match "|" (symbol-name tag)))) + (string-search "|" (symbol-name tag)))) (defun mpc-cmd-find (tag value) "Return a list of all songs whose tag TAG has value VALUE. @@ -1438,7 +1438,7 @@ when constructing the set of constraints." (let (res) (dolist (constraint constraints) (when (or (eq (car constraint) buffer-tag) - (and (string-match "|" (symbol-name buffer-tag)) + (and (string-search "|" (symbol-name buffer-tag)) (member (symbol-name (car constraint)) (split-string (symbol-name buffer-tag) "|")))) (setq res (cdr constraint)))) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 3f3a3df8e55..e302aa89f30 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -2296,7 +2296,7 @@ and NOWAIT." ;; If the dir name contains a space, some ftp servers will ;; refuse to list it. We instead change directory to the ;; directory in question and ls ".". - (when (string-match " " cmd1) + (when (string-search " " cmd1) ;; Keep the result. In case of failure, we will (see below) ;; short-circuit CMD and return this result directly. (setq result (ange-ftp-cd host user (nth 1 cmd) 'noerror)) @@ -2881,13 +2881,13 @@ NO-ERROR, if a listing for DIRECTORY cannot be obtained." (or ;; No dots in dir names in vms. (and (eq host-type 'vms) - (string-match "\\." efile)) + (string-search "." efile)) ;; No subdirs in mts of cms. (and (memq host-type '(mts cms)) (not (string-equal "/" (nth 2 parsed)))) ;; No dots in pseudo-dir names in bs2000. (and (eq host-type 'bs2000) - (string-match "\\." efile)))))) + (string-search "." efile)))))) (defun ange-ftp-file-entry-p (name) "Given NAME, return whether there is a file entry for it." diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index aeeb9bd8d3b..5473ba7e697 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -1075,7 +1075,7 @@ For instance, \"foo.png\" will result in \"image/png\"." (dolist (data mailcap--computed-mime-data) (dolist (info (cdr data)) (setq type (cdr (assq 'type (cdr info)))) - (unless (string-match-p "\\*" type) + (unless (string-search "*" type) (push type res)))) (nreverse res))))) diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index e1d35c2a85a..727aa55de58 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el @@ -422,7 +422,7 @@ with m:msgid of the current article and enabled threads." (while (string-match "[<>]" mid) (setq mid (replace-match "" t t mid))) ;; mairix somehow does not like '$' in message-id - (when (string-match "\\$" mid) + (when (string-search "$" mid) (setq mid (concat mid "="))) (while (string-match "\\$" mid) (setq mid (replace-match "=," t t mid))) diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el index cb49f75c81d..a267ac319b6 100644 --- a/lisp/net/pop3.el +++ b/lisp/net/pop3.el @@ -551,8 +551,8 @@ Returns the process associated with the connection." (when result (let ((response (plist-get (cdr result) :greeting))) (setq pop3-timestamp - (substring response (or (string-match "<" response) 0) - (+ 1 (or (string-match ">" response) -1))))) + (substring response (or (string-search "<" response) 0) + (+ 1 (or (string-search ">" response) -1))))) (set-process-query-on-exit-flag (car result) nil) (erase-buffer) (car result))))) diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index f5480afb698..de1cd9d320f 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -1938,7 +1938,7 @@ This is a specialization of `soap-decode-type' for (e-name (soap-xs-element-name element)) ;; Heuristic: guess if we need to decode using local ;; namespaces. - (use-fq-names (string-match ":" (symbol-name (car node)))) + (use-fq-names (string-search ":" (symbol-name (car node)))) (children (if e-name (if use-fq-names ;; Find relevant children diff --git a/lisp/net/socks.el b/lisp/net/socks.el index 1da1d31d678..78a261fd83e 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -277,7 +277,7 @@ (setq version (process-get proc 'socks-server-protocol)) (cond ((equal version 'http) - (if (not (string-match "\r\n\r\n" string)) + (if (not (string-search "\r\n\r\n" string)) nil ; Need to spin some more (process-put proc 'socks-state socks-state-connected) (process-put proc 'socks-reply 0) diff --git a/lisp/nxml/nxml-outln.el b/lisp/nxml/nxml-outln.el index 6dca34a80f2..c265b19cf05 100644 --- a/lisp/nxml/nxml-outln.el +++ b/lisp/nxml/nxml-outln.el @@ -633,7 +633,7 @@ non-transparent child section." tag-qnames)))) (defun nxml-highlighted-qname (qname) - (let ((colon (string-match ":" qname))) + (let ((colon (string-search ":" qname))) (if colon (concat (propertize (substring qname 0 colon) 'face diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index d820d1b99b5..dd3000773fd 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el @@ -179,7 +179,7 @@ Return a pattern." (setq rng-c-default-namespace rng-c-inherit-namespace))) (defun rng-c-expand-name (prefixed-name) - (let ((i (string-match ":" prefixed-name))) + (let ((i (string-search ":" prefixed-name))) (rng-make-name (rng-c-lookup-prefix (substring prefixed-name 0 i)) @@ -222,7 +222,7 @@ and URI is a symbol.") (cdr binding))) (defun rng-c-expand-datatype (prefixed-name) - (let ((i (string-match ":" prefixed-name))) + (let ((i (string-search ":" prefixed-name))) (rng-make-datatype (rng-c-lookup-datatype-prefix (substring prefixed-name 0 i)) (substring prefixed-name (+ i 1))))) diff --git a/lisp/nxml/rng-uri.el b/lisp/nxml/rng-uri.el index fda481fa281..24f4d2ec443 100644 --- a/lisp/nxml/rng-uri.el +++ b/lisp/nxml/rng-uri.el @@ -93,7 +93,7 @@ Signal an error if URI is not a valid file URL." (rng-uri-error "`?' not escaped in file URI `%s'" uri)) (when fragment-id (rng-uri-error "URI `%s' has a fragment identifier" uri)) - (when (string-match ";" path) + (when (string-search ";" path) (rng-uri-error "`;' not escaped in URI `%s'" uri)) (when (string-match "%2[fF]" path) ;; 2f is hex code of slash (rng-uri-error "Escaped slash in URI `%s'" uri)) @@ -110,7 +110,7 @@ Signal an error if URI is not a valid file URL." (rng-uri-unescape-unibyte-replace path 2)) (t (rng-uri-unescape-unibyte path)))) - (when (string-match "\000" path) + (when (string-search "\000" path) (rng-uri-error "URI `%s' has NUL character in path" uri)) (when (eq pattern 'match) (setq path diff --git a/lisp/obsolete/complete.el b/lisp/obsolete/complete.el index 1c1167db89b..2d3be2dd9a4 100644 --- a/lisp/obsolete/complete.el +++ b/lisp/obsolete/complete.el @@ -243,7 +243,7 @@ second TAB brings up the `*Completions*' buffer." (when (and partial-completion-mode (null PC-env-vars-alist)) (setq PC-env-vars-alist (mapcar (lambda (string) - (let ((d (string-match "=" string))) + (let ((d (string-search "=" string))) (cons (concat "$" (substring string 0 d)) (and d (substring string (1+ d)))))) process-environment)))) @@ -575,7 +575,7 @@ GOTO-END is non-nil, however, it instead replaces up to END." p (+ p (length PC-ndelims-regex) 1))))) (setq p 0) (if filename - (while (setq p (string-match "\\\\\\*" regex p)) + (while (setq p (string-search "\\*" regex p)) (setq regex (concat (substring regex 0 p) "[^/]*" (substring regex (+ p 2)))))) diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el index 9676d6b28e9..9bf68456826 100644 --- a/lisp/obsolete/longlines.el +++ b/lisp/obsolete/longlines.el @@ -393,11 +393,11 @@ compatibility with `format-alist', and is ignored." "Return a copy of STRING with each soft newline replaced by a space. Hard newlines are left intact." (let* ((str (copy-sequence string)) - (pos (string-match "\n" str))) + (pos (string-search "\n" str))) (while pos (if (null (get-text-property pos 'hard str)) (aset str pos ? )) - (setq pos (string-match "\n" str (1+ pos)))) + (setq pos (string-search "\n" str (1+ pos)))) str)) ;;; Auto wrap diff --git a/lisp/obsolete/nnir.el b/lisp/obsolete/nnir.el index caeca988810..9aab1e7c9f5 100644 --- a/lisp/obsolete/nnir.el +++ b/lisp/obsolete/nnir.el @@ -509,7 +509,7 @@ construct the vector entries." (vector (gnus-group-full-name group server) (if (string-match "\\`nnmaildir:" (gnus-group-server server)) (nnmaildir-base-name-to-article-number - (substring article 0 (string-match ":" article)) + (substring article 0 (string-search ":" article)) group nil) (string-to-number article)) (string-to-number score))))) diff --git a/lisp/obsolete/terminal.el b/lisp/obsolete/terminal.el index dbfc79bf913..0167a00066b 100644 --- a/lisp/obsolete/terminal.el +++ b/lisp/obsolete/terminal.el @@ -1222,7 +1222,7 @@ of the terminal-emulator" (cond ((string-match "\\`[-a-zA-Z0-9+=_.@/:]+\\'" string) string) - ((not (string-match "[$]" string)) + ((not (string-search "$" string)) ;; "[\"\\]" are special to sh and the lisp reader in the same way (prin1-to-string string)) (t diff --git a/lisp/obsolete/tpu-edt.el b/lisp/obsolete/tpu-edt.el index 1340618f055..e0e89c390ea 100644 --- a/lisp/obsolete/tpu-edt.el +++ b/lisp/obsolete/tpu-edt.el @@ -1415,9 +1415,9 @@ If an argument is specified, don't set the search direction." ;; if using regexp, eliminate upper case forms (\B \W \S.) (if tpu-regexp-p (let ((pat (copy-sequence string)) (case-fold-search nil) (pos 0)) - (while (setq pos (string-match "\\\\\\\\" pat)) (aset pat (+ 1 pos) ?.)) - (while (setq pos (string-match "\\\\B" pat)) (aset pat (+ 1 pos) ?.)) - (while (setq pos (string-match "\\\\W" pat)) (aset pat (+ 1 pos) ?.)) + (while (setq pos (string-search "\\\\" pat)) (aset pat (+ 1 pos) ?.)) + (while (setq pos (string-search "\\B" pat)) (aset pat (+ 1 pos) ?.)) + (while (setq pos (string-search "\\W" pat)) (aset pat (+ 1 pos) ?.)) (while (setq pos (string-match "\\\\S." pat)) (aset pat (+ 1 pos) ?.) (aset pat (+ 2 pos) ?.)) (string-equal pat (downcase pat))) diff --git a/lisp/obsolete/url-ns.el b/lisp/obsolete/url-ns.el index b62ad829990..6cd6693fc43 100644 --- a/lisp/obsolete/url-ns.el +++ b/lisp/obsolete/url-ns.el @@ -31,7 +31,7 @@ ;;;###autoload (defun isPlainHostName (host) - (not (string-match "\\." host))) + (not (string-search "." host))) ;;;###autoload (defun dnsDomainIs (host dom) diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index e1d104f74ff..49dc2d2fc6c 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -214,7 +214,7 @@ Includes files as well as host names followed by a colon." (list string) (completion-table-subvert (pcomplete-all-entries) "" "/ssh:"))) - ((string-match "/" string) ; Local file name. + ((string-search "/" string) ; Local file name. (pcomplete-all-entries)) (t ;Host name or local file name. (append (all-completions string (pcomplete-all-entries)) diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 3bb8bf0c82b..9d5ee261976 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -2170,7 +2170,7 @@ other words." (let (pos ret-list end-pos) (setq pos 0) (setq ret-list nil) - (while (setq end-pos (string-match " " (substring strin pos))) + (while (setq end-pos (string-search " " (substring strin pos))) (setq end-pos (+ end-pos pos)) (if (not (= end-pos pos)) (setq ret-list (append ret-list (list @@ -2269,7 +2269,7 @@ except for the verb." startlist (if (string= (substring dirstring 0 1) "/") (dun-get-path (substring dirstring 1) (append startlist (list "/"))) - (if (not (setq slash (string-match "/" dirstring))) + (if (not (setq slash (string-search "/" dirstring))) (append startlist (list dirstring)) (dun-get-path (substring dirstring (1+ slash)) (append startlist @@ -2348,7 +2348,7 @@ Also prints current score to let user know he has scored." (princ dun-line) (if (eq (dun-parse2 nil dun-unix-verbs dun-line) -1) (progn - (if (setq esign (string-match "=" dun-line)) + (if (setq esign (string-search "=" dun-line)) (dun-doassign dun-line esign) (dun-mprinc (car dun-line-list)) (dun-mprincl ": not found."))))) @@ -2380,21 +2380,21 @@ Also prints current score to let user know he has scored." (dun-mprinc line) (dun-mprincl " : not found.")) - (if (not (setq epoint (string-match ")" line))) + (if (not (setq epoint (string-search ")" line))) (if (string= (substring line (1+ esign) (+ esign 2)) "\"") (progn (setq afterq (substring line (+ esign 2))) (setq epoint (+ - (string-match "\"" afterq) + (string-search "\"" afterq) (+ esign 3)))) - (if (not (setq epoint (string-match " " line))) + (if (not (setq epoint (string-search " " line))) (setq epoint (length line)))) (setq epoint (1+ epoint)) (while (and (not (= epoint (length line))) - (setq i (string-match ")" (substring line epoint)))) + (setq i (string-search ")" (substring line epoint)))) (setq epoint (+ epoint i 1)))) (setq value (substring line (1+ esign) epoint)) (dun-eval varname value))))) @@ -2788,7 +2788,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (cond ((null (setq args (car args))) (dun-mprincl "Usage: cat ")) - ((string-match-p "/" args) + ((string-search "/" args) (dun-mprincl "cat: only files in current directory allowed.")) ((and (> dun-cdroom 0) (string= args "description")) (dun-mprincl (car (nth dun-cdroom dun-rooms)))) @@ -3110,7 +3110,7 @@ File not found"))) (setq dun-line (downcase (dun-read-line))) (if (eq (dun-parse2 nil dun-unix-verbs dun-line) -1) (let (esign) - (if (setq esign (string-match "=" dun-line)) + (if (setq esign (string-search "=" dun-line)) (dun-doassign dun-line esign) (dun-mprinc (car dun-line-list)) (dun-mprincl ": not found."))))) diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index a00440d898c..884104a16f7 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -4337,7 +4337,7 @@ end (let ((len (1- (length str))) (index 0) new start fmt) - (while (setq start (string-match "%" str index)) + (while (setq start (string-search "%" str index)) (setq fmt (if (< start len) (aref str (1+ start)) ?\?) new (concat new (substring str index start) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 97596d0d278..67ad39b7f46 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1382,7 +1382,7 @@ With arg, enter name of variable to be watched in the minibuffer." (string-match "\\(\\S-+\\)" text) (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) (varnum (car var))) - (if (string-match "\\." (car var)) + (if (string-search "." (car var)) (message-box "Can only delete a root expression") (gdb-var-delete-1 var varnum))))) @@ -1479,14 +1479,14 @@ With arg, enter name of variable to be watched in the minibuffer." TEXT is the text of the button we clicked on, a + or - item. TOKEN is data related to this node. INDENT is the current indentation depth." - (cond ((string-match "\\+" text) ;expand this node + (cond ((string-search "+" text) ;expand this node (let* ((var (assoc token gdb-var-list)) (expr (nth 1 var)) (children (nth 2 var))) (if (or (<= (string-to-number children) gdb-max-children) (y-or-n-p (format "%s has %s children. Continue? " expr children))) (gdb-var-list-children token)))) - ((string-match "-" text) ;contract this node + ((string-search "-" text) ;contract this node (dolist (var gdb-var-list) (if (string-match (concat token "\\.") (car var)) (setq gdb-var-list (delq var gdb-var-list)))) @@ -2416,7 +2416,7 @@ rule from an incomplete data stream. The parser will stay in this state until the end of the current result or async record is reached." (when (< gdbmi-bnf-offset (length gud-marker-acc)) ;; Search the data stream for the end of the current record: - (let* ((newline-pos (string-match "\n" gud-marker-acc gdbmi-bnf-offset)) + (let* ((newline-pos (string-search "\n" gud-marker-acc gdbmi-bnf-offset)) (is-progressive (equal (cdr class-command) 'progressive)) (is-complete (not (null newline-pos))) result-str) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 05ad82acc4a..08814ebcaaa 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3150,7 +3150,7 @@ Obeying it means displaying in another window the specified file and line." (buffer-substring (region-beginning) (region-end)) (apply gud-find-expr-function args)))) (save-match-data - (if (string-match "\n" expr) + (if (string-search "\n" expr) (error "Expression must not include a newline")) (with-current-buffer gud-comint-buffer (save-excursion diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index db76df96a56..c53b9a4775c 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -495,7 +495,7 @@ It collects and prints the diagnostics messages." ((and (memq cw '(function-keyword procedure-keyword)) (stringp this-word) (string-match "\\S-" this-word) - (not (string-match "!" this-word))) + (not (string-search "!" this-word))) (cond ((or (= (char-before beg) ?/) (save-excursion (goto-char end) (looking-at "[ \t]*="))) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index ad8feb988f5..eb88f25dfd6 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -967,7 +967,7 @@ IDL has currently stepped.") ;; Strip those pesky ctrl-m's. (add-hook 'comint-output-filter-functions (lambda (string) - (when (string-match "\r" string) + (when (string-search "\r" string) (let ((pmark (process-mark (get-buffer-process (current-buffer))))) (save-excursion @@ -1409,7 +1409,7 @@ Remove everything to the first newline, and all lines with % in front of them, with optional follow-on lines starting with two spaces. This works well enough, since any print output typically arrives before error messages, etc." - (setq output (substring output (string-match "\n" output))) + (setq output (substring output (string-search "\n" output))) (while (string-match "\\(\n\\|\\`\\)%.*\\(\n .*\\)*" output) (setq output (replace-match "" nil t output))) (unless @@ -1431,12 +1431,12 @@ and then calls `idlwave-shell-send-command' for any pending commands." (unwind-protect (progn ;; Ring the bell if necessary - (while (setq p (string-match "\C-G" string)) + (while (setq p (string-search "\C-G" string)) (ding) (aset string p ?\C-j )) (if idlwave-shell-hide-output (save-excursion - (while (setq p (string-match "\C-M" string)) + (while (setq p (string-search "\C-M" string)) (aset string p ?\ )) (set-buffer (get-buffer-create idlwave-shell-hidden-output-buffer)) @@ -1445,7 +1445,7 @@ and then calls `idlwave-shell-send-command' for any pending commands." (comint-output-filter proc string)) ;; Watch for magic - need to accumulate the current line ;; since it may not be sent all at once. - (if (string-match "\n" string) + (if (string-search "\n" string) (progn (if idlwave-shell-use-input-mode-magic (idlwave-shell-input-mode-magic diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index b55a98af0b3..55e712dd77d 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -2547,7 +2547,7 @@ If there is no label point is not moved and nil is returned." (end (idlwave-find-key ":" 1 'nomark eos))) (if (and end (= (nth 0 (parse-partial-sexp start end)) 0) - (not (string-match "\\?" (buffer-substring start end))) + (not (string-search "?" (buffer-substring start end))) (not (string-match "^::" (buffer-substring end eos)))) (progn (forward-char) @@ -7677,9 +7677,9 @@ arg, the class property is cleared out." (interactive "P") (idlwave-routines) - (if (string-match "->" (buffer-substring - (max (point-min) (1- (point))) - (min (+ 2 (point)) (point-max)))) + (if (string-search "->" (buffer-substring + (max (point-min) (1- (point))) + (min (+ 2 (point)) (point-max)))) ;; Cursor is on an arrow (if (get-text-property (point) 'idlwave-class) ;; arrow has class property diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index aff3066c698..b1a5f301587 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -895,7 +895,7 @@ startup file, `~/.emacs-octave'." (defun inferior-octave-completion-at-point () "Return the data to complete the Octave symbol at point." ;; https://debbugs.gnu.org/14300 - (unless (string-match-p "/" (or (comint--match-partial-filename) "")) + (unless (string-search "/" (or (comint--match-partial-filename) "")) (let ((beg (save-excursion (skip-syntax-backward "w_" (comint-line-beginning-position)) (point))) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 91db4ae21cb..2f98b9c53c1 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -2672,7 +2672,7 @@ t means to return a list of all possible completions of STRING. (or sh-shell-variables-initialized (sh-shell-initialize-variables)) (nconc (mapcar (lambda (var) - (substring var 0 (string-match "=" var))) + (substring var 0 (string-search "=" var))) process-environment) sh-shell-variables)))) (complete-with-action code vars string predicate))) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index b9012166a52..d144d68b571 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -1573,7 +1573,7 @@ statement. The format of variable should be a valid face))) (defun sql-regexp-abbrev (keyword) - (let ((brk (string-match "[~]" keyword)) + (let ((brk (string-search "~" keyword)) (len (length keyword)) (sep "\\(?:") re i) diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 613863dd613..70763319840 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -936,7 +936,7 @@ the remaining input.") (setq call-noexcursion nil) (with-current-buffer (process-buffer proc) (cond ((eq xscheme-process-filter-state 'idle) - (let ((start (string-match "\e" xscheme-filter-input))) + (let ((start (string-search "\e" xscheme-filter-input))) (if start (progn (xscheme-process-filter-output @@ -960,7 +960,7 @@ the remaining input.") (xscheme-process-filter-output ?\e char) (setq xscheme-process-filter-state 'idle))))))) ((eq xscheme-process-filter-state 'reading-string) - (let ((start (string-match "\e" xscheme-filter-input))) + (let ((start (string-search "\e" xscheme-filter-input))) (if start (let ((string (concat xscheme-string-accumulator diff --git a/lisp/replace.el b/lisp/replace.el index c67877efd5d..1d6f091dc71 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -310,7 +310,7 @@ the original string if not." ;; but not after (quote foo). (and (eq (car-safe (car pos)) 'quote) (not (= ?\( (aref to 0))))) - (eq (string-match " " to (cdr pos)) + (eq (string-search " " to (cdr pos)) (cdr pos))) (1+ (cdr pos)) (cdr pos)))) @@ -633,13 +633,13 @@ Arguments REGEXP, START, END, and REGION-NONCONTIGUOUS-P are passed to (if (listp to-strings) (setq replacements to-strings) (while (/= (length to-strings) 0) - (if (string-match " " to-strings) + (if (string-search " " to-strings) (setq replacements (append replacements (list (substring to-strings 0 - (string-match " " to-strings)))) + (string-search " " to-strings)))) to-strings (substring to-strings - (1+ (string-match " " to-strings)))) + (1+ (string-search " " to-strings)))) (setq replacements (append replacements (list to-strings)) to-strings "")))) (perform-replace regexp replacements t t nil n nil start end nil region-noncontiguous-p))) diff --git a/lisp/shell.el b/lisp/shell.el index 5aab80d1031..292f267d2e1 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -1252,7 +1252,7 @@ Returns t if successful." (list start end (lambda (string pred action) - (if (string-match "/" string) + (if (string-search "/" string) (completion-file-name-table string pred action) (complete-with-action action completions string pred))) :exit-function @@ -1328,7 +1328,7 @@ Returns non-nil if successful." (looking-at "\\$?[({]*") (match-end 0))) (variables (mapcar (lambda (x) - (substring x 0 (string-match "=" x))) + (substring x 0 (string-search "=" x))) process-environment)) (suffix (pcase (char-before start) (?\{ "}") (?\( ")") (_ "")))) (list start end variables diff --git a/lisp/simple.el b/lisp/simple.el index 3ad8634975f..985beb06fc9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4272,11 +4272,11 @@ the contents are inserted into the buffer anyway. Optional arguments ACTION and FRAME are as for `display-buffer', and are used only if a pop-up buffer is displayed." - (cond ((and (stringp message) (not (string-match "\n" message))) + (cond ((and (stringp message) (not (string-search "\n" message))) ;; Trivial case where we can use the echo area (message "%s" message)) ((and (stringp message) - (= (string-match "\n" message) (1- (length message)))) + (= (string-search "\n" message) (1- (length message)))) ;; Trivial case where we can just remove single trailing newline (message "%s" (substring message 0 (1- (length message))))) (t diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 34fbec9c218..3cc3e276067 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3270,7 +3270,7 @@ Handles end-of-sublist smartly." Clicking this button expands or contracts a directory. TEXT is the button clicked which has either a + or -. TOKEN is the directory to be expanded. INDENT is the current indentation level." - (cond ((string-match "\\+" text) ;we have to expand this dir + (cond ((string-search "+" text) ;we have to expand this dir (setq speedbar-shown-directories (cons (expand-file-name (concat (speedbar-line-directory indent) token "/")) @@ -3283,7 +3283,7 @@ expanded. INDENT is the current indentation level." (speedbar-default-directory-list (concat (speedbar-line-directory indent) token "/") (1+ indent))))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-reset-scanners) (let ((oldl speedbar-shown-directories) (newl nil) @@ -3317,7 +3317,7 @@ INDENT is the current indentation level and is unused." The parameter TEXT and TOKEN are required, where TEXT is the button clicked, and TOKEN is the file to expand. INDENT is the current indentation level." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (let* ((fn (expand-file-name (concat (speedbar-line-directory indent) token))) (lst (speedbar-fetch-dynamic-tags fn))) @@ -3329,7 +3329,7 @@ indentation level." (save-excursion (end-of-line) (forward-char 1) (funcall (car lst) indent (cdr lst))))))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) @@ -3358,14 +3358,14 @@ INDENT is the current indentation level." "Expand a tag sublist. Imenu will return sub-lists of specialized tag types. Etags does not support this feature. TEXT will be the button string. TOKEN will be the list, and INDENT is the current indentation level." - (cond ((string-match "\\+" text) ;we have to expand this file + (cond ((string-search "+" text) ;we have to expand this file (speedbar-change-expand-button-char ?-) (speedbar-with-writable (save-excursion (end-of-line) (forward-char 1) (speedbar-insert-generic-list indent token 'speedbar-tag-expand 'speedbar-tag-find)))) - ((string-match "-" text) ;we have to contract this node + ((string-search "-" text) ;we have to contract this node (speedbar-change-expand-button-char ?+) (speedbar-delete-subblock indent)) (t (error "Ooops... not sure what to do"))) diff --git a/lisp/subr.el b/lisp/subr.el index 87298b5cfde..1cae3ee1a60 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4808,7 +4808,7 @@ It understands Emacs Lisp quoting within STRING, such that (split-string-and-unquote (combine-and-quote-strings strs)) == strs The SEPARATOR regexp defaults to \"\\s-+\"." (let ((sep (or separator "\\s-+")) - (i (string-match "\"" string))) + (i (string-search "\"" string))) (if (null i) (split-string string sep t) ; no quoting: easy (append (unless (eq i 0) (split-string (substring string 0 i) sep t)) diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 3f0cca0ab7a..411c71cd8c4 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -962,7 +962,7 @@ return nil. Otherwise point is returned." (new-buffer-file-name (expand-file-name ;; `:' is not allowed on Windows (concat tarname "!" - (if (string-match "/" name) + (if (string-search "/" name) name ;; Make sure `name' contains a / ;; so set-auto-mode doesn't try diff --git a/lisp/term.el b/lisp/term.el index 27f0bb1be3b..b3870a814d2 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3488,9 +3488,9 @@ The top-most line is line 0." ((= (aref string 0) ?\032) ;; gdb (when invoked with -fullname) prints: ;; \032\032FULLFILENAME:LINENUMBER:CHARPOS:BEG_OR_MIDDLE:PC\n - (let* ((first-colon (string-match ":" string 1)) + (let* ((first-colon (string-search ":" string 1)) (second-colon - (string-match ":" string (1+ first-colon))) + (string-search ":" string (1+ first-colon))) (filename (substring string 1 first-colon)) (fileline (string-to-number (substring string (1+ first-colon) second-colon)))) @@ -4307,7 +4307,7 @@ well as the newer ports COM10 and higher." (when (or (null x) (and (stringp x) (zerop (length x)))) (error "No serial port selected")) (when (not (or (serial-port-is-file-p) - (string-match "\\\\" x))) + (string-search "\\" x))) (setq x (concat "\\\\.\\" x))) x)) diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 31186fb4fac..5cece1aa3c6 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3962,7 +3962,7 @@ Optional arg COMMA is as in `bibtex-enclosing-field'. It is t for interactive calls." (interactive (list nil t)) (unless field (setq field (car (bibtex-find-text-internal nil nil comma)))) - (if (string-match "@" field) + (if (string-search "@" field) (cond ((bibtex-string= field "@string") (message "String definition")) ((bibtex-string= field "@preamble") diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 4c64531ea35..67852998f42 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2497,7 +2497,7 @@ if defined." "Customize `ispell-alternate-dictionary' to set yours."))) (let* ((process-connection-type ispell-use-ptys-p) - (wild-p (string-match "\\*" word)) + (wild-p (string-search "*" word)) (look-p (and ispell-look-p ; Only use look for an exact match. (or ispell-have-new-look (not wild-p)))) (prog (if look-p ispell-look-command ispell-grep-command)) @@ -2560,7 +2560,7 @@ if defined." (continue t) end) (while continue - (setq end (string-match "\n" output start)) ; get text up to the newline. + (setq end (string-search "\n" output start)) ; get text up to the newline. ;; If we get out of sync and ispell-filter-continue is asserted when we ;; are not continuing, treat the next item as a separate list. When ;; ispell-filter-continue is asserted, ispell-filter *should* always be a @@ -2732,11 +2732,11 @@ Optional third arg SHIFT is an offset to apply based on previous corrections." (if (eq type ?#) (setq count 0) ; no misses for type # (setq count (string-to-number output) ; get number of misses. - output (substring output (1+ (string-match " " output 1))))) + output (substring output (1+ (string-search " " output 1))))) (setq offset (string-to-number output)) (setq output (if (eq type ?#) ; No miss or guess list. nil - (substring output (1+ (string-match " " output 1))))) + (substring output (1+ (string-search " " output 1))))) (while output (let ((end (string-match ", \\|\\($\\)" output))) ; end of miss/guess. (setq cur-count (1+ cur-count)) @@ -4077,7 +4077,7 @@ Includes LaTeX/Nroff modes and extended character mode." (ispell-send-string "+\n~tex\n")) ((string-match "nroff-mode" string) (ispell-send-string "-\n~nroff\n")) - ((string-match "~" string) ; Set extended character mode. + ((string-search "~" string) ; Set extended character mode. (ispell-send-string (concat string "\n"))) (t (message "Invalid Ispell Parsing argument!") (sit-for 2)))))))) diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 650d11d4aca..895064b82f3 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -718,7 +718,7 @@ While entering the regexp, completion on knows citation keys is possible. (insert string)) ;; Reposition cursor? - (when (string-match "\\?" string) + (when (string-search "?" string) (search-backward "?") (delete-char 1)) diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 0157f8443aa..9def10cee05 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -757,7 +757,7 @@ if the information is exact (t) or approximate (nil)." (while (and (setq tail (memq (assq 'toc (cdr tail)) tail)) (setq entry (car tail)) (>= (nth 5 entry) level)) - (setq star (string-match "\\*" (nth 6 entry)) + (setq star (string-search "*" (nth 6 entry)) context (nth 2 entry) section-number (reftex-section-number (nth 5 entry) star)) diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index 611102ecbac..19081825931 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el @@ -798,7 +798,7 @@ When called with 2 C-u prefix args, disable magic word recognition." (push (cons (current-buffer) buffer-invisibility-spec) reftex-buffers-with-changed-invisibility) (setq buffer-invisibility-spec nil)) - ((string-match "\r" (buffer-substring beg end)) + ((string-search "\r" (buffer-substring beg end)) ;; Invisible with selective display. We need to copy it. (let ((string (buffer-substring-no-properties beg end))) (switch-to-buffer "*RefTeX Context Copy*") diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index c732299361c..1cb2cf40c3b 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -813,7 +813,7 @@ This enforces rescanning the buffer on next use." (setq wordlist (nthcdr 4 entry))) (if (and (stringp fmt) - (string-match "@" fmt)) + (string-search "@" fmt)) ;; Special syntax for specifying a label format (setq fmt (split-string fmt "@+")) (setq fmt (list "\\label{%s}" fmt))) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index d9d8059f960..5169377c136 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -2072,7 +2072,7 @@ Return the process in which TeX is running." (let* ((cmd (eval command t)) (proc (tex-shell-proc)) (buf (process-buffer proc)) - (star (string-match "\\*" cmd)) + (star (string-search "*" cmd)) (string (concat (if (null file) @@ -2474,7 +2474,7 @@ Only applies the FSPEC to the args part of FORMAT." (defun tex-start-tex (command file &optional dir) "Start a TeX run, using COMMAND on FILE." - (let* ((star (string-match "\\*" command)) + (let* ((star (string-search "*" command)) (compile-command (if star (concat (substring command 0 star) @@ -2773,7 +2773,7 @@ so normally SUFFIX starts with one." ;; Not found, so split on first period. (concat (file-name-directory file-name) (substring file 0 - (string-match "\\." file)) + (string-search "." file)) suffix))) " ")) diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 5bbf1a85b36..66bbfb0f9f6 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -492,7 +492,7 @@ looks like an email address, \"ftp://\" if it starts with (and (string-match "\\`[[:alnum:]]+\\'" str) (eq (char-before (car bounds)) ?<) (eq (char-after (cdr bounds)) ?>) - (not (string-match "~" (expand-file-name (concat "~" str)))) + (not (string-search "~" (expand-file-name (concat "~" str)))) (setq str (concat "mailto:" str))) ;; If it looks like news.example.com, treat it as news. (if (thing-at-point-newsgroup-p str) diff --git a/lisp/tmm.el b/lisp/tmm.el index 2040f522700..71082bd2f4b 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -268,7 +268,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (cdr elt))) (t (let* ((str (car elt)) - (paren (string-match "(" str)) + (paren (string-search "(" str)) (pos 0) (word 0) char) (catch 'done ; ??? is this slow? (while (and (or (not tmm-shortcut-words) ; no limit on words diff --git a/lisp/transient.el b/lisp/transient.el index 4087a0c68a6..5f441e80ddd 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3073,7 +3073,7 @@ Optional support for popup buttons is also implemented here." ;; the definition, then we want to drop the space that ;; is reinserted above. False-positives are possible ;; for silly bindings like "-C-c C-c". - (unless (string-match-p " " key) + (unless (string-search " " key) (setq pre (string-replace " " "" pre)) (setq suf (string-replace " " "" suf))) (concat (propertize pre 'face 'default) diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index f291414e81b..06cfacc99d6 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -102,10 +102,10 @@ instead of the filename inheritance method." (byserv (setq retval (cdr-safe (assoc file byserv))) (if (and (not retval) - (string-match "/" file)) + (string-search "/" file)) (while (and byserv (not retval)) (setq data (car (car byserv))) - (if (or (not (string-match "/" data)) ; It's a realm - take it! + (if (or (not (string-search "/" data)) ; It's a realm - take it! (and (>= (length file) (length data)) (string= data (substring file 0 (length data))))) @@ -251,12 +251,12 @@ a match." (assoc dirkey keylist) ;; No exact match found. Continue to look for partial match if ;; dirkey is not a realm. - (and (string-match "/" dirkey) + (and (string-search "/" dirkey) (let (match) (while (and (null match) keylist) (if (or ;; Any realm candidate matches. Why? - (not (string-match "/" (caar keylist))) + (not (string-search "/" (caar keylist))) ;; Parent directory matches. (string-prefix-p (caar keylist) dirkey)) (setq match (car keylist)) diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el index 49cc587590e..4fe909cadbc 100644 --- a/lisp/url/url-news.el +++ b/lisp/url/url-news.el @@ -106,7 +106,7 @@ (article (url-unhex-string (url-filename url)))) (url-news-open-host host port (url-user url) (url-password url)) (cond - ((string-match "@" article) ; Its a specific article + ((string-search "@" article) ; Its a specific article (setq buf (url-news-fetch-message-id host article))) ((string= article "") ; List all newsgroups (gnus)) diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index 8b79736d004..113ac2833bc 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -252,7 +252,7 @@ Will not do anything if `url-show-status' is nil." (while pairs (setq cur (car pairs) pairs (cdr pairs)) - (unless (string-match "=" cur) + (unless (string-search "=" cur) (setq cur (concat cur "="))) (when (string-match "=" cur) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index ef607133e86..c8f36fb76ec 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -1173,7 +1173,7 @@ is non-nil." (mtime (file-attribute-modification-time (file-attributes file))) (parsed-time (progn (require 'parse-time) (parse-time-string (concat time " +0000"))))) - (cond ((and (not (string-match "\\+" time)) + (cond ((and (not (string-search "+" time)) (decoded-time-second parsed-time) ;; Compare just the seconds part of the file time, ;; since CVS file time stamp resolution is just 1 second. diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el index 54b71c9f9f6..7ce0633b40b 100644 --- a/lisp/wid-browse.el +++ b/lisp/wid-browse.el @@ -218,7 +218,7 @@ Nothing is assumed about value." (error (prin1-to-string signal))))) (when (string-match "\n\\'" pp) (setq pp (substring pp 0 (1- (length pp))))) - (if (cond ((string-match "\n" pp) + (if (cond ((string-search "\n" pp) nil) ((> (length pp) (- (window-width) (current-column))) nil) diff --git a/lisp/woman.el b/lisp/woman.el index 0bc992d8f7f..fe9f8969c3e 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -418,7 +418,7 @@ As a special case, if PATHS is nil then replace it by calling (if (memq system-type '(windows-nt ms-dos)) (cond ((null paths) (mapcar #'woman-Cyg-to-Win (woman-parse-man.conf))) - ((string-match-p ";" paths) + ((string-search ";" paths) ;; Assume DOS-style path-list... (mapcan ; splice list into list (lambda (x) @@ -1939,12 +1939,12 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated." (setq symbol (car p)) ; 1. name (if (functionp symbol) ; 2. command doc (if (setq doc (documentation symbol t)) - (substring doc 0 (string-match "\n" doc)) + (substring doc 0 (string-search "\n" doc)) "(not documented)")) (if (custom-variable-p symbol) ; 3. variable doc (if (setq doc (documentation-property symbol 'variable-documentation t)) - (substring doc 0 (string-match "\n" doc)))))) + (substring doc 0 (string-search "\n" doc)))))) (setq p (cdr p)))) ;; Output the result: (and (apropos-print t nil) @@ -1955,7 +1955,7 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated." (defun WoMan-getpage-in-background (topic) "Use TOPIC to start WoMan from `Man-follow-manual-reference'." ;; topic is a string, generally of the form "section topic" - (let ((s (string-match " " topic))) + (let ((s (string-search " " topic))) (if s (setq topic (substring topic (1+ s)))) (woman topic))) @@ -3840,7 +3840,7 @@ Leave 1 blank line. Format paragraphs upto TO." ((eolp) ; extend line ;; Insert character INCLUDING TEXT PROPERTIES: ;; (insert (substring overlap i (1+ i))) - (let ((eol (string-match "\n" overlap i))) + (let ((eol (string-search "\n" overlap i))) (insert (substring overlap i eol)) (setq i (or eol imax))) ) diff --git a/lisp/xml.el b/lisp/xml.el index 4e2dd13ecbd..1b2d6557388 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -922,11 +922,11 @@ references and parameter-entity references." (progn (setq elem (match-string-no-properties 1 string) modifier (match-string-no-properties 2 string)) - (if (string-match-p "|" elem) + (if (string-search "|" elem) (setq elem (cons 'choice (mapcar 'xml-parse-elem-type (split-string elem "|")))) - (if (string-match-p "," elem) + (if (string-search "," elem) (setq elem (cons 'seq (mapcar 'xml-parse-elem-type (split-string elem ","))))))) diff --git a/test/lisp/emacs-lisp/check-declare-tests.el b/test/lisp/emacs-lisp/check-declare-tests.el index 9552bf0e397..276530fb4d3 100644 --- a/test/lisp/emacs-lisp/check-declare-tests.el +++ b/test/lisp/emacs-lisp/check-declare-tests.el @@ -106,11 +106,11 @@ (let ((res (buffer-string))) ;; Don't care too much about the format of the output, but ;; check that key information is present. - (should (string-match-p "foo-file" res)) - (should (string-match-p "foo-fun" res)) - (should (string-match-p "bar-file" res)) - (should (string-match-p "it wasn't" res)) - (should (string-match-p "999" res)))))) + (should (string-search "foo-file" res)) + (should (string-search "foo-fun" res)) + (should (string-search "bar-file" res)) + (should (string-search "it wasn't" res)) + (should (string-search "999" res)))))) (provide 'check-declare-tests) ;;; check-declare-tests.el ends here diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index db93250b17b..fb24b98595b 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -610,7 +610,7 @@ unquoted file names." (ert-deftest files-tests-file-name-non-special-dired-compress-handler () ;; `dired-compress-file' can get confused by filenames with ":" in ;; them, which causes this to fail on `windows-nt' systems. - (when (string-match-p ":" (expand-file-name temporary-file-directory)) + (when (string-search ":" (expand-file-name temporary-file-directory)) (ert-skip "FIXME: `dired-compress-file' unreliable when filenames contain `:'.")) (files-tests--with-temp-non-special (tmpfile nospecial) (let ((compressed (dired-compress-file nospecial))) diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index 1a4cc744f0c..4a0b23dd26f 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -128,7 +128,7 @@ (when prev (setq string (concat prev string)) (process-put proc 'previous-string nil))) - (if (and (not (string-match "\n" string)) + (if (and (not (string-search "\n" string)) (> (length string) 0)) (process-put proc 'previous-string string)) (let ((command (split-string string))) diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index 0309b2b1ad6..134f5676709 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el @@ -56,7 +56,7 @@ (set-buffer-multibyte nil) (insert (encode-coding-string "あ" 'euc-jp) "\xd" "\n") (decode-coding-region (point-min) (point-max) 'euc-jp-dos) - (should-not (string-match-p "\^M" (buffer-string))))) + (should-not (string-search "\^M" (buffer-string))))) ;; Return the contents (specified by CONTENT-TYPE; ascii, latin, or ;; binary) of a test file. -- cgit v1.2.3