[gnus git] branch master updated: m0-5-126-gf6b456b =1= XEmacs 21.5 compilation fix

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  f6b456bf14e4638970fbe61de6be8ccd525b0b5a (commit)
      from  94b354fe486e35b2dbff507edb11985a19fc9da0 (commit)


- Log -----------------------------------------------------------------
commit f6b456bf14e4638970fbe61de6be8ccd525b0b5a
Author: Katsumi Yamaoka <[email protected]>
Date:   Thu Sep 6 02:18:01 2012 +0000

    XEmacs 21.5 compilation fix
    
    * gnus-score.el (gnus-score-decode-text-parts): Use #' for
      mm-text-parts used in labels macro to make it work with XEmacs 21.5.
    * gnus-util.el (gnus-string-prefix-p): New function, an alias to
      string-prefix-p in Emacs >=23.2.
    * nnmaildir.el (nnmaildir--ensure-suffix, nnmaildir--add-flag)
      (nnmaildir--remove-flag, nnmaildir--scan): Use gnus-string-match-p
      instead of string-match-p.
      (nnmaildir--scan): Use gnus-string-prefix-p instead of string-prefix-p.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index afd0327..8187f82 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
+2012-09-06  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-score.el (gnus-score-decode-text-parts): Use #' for
+	mm-text-parts used in labels macro to make it work with XEmacs 21.5.
+
+	* gnus-util.el (gnus-string-prefix-p): New function, an alias to
+	string-prefix-p in Emacs >=23.2.
+
+	* nnmaildir.el (nnmaildir--ensure-suffix, nnmaildir--add-flag)
+	(nnmaildir--remove-flag, nnmaildir--scan): Use gnus-string-match-p
+	instead of string-match-p.
+	(nnmaildir--scan): Use gnus-string-prefix-p instead of string-prefix-p.
+
 2012-09-06  Kenichi Handa  <[email protected]>
 
 	* qp.el (quoted-printable-decode-region): Fix previous change; handle
diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el
index bc35cf3..f215b84 100644
--- a/lisp/gnus-score.el
+++ b/lisp/gnus-score.el
@@ -1720,7 +1720,7 @@ score in `gnus-newsgroup-scored' by SCORE."
 (defun gnus-score-decode-text-parts ()
   (labels ((mm-text-parts (handle)
                         (cond ((stringp (car handle))
-                               (let ((parts (mapcan 'mm-text-parts (cdr handle))))
+                               (let ((parts (mapcan #'mm-text-parts (cdr handle))))
                                  (if (equal "multipart/alternative" (car handle))
                                      ;; pick the first supported alternative
                                      (list (car parts))
@@ -1730,7 +1730,7 @@ score in `gnus-newsgroup-scored' by SCORE."
                                (when (string-match "^text/" (mm-handle-media-type handle))
                                  (list handle)))
 
-                              (t (mapcan 'mm-text-parts handle))))
+                              (t (mapcan #'mm-text-parts handle))))
            (my-mm-display-part (handle)
                                (when handle
                                  (save-restriction
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index 26178af..3c4af9b 100644
--- a/lisp/gnus-util.el
+++ b/lisp/gnus-util.el
@@ -1926,6 +1926,15 @@ Same as `string-match' except this function does not change the match data."
     (save-match-data
       (string-match regexp string start))))
 
+(if (fboundp 'string-prefix-p)
+    (defalias 'gnus-string-prefix-p 'string-prefix-p)
+  (defun gnus-string-prefix-p (str1 str2 &optional ignore-case)
+    "Return non-nil if STR1 is a prefix of STR2.
+If IGNORE-CASE is non-nil, the comparison is done without paying attention
+to case differences."
+    (eq t (compare-strings str1 nil nil
+			   str2 0 (length str1) ignore-case))))
+
 (eval-and-compile
   (if (fboundp 'macroexpand-all)
       (defalias 'gnus-macroexpand-all 'macroexpand-all)
diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el
index 327649d..74a693a 100644
--- a/lisp/nnmaildir.el
+++ b/lisp/nnmaildir.el
@@ -100,14 +100,14 @@ See `nnmaildir-flag-mark-mapping'."
 
 (defun nnmaildir--ensure-suffix (filename)
   "Ensure that FILENAME contains the suffix \":2,\"."
-  (if (string-match-p ":2," filename)
+  (if (gnus-string-match-p ":2," filename)
       filename
     (concat filename ":2,")))
 
 (defun nnmaildir--add-flag (flag suffix)
   "Return a copy of SUFFIX where FLAG is set.
 SUFFIX should start with \":2,\"."
-  (unless (string-match-p "^:2," suffix)
+  (unless (gnus-string-match-p "^:2," suffix)
     (error "Invalid suffix `%s'" suffix))
   (let* ((flags (substring suffix 3))
 	 (flags-as-list (append flags nil))
@@ -120,7 +120,7 @@ SUFFIX should start with \":2,\"."
 (defun nnmaildir--remove-flag (flag suffix)
   "Return a copy of SUFFIX where FLAG is cleared.
 SUFFIX should start with \":2,\"."
-  (unless (string-match-p "^:2," suffix)
+  (unless (gnus-string-match-p "^:2," suffix)
     (error "Invalid suffix `%s'" suffix))
   (let* ((flags (substring suffix 3))
 	 (flags-as-list (append flags nil))
@@ -856,11 +856,11 @@ by nnmaildir-request-article.")
 	      (when (or
 		     ;; first look for marks in suffix, if it's valid...
 		     (when (and (stringp suffix)
-				(string-prefix-p ":2," suffix))
+				(gnus-string-prefix-p ":2," suffix))
 		       (or
-			(not (string-match-p
+			(not (gnus-string-match-p
 			      (string (nnmaildir--mark-to-flag 'read)) suffix))
-			(string-match-p
+			(gnus-string-match-p
 			 (string (nnmaildir--mark-to-flag 'tick)) suffix)))
 		     ;; then look in marks directories
 		     (not (file-exists-p (concat cdir prefix)))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog     |   13 +++++++++++++
 lisp/gnus-score.el |    4 ++--
 lisp/gnus-util.el  |    9 +++++++++
 lisp/nnmaildir.el  |   12 ++++++------
 4 files changed, 30 insertions(+), 8 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.