X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-sum.el;h=cd836dd338e36743e2386d7cbc5123c8a3120331;hb=f6234873d0f9a0ee9b26beab123cf4e9d77099c8;hp=9b7098c0fbdaba80bf1a90f5f7788ef342d7ceba;hpb=6d48a83f61ffbd2e45d9b98572f25740daa68978;p=gnus diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 9b7098c0f..cd836dd33 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1917,6 +1917,7 @@ increase the score of each group you read." "x" gnus-summary-limit-to-unread "s" gnus-summary-isearch-article [tab] gnus-summary-widget-forward + [backtab] gnus-summary-widget-backward "t" gnus-summary-toggle-header "g" gnus-summary-show-article "l" gnus-summary-goto-last-article @@ -2081,6 +2082,7 @@ increase the score of each group you read." "g" gnus-summary-show-article "s" gnus-summary-isearch-article [tab] gnus-summary-widget-forward + [backtab] gnus-summary-widget-backward "P" gnus-summary-print-article "S" gnus-sticky-article "M" gnus-mailing-list-insinuate @@ -3059,6 +3061,7 @@ When FORCE, rebuild the tool bar." (declare-function turn-on-gnus-mailing-list-mode "gnus-ml" ()) (defvar bookmark-make-record-function) +(defvar bidi-paragraph-direction) (defun gnus-summary-mode (&optional group) "Major mode for reading articles. @@ -3098,6 +3101,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. Don't make it + ;; bound globally 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) @@ -6279,13 +6285,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 @@ -6294,11 +6306,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 @@ -7315,9 +7330,11 @@ If FORCE (the prefix), also save the .newsrc file(s)." (gnus-kill-buffer gnus-original-article-buffer) (setq gnus-article-current nil)) ;; Return to the group buffer. - (gnus-configure-windows 'group 'force) (if (not gnus-kill-summary-on-exit) - (gnus-deaden-summary) + (progn + (gnus-deaden-summary) + (gnus-configure-windows 'group 'force)) + (gnus-configure-windows 'group 'force) (gnus-close-group group) (gnus-kill-buffer gnus-summary-buffer)) (unless gnus-single-article-buffer @@ -7339,7 +7356,7 @@ If FORCE (the prefix), also save the .newsrc file(s)." (defun gnus-handle-ephemeral-exit (quit-config) "Handle movement when leaving an ephemeral group. The state which existed when entering the ephemeral is reset." - (if (not (buffer-name (car quit-config))) + (if (not (buffer-live-p (car quit-config))) (gnus-configure-windows 'group 'force) (set-buffer (car quit-config)) (unless (eq (cdr quit-config) 'group) @@ -9249,6 +9266,17 @@ With optional ARG, move across that many fields." (select-window (gnus-get-buffer-window gnus-article-buffer)) (widget-forward arg)) +(defun gnus-summary-widget-backward (arg) + "Move point to the previous field or button in the article. +With optional ARG, move across that many fields." + (interactive "p") + (gnus-summary-select-article) + (gnus-configure-windows 'article) + (select-window (gnus-get-buffer-window gnus-article-buffer)) + (unless (widget-at (point)) + (goto-char (point-max))) + (widget-backward arg)) + (defun gnus-summary-isearch-article (&optional regexp-p) "Do incremental search forward on the current article. If REGEXP-P (the prefix) is non-nil, do regexp isearch." @@ -10057,7 +10085,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))))) @@ -11562,8 +11594,10 @@ Returns nil if no thread was there to be shown." (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point))))) (eoi (when end (if (fboundp 'next-single-char-property-change) - (or (next-single-char-property-change end 'invisible) - (point-max)) + (if (featurep 'xemacs) + (or (next-single-char-property-change end 'invisible) + (point-max)) + (next-single-char-property-change end 'invisible)) (while (progn (end-of-line 2) (and (not (eobp))