emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105494: Merge changes made in Gnus t


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105494: Merge changes made in Gnus trunk.
Date: Thu, 18 Aug 2011 22:12:47 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105494
author: Gnus developers <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2011-08-18 22:12:47 +0000
message:
  Merge changes made in Gnus trunk.
  
  nnmairix.el (nnmairix-request-set-mark, nnmairix-goto-original-article): 
Remove adding of article to registry, since `gnus-registry-add-group' isn't 
available anymore.
   (nnmairix-determine-original-group-from-registry): Use 
`gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't available 
anymore.
  gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make things 
work in Emacs 22 and XEmacs, too.
  gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): LRM-ify the default From.
  gnus-spec.el (gnus-lrm-string-p): New macro.
   (gnus-lrm-string): New constant.
   (gnus-summary-line-format-spec): LRM-ify the from.
   (gnus-tilde-max-form): LRM-ify string chopping.
  gnus-ems.el (gnus-string-mark-left-to-right): New function.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-ems.el
  lisp/gnus/gnus-spec.el
  lisp/gnus/gnus-sum.el
  lisp/gnus/nnmairix.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-08-17 22:09:19 +0000
+++ b/lisp/gnus/ChangeLog       2011-08-18 22:12:47 +0000
@@ -1,5 +1,27 @@
+2011-08-18  David Engster  <address@hidden>
+
+       * nnmairix.el (nnmairix-request-set-mark)
+       (nnmairix-goto-original-article): Remove adding of article to registry,
+       since `gnus-registry-add-group' isn't available anymore.
+       (nnmairix-determine-original-group-from-registry): Use
+       `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't
+       available anymore.
+
 2011-08-17  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make
