diff options
| author | Katsumi Yamaoka | 2010-11-01 03:58:53 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-11-01 03:58:53 +0000 |
| commit | 87732ef36ad03013efe8a6a29bdf9389f0abade3 (patch) | |
| tree | d79c0aae5c0095ff94ef8ae3c39f6a0eee11302a | |
| parent | 42d9cffad26ec6ac1738b252d4f7937361b45412 (diff) | |
| download | emacs-87732ef36ad03013efe8a6a29bdf9389f0abade3.tar.gz emacs-87732ef36ad03013efe8a6a29bdf9389f0abade3.zip | |
gnus-util.el (gnus-string-match-p): New function, that is an alias to string-match-p in Emacs >=23.
gnus-msg.el (gnus-configure-posting-styles)
nnir.el (nnir-run-gmane): Use gnus-string-match-p.
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 8 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 2 |
4 files changed, 18 insertions, 2 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 37c262ad3d0..1e42c4dc12e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2010-11-01 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-util.el (gnus-string-match-p): New function, that is an alias to | ||
| 4 | string-match-p in Emacs >=23. | ||
| 5 | |||
| 6 | * gnus-msg.el (gnus-configure-posting-styles) | ||
| 7 | * nnir.el (nnir-run-gmane): Use gnus-string-match-p. | ||
| 8 | |||
| 1 | 2010-11-01 Glenn Morris <rgm@gnu.org> | 9 | 2010-11-01 Glenn Morris <rgm@gnu.org> |
| 2 | 10 | ||
| 3 | * nnir.el (declare-function): Add compat stub. | 11 | * nnir.el (declare-function): Add compat stub. |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 46cbc75f2a5..544aa7776a8 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1892,7 +1892,7 @@ this is a reply." | |||
| 1892 | (cond | 1892 | (cond |
| 1893 | ((stringp value) | 1893 | ((stringp value) |
| 1894 | (if (and (stringp match) | 1894 | (if (and (stringp match) |
| 1895 | (string-match-p "\\\\[&[:digit:]]" value) | 1895 | (gnus-string-match-p "\\\\[&[:digit:]]" value) |
| 1896 | (match-beginning 1)) | 1896 | (match-beginning 1)) |
| 1897 | (gnus-match-substitute-replacement value nil nil group) | 1897 | (gnus-match-substitute-replacement value nil nil group) |
| 1898 | value)) | 1898 | value)) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 239d81075dd..94b7c633196 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -2010,6 +2010,14 @@ This is the definition of match-substitute-replacement in subr.el from GNU Emacs | |||
| 2010 | (match-data t))) | 2010 | (match-data t))) |
| 2011 | (replace-match replacement fixedcase literal match subexp))))))) | 2011 | (replace-match replacement fixedcase literal match subexp))))))) |
| 2012 | 2012 | ||
| 2013 | (if (fboundp 'string-match-p) | ||
| 2014 | (defalias 'gnus-string-match-p 'string-match-p) | ||
| 2015 | (defsubst gnus-string-match-p (regexp string &optional start) | ||
| 2016 | "\ | ||
| 2017 | Same as `string-match' except this function does not change the match data." | ||
| 2018 | (save-match-data | ||
| 2019 | (string-match regexp string start)))) | ||
| 2020 | |||
| 2013 | (provide 'gnus-util) | 2021 | (provide 'gnus-util) |
| 2014 | 2022 | ||
| 2015 | ;;; gnus-util.el ends here | 2023 | ;;; gnus-util.el ends here |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 073df1928bc..bfe4df8ee1b 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -1392,7 +1392,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." | |||
| 1392 | ;; gmane interface | 1392 | ;; gmane interface |
| 1393 | (defun nnir-run-gmane (query srv &optional groups) | 1393 | (defun nnir-run-gmane (query srv &optional groups) |
| 1394 | "Run a search against a gmane back-end server." | 1394 | "Run a search against a gmane back-end server." |
| 1395 | (if (string-match-p "gmane" srv) | 1395 | (if (gnus-string-match-p "gmane" srv) |
| 1396 | (let* ((case-fold-search t) | 1396 | (let* ((case-fold-search t) |
| 1397 | (qstring (cdr (assq 'query query))) | 1397 | (qstring (cdr (assq 'query query))) |
| 1398 | (server (cadr (gnus-server-to-method srv))) | 1398 | (server (cadr (gnus-server-to-method srv))) |