emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111328: Merge changes made in Gnus master
Date: Tue, 25 Dec 2012 22:12:59 +0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111328
author: Gnus developers <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Tue 2012-12-25 22:12:59 +0000
message:
  Merge changes made in Gnus master
  
  2012-12-25  Lars Ingebrigtsen  <address@hidden>
  * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary
    buffer to the article buffer here, because that clobbers multiple
    article buffers.
  * gnus-art.el (gnus-article-setup-buffer): Make sure that the article
    buffer always points to the right summary buffer.
  
  2012-12-25  John Wiegley  <address@hidden>
  * auth-source.el (auth-source-netrc-parse): Allow using "password" as
    the password (bug#12097).
  
  2012-12-25  Lars Ingebrigtsen  <address@hidden>
  * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs
    (bug#13263).
  * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree
    buffer exists before using it (bug#12475).
  * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from
    offline groups (bug#11937).
  * message.el (message-yank-original): When using customize to set the
    value of `message-cite-style', the variable it set to a symbol that's
    the name of the variable, which must then be dereferenced (bug#12616).
  
  2012-09-13  Wolfgang Jenkner  <address@hidden>
  * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of
    the `face' property with a list whose car is the face specified in the
    format string and whose cdr is (nil).
  * lisp/gnus-util.el
    (gnus-put-text-property-excluding-characters-with-faces): Change
    accordingly.
    (gnus-get-text-property-excluding-characters-with-faces): New function.
  * lisp/gnus-sum.el (gnus-summary-highlight-line):
  * lisp/gnus-salt.el (gnus-tree-highlight-node):
  * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/auth-source.el
  lisp/gnus/gnus-agent.el
  lisp/gnus/gnus-art.el
  lisp/gnus/gnus-group.el
  lisp/gnus/gnus-salt.el
  lisp/gnus/gnus-spec.el
  lisp/gnus/gnus-sum.el
  lisp/gnus/gnus-util.el
  lisp/gnus/message.el
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-12-25 12:00:26 +0000
+++ b/lisp/gnus/ChangeLog       2012-12-25 22:12:59 +0000
@@ -1,5 +1,47 @@
 2012-12-25  Lars Ingebrigtsen  <address@hidden>
 
+       * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary
+       buffer to the article buffer here, because that clobbers multiple
+       article buffers.
+
+       * gnus-art.el (gnus-article-setup-buffer): Make sure that the article
+       buffer always points to the right summary buffer.
+
+2012-12-25  John Wiegley  <address@hidden>
+
+       * auth-source.el (auth-source-netrc-parse): Allow using "password" as
+       the password (bug#12097).
+
+2012-12-25  Lars Ingebrigtsen  <address@hidden>
+
+       * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs
+       (bug#13263).
+
+       * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree
+       buffer exists before using it (bug#12475).
+
+       * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from
+       offline groups (bug#11937).
+
+       * message.el (message-yank-original): When using customize to set the
+       value of `message-cite-style', the variable it set to a symbol that's
+       the name of the variable, which must then be dereferenced (bug#12616).
+
+2012-12-25  Wolfgang Jenkner  <address@hidden>
+
+       * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of
+       the `face' property with a list whose car is the face specified in the
+       format string and whose cdr is (nil).
+       * lisp/gnus-util.el
+       (gnus-put-text-property-excluding-characters-with-faces): Change
+       accordingly.
+       (gnus-get-text-property-excluding-characters-with-faces): New function.
+       * lisp/gnus-sum.el (gnus-summary-highlight-line):
+       * lisp/gnus-salt.el (gnus-tree-highlight-node):
+       * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
+
+2012-12-25  Lars Ingebrigtsen  <address@hidden>
+
        * nnimap.el (nnimap-authenticator): Expand to allow specifying the
        login methods.
        (nnimap-login): Respect the `nnimap-authenticator' variable.
@@ -8,7 +50,7 @@
        mark state when moving articles.  Otherwise unticked articles will get
        their ticks back after moving.
 
-2012-12-24  Lars Ingebrigtsen  <address@hidden>
+2012-12-25  Lars Ingebrigtsen  <address@hidden>
 
        * gnus-srvr.el (gnus-browse-delete-group): Fix syntax error.
 
@@ -26,11 +68,11 @@
        to nil to allow re-selecting groups that gain articles.
        (gnus-bug-group-download-format-alist): Update the URL.
 
-2012-12-23  Andreas Schwab  <address@hidden>
+2012-12-25  Andreas Schwab  <address@hidden>
 
        * shr.el (shr-tag-em): Render em as italic, not bold.
 
-2012-12-23  Lars Ingebrigtsen  <address@hidden>
+2012-12-25  Lars Ingebrigtsen  <address@hidden>
 
        * gnus-int.el (gnus-backend-trace): Factor out into its own function
        for reuse.
@@ -38,7 +80,7 @@
        (gnus-finish-retrieve-group-infos): Add backend tracing.
        (gnus-backend-trace): Also note the elapsed seconds.
 
-2012-12-22  Philipp Haselwarter  <address@hidden>
+2012-12-25  Philipp Haselwarter  <address@hidden>
 
        * gnus-sync.el (gnus-sync-file-encrypt-to, gnus-sync-save): Set
        epa-file-encrypt-to from variable to avoid querying.

=== modified file 'lisp/gnus/auth-source.el'
--- a/lisp/gnus/auth-source.el  2012-08-31 04:39:30 +0000
+++ b/lisp/gnus/auth-source.el  2012-12-25 22:12:59 +0000
@@ -1008,7 +1008,7 @@
                     (while (and (zerop (forward-line 1))
                                 (looking-at "$")))
                     (narrow-to-region (point) (point)))
-                   ((member elem tokens)
+                   ((and (member elem tokens) (null pair))
                     ;; Tokens that don't have a following value are ignored,
                     ;; except "default".
                     (when (and pair (or (cdr pair)

=== modified file 'lisp/gnus/gnus-agent.el'
--- a/lisp/gnus/gnus-agent.el   2012-08-10 21:20:24 +0000
+++ b/lisp/gnus/gnus-agent.el   2012-12-25 22:12:59 +0000
@@ -1489,7 +1489,8 @@
 
 (defun gnus-agent-fetch-articles (group articles)
   "Fetch ARTICLES from GROUP and put them into the Agent."
-  (when articles
+  (when (and articles
+            (gnus-online (gnus-group-method group)))
     (gnus-agent-load-alist group)
     (let* ((alist gnus-agent-article-alist)
            (headers (if (< (length articles) 2) nil gnus-newsgroup-headers))

=== modified file 'lisp/gnus/gnus-art.el'
--- a/lisp/gnus/gnus-art.el     2012-12-12 22:22:31 +0000
+++ b/lisp/gnus/gnus-art.el     2012-12-25 22:12:59 +0000
@@ -4539,18 +4539,17 @@
            (gnus-article-mode))
          (setq truncate-lines gnus-article-truncate-lines)
          (current-buffer))
-      (with-current-buffer (gnus-get-buffer-create name)
-       (gnus-article-mode)
-       (setq truncate-lines gnus-article-truncate-lines)
-       (make-local-variable 'gnus-summary-buffer)
-       (setq gnus-summary-buffer
-             (gnus-summary-buffer-name gnus-newsgroup-name))
-       (gnus-summary-set-local-parameters gnus-newsgroup-name)
-       (when article-lapsed-timer
-         (gnus-stop-date-timer))
-       (when gnus-article-update-date-headers
-         (gnus-start-date-timer gnus-article-update-date-headers))
-       (current-buffer)))))
+      (let ((summary gnus-summary-buffer))
+       (with-current-buffer (gnus-get-buffer-create name)
+         (gnus-article-mode)
+         (setq truncate-lines gnus-article-truncate-lines)
+         (set (make-local-variable 'gnus-summary-buffer) summary)
+         (gnus-summary-set-local-parameters gnus-newsgroup-name)
+         (when article-lapsed-timer
+           (gnus-stop-date-timer))
+         (when gnus-article-update-date-headers
+           (gnus-start-date-timer gnus-article-update-date-headers))
+         (current-buffer))))))
 
 (defun gnus-article-stop-animations ()
   (dolist (timer (and (boundp 'timer-list)

=== modified file 'lisp/gnus/gnus-group.el'
--- a/lisp/gnus/gnus-group.el   2012-12-24 22:56:47 +0000
+++ b/lisp/gnus/gnus-group.el   2012-12-25 22:12:59 +0000
@@ -1667,7 +1667,7 @@
   (let ((face (cdar (gnus-group-update-eval-form
                       group
                       gnus-group-highlight))))
-    (unless (eq face (get-text-property beg 'face))
+    (unless (eq face (gnus-get-text-property-excluding-characters-with-faces 
beg 'face))
       (let ((inhibit-read-only t))
         (gnus-put-text-property-excluding-characters-with-faces
          beg end 'face

=== modified file 'lisp/gnus/gnus-salt.el'
--- a/lisp/gnus/gnus-salt.el    2012-09-07 04:07:00 +0000
+++ b/lisp/gnus/gnus-salt.el    2012-12-25 22:12:59 +0000
@@ -659,7 +659,7 @@
        (while (and list
                    (not (eval (caar list))))
          (setq list (cdr list)))))
-    (unless (eq (setq face (cdar list)) (get-text-property beg 'face))
+    (unless (eq (setq face (cdar list)) 
(gnus-get-text-property-excluding-characters-with-faces beg 'face))
       (gnus-put-text-property-excluding-characters-with-faces
        beg end 'face
        (if (boundp face) (symbol-value face) face)))))
@@ -828,31 +828,33 @@
 
 (defun gnus-highlight-selected-tree (article)
   "Highlight the selected article in the tree."
-  (let ((buf (current-buffer))
-       region)
-    (set-buffer gnus-tree-buffer)
-    (when (setq region (gnus-tree-article-region article))
-      (when (or (not gnus-selected-tree-overlay)
-               (gnus-extent-detached-p gnus-selected-tree-overlay))
-       ;; Create a new overlay.
-       (gnus-overlay-put
-        (setq gnus-selected-tree-overlay
-              (gnus-make-overlay (point-min) (1+ (point-min))))
-        'face gnus-selected-tree-face))
-      ;; Move the overlay to the article.
-      (gnus-move-overlay
-       gnus-selected-tree-overlay (goto-char (car region)) (cdr region))
-      (gnus-tree-minimize)
-      (gnus-tree-recenter)
-      (let ((selected (selected-window)))
-       (when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)
-         (select-window (gnus-get-buffer-window (set-buffer gnus-tree-buffer) 
t))
-         (gnus-horizontal-recenter)
-         (select-window selected))))
-;; If we remove this save-excursion, it updates the wrong mode lines?!?
-    (with-current-buffer gnus-tree-buffer
-      (gnus-set-mode-line 'tree))
-    (set-buffer buf)))
+  (when (buffer-live-p gnus-tree-buffer)
+    (let ((buf (current-buffer))
+         region)
+      (set-buffer gnus-tree-buffer)
+      (when (setq region (gnus-tree-article-region article))
+       (when (or (not gnus-selected-tree-overlay)
+                 (gnus-extent-detached-p gnus-selected-tree-overlay))
+         ;; Create a new overlay.
+         (gnus-overlay-put
+          (setq gnus-selected-tree-overlay
+                (gnus-make-overlay (point-min) (1+ (point-min))))
+          'face gnus-selected-tree-face))
+       ;; Move the overlay to the article.
+       (gnus-move-overlay
+        gnus-selected-tree-overlay (goto-char (car region)) (cdr region))
+       (gnus-tree-minimize)
+       (gnus-tree-recenter)
+       (let ((selected (selected-window)))
+         (when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)
+           (select-window
+            (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t))
+           (gnus-horizontal-recenter)
+           (select-window selected))))
+      ;; If we remove this save-excursion, it updates the wrong mode lines?!?
+      (with-current-buffer gnus-tree-buffer
+       (gnus-set-mode-line 'tree))
+      (set-buffer buf))))
 
 (defun gnus-tree-highlight-article (article face)
   (with-current-buffer (gnus-get-tree-buffer)

=== modified file 'lisp/gnus/gnus-spec.el'
--- a/lisp/gnus/gnus-spec.el    2012-06-26 22:52:31 +0000
+++ b/lisp/gnus/gnus-spec.el    2012-12-25 22:12:59 +0000
@@ -265,7 +265,14 @@
 (defun gnus-face-face-function (form type)
   `(gnus-add-text-properties
     (point) (progn ,@form (point))
-    '(gnus-face t face ,(symbol-value (intern (format "gnus-face-%d" type))))))
+    (cons 'face
+         (cons
+          ;; Delay consing the value of the `face' property until
+          ;; `gnus-add-text-properties' runs, since it will be modified
+          ;; by `gnus-put-text-property-excluding-characters-with-faces'.
+          (list ',(symbol-value (intern (format "gnus-face-%d" type))) nil)
+          ;; Redundant now, but still convenient.
+          '(gnus-face t)))))
 
 (defun gnus-balloon-face-function (form type)
   `(gnus-put-text-property

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2012-12-25 12:00:26 +0000
+++ b/lisp/gnus/gnus-sum.el     2012-12-25 22:12:59 +0000
@@ -3493,8 +3493,8 @@
          (set-buffer buffer)
          (setq gnus-summary-buffer (current-buffer))
          (not gnus-newsgroup-prepared))
-      ;; Fix by Sudish Joseph <address@hidden>
-      (setq gnus-summary-buffer (set-buffer (gnus-get-buffer-create buffer)))
+      (set-buffer (gnus-get-buffer-create buffer))
+      (setq gnus-summary-buffer (current-buffer))
       (gnus-summary-mode group)
       (when (gnus-group-quit-config group)
        (set (make-local-variable 'gnus-single-article-buffer) nil))
@@ -3552,11 +3552,7 @@
            (if (consp (car locals))
                (set (caar locals) (pop vlist))
              (set (car locals) (pop vlist)))
-           (setq locals (cdr locals))))
-       ;; The article buffer also has local variables.
-       (when (gnus-buffer-live-p gnus-article-buffer)
-         (set-buffer gnus-article-buffer)
-         (setq gnus-summary-buffer summary))))))
+           (setq locals (cdr locals))))))))
 
 (defun gnus-summary-article-unread-p (article)
   "Say whether ARTICLE is unread or not."
@@ -7874,7 +7870,6 @@
 
 Also see the variable `gnus-article-skip-boring'."
   (interactive "P")
-  (setq gnus-summary-buffer (current-buffer))
   (gnus-set-global-variables)
   (let ((article (gnus-summary-article-number))
        (article-window (get-buffer-window gnus-article-buffer t))
@@ -12524,7 +12519,7 @@
                         (memq article gnus-newsgroup-undownloaded)
                         (not (memq article gnus-newsgroup-cached)))))
     (let ((face (funcall (gnus-summary-highlight-line-0))))
-      (unless (eq face (get-text-property beg 'face))
+      (unless (eq face (gnus-get-text-property-excluding-characters-with-faces 
beg 'face))
        (gnus-put-text-property-excluding-characters-with-faces
         beg (point-at-eol) 'face
         (setq face (if (boundp face) (symbol-value face) face)))

=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el    2012-12-04 08:22:12 +0000
+++ b/lisp/gnus/gnus-util.el    2012-12-25 22:12:59 +0000
@@ -866,18 +866,29 @@
          (setq beg (point)))
        (gnus-overlay-put (gnus-make-overlay beg (point)) prop val)))))
 
-(defun gnus-put-text-property-excluding-characters-with-faces (beg end
-                                                                  prop val)
-  "The same as `put-text-property', but don't put props on characters with the 
`gnus-face' property."
-  (let ((b beg))
-    (while (/= b end)
-      (when (get-text-property b 'gnus-face)
-       (setq b (next-single-property-change b 'gnus-face nil end)))
-      (when (/= b end)
+(defun gnus-put-text-property-excluding-characters-with-faces (beg end prop 
val)
+  "The same as `put-text-property', except where `gnus-face' is set.
+If so, and PROP is `face', set the second element of its value to VAL.
+Otherwise, do nothing."
+  (while (< beg end)
+    ;; Property values are compared with `eq'.
+    (let ((stop (next-single-property-change beg 'face nil end)))
+      (if (get-text-property beg 'gnus-face)
+         (when (eq prop 'face)
+           (setcar (cdr (get-text-property beg 'face)) val))
        (inline
-         (gnus-put-text-property
-          b (setq b (next-single-property-change b 'gnus-face nil end))
-          prop val))))))
+         (gnus-put-text-property beg stop prop val)))
+      (setq beg stop))))
+
+(defun gnus-get-text-property-excluding-characters-with-faces (pos prop)
+  "The same as `get-text-property', except where `gnus-face' is set.
+If so, and PROP is `face', return the second element of its value.
+Otherwise, return the value."
+  (let ((val (get-text-property pos prop)))
+    (if (and (get-text-property pos 'gnus-face)
+            (eq prop 'face))
+       (cadr val)
+      (get-text-property pos prop))))
 
 (defmacro gnus-faces-at (position)
   "Return a list of faces at POSITION."

=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el      2012-12-24 22:56:47 +0000
+++ b/lisp/gnus/message.el      2012-12-25 22:12:59 +0000
@@ -3814,7 +3814,9 @@
   (interactive "P")
   ;; eval the let forms contained in message-cite-style
   (eval
-   `(let ,message-cite-style
+   `(let ,(if (symbolp message-cite-style)
+             (symbol-value message-cite-style)
+           message-cite-style)
       (message--yank-original-internal ',arg))))
 
 (defun message-yank-buffer (buffer)

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2012-12-24 04:21:58 +0000
+++ b/lisp/gnus/shr.el  2012-12-25 22:12:59 +0000
@@ -931,7 +931,8 @@
        (start (point))
        shr-start)
     (shr-generic cont)
-    (shr-urlify (or shr-start start) (shr-expand-url url) title)))
+    (when url
+      (shr-urlify (or shr-start start) (shr-expand-url url) title))))
 
 (defun shr-tag-object (cont)
   (let ((start (point))


reply via email to

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