aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-12 18:24:30 +1100
committerLars Ingebrigtsen2016-02-12 18:24:30 +1100
commitbd066f82903ac055109882189646d39c2a75e044 (patch)
treee44dd5c865325fdc74828bd30fabfff26b46444d
parent2a342bda0af6c0bc168a190f368f0871ff31f7b1 (diff)
downloademacs-bd066f82903ac055109882189646d39c2a75e044.tar.gz
emacs-bd066f82903ac055109882189646d39c2a75e044.zip
Revert the gnus-replace-in-string change, fix arguments, reapply
-rw-r--r--lisp/gnus/gnus-art.el29
-rw-r--r--lisp/gnus/gnus-bookmark.el2
-rw-r--r--lisp/gnus/gnus-gravatar.el3
-rw-r--r--lisp/gnus/gnus-group.el6
-rw-r--r--lisp/gnus/gnus-msg.el4
-rw-r--r--lisp/gnus/gnus-sum.el8
-rw-r--r--lisp/gnus/gnus-util.el2
-rw-r--r--lisp/gnus/mail-source.el4
-rw-r--r--lisp/gnus/mailcap.el7
-rw-r--r--lisp/gnus/message.el3
-rw-r--r--lisp/gnus/mm-decode.el6
-rw-r--r--lisp/gnus/nnir.el30
-rw-r--r--lisp/gnus/nnmaildir.el19
-rw-r--r--lisp/gnus/nnml.el4
-rw-r--r--lisp/gnus/nnrss.el9
-rw-r--r--lisp/gnus/spam-report.el14
-rw-r--r--lisp/gnus/spam.el10
17 files changed, 83 insertions, 77 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 68d07c70ee8..920544d5c51 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7521,7 +7521,7 @@ address, `ask' if unsure and `invalid' if the string is invalid."
7521 (list gnus-button-mid-or-mail-heuristic-alist) 7521 (list gnus-button-mid-or-mail-heuristic-alist)
7522 (result 0) rate regexp lpartlen elem) 7522 (result 0) rate regexp lpartlen elem)
7523 (setq lpartlen 7523 (setq lpartlen
7524 (length (replace-regexp-in-string mid-or-mail "^\\(.*\\)@.*$" "\\1"))) 7524 (length (replace-regexp-in-string "^\\(.*\\)@.*$" "\\1" mid-or-mail)))
7525 (gnus-message 8 "`%s', length of local part=`%s'." mid-or-mail lpartlen) 7525 (gnus-message 8 "`%s', length of local part=`%s'." mid-or-mail lpartlen)
7526 ;; Certain special cases... 7526 ;; Certain special cases...
7527 (when (string-match 7527 (when (string-match
@@ -7592,7 +7592,7 @@ address, `ask' if unsure and `invalid' if the string is invalid."
7592 (setq guessed 7592 (setq guessed
7593 ;; get rid of surrounding angles... 7593 ;; get rid of surrounding angles...
7594 (funcall pref 7594 (funcall pref
7595 (replace-regexp-in-string mid-or-mail "^<\\|>$" ""))) 7595 (replace-regexp-in-string "^<\\|>$" "" mid-or-mail)))
7596 (if (or (eq 'mid guessed) (eq 'mail guessed)) 7596 (if (or (eq 'mid guessed) (eq 'mail guessed))
7597 (setq pref guessed) 7597 (setq pref guessed)
7598 (setq pref 'ask))) 7598 (setq pref 'ask)))
@@ -7624,13 +7624,13 @@ as a symbol to FUN."
7624 "Call `describe-function' when pushing the corresponding URL button." 7624 "Call `describe-function' when pushing the corresponding URL button."
7625 (describe-function 7625 (describe-function
7626 (intern 7626 (intern
7627 (replace-regexp-in-string url gnus-button-handle-describe-prefix "")))) 7627 (replace-regexp-in-string gnus-button-handle-describe-prefix "" url))))
7628 7628
7629(defun gnus-button-handle-describe-variable (url) 7629(defun gnus-button-handle-describe-variable (url)
7630 "Call `describe-variable' when pushing the corresponding URL button." 7630 "Call `describe-variable' when pushing the corresponding URL button."
7631 (describe-variable 7631 (describe-variable
7632 (intern 7632 (intern
7633 (replace-regexp-in-string url gnus-button-handle-describe-prefix "")))) 7633 (replace-regexp-in-string gnus-button-handle-describe-prefix "" url))))
7634 7634
7635(defun gnus-button-handle-symbol (url) 7635(defun gnus-button-handle-symbol (url)
7636"Display help on variable or function. 7636"Display help on variable or function.
@@ -7644,7 +7644,7 @@ Calls `describe-variable' or `describe-function'."
7644(defun gnus-button-handle-describe-key (url) 7644(defun gnus-button-handle-describe-key (url)
7645 "Call `describe-key' when pushing the corresponding URL button." 7645 "Call `describe-key' when pushing the corresponding URL button."
7646 (let* ((key-string 7646 (let* ((key-string
7647 (replace-regexp-in-string url gnus-button-handle-describe-prefix "")) 7647 (replace-regexp-in-string gnus-button-handle-describe-prefix "" url))
7648 (keys (ignore-errors (eval `(kbd ,key-string))))) 7648 (keys (ignore-errors (eval `(kbd ,key-string)))))
7649 (if keys 7649 (if keys
7650 (describe-key keys) 7650 (describe-key keys)
@@ -7652,31 +7652,30 @@ Calls `describe-variable' or `describe-function'."
7652 7652
7653(defun gnus-button-handle-apropos (url) 7653(defun gnus-button-handle-apropos (url)
7654 "Call `apropos' when pushing the corresponding URL button." 7654 "Call `apropos' when pushing the corresponding URL button."
7655 (apropos (replace-regexp-in-string 7655 (apropos (replace-regexp-in-string gnus-button-handle-describe-prefix "" url)))
7656 url gnus-button-handle-describe-prefix "")))
7657 7656
7658(defun gnus-button-handle-apropos-command (url) 7657(defun gnus-button-handle-apropos-command (url)
7659 "Call `apropos' when pushing the corresponding URL button." 7658 "Call `apropos' when pushing the corresponding URL button."
7660 (apropos-command 7659 (apropos-command
7661 (replace-regexp-in-string url gnus-button-handle-describe-prefix ""))) 7660 (replace-regexp-in-string gnus-button-handle-describe-prefix "" url)))
7662 7661
7663(defun gnus-button-handle-apropos-variable (url) 7662(defun gnus-button-handle-apropos-variable (url)
7664 "Call `apropos' when pushing the corresponding URL button." 7663 "Call `apropos' when pushing the corresponding URL button."
7665 (funcall 7664 (funcall
7666 (if (fboundp 'apropos-variable) 'apropos-variable 'apropos) 7665 (if (fboundp 'apropos-variable) 'apropos-variable 'apropos)
7667 (replace-regexp-in-string url gnus-button-handle-describe-prefix ""))) 7666 (replace-regexp-in-string gnus-button-handle-describe-prefix "" url)))
7668 7667
7669(defun gnus-button-handle-apropos-documentation (url) 7668(defun gnus-button-handle-apropos-documentation (url)
7670 "Call `apropos' when pushing the corresponding URL button." 7669 "Call `apropos' when pushing the corresponding URL button."
7671 (funcall 7670 (funcall
7672 (if (fboundp 'apropos-documentation) 'apropos-documentation 'apropos) 7671 (if (fboundp 'apropos-documentation) 'apropos-documentation 'apropos)
7673 (replace-regexp-in-string url gnus-button-handle-describe-prefix ""))) 7672 (replace-regexp-in-string gnus-button-handle-describe-prefix "" url)))
7674 7673
7675(defun gnus-button-handle-library (url) 7674(defun gnus-button-handle-library (url)
7676 "Call `locate-library' when pushing the corresponding URL button." 7675 "Call `locate-library' when pushing the corresponding URL button."
7677 (gnus-message 9 "url=`%s'" url) 7676 (gnus-message 9 "url=`%s'" url)
7678 (let* ((lib (locate-library url)) 7677 (let* ((lib (locate-library url))
7679 (file (replace-regexp-in-string (or lib "") "\\.elc" ".el"))) 7678 (file (replace-regexp-in-string "\\.elc" ".el" (or lib ""))))
7680 (if (not lib) 7679 (if (not lib)
7681 (gnus-message 1 "Cannot locale library `%s'." url) 7680 (gnus-message 1 "Cannot locale library `%s'." url)
7682 (find-file-read-only file)))) 7681 (find-file-read-only file))))
@@ -8274,7 +8273,7 @@ url is put as the `gnus-button-url' overlay property on the button."
8274 "Fetch a man page." 8273 "Fetch a man page."
8275 (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url) 8274 (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url)
8276 (when (eq gnus-button-man-handler 'woman) 8275 (when (eq gnus-button-man-handler 'woman)
8277 (setq url (replace-regexp-in-string url "([1-9][X1a-z]*).*\\'" ""))) 8276 (setq url (replace-regexp-in-string "([1-9][X1a-z]*).*\\'" "" url)))
8278 (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url) 8277 (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url)
8279 (funcall gnus-button-man-handler url)) 8278 (funcall gnus-button-man-handler url))
8280 8279
@@ -8290,7 +8289,7 @@ url is put as the `gnus-button-url' overlay property on the button."
8290 ((string-match "([^)\"]+)[^\"]+" url) 8289 ((string-match "([^)\"]+)[^\"]+" url)
8291 (setq url 8290 (setq url
8292 (replace-regexp-in-string 8291 (replace-regexp-in-string
8293 (replace-regexp-in-string url "[\n\t ]+" " ") "\"" "")) 8292 "\"" "" (replace-regexp-in-string "[\n\t ]+" " " url)))
8294 (gnus-info-find-node url)) 8293 (gnus-info-find-node url))
8295 (t (error "Can't parse %s" url)))) 8294 (t (error "Can't parse %s" url))))
8296 8295
@@ -8429,8 +8428,8 @@ url is put as the `gnus-button-url' overlay property on the button."
8429 (funcall func) 8428 (funcall func)
8430 (message-position-on-field (caar args))) 8429 (message-position-on-field (caar args)))
8431 (insert (replace-regexp-in-string 8430 (insert (replace-regexp-in-string
8432 (mapconcat 'identity (reverse (cdar args)) ", ") 8431 "\r\n" "\n"
8433 "\r\n" "\n" t)) 8432 (mapconcat 'identity (reverse (cdar args)) ", ") nil t))
8434 (setq args (cdr args))) 8433 (setq args (cdr args)))
8435 (if subject 8434 (if subject
8436 (message-goto-body) 8435 (message-goto-body)
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el
index cb3de92a2ae..66fc6106799 100644
--- a/lisp/gnus/gnus-bookmark.el
+++ b/lisp/gnus/gnus-bookmark.el
@@ -226,7 +226,7 @@ So the cdr of each bookmark is an alist too.")
226 "-" (car subject) "-" (cadr subject))) 226 "-" (car subject) "-" (cadr subject)))
227 (default-name-1 227 (default-name-1
228 ;; Strip "[]" chars from the bookmark name: 228 ;; Strip "[]" chars from the bookmark name:
229 (replace-regexp-in-string default-name-0 "[]_[]" "")) 229 (replace-regexp-in-string "[]_[]" "" default-name-0))
230 (name (read-from-minibuffer 230 (name (read-from-minibuffer
231 (format "Set bookmark (%s): " default-name-1) 231 (format "Set bookmark (%s): " default-name-1)
232 nil nil nil nil 232 nil nil nil nil
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el
index 28caed2e80d..89be8640c53 100644
--- a/lisp/gnus/gnus-gravatar.el
+++ b/lisp/gnus/gnus-gravatar.el
@@ -95,7 +95,8 @@ Set image category to CATEGORY."
95 (when (if real-name 95 (when (if real-name
96 (re-search-forward 96 (re-search-forward
97 (concat (replace-regexp-in-string 97 (concat (replace-regexp-in-string
98 (regexp-quote real-name) "[\t ]+" "[\t\n ]+") 98 "[\t ]+" "[\t\n ]+"
99 (regexp-quote real-name))
99 "\\|" 100 "\\|"
100 (regexp-quote mail-address)) 101 (regexp-quote mail-address))
101 nil t) 102 nil t)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 18e899b7bce..b702e2f42ca 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2197,7 +2197,7 @@ if it is not a list."
2197 (setq group 2197 (setq group
2198 (encode-coding-string 2198 (encode-coding-string
2199 group (gnus-group-name-charset nil group)))) 2199 group (gnus-group-name-charset nil group))))
2200 (replace-regexp-in-string group "\n" ""))) 2200 (replace-regexp-in-string "\n" "" group)))
2201 2201
2202;;;###autoload 2202;;;###autoload
2203(defun gnus-fetch-group (group &optional articles) 2203(defun gnus-fetch-group (group &optional articles)
@@ -2456,8 +2456,8 @@ the bug number, and browsing the URL must return mbox output."
2456 (end-of-line) 2456 (end-of-line)
2457 (insert (format ", %s@%s" (car ids) 2457 (insert (format ", %s@%s" (car ids)
2458 (replace-regexp-in-string 2458 (replace-regexp-in-string
2459 (replace-regexp-in-string mbox-url "^http://" "") 2459 "/.*$" ""
2460 "/.*$" "")))))) 2460 (replace-regexp-in-string "^http://" "" mbox-url)))))))
2461 (gnus-group-read-ephemeral-group 2461 (gnus-group-read-ephemeral-group
2462 (format "nndoc+ephemeral:bug#%s" 2462 (format "nndoc+ephemeral:bug#%s"
2463 (mapconcat 'number-to-string ids ",")) 2463 (mapconcat 'number-to-string ids ","))
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index dec0e4e81e8..43a496942e3 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1135,8 +1135,8 @@ See the variable `gnus-user-agent'."
1135 (when (memq 'gnus gnus-user-agent) 1135 (when (memq 'gnus gnus-user-agent)
1136 (concat "Gnus/" 1136 (concat "Gnus/"
1137 (replace-regexp-in-string 1137 (replace-regexp-in-string
1138 (format "%1.8f" (gnus-continuum-version gnus-version)) 1138 "0+\\'" ""
1139 "0+\\'" "") 1139 (format "%1.8f" (gnus-continuum-version gnus-version)))
1140 " (" gnus-version ")"))) 1140 " (" gnus-version ")")))
1141 (emacs-v (gnus-emacs-version))) 1141 (emacs-v (gnus-emacs-version)))
1142 (concat gnus-v (when (and gnus-v emacs-v) " ") 1142 (concat gnus-v (when (and gnus-v emacs-v) " ")
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index dfdf8e18966..688646f3e82 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -9085,7 +9085,7 @@ non-numeric or nil fetch the number specified by the
9085 (gnus-warp-to-article) 9085 (gnus-warp-to-article)
9086 (when (and (stringp message-id) 9086 (when (and (stringp message-id)
9087 (not (zerop (length message-id)))) 9087 (not (zerop (length message-id))))
9088 (setq message-id (replace-regexp-in-string message-id " " "")) 9088 (setq message-id (replace-regexp-in-string " " "" message-id))
9089 ;; Construct the correct Message-ID if necessary. 9089 ;; Construct the correct Message-ID if necessary.
9090 ;; Suggested by tale@pawl.rpi.edu. 9090 ;; Suggested by tale@pawl.rpi.edu.
9091 (unless (string-match "^<" message-id) 9091 (unless (string-match "^<" message-id)
@@ -9563,10 +9563,10 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead."
9563 9563
9564(defun gnus-summary-print-truncate-and-quote (string &optional len) 9564(defun gnus-summary-print-truncate-and-quote (string &optional len)
9565 "Truncate to LEN and quote all \"(\"'s in STRING." 9565 "Truncate to LEN and quote all \"(\"'s in STRING."
9566 (replace-regexp-in-string (if (and len (> (length string) len)) 9566 (replace-regexp-in-string "[()]" "\\\\\\&"
9567 (if (and len (> (length string) len))
9567 (substring string 0 len) 9568 (substring string 0 len)
9568 string) 9569 string)))
9569 "[()]" "\\\\\\&"))
9570 9570
9571(defun gnus-summary-print-article (&optional filename n) 9571(defun gnus-summary-print-article (&optional filename n)
9572 "Generate and print a PostScript image of the process-marked (mail) articles. 9572 "Generate and print a PostScript image of the process-marked (mail) articles.
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index eee80fdd6bc..284f094f7a5 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -407,7 +407,7 @@ Cache the result as a text property stored in DATE."
407 407
408(defun gnus-mode-string-quote (string) 408(defun gnus-mode-string-quote (string)
409 "Quote all \"%\"'s in STRING." 409 "Quote all \"%\"'s in STRING."
410 (replace-regexp-in-string string "%" "%%")) 410 (replace-regexp-in-string "%" "%%" string))
411 411
412;; Make a hash table (default and minimum size is 256). 412;; Make a hash table (default and minimum size is 256).
413;; Optional argument HASHSIZE specifies the table size. 413;; Optional argument HASHSIZE specifies the table size.
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index d360f5f71fe..2388a1afa57 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -603,8 +603,8 @@ If CONFIRM is non-nil, ask for confirmation before removing a file."
603 currday (+ currday (* low2days (nth 1 (current-time))))) 603 currday (+ currday (* low2days (nth 1 (current-time)))))
604 (while files 604 (while files
605 (let* ((ffile (car files)) 605 (let* ((ffile (car files))
606 (bfile (replace-regexp-in-string 606 (bfile (replace-regexp-in-string "\\`.*/\\([^/]+\\)\\'" "\\1"
607 ffile "\\`.*/\\([^/]+\\)\\'" "\\1")) 607 ffile))
608 (filetime (nth 5 (file-attributes ffile))) 608 (filetime (nth 5 (file-attributes ffile)))
609 (fileday (* (car filetime) high2days)) 609 (fileday (* (car filetime) high2days))
610 (fileday (+ fileday (* low2days (nth 1 filetime))))) 610 (fileday (+ fileday (* low2days (nth 1 filetime)))))
diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el
index a82768fed04..609a8f4d64b 100644
--- a/lisp/gnus/mailcap.el
+++ b/lisp/gnus/mailcap.el
@@ -1028,11 +1028,12 @@ If FORCE, re-parse even if already parsed."
1028 (replace-regexp-in-string 1028 (replace-regexp-in-string
1029 ;; Replace mailcap's `%s' placeholder 1029 ;; Replace mailcap's `%s' placeholder
1030 ;; with dired's `?' placeholder 1030 ;; with dired's `?' placeholder
1031 "%s" "?"
1031 (replace-regexp-in-string 1032 (replace-regexp-in-string
1032 ;; Remove the final filename placeholder 1033 ;; Remove the final filename placeholder
1033 command "[ \t\n]*\\('\\)?%s\\1?[ \t\n]*\\'" "" 1034 "[ \t\n]*\\('\\)?%s\\1?[ \t\n]*\\'" ""
1034 nil t) 1035 command nil t)
1035 "%s" "?" nil t)))) 1036 nil t))))
1036 common-mime-info))))) 1037 common-mime-info)))))
1037 commands)) 1038 commands))
1038 1039
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 540736c0e57..0a806467058 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -8309,7 +8309,8 @@ From headers in the original article."
8309 (dolist (string (mail-header-parse-addresses value 'raw)) 8309 (dolist (string (mail-header-parse-addresses value 'raw))
8310 (setq string 8310 (setq string
8311 (replace-regexp-in-string 8311 (replace-regexp-in-string
8312 (replace-regexp-in-string string "^ +\\| +$" "") "\n" "")) 8312 "\n" ""
8313 (replace-regexp-in-string "^ +\\| +$" "" string)))
8313 (ecomplete-add-item 'mail (car (mail-header-parse-address string)) 8314 (ecomplete-add-item 'mail (car (mail-header-parse-address string))
8314 string)))) 8315 string))))
8315 (ecomplete-save)) 8316 (ecomplete-save))
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index c861b9a8a29..383aeded66f 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1353,12 +1353,12 @@ string if you do not like underscores."
1353 1353
1354(defun mm-file-name-delete-control (filename) 1354(defun mm-file-name-delete-control (filename)
1355 "Delete control characters from FILENAME." 1355 "Delete control characters from FILENAME."
1356 (replace-regexp-in-string filename "[\x00-\x1f\x7f]" "")) 1356 (replace-regexp-in-string "[\x00-\x1f\x7f]" "" filename))
1357 1357
1358(defun mm-file-name-delete-gotchas (filename) 1358(defun mm-file-name-delete-gotchas (filename)
1359 "Delete shell gotchas from FILENAME." 1359 "Delete shell gotchas from FILENAME."
1360 (setq filename (replace-regexp-in-string filename "[<>|]" "")) 1360 (setq filename (replace-regexp-in-string "[<>|]" "" filename))
1361 (replace-regexp-in-string filename "^[.-]+" "")) 1361 (replace-regexp-in-string "^[.-]+" "" filename))
1362 1362
1363(defun mm-save-part (handle &optional prompt) 1363(defun mm-save-part (handle &optional prompt)
1364 "Write HANDLE to a file. 1364 "Write HANDLE to a file.
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index a36dba429b0..7614002a920 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -929,16 +929,17 @@ ready to be added to the list of search results."
929 ;; Set group to dirnam without any leading dots or slashes, 929 ;; Set group to dirnam without any leading dots or slashes,
930 ;; and with all subsequent slashes replaced by dots 930 ;; and with all subsequent slashes replaced by dots
931 (let ((group (replace-regexp-in-string 931 (let ((group (replace-regexp-in-string
932 (replace-regexp-in-string dirnam "^[./\\]" "" nil t) 932 "[/\\]" "."
933 "[/\\]" "." nil t))) 933 (replace-regexp-in-string "^[./\\]" "" dirnam nil t)
934 934 nil t)))
935 (vector (gnus-group-full-name group server) 935
936 (if (string-match "\\`nnmaildir:" (gnus-group-server server)) 936 (vector (gnus-group-full-name group server)
937 (nnmaildir-base-name-to-article-number 937 (if (string-match "\\`nnmaildir:" (gnus-group-server server))
938 (substring article 0 (string-match ":" article)) 938 (nnmaildir-base-name-to-article-number
939 group nil) 939 (substring article 0 (string-match ":" article))
940 (string-to-number article)) 940 group nil)
941 (string-to-number score))))) 941 (string-to-number article))
942 (string-to-number score)))))
942 943
943;;; Search Engine Interfaces: 944;;; Search Engine Interfaces:
944 945
@@ -1341,9 +1342,9 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
1341 (string-match "^[./\\]*\\(.*\\)$" dirnam) 1342 (string-match "^[./\\]*\\(.*\\)$" dirnam)
1342 ;; "/" -> "." 1343 ;; "/" -> "."
1343 (setq group (replace-regexp-in-string 1344 (setq group (replace-regexp-in-string
1344 (match-string 1 dirnam) "/" ".")) 1345 "/" "." (match-string 1 dirnam)))
1345 ;; Windows "\\" -> "." 1346 ;; Windows "\\" -> "."
1346 (setq group (replace-regexp-in-string group "\\\\" ".")) 1347 (setq group (replace-regexp-in-string "\\\\" "." group))
1347 1348
1348 (push (vector (gnus-group-full-name group server) 1349 (push (vector (gnus-group-full-name group server)
1349 (string-to-number artno) 1350 (string-to-number artno)
@@ -1415,7 +1416,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
1415 (when (string-match prefix dirnam) 1416 (when (string-match prefix dirnam)
1416 (setq dirnam (replace-match "" t t dirnam))) 1417 (setq dirnam (replace-match "" t t dirnam)))
1417 (push (vector (gnus-group-full-name 1418 (push (vector (gnus-group-full-name
1418 (replace-regexp-in-string dirnam "/" ".") server) 1419 (replace-regexp-in-string "/" "." dirnam) server)
1419 (string-to-number artno) 1420 (string-to-number artno)
1420 (string-to-number score)) 1421 (string-to-number score))
1421 artlist)) 1422 artlist))
@@ -1614,7 +1615,8 @@ actually)."
1614 (if (file-directory-p 1615 (if (file-directory-p
1615 (setq group 1616 (setq group
1616 (replace-regexp-in-string 1617 (replace-regexp-in-string
1617 group "\\." "/" nil t))) 1618 "\\." "/"
1619 group nil t)))
1618 group)))))) 1620 group))))))
1619 (unless group 1621 (unless group
1620 (error "Cannot locate directory for group")) 1622 (error "Cannot locate directory for group"))
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index 4b154432c7e..e34a13b4561 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -657,12 +657,12 @@ by nnmaildir-request-article.")
657 657
658(defun nnmaildir--system-name () 658(defun nnmaildir--system-name ()
659 (replace-regexp-in-string 659 (replace-regexp-in-string
660 ":" "\\072"
660 (replace-regexp-in-string 661 (replace-regexp-in-string
661 (replace-regexp-in-string 662 "/" "\\057"
662 (system-name) 663 (replace-regexp-in-string "\\\\" "\\134" (system-name) nil 'literal)
663 "\\\\" "\\134" nil 'literal) 664 nil 'literal)
664 "/" "\\057" nil 'literal) 665 nil 'literal))
665 ":" "\\072" nil 'literal))
666 666
667(defun nnmaildir-request-type (_group &optional _article) 667(defun nnmaildir-request-type (_group &optional _article)
668 'mail) 668 'mail)
@@ -956,7 +956,8 @@ by nnmaildir-request-article.")
956 group (symbol-value group) 956 group (symbol-value group)
957 ro (nnmaildir--param pgname 'read-only)) 957 ro (nnmaildir--param pgname 'read-only))
958 (insert (replace-regexp-in-string 958 (insert (replace-regexp-in-string
959 (nnmaildir--grp-name group) " " "\\ " nil t) 959 " " "\\ "
960 (nnmaildir--grp-name group) nil t)
960 " ") 961 " ")
961 (princ (nnmaildir--group-maxnum nnmaildir--cur-server group) 962 (princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
962 nntp-server-buffer) 963 nntp-server-buffer)
@@ -985,7 +986,7 @@ by nnmaildir-request-article.")
985 (princ (nnmaildir--group-maxnum nnmaildir--cur-server group) 986 (princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
986 nntp-server-buffer) 987 nntp-server-buffer)
987 (insert " " 988 (insert " "
988 (replace-regexp-in-string gname " " "\\ " nil t) 989 (replace-regexp-in-string " " "\\ " gname nil t)
989 "\n"))))) 990 "\n")))))
990 'group) 991 'group)
991 992
@@ -1116,7 +1117,7 @@ by nnmaildir-request-article.")
1116 (insert " ") 1117 (insert " ")
1117 (princ (nnmaildir--group-maxnum nnmaildir--cur-server group) 1118 (princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
1118 nntp-server-buffer) 1119 nntp-server-buffer)
1119 (insert " " (replace-regexp-in-string gname " " "\\ " nil t) "\n") 1120 (insert " " (replace-regexp-in-string " " "\\ " gname nil t) "\n")
1120 t)))) 1121 t))))
1121 1122
1122(defun nnmaildir-request-create-group (gname &optional server _args) 1123(defun nnmaildir-request-create-group (gname &optional server _args)
@@ -1278,7 +1279,7 @@ by nnmaildir-request-article.")
1278 (insert "\t" (nnmaildir--nov-get-beg nov) "\t" 1279 (insert "\t" (nnmaildir--nov-get-beg nov) "\t"
1279 (nnmaildir--art-msgid article) "\t" 1280 (nnmaildir--art-msgid article) "\t"
1280 (nnmaildir--nov-get-mid nov) "\tXref: nnmaildir " 1281 (nnmaildir--nov-get-mid nov) "\tXref: nnmaildir "
1281 (replace-regexp-in-string gname " " "\\ " nil t) ":") 1282 (replace-regexp-in-string " " "\\ " gname nil t) ":")
1282 (princ num nntp-server-buffer) 1283 (princ num nntp-server-buffer)
1283 (insert "\t" (nnmaildir--nov-get-end nov) "\n")))) 1284 (insert "\t" (nnmaildir--nov-get-end nov) "\n"))))
1284 (catch 'return 1285 (catch 'return
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index 5b471e8d736..4976f25795e 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -1078,7 +1078,6 @@ Use the nov database for the current group if available."
1078 (let* ((oldfile (nnml-article-to-file old-number)) 1078 (let* ((oldfile (nnml-article-to-file old-number))
1079 (newfile 1079 (newfile
1080 (replace-regexp-in-string 1080 (replace-regexp-in-string
1081 oldfile
1082 ;; nnml-use-compressed-files might be any string, but 1081 ;; nnml-use-compressed-files might be any string, but
1083 ;; probably it's sufficient to take into account only 1082 ;; probably it's sufficient to take into account only
1084 ;; "\\.[a-z0-9]+". Note that we can't only use the 1083 ;; "\\.[a-z0-9]+". Note that we can't only use the
@@ -1087,7 +1086,8 @@ Use the nov database for the current group if available."
1087 ;; value. 1086 ;; value.
1088 (concat 1087 (concat
1089 "\\(" old-number-string "\\)\\(\\(\\.[a-z0-9]+\\)?\\)$") 1088 "\\(" old-number-string "\\)\\(\\(\\.[a-z0-9]+\\)?\\)$")
1090 (concat new-number-string "\\2")))) 1089 (concat new-number-string "\\2")
1090 oldfile)))
1091 (with-current-buffer nntp-server-buffer 1091 (with-current-buffer nntp-server-buffer
1092 (nnmail-find-file oldfile) 1092 (nnmail-find-file oldfile)
1093 ;; Update the Xref header in the article itself: 1093 ;; Update the Xref header in the article itself:
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index 6d2d16ab41b..6168e5a281b 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -111,7 +111,7 @@ for decoding when the cdr that the data specify is not available.")
111;;; Interface functions 111;;; Interface functions
112 112
113(defsubst nnrss-format-string (string) 113(defsubst nnrss-format-string (string)
114 (replace-regexp-in-string string " *\n *" " ")) 114 (replace-regexp-in-string " *\n *" " " string))
115 115
116(defun nnrss-decode-group-name (group) 116(defun nnrss-decode-group-name (group)
117 (if (and group (mm-coding-system-p 'utf-8)) 117 (if (and group (mm-coding-system-p 'utf-8))
@@ -291,7 +291,7 @@ for decoding when the cdr that the data specify is not available.")
291 (let ((rfc2047-encoding-type 'mime) 291 (let ((rfc2047-encoding-type 'mime)
292 rfc2047-encode-max-chars) 292 rfc2047-encode-max-chars)
293 (rfc2047-encode-string 293 (rfc2047-encode-string
294 (replace-regexp-in-string group "[\t\n ]+" "_"))))) 294 (replace-regexp-in-string "[\t\n ]+" "_" group)))))
295 (when nnrss-content-function 295 (when nnrss-content-function
296 (funcall nnrss-content-function e group article)))) 296 (funcall nnrss-content-function e group article))))
297 (cond 297 (cond
@@ -804,9 +804,10 @@ It is useful when `(setq nnrss-use-local t)'."
804 node)) 804 node))
805 (cleaned-text (if text 805 (cleaned-text (if text
806 (replace-regexp-in-string 806 (replace-regexp-in-string
807 "\r\n" "\n"
807 (replace-regexp-in-string 808 (replace-regexp-in-string
808 text "^[\000-\037\177]+\\|^ +\\| +$" "") 809 "^[\000-\037\177]+\\|^ +\\| +$" ""
809 "\r\n" "\n")))) 810 text)))))
810 (if (string-equal "" cleaned-text) 811 (if (string-equal "" cleaned-text)
811 nil 812 nil
812 cleaned-text))) 813 cleaned-text)))
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index eb7d862e99c..0b58dc8c25b 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -163,12 +163,12 @@ submitted at once. Internal variable.")
163 (concat 163 (concat
164 "/" 164 "/"
165 (replace-regexp-in-string 165 (replace-regexp-in-string
166 "/" ":"
166 (replace-regexp-in-string 167 (replace-regexp-in-string
168 "^.*article.gmane.org/" ""
167 (replace-regexp-in-string 169 (replace-regexp-in-string
168 (mail-header-xref (gnus-summary-article-header article)) 170 "/raw" ":silent"
169 "/raw" ":silent") 171 (mail-header-xref (gnus-summary-article-header article))))))))
170 "^.*article.gmane.org/" "")
171 "/" ":"))))
172 (spam-report-gmane-use-article-number 172 (spam-report-gmane-use-article-number
173 (spam-report-url-ping 173 (spam-report-url-ping
174 rpt-host 174 rpt-host
@@ -207,8 +207,8 @@ submitted at once. Internal variable.")
207 (when host 207 (when host
208 (when (string-equal "permalink.gmane.org" host) 208 (when (string-equal "permalink.gmane.org" host)
209 (setq host rpt-host) 209 (setq host rpt-host)
210 (setq report (replace-regexp-in-string 210 (setq report (replace-regexp-in-string "/\\([0-9]+\\)$" ":\\1"
211 report "/\\([0-9]+\\)$" ":\\1"))) 211 report)))
212 (setq url (format "http://%s%s" host report))) 212 (setq url (format "http://%s%s" host report)))
213 (if (not (and host report url)) 213 (if (not (and host report url))
214 (gnus-message 214 (gnus-message
@@ -227,7 +227,7 @@ the function specified by `spam-report-url-ping-function'."
227 227
228(defcustom spam-report-user-mail-address 228(defcustom spam-report-user-mail-address
229 (and (stringp user-mail-address) 229 (and (stringp user-mail-address)
230 (replace-regexp-in-string user-mail-address "@" "<at>")) 230 (replace-regexp-in-string "@" "<at>" user-mail-address))
231 "Mail address of this user used for spam reports to Gmane. 231 "Mail address of this user used for spam reports to Gmane.
232This is initialized based on `user-mail-address'." 232This is initialized based on `user-mail-address'."
233 :type '(choice string 233 :type '(choice string
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 39181eaa62f..d3224004f15 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -1200,18 +1200,18 @@ Note this has to be fast."
1200 (cond 1200 (cond
1201 ((eq header 'X-Spam-Status) 1201 ((eq header 'X-Spam-Status)
1202 (string-to-number (replace-regexp-in-string 1202 (string-to-number (replace-regexp-in-string
1203 header-content
1204 spam-spamassassin-score-regexp 1203 spam-spamassassin-score-regexp
1205 "\\1"))) 1204 "\\1"
1205 header-content)))
1206 ;; for CRM checking, it's probably faster to just do the string match 1206 ;; for CRM checking, it's probably faster to just do the string match
1207 ((string-match "( pR: \\([0-9.-]+\\)" header-content) 1207 ((string-match "( pR: \\([0-9.-]+\\)" header-content)
1208 (- (string-to-number (match-string 1 header-content)))) 1208 (- (string-to-number (match-string 1 header-content))))
1209 ((eq header 'X-Bogosity) 1209 ((eq header 'X-Bogosity)
1210 (string-to-number (replace-regexp-in-string 1210 (string-to-number (replace-regexp-in-string
1211 ",.*" ""
1211 (replace-regexp-in-string 1212 (replace-regexp-in-string
1212 header-content 1213 ".*spamicity=" ""
1213 ".*spamicity=" "") 1214 header-content))))
1214 ",.*" "")))
1215 (t nil)) 1215 (t nil))
1216 nil))) 1216 nil)))
1217 1217