[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102197: gnus-util.el (gnus-string-ma
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102197: gnus-util.el (gnus-string-match-p): New function, that is an alias to string-match-p in Emacs >=23. |
Date: |
Mon, 01 Nov 2010 03:58:53 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102197
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2010-11-01 03:58:53 +0000
message:
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.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-msg.el
lisp/gnus/gnus-util.el
lisp/gnus/nnir.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-11-01 02:38:33 +0000
+++ b/lisp/gnus/ChangeLog 2010-11-01 03:58:53 +0000
@@ -1,3 +1,11 @@
+2010-11-01 Katsumi Yamaoka <address@hidden>
+
+ * 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.
+
2010-11-01 Glenn Morris <address@hidden>
* nnir.el (declare-function): Add compat stub.
=== modified file 'lisp/gnus/gnus-msg.el'
--- a/lisp/gnus/gnus-msg.el 2010-10-31 22:31:24 +0000
+++ b/lisp/gnus/gnus-msg.el 2010-11-01 03:58:53 +0000
@@ -1892,7 +1892,7 @@
(cond
((stringp value)
(if (and (stringp match)
- (string-match-p "\\\\[&[:digit:]]" value)
+ (gnus-string-match-p "\\\\[&[:digit:]]" value)
(match-beginning 1))
(gnus-match-substitute-replacement value nil nil group)
value))
=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el 2010-11-01 01:34:55 +0000
+++ b/lisp/gnus/gnus-util.el 2010-11-01 03:58:53 +0000
@@ -2010,6 +2010,14 @@
(match-data t)))
(replace-match replacement fixedcase literal match subexp)))))))
+(if (fboundp 'string-match-p)
+ (defalias 'gnus-string-match-p 'string-match-p)
+ (defsubst gnus-string-match-p (regexp string &optional start)
+ "\
+Same as `string-match' except this function does not change the match data."
+ (save-match-data
+ (string-match regexp string start))))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
=== modified file 'lisp/gnus/nnir.el'
--- a/lisp/gnus/nnir.el 2010-11-01 02:38:33 +0000
+++ b/lisp/gnus/nnir.el 2010-11-01 03:58:53 +0000
@@ -1392,7 +1392,7 @@
;; gmane interface
(defun nnir-run-gmane (query srv &optional groups)
"Run a search against a gmane back-end server."
- (if (string-match-p "gmane" srv)
+ (if (gnus-string-match-p "gmane" srv)
(let* ((case-fold-search t)
(qstring (cdr (assq 'query query)))
(server (cadr (gnus-server-to-method srv)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102197: gnus-util.el (gnus-string-match-p): New function, that is an alias to string-match-p in Emacs >=23.,
Katsumi Yamaoka <=