emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109897: [Gnus] XEmacs 21.5 compilati


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109897: [Gnus] XEmacs 21.5 compilation fix
Date: Thu, 06 Sep 2012 02:20:21 +0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109897
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2012-09-06 02:20:21 +0000
message:
  [Gnus] 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.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-score.el
  lisp/gnus/gnus-util.el
  lisp/gnus/nnmaildir.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-09-06 01:49:15 +0000
+++ b/lisp/gnus/ChangeLog       2012-09-06 02:20:21 +0000
@@ -1,3 +1,16 @@
+2012-09-06  Katsumi Yamaoka  <address@hidden>
+
+       * 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  <address@hidden>
 
        * qp.el (quoted-printable-decode-region): Fix previous change; handle

=== modified file 'lisp/gnus/gnus-score.el'
--- a/lisp/gnus/gnus-score.el   2012-09-05 22:35:32 +0000
+++ b/lisp/gnus/gnus-score.el   2012-09-06 02:20:21 +0000
@@ -1720,7 +1720,7 @@
 (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 @@
                                (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

=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el    2012-07-24 22:17:17 +0000
+++ b/lisp/gnus/gnus-util.el    2012-09-06 02:20:21 +0000
@@ -1926,6 +1926,15 @@
     (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)

=== modified file 'lisp/gnus/nnmaildir.el'
--- a/lisp/gnus/nnmaildir.el    2012-09-05 22:45:43 +0000
+++ b/lisp/gnus/nnmaildir.el    2012-09-06 02:20:21 +0000
@@ -100,14 +100,14 @@
 
 (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 @@
 (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 @@
              (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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]