+       things work in Emacs 22 and XEmacs, too.
+
+       * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): LRM-ify the
+       default From.
+
+       * gnus-spec.el (gnus-lrm-string-p): New macro.
+       (gnus-lrm-string): New constant.
+       (gnus-summary-line-format-spec): LRM-ify the from.
+       (gnus-tilde-max-form): LRM-ify string chopping.
+
+       * gnus-ems.el (gnus-string-mark-left-to-right): New function.
+
        * message.el (message-is-yours-p): Allow disabling canlock checking
        (bug#9295).
        (message-shoot-gnksa-feet): Add `canlock-verify'.

=== modified file 'lisp/gnus/gnus-ems.el'
--- a/lisp/gnus/gnus-ems.el     2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/gnus-ems.el     2011-08-18 22:12:47 +0000
@@ -209,6 +209,11 @@
          (setq start end
                end nil))))))
 
+(defmacro gnus-string-mark-left-to-right (string)
+  (if (fboundp 'string-mark-left-to-right)
+      `(string-mark-left-to-right ,string)
+    string))
+
 (eval-and-compile
   ;; XEmacs does not have window-inside-pixel-edges
   (defalias 'gnus-window-inside-pixel-edges

=== modified file 'lisp/gnus/gnus-spec.el'
--- a/lisp/gnus/gnus-spec.el    2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/gnus-spec.el    2011-08-18 22:12:47 +0000
@@ -90,6 +90,15 @@
 (declare-function gnus-summary-from-or-to-or-newsgroups "gnus-sum"
                   (header gnus-tmp-from))
 
+(defmacro gnus-lrm-string-p (string)
+  (if (fboundp 'string-mark-left-to-rigth)
+      `(eq (aref ,string (1- (length ,string))) 8206)
+    nil))
+
+(defvar gnus-lrm-string (if (ignore-errors (string 8206))
+                           (propertize (string 8206) 'invisible t)
+                         ""))
+
 (defun gnus-summary-line-format-spec ()
   (insert gnus-tmp-unread gnus-tmp-replied
          gnus-tmp-score-char gnus-tmp-indentation)
@@ -103,7 +112,9 @@
                       (gnus-summary-from-or-to-or-newsgroups
                        gnus-tmp-header gnus-tmp-from))))
                (if (> (length val) 23)
-                   (substring val 0 23)
+                   (if (gnus-lrm-string-p val)
+                       (concat (substring val 0 23) gnus-lrm-string)
+                     (substring val 0 23))
                  val))
              gnus-tmp-closing-bracket))
      (point))
@@ -351,13 +362,17 @@
        `(if (> (,length-fun ,el) ,max)
             ,(if (< max-width 0)
                  `(,substring-fun ,el (- (,length-fun ,el) ,max))
-               `(,substring-fun ,el 0 ,max))
+               `(if (gnus-lrm-string-p ,el)
+                    (concat (,substring-fun ,el 0 ,max) ,gnus-lrm-string)
+                  (,substring-fun ,el 0 ,max)))
           ,el)
       `(let ((val (eval ,el)))
         (if (> (,length-fun val) ,max)
             ,(if (< max-width 0)
                  `(,substring-fun val (- (,length-fun val) ,max))
-               `(,substring-fun val 0 ,max))
+               `(if (gnus-lrm-string-p val)
+                    (concat (,substring-fun val 0 ,max) ,gnus-lrm-string)
+                  (,substring-fun val 0 ,max)))
           val)))))
 
 (defun gnus-tilde-cut-form (el cut-width)

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2011-08-06 00:21:29 +0000
+++ b/lisp/gnus/gnus-sum.el     2011-08-18 22:12:47 +0000
@@ -3709,7 +3709,9 @@
                                 gnus-newsgroup-name)) 'nntp)
                      (gnus-group-real-name gnus-newsgroup-name))))
              (concat gnus-summary-newsgroup-prefix newsgroups)))))
-     (inline (gnus-summary-extract-address-component gnus-tmp-from)))))
+     (gnus-string-mark-left-to-right
+      (inline
+       (gnus-summary-extract-address-component gnus-tmp-from))))))
 
 (defun gnus-summary-insert-line (gnus-tmp-header
                                 gnus-tmp-level gnus-tmp-current

=== modified file 'lisp/gnus/nnmairix.el'
--- a/lisp/gnus/nnmairix.el     2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/nnmairix.el     2011-08-18 22:12:47 +0000
@@ -604,9 +604,7 @@
 
 ;; Silence byte-compiler.
 (defvar gnus-registry-install)
-(autoload 'gnus-registry-fetch-group "gnus-registry")
-(autoload 'gnus-registry-fetch-groups "gnus-registry")
-(autoload 'gnus-registry-add-group "gnus-registry")
+(autoload 'gnus-registry-get-id-key "gnus-registry")
 
 (deffoo nnmairix-request-set-mark (group actions &optional server)
   (when server
@@ -660,13 +658,7 @@
                              nnmairix-only-use-registry)
                    (setq ogroup
                          (nnmairix-determine-original-group-from-path
-                          mid nnmairix-current-server))
-                   ;; if available and allowed, add this entry to the registry
-                   (when (and (boundp 'gnus-registry-install)
-                              gnus-registry-install)
-                     (dolist (cur ogroup)
-                       (unless (gnus-parameter-registry-ignore cur)
-                         (gnus-registry-add-group mid cur)))))
+                          mid nnmairix-current-server)))
                  (unless ogroup
                    (nnheader-message
                     3 "Unable to set mark: couldn't find original group for 
%s" mid)
@@ -1630,14 +1622,7 @@
        ;; registry was not available or did not find article
        ;; so we search again with mairix in raw mode to get filename
        (setq allgroups
-             (nnmairix-determine-original-group-from-path mid server))
-       ;; if available and allowed, add this entry to the registry
-       (when (and (not no-registry)
-                  (boundp 'gnus-registry-install)
-                  gnus-registry-install)
-         (dolist (cur allgroups)
-           (unless (gnus-parameter-registry-ignore cur)
-             (gnus-registry-add-group mid cur)))))
+             (nnmairix-determine-original-group-from-path mid server)))
       (if (> (length allgroups) 1)
          (setq group
                (gnus-completing-read
@@ -1657,7 +1642,7 @@
       (set mid (concat "<" mid)))
     (unless (string-match ">$" mid)
       (set mid (concat mid ">")))
-    (gnus-registry-fetch-groups mid)))
+    (gnus-registry-get-id-key mid 'group)))
 
 (defun nnmairix-determine-original-group-from-path (mid server)
   "Determine original group(s) for message-id MID from the file path.


reply via email to

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