From: Gnus developers Date: Thu, 26 Jan 2012 23:03:28 +0000 (+0000) Subject: Merge changes made in Gnus trunk. X-Git-Tag: emacs-pretest-24.0.93~56 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4887f8b1e3dcfe015fba1b9e9d403f98bcda572;p=emacs.git Merge changes made in Gnus trunk. gnus-sum.el (gnus-summary-mode): Don't make bidi-paragraph-direction bound in old Emacsen and XEmacsen. gnus.el (gnus-group-find-parameter): Check for liveness of the buffer, not of the string which is its name. gnus-sum.el (gnus-summary-move-article): Don't propagate marks to non-server-marks groups. (gnus-group-make-articles-read): Ditto. gnus-srvr.el (gnus-server-prepare): Use it to avoid showing ephemeral methods (bug#9676). gnus.el (gnus-method-ephemeral-p): New function. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 9329188fc00..177393bbc2a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,24 @@ +2012-01-26 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-mode): Don't make bidi-paragraph-direction + bound in old Emacsen and XEmacsen. + +2012-01-26 Nick Alcock (tiny change) + + * gnus.el (gnus-group-find-parameter): Check for liveness of the + buffer, not of the string which is its name. + +2012-01-26 Lars Ingebrigtsen + + * gnus-sum.el (gnus-summary-move-article): Don't propagate marks to + non-server-marks groups. + (gnus-group-make-articles-read): Ditto. + + * gnus-srvr.el (gnus-server-prepare): Use it to avoid showing ephemeral + methods (bug#9676). + + * gnus.el (gnus-method-ephemeral-p): New function. + 2012-01-26 Katsumi Yamaoka * gnus-sum.el (gnus-summary-mode): Force paragraph direction to be diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 34a16a21dc5..66509c939dc 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -330,7 +330,7 @@ The following commands are available: (dolist (open gnus-opened-servers) (when (and (not (member (car open) done)) ;; Just ignore ephemeral servers. - (not (member (car open) gnus-ephemeral-servers))) + (not (gnus-method-ephemeral-p (car open)))) (push (car open) done) (gnus-server-insert-server-line (setq op-ser (format "%s:%s" (caar open) (nth 1 (car open)))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 26bd5b0bddc..bbb4c46fb0b 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3060,8 +3060,6 @@ When FORCE, rebuild the tool bar." (defvar bookmark-make-record-function) -(defvar bidi-paragraph-direction) - (defun gnus-summary-mode (&optional group) "Major mode for reading articles. @@ -3100,8 +3098,9 @@ The following commands are available: (setq buffer-read-only t ;Disable modification show-trailing-whitespace nil) (setq truncate-lines t) - ;; Force paragraph direction to be left-to-right. - (setq bidi-paragraph-direction 'left-to-right) + ;; Force paragraph direction to be left-to-right. Don't make it + ;; bound in old Emacsen and XEmacsen. + (set (make-local-variable 'bidi-paragraph-direction) 'left-to-right) (add-to-invisibility-spec '(gnus-sum . t)) (gnus-summary-set-display-table) (gnus-set-default-directory) @@ -6283,13 +6282,19 @@ The resulting hash table is returned, or nil if no Xrefs were found." (entry (gnus-group-entry group)) (info (nth 2 entry)) (active (gnus-active group)) + (set-marks + (or gnus-propagate-marks + (gnus-method-option-p + (gnus-find-method-for-group group) + 'server-marks))) range) (if (not entry) ;; Group that Gnus doesn't know exists, but still allow the ;; backend to set marks. - (gnus-request-set-mark - group (list (list (gnus-compress-sequence (sort articles #'<)) - 'add '(read)))) + (when set-marks + (gnus-request-set-mark + group (list (list (gnus-compress-sequence (sort articles #'<)) + 'add '(read))))) ;; Normal, subscribed groups. (setq range (gnus-compute-read-articles group articles)) (with-current-buffer gnus-group-buffer @@ -6298,11 +6303,14 @@ The resulting hash table is returned, or nil if no Xrefs were found." (gnus-info-set-marks ',info ',(gnus-info-marks info) t) (gnus-info-set-read ',info ',(gnus-info-read info)) (gnus-get-unread-articles-in-group ',info (gnus-active ,group)) - (gnus-request-set-mark ,group (list (list ',range 'del '(read)))) + (when ,set-marks + (gnus-request-set-mark + ,group (list (list ',range 'del '(read))))) (gnus-group-update-group ,group t)))) ;; Add the read articles to the range. (gnus-info-set-read info range) - (gnus-request-set-mark group (list (list range 'add '(read)))) + (when set-marks + (gnus-request-set-mark group (list (list range 'add '(read))))) ;; Then we have to re-compute how many unread ;; articles there are in this group. (when active @@ -10061,7 +10069,11 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." (gnus-add-marked-articles to-group 'expire (list to-article) info)) - (when to-marks + (when (and to-marks + (or gnus-propagate-marks + (gnus-method-option-p + (gnus-find-method-for-group to-group) + 'server-marks))) (gnus-request-set-mark to-group (list (list (list to-article) 'add to-marks))))) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 2d48f515f3e..f90d5433efe 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3581,6 +3581,13 @@ that that variable is buffer-local to the summary buffers." gnus-valid-select-methods))) (equal (nth 1 m1) (nth 1 m2))))))) +(defun gnus-method-ephemeral-p (method) + (let ((equal nil)) + (dolist (ephemeral gnus-ephemeral-servers) + (when (gnus-sloppily-equal-method-parameters method ephemeral) + (setq equal t))) + equal)) + (defsubst gnus-sloppily-equal-method-parameters (m1 m2) ;; Check parameters for sloppy equality. (let ((p1 (copy-sequence (cddr m1))) @@ -3877,7 +3884,7 @@ If SYMBOL, return the value of that symbol in the group parameters. If you call this function inside a loop, consider using the faster `gnus-group-fast-parameter' instead." - (with-current-buffer (if (buffer-live-p gnus-group-buffer) + (with-current-buffer (if (buffer-live-p (get-buffer gnus-group-buffer)) gnus-group-buffer (current-buffer)) (if symbol