diff options
| author | Lars Ingebrigtsen | 2016-02-13 17:40:34 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-13 17:40:34 +1100 |
| commit | 9efc29a2dfda67c2e6b6693a6cb06a19fbdccaeb (patch) | |
| tree | 2ee4a813f66d95e3bd6d960229c9f26c4fbbd199 | |
| parent | 9bcefcf0b0bcb860f432299c8e6cf109d07ee8ef (diff) | |
| download | emacs-9efc29a2dfda67c2e6b6693a6cb06a19fbdccaeb.tar.gz emacs-9efc29a2dfda67c2e6b6693a6cb06a19fbdccaeb.zip | |
Remove several gnus-util compat functions
* lisp/gnus/gnus-util.el (gnus-set-process-query-on-exit-flag): Remove.
(gnus-read-shell-command): Remove.
(gnus-match-substitute-replacement): Remove.
(gnus-string-match-p): Remove.
(gnus-string-prefix-p): Remove.
| -rw-r--r-- | lisp/gnus/gnus-art.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-notifications.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 51 | ||||
| -rw-r--r-- | lisp/gnus/mm-decode.el | 3 | ||||
| -rw-r--r-- | lisp/gnus/mml-sec.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 8 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnmaildir.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/nntp.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/spam-report.el | 2 |
12 files changed, 26 insertions, 78 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index e22d422c548..4858c2a663e 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2459,7 +2459,7 @@ long lines if and only if arg is positive." | |||
| 2459 | ;; The command is a string, so we interpret the command | 2459 | ;; The command is a string, so we interpret the command |
| 2460 | ;; as a, well, command, and fork it off. | 2460 | ;; as a, well, command, and fork it off. |
| 2461 | (let ((process-connection-type nil)) | 2461 | (let ((process-connection-type nil)) |
| 2462 | (gnus-set-process-query-on-exit-flag | 2462 | (set-process-query-on-exit-flag |
| 2463 | (start-process | 2463 | (start-process |
| 2464 | "article-x-face" nil shell-file-name | 2464 | "article-x-face" nil shell-file-name |
| 2465 | shell-command-switch gnus-article-x-face-command) | 2465 | shell-command-switch gnus-article-x-face-command) |
| @@ -4126,8 +4126,7 @@ and the raw article including all headers will be piped." | |||
| 4126 | (setq command | 4126 | (setq command |
| 4127 | (if (and (eq command 'default) default) | 4127 | (if (and (eq command 'default) default) |
| 4128 | default | 4128 | default |
| 4129 | (gnus-read-shell-command "Shell command on this article: " | 4129 | (read-shell-command "Shell command on this article: " default)))) |
| 4130 | default)))) | ||
| 4131 | (when (string-equal command "") | 4130 | (when (string-equal command "") |
| 4132 | (if default | 4131 | (if default |
| 4133 | (setq command default) | 4132 | (setq command default) |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 43a496942e3..e2b8dcc51e4 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1904,10 +1904,10 @@ this is a reply." | |||
| 1904 | (cond | 1904 | (cond |
| 1905 | ((stringp value) | 1905 | ((stringp value) |
| 1906 | (if (and matched-string | 1906 | (if (and matched-string |
| 1907 | (gnus-string-match-p "\\\\[&[:digit:]]" value) | 1907 | (string-match-p "\\\\[&[:digit:]]" value) |
| 1908 | (match-beginning 1)) | 1908 | (match-beginning 1)) |
| 1909 | (gnus-match-substitute-replacement value nil nil | 1909 | (match-substitute-replacement value nil nil |
| 1910 | matched-string) | 1910 | matched-string) |
| 1911 | value)) | 1911 | value)) |
| 1912 | ((or (symbolp value) | 1912 | ((or (symbolp value) |
| 1913 | (functionp value)) | 1913 | (functionp value)) |
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el index d0b0202788d..2f6d6a8b619 100644 --- a/lisp/gnus/gnus-notifications.el +++ b/lisp/gnus/gnus-notifications.el | |||
| @@ -182,8 +182,9 @@ This is typically a function to add in | |||
| 182 | address | 182 | address |
| 183 | (cond ((functionp gnus-ignored-from-addresses) | 183 | (cond ((functionp gnus-ignored-from-addresses) |
| 184 | (funcall gnus-ignored-from-addresses address)) | 184 | (funcall gnus-ignored-from-addresses address)) |
| 185 | (t (gnus-string-match-p (gnus-ignored-from-addresses) | 185 | (t (string-match-p |
| 186 | address)))) | 186 | (gnus-ignored-from-addresses) |
| 187 | address)))) | ||
| 187 | (let* ((photo-file (gnus-notifications-get-photo-file address)) | 188 | (let* ((photo-file (gnus-notifications-get-photo-file address)) |
| 188 | (notification-id (gnus-notifications-notify | 189 | (notification-id (gnus-notifications-notify |
| 189 | (or (car address-components) address) | 190 | (or (car address-components) address) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 2c87ba1573a..a20816054bc 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -12061,7 +12061,7 @@ no matter what the properties `:decode' and `:headers' are." | |||
| 12061 | command result) | 12061 | command result) |
| 12062 | (unless (numberp (car articles)) | 12062 | (unless (numberp (car articles)) |
| 12063 | (error "No article to pipe")) | 12063 | (error "No article to pipe")) |
| 12064 | (setq command (gnus-read-shell-command | 12064 | (setq command (read-shell-command |
| 12065 | (concat "Shell command on " | 12065 | (concat "Shell command on " |
| 12066 | (if (cdr articles) | 12066 | (if (cdr articles) |
| 12067 | (format "these %d articles" (length articles)) | 12067 | (format "these %d articles" (length articles)) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 23c6cd92cfb..5e6b66dfb4b 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1656,15 +1656,6 @@ empty directories from OLD-PATH." | |||
| 1656 | (ignore-errors | 1656 | (ignore-errors |
| 1657 | (set-file-modes filename mode))) | 1657 | (set-file-modes filename mode))) |
| 1658 | 1658 | ||
| 1659 | (if (fboundp 'set-process-query-on-exit-flag) | ||
| 1660 | (defalias 'gnus-set-process-query-on-exit-flag | ||
| 1661 | 'set-process-query-on-exit-flag) | ||
| 1662 | (defalias 'gnus-set-process-query-on-exit-flag | ||
| 1663 | 'process-kill-without-query)) | ||
| 1664 | |||
| 1665 | (defalias 'gnus-read-shell-command | ||
| 1666 | (if (fboundp 'read-shell-command) 'read-shell-command 'read-string)) | ||
| 1667 | |||
| 1668 | (declare-function image-size "image.c" (spec &optional pixels frame)) | 1659 | (declare-function image-size "image.c" (spec &optional pixels frame)) |
| 1669 | 1660 | ||
| 1670 | (defun gnus-rescale-image (image size) | 1661 | (defun gnus-rescale-image (image size) |
| @@ -1715,48 +1706,6 @@ The first found will be returned if a file has hard or symbolic links." | |||
| 1715 | (memq elem list)))) | 1706 | (memq elem list)))) |
| 1716 | found)) | 1707 | found)) |
| 1717 | 1708 | ||
| 1718 | (eval-and-compile | ||
| 1719 | (cond | ||
| 1720 | ((fboundp 'match-substitute-replacement) | ||
| 1721 | (defalias 'gnus-match-substitute-replacement 'match-substitute-replacement)) | ||
| 1722 | (t | ||
| 1723 | (defun gnus-match-substitute-replacement (replacement &optional fixedcase literal string subexp) | ||
| 1724 | "Return REPLACEMENT as it will be inserted by `replace-match'. | ||
| 1725 | In other words, all back-references in the form `\\&' and `\\N' | ||
| 1726 | are substituted with actual strings matched by the last search. | ||
| 1727 | Optional FIXEDCASE, LITERAL, STRING and SUBEXP have the same | ||
| 1728 | meaning as for `replace-match'. | ||
| 1729 | |||
| 1730 | This is the definition of match-substitute-replacement in subr.el from GNU Emacs." | ||
| 1731 | (let ((match (match-string 0 string))) | ||
| 1732 | (save-match-data | ||
| 1733 | (set-match-data (mapcar (lambda (x) | ||
| 1734 | (if (numberp x) | ||
| 1735 | (- x (match-beginning 0)) | ||
| 1736 | x)) | ||
| 1737 | (match-data t))) | ||
| 1738 | (replace-match replacement fixedcase literal match subexp))))))) | ||
| 1739 | |||
| 1740 | (if (fboundp 'string-match-p) | ||
| 1741 | (defalias 'gnus-string-match-p 'string-match-p) | ||
| 1742 | (defsubst gnus-string-match-p (regexp string &optional start) | ||
| 1743 | "\ | ||
| 1744 | Same as `string-match' except this function does not change the match data." | ||
| 1745 | (save-match-data | ||
| 1746 | (string-match regexp string start)))) | ||
| 1747 | |||
| 1748 | (if (fboundp 'string-prefix-p) | ||
| 1749 | (defalias 'gnus-string-prefix-p 'string-prefix-p) | ||
| 1750 | (defun gnus-string-prefix-p (str1 str2 &optional ignore-case) | ||
| 1751 | "Return non-nil if STR1 is a prefix of STR2. | ||
| 1752 | If IGNORE-CASE is non-nil, the comparison is done without paying attention | ||
| 1753 | to case differences." | ||
| 1754 | (and (<= (length str1) (length str2)) | ||
| 1755 | (let ((prefix (substring str2 0 (length str1)))) | ||
| 1756 | (if ignore-case | ||
| 1757 | (string-equal (downcase str1) (downcase prefix)) | ||
| 1758 | (string-equal str1 prefix)))))) | ||
| 1759 | |||
| 1760 | (defun gnus-test-list (list predicate) | 1709 | (defun gnus-test-list (list predicate) |
| 1761 | "To each element of LIST apply PREDICATE. | 1710 | "To each element of LIST apply PREDICATE. |
| 1762 | Return nil if LIST is no list or is empty or some test returns nil; | 1711 | Return nil if LIST is no list or is empty or some test returns nil; |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 383aeded66f..28b08af2439 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | (eval-when-compile (require 'cl)) | 28 | (eval-when-compile (require 'cl)) |
| 29 | 29 | ||
| 30 | (autoload 'gnus-map-function "gnus-util") | 30 | (autoload 'gnus-map-function "gnus-util") |
| 31 | (autoload 'gnus-read-shell-command "gnus-util") | ||
| 32 | 31 | ||
| 33 | (autoload 'mm-inline-partial "mm-partial") | 32 | (autoload 'mm-inline-partial "mm-partial") |
| 34 | (autoload 'mm-inline-external-body "mm-extern") | 33 | (autoload 'mm-inline-external-body "mm-extern") |
| @@ -1451,7 +1450,7 @@ text/\\(\\sw+\\)\\(?:;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t) | |||
| 1451 | Use CMD as the process." | 1450 | Use CMD as the process." |
| 1452 | (let ((name (mail-content-type-get (mm-handle-type handle) 'name)) | 1451 | (let ((name (mail-content-type-get (mm-handle-type handle) 'name)) |
| 1453 | (command (or cmd | 1452 | (command (or cmd |
| 1454 | (gnus-read-shell-command | 1453 | (read-shell-command |
| 1455 | "Shell command on MIME part: " mm-last-shell-command)))) | 1454 | "Shell command on MIME part: " mm-last-shell-command)))) |
| 1456 | (mm-with-unibyte-buffer | 1455 | (mm-with-unibyte-buffer |
| 1457 | (mm-insert-part handle) | 1456 | (mm-insert-part handle) |
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 4744187994a..bc7c0ac5210 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el | |||
| @@ -704,9 +704,9 @@ be present in the keyring." | |||
| 704 | ;; In contrast, signing requires secret key. | 704 | ;; In contrast, signing requires secret key. |
| 705 | (mml-secure-secret-key-exists-p context subkey)) | 705 | (mml-secure-secret-key-exists-p context subkey)) |
| 706 | (or (not fingerprint) | 706 | (or (not fingerprint) |
| 707 | (gnus-string-match-p (concat fingerprint "$") fpr) | 707 | (string-match-p (concat fingerprint "$") fpr) |
| 708 | (gnus-string-match-p (concat fingerprint "$") | 708 | (string-match-p (concat fingerprint "$") |
| 709 | (epg-sub-key-fingerprint subkey)))) | 709 | (epg-sub-key-fingerprint subkey)))) |
| 710 | (throw 'break t))))))) | 710 | (throw 'break t))))))) |
| 711 | 711 | ||
| 712 | (defun mml-secure-find-usable-keys (context name usage &optional justone) | 712 | (defun mml-secure-find-usable-keys (context name usage &optional justone) |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index eefe1a140b7..a53d6cd11c0 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -437,7 +437,7 @@ textual parts.") | |||
| 437 | :success " OK " | 437 | :success " OK " |
| 438 | :starttls-function | 438 | :starttls-function |
| 439 | (lambda (capabilities) | 439 | (lambda (capabilities) |
| 440 | (when (gnus-string-match-p "STARTTLS" capabilities) | 440 | (when (string-match-p "STARTTLS" capabilities) |
| 441 | "1 STARTTLS\r\n")))) | 441 | "1 STARTTLS\r\n")))) |
| 442 | (stream (car stream-list)) | 442 | (stream (car stream-list)) |
| 443 | (props (cdr stream-list)) | 443 | (props (cdr stream-list)) |
| @@ -459,15 +459,15 @@ textual parts.") | |||
| 459 | (nnheader-report 'nnimap "Unable to contact %s:%s via %s" | 459 | (nnheader-report 'nnimap "Unable to contact %s:%s via %s" |
| 460 | nnimap-address (car ports) nnimap-stream) | 460 | nnimap-address (car ports) nnimap-stream) |
| 461 | 'no-connect) | 461 | 'no-connect) |
| 462 | (gnus-set-process-query-on-exit-flag stream nil) | 462 | (set-process-query-on-exit-flag stream nil) |
| 463 | (if (not (gnus-string-match-p "[*.] \\(OK\\|PREAUTH\\)" greeting)) | 463 | (if (not (string-match-p "[*.] \\(OK\\|PREAUTH\\)" greeting)) |
| 464 | (nnheader-report 'nnimap "%s" greeting) | 464 | (nnheader-report 'nnimap "%s" greeting) |
| 465 | ;; Store the greeting (for debugging purposes). | 465 | ;; Store the greeting (for debugging purposes). |
| 466 | (setf (nnimap-greeting nnimap-object) greeting) | 466 | (setf (nnimap-greeting nnimap-object) greeting) |
| 467 | (setf (nnimap-capabilities nnimap-object) | 467 | (setf (nnimap-capabilities nnimap-object) |
| 468 | (mapcar #'upcase | 468 | (mapcar #'upcase |
| 469 | (split-string capabilities))) | 469 | (split-string capabilities))) |
| 470 | (unless (gnus-string-match-p "[*.] PREAUTH" greeting) | 470 | (unless (string-match-p "[*.] PREAUTH" greeting) |
| 471 | (if (not (setq credentials | 471 | (if (not (setq credentials |
| 472 | (if (eq nnimap-authenticator 'anonymous) | 472 | (if (eq nnimap-authenticator 'anonymous) |
| 473 | (list "anonymous" | 473 | (list "anonymous" |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 7614002a920..6c2d11396cb 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -1669,7 +1669,7 @@ actually)." | |||
| 1669 | (server (cadr (gnus-server-to-method srv))) | 1669 | (server (cadr (gnus-server-to-method srv))) |
| 1670 | (groupspec (mapconcat | 1670 | (groupspec (mapconcat |
| 1671 | (lambda (x) | 1671 | (lambda (x) |
| 1672 | (if (gnus-string-match-p "gmane" x) | 1672 | (if (string-match-p "gmane" x) |
| 1673 | (format "group:%s" (gnus-group-short-name x)) | 1673 | (format "group:%s" (gnus-group-short-name x)) |
| 1674 | (error "Can't search non-gmane groups: %s" x))) | 1674 | (error "Can't search non-gmane groups: %s" x))) |
| 1675 | groups " ")) | 1675 | groups " ")) |
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index e34a13b4561..cebdc95876f 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el | |||
| @@ -97,14 +97,14 @@ See `nnmaildir-flag-mark-mapping'." | |||
| 97 | 97 | ||
| 98 | (defun nnmaildir--ensure-suffix (filename) | 98 | (defun nnmaildir--ensure-suffix (filename) |
| 99 | "Ensure that FILENAME contains the suffix \":2,\"." | 99 | "Ensure that FILENAME contains the suffix \":2,\"." |
| 100 | (if (gnus-string-match-p ":2," filename) | 100 | (if (string-match-p ":2," filename) |
| 101 | filename | 101 | filename |
| 102 | (concat filename ":2,"))) | 102 | (concat filename ":2,"))) |
| 103 | 103 | ||
| 104 | (defun nnmaildir--add-flag (flag suffix) | 104 | (defun nnmaildir--add-flag (flag suffix) |
| 105 | "Return a copy of SUFFIX where FLAG is set. | 105 | "Return a copy of SUFFIX where FLAG is set. |
| 106 | SUFFIX should start with \":2,\"." | 106 | SUFFIX should start with \":2,\"." |
| 107 | (unless (gnus-string-match-p "^:2," suffix) | 107 | (unless (string-match-p "^:2," suffix) |
| 108 | (error "Invalid suffix `%s'" suffix)) | 108 | (error "Invalid suffix `%s'" suffix)) |
| 109 | (let* ((flags (substring suffix 3)) | 109 | (let* ((flags (substring suffix 3)) |
| 110 | (flags-as-list (append flags nil)) | 110 | (flags-as-list (append flags nil)) |
| @@ -117,7 +117,7 @@ SUFFIX should start with \":2,\"." | |||
| 117 | (defun nnmaildir--remove-flag (flag suffix) | 117 | (defun nnmaildir--remove-flag (flag suffix) |
| 118 | "Return a copy of SUFFIX where FLAG is cleared. | 118 | "Return a copy of SUFFIX where FLAG is cleared. |
| 119 | SUFFIX should start with \":2,\"." | 119 | SUFFIX should start with \":2,\"." |
| 120 | (unless (gnus-string-match-p "^:2," suffix) | 120 | (unless (string-match-p "^:2," suffix) |
| 121 | (error "Invalid suffix `%s'" suffix)) | 121 | (error "Invalid suffix `%s'" suffix)) |
| 122 | (let* ((flags (substring suffix 3)) | 122 | (let* ((flags (substring suffix 3)) |
| 123 | (flags-as-list (append flags nil)) | 123 | (flags-as-list (append flags nil)) |
| @@ -848,11 +848,11 @@ by nnmaildir-request-article.") | |||
| 848 | (when (or | 848 | (when (or |
| 849 | ;; first look for marks in suffix, if it's valid... | 849 | ;; first look for marks in suffix, if it's valid... |
| 850 | (when (and (stringp suffix) | 850 | (when (and (stringp suffix) |
| 851 | (gnus-string-prefix-p ":2," suffix)) | 851 | (string-prefix-p ":2," suffix)) |
| 852 | (or | 852 | (or |
| 853 | (not (gnus-string-match-p | 853 | (not (string-match-p |
| 854 | (string (nnmaildir--mark-to-flag 'read)) suffix)) | 854 | (string (nnmaildir--mark-to-flag 'read)) suffix)) |
| 855 | (gnus-string-match-p | 855 | (string-match-p |
| 856 | (string (nnmaildir--mark-to-flag 'tick)) suffix))) | 856 | (string (nnmaildir--mark-to-flag 'tick)) suffix))) |
| 857 | ;; then look in marks directories | 857 | ;; then look in marks directories |
| 858 | (not (file-exists-p (concat cdir prefix))) | 858 | (not (file-exists-p (concat cdir prefix))) |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 6108b5a7768..e6483c2046a 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -1302,7 +1302,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the | |||
| 1302 | ;; Use TCP-keepalive so that connections that pass through a NAT router | 1302 | ;; Use TCP-keepalive so that connections that pass through a NAT router |
| 1303 | ;; don't hang when left idle. | 1303 | ;; don't hang when left idle. |
| 1304 | (set-network-process-option process :keepalive t)) | 1304 | (set-network-process-option process :keepalive t)) |
| 1305 | (gnus-set-process-query-on-exit-flag process nil) | 1305 | (set-process-query-on-exit-flag process nil) |
| 1306 | (if (and (nntp-wait-for process "^2.*\n" buffer nil t) | 1306 | (if (and (nntp-wait-for process "^2.*\n" buffer nil t) |
| 1307 | (memq (process-status process) '(open run))) | 1307 | (memq (process-status process) '(open run))) |
| 1308 | (prog1 | 1308 | (prog1 |
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 0b58dc8c25b..88854e04253 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el | |||
| @@ -255,7 +255,7 @@ This is initialized based on `user-mail-address'." | |||
| 255 | 80)) | 255 | 80)) |
| 256 | (error "Could not open connection to %s" host)) | 256 | (error "Could not open connection to %s" host)) |
| 257 | (set-marker (process-mark tcp-connection) (point-min)) | 257 | (set-marker (process-mark tcp-connection) (point-min)) |
| 258 | (gnus-set-process-query-on-exit-flag tcp-connection nil) | 258 | (set-process-query-on-exit-flag tcp-connection nil) |
| 259 | (process-send-string | 259 | (process-send-string |
| 260 | tcp-connection | 260 | tcp-connection |
| 261 | (format "GET %s HTTP/1.1\nUser-Agent: %s\nHost: %s\n\n" | 261 | (format "GET %s HTTP/1.1\nUser-Agent: %s\nHost: %s\n\n" |