From: yamaoka Date: Wed, 19 Dec 2001 12:34:27 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-09-quimby-last-~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30b834612c9e3d886b7ed8d1291bce5b7fee9f8f;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 031742c..44b4a78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,39 @@ +2001-12-19 01:00:00 ShengHuo ZHU + + * gnus-win.el (gnus-frames-on-display-list): New. + (gnus-get-buffer-window): Use it. + +2001-12-19 00:00:00 ShengHuo ZHU + + * nnwarchive.el (nnwarchive-mail-archive-xover): Fix the regexp. + +2001-12-18 11:00:00 ShengHuo ZHU + + * gnus-win.el (gnus-get-buffer-window): Use gnus-delete-if. + +2001-12-18 11:00:00 ShengHuo ZHU + From Harald Meland + + * gnus-win.el (gnus-get-buffer-window): New function. + (gnus-all-windows-visible-p): Use it. + + * gnus-util.el (gnus-horizontal-recenter) + (gnus-horizontal-recenter, gnus-horizontal-recenter) + (gnus-horizontal-recenter, gnus-set-window-start): Use it. + + * gnus-score.el (gnus-score-insert-help): Use it. + + * gnus-salt.el (gnus-tree-recenter, gnus-generate-tree) + (gnus-generate-tree, gnus-highlight-selected-tree) + (gnus-highlight-selected-tree, gnus-tree-highlight-article): Use + it. + + * gnus-art.el (gnus-article-set-window-start) + (gnus-mm-display-part, gnus-request-article-this-buffer) + (gnus-button-next-page, gnus-button-prev-page) + (gnus-article-button-next-page, gnus-article-button-prev-page): + Use it. + 2001-12-18 Josh Huber * ChangeLog, ChangeLog.1, nnwfm.el, smiley.el: diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index ff8f98b..35e5f32 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -36,6 +36,7 @@ (require 'gnus-sum) (require 'gnus-spec) (require 'gnus-int) +(require 'gnus-win) (require 'alist) (require 'mime-view) (require 'wid-edit) @@ -3354,7 +3355,7 @@ commands: ;; from the head of the article. (defun gnus-article-set-window-start (&optional line) (set-window-start - (get-buffer-window gnus-article-buffer t) + (gnus-get-buffer-window gnus-article-buffer t) (save-excursion (set-buffer gnus-article-buffer) (goto-char (point-min)) @@ -4098,7 +4099,7 @@ If no internal viewer is available, use an external viewer." gnus-newsgroup-ignored-charsets))) (save-excursion (unwind-protect - (let ((win (get-buffer-window (current-buffer) t)) + (let ((win (gnus-get-buffer-window (current-buffer) t)) (beg (point))) (when win (select-window win)) @@ -4487,11 +4488,11 @@ If no internal viewer is available, use an external viewer." (goto-char point)))) (defconst gnus-article-wash-status-strings - (let ((alist '((cite "c" "Possible hidden citation text" + (let ((alist '((cite "c" "Possible hidden citation text" " " "All citation text visible") (headers "h" "Hidden headers" " " "All headers visible.") - (pgp "p" "Encrypted or signed message status hidden" + (pgp "p" "Encrypted or signed message status hidden" " " "No hidden encryption nor digital signature status") (signature "s" "Signature has been hidden" " " "Signature is visible") @@ -4937,7 +4938,7 @@ T-gnus change: Insert an article into `gnus-original-article-buffer'." (gnus-group-enter-directory dir)))))))) (setq gnus-original-article (cons group article)) - ;; The current buffer is `gnus-original-article-buffer'. + ;; The current buffer is `gnus-original-article-buffer'. (if (get-buffer gnus-original-article-buffer) (set-buffer gnus-original-article-buffer) (set-buffer (gnus-get-buffer-create gnus-original-article-buffer)) @@ -5033,7 +5034,7 @@ T-gnus change: Insert an article into `gnus-original-article-buffer'." (set-buffer gnus-summary-buffer) (gnus-summary-update-article do-update-line sparse-header) (gnus-summary-goto-subject do-update-line nil t) - (set-window-point (get-buffer-window (current-buffer) t) + (set-window-point (gnus-get-buffer-window (current-buffer) t) (point)) (set-buffer buf)))))) @@ -5748,13 +5749,13 @@ specified by `gnus-button-alist'." (defun gnus-button-handle-info (url) "Fetch an info URL." - (if (string-match + (if (string-match "^\\([^:/]+\\)?/\\(.*\\)" url) (gnus-info-find-node (concat "(" (or (gnus-url-unhex-string (match-string 1 url)) - "Gnus") - ")" + "Gnus") + ")" (gnus-url-unhex-string (match-string 2 url)))) (error "Can't parse %s" url))) @@ -5878,7 +5879,7 @@ specified by `gnus-button-alist'." "Go to the next page." (interactive) (let ((win (selected-window))) - (select-window (get-buffer-window gnus-article-buffer t)) + (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-next-page) (select-window win))) @@ -5886,7 +5887,7 @@ specified by `gnus-button-alist'." "Go to the prev page." (interactive) (let ((win (selected-window))) - (select-window (get-buffer-window gnus-article-buffer t)) + (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-prev-page) (select-window win))) @@ -5914,7 +5915,7 @@ specified by `gnus-button-alist'." "Go to the next page." (interactive "P") (let ((win (selected-window))) - (select-window (get-buffer-window gnus-article-buffer t)) + (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-next-page) (select-window win))) @@ -5922,7 +5923,7 @@ specified by `gnus-button-alist'." "Go to the prev page." (interactive "P") (let ((win (selected-window))) - (select-window (get-buffer-window gnus-article-buffer t)) + (select-window (gnus-get-buffer-window gnus-article-buffer t)) (gnus-article-prev-page) (select-window win))) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index 9a04070..ae9a9be 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -31,6 +31,7 @@ (require 'gnus) (require 'gnus-sum) +(require 'gnus-win) ;;; ;;; gnus-pick-mode @@ -554,7 +555,7 @@ Two predefined functions are available: (defun gnus-tree-recenter () "Center point in the tree window." (let ((selected (selected-window)) - (tree-window (get-buffer-window gnus-tree-buffer t))) + (tree-window (gnus-get-buffer-window gnus-tree-buffer t))) (when tree-window (select-window tree-window) (when gnus-selected-tree-overlay @@ -699,8 +700,8 @@ Two predefined functions are available: (gnus-tree-minimize) (gnus-tree-recenter) (let ((selected (selected-window))) - (when (get-buffer-window (set-buffer gnus-tree-buffer) t) - (select-window (get-buffer-window (set-buffer gnus-tree-buffer) t)) + (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)))))) @@ -856,8 +857,8 @@ Two predefined functions are available: (gnus-tree-minimize) (gnus-tree-recenter) (let ((selected (selected-window))) - (when (get-buffer-window (set-buffer gnus-tree-buffer) t) - (select-window (get-buffer-window (set-buffer gnus-tree-buffer) t)) + (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?!? @@ -873,7 +874,7 @@ Two predefined functions are available: (when (setq region (gnus-tree-article-region article)) (gnus-put-text-property (car region) (cdr region) 'face face) (set-window-point - (get-buffer-window (current-buffer) t) (cdr region)))))) + (gnus-get-buffer-window (current-buffer) t) (cdr region)))))) ;;; ;;; gnus-carpal diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 260dbce..171c026 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -33,6 +33,7 @@ (require 'gnus) (require 'gnus-sum) (require 'gnus-range) +(require 'gnus-win) (require 'message) (require 'score-mode) @@ -775,7 +776,7 @@ used as score." (pop-to-buffer "*Score Help*") (let ((window-min-height 1)) (shrink-window-if-larger-than-buffer)) - (select-window (get-buffer-window gnus-summary-buffer t)))) + (select-window (gnus-get-buffer-window gnus-summary-buffer t)))) (defun gnus-summary-header (header &optional no-err extra) ;; Return HEADER for current articles, or error. diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index e2246d4..718fe72 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -44,6 +44,7 @@ (eval-and-compile (autoload 'message-fetch-field "message") + (autoload 'gnus-get-buffer-window "gnus-win") (autoload 'rmail-insert-rmail-file-header "rmail") (autoload 'rmail-count-new-messages "rmail") (autoload 'rmail-show-message "rmail")) @@ -77,7 +78,7 @@ (frame (make-symbol "frame"))) `(let* ((,tempvar (selected-window)) (,buf ,buffer) - (,w (get-buffer-window ,buf 'visible)) + (,w (gnus-get-buffer-window ,buf 'visible)) ,frame) (unwind-protect (progn @@ -516,9 +517,9 @@ If N, return the Nth ancestor instead." (defun gnus-horizontal-recenter () "Recenter the current buffer horizontally." (if (< (current-column) (/ (window-width) 2)) - (set-window-hscroll (get-buffer-window (current-buffer) t) 0) + (set-window-hscroll (gnus-get-buffer-window (current-buffer) t) 0) (let* ((orig (point)) - (end (window-end (get-buffer-window (current-buffer) t))) + (end (window-end (gnus-get-buffer-window (current-buffer) t))) (max 0)) (when end ;; Find the longest line currently displayed in the window. @@ -532,10 +533,10 @@ If N, return the Nth ancestor instead." ;; Scroll horizontally to center (sort of) the point. (if (> max (window-width)) (set-window-hscroll - (get-buffer-window (current-buffer) t) + (gnus-get-buffer-window (current-buffer) t) (min (- (current-column) (/ (window-width) 3)) (+ 2 (- max (window-width))))) - (set-window-hscroll (get-buffer-window (current-buffer) t) 0)) + (set-window-hscroll (gnus-get-buffer-window (current-buffer) t) 0)) max)))) (defun gnus-read-event-char () @@ -1066,7 +1067,7 @@ Return the modified alist." (defun gnus-set-window-start (&optional point) "Set the window start to POINT, or (point) if nil." - (let ((win (get-buffer-window (current-buffer) t))) + (let ((win (gnus-get-buffer-window (current-buffer) t))) (when win (set-window-start win (or point (point)))))) diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index acb00f9..43c7972 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -29,6 +29,7 @@ (eval-when-compile (require 'cl)) (require 'gnus) +(require 'gnus-util) (defgroup gnus-windows nil "Window configuration." @@ -57,6 +58,13 @@ :group 'gnus-windows :type 'boolean) +(defcustom gnus-use-frames-on-any-display nil + "*If non-nil, frames on all displays will be considered useable by Gnus. +When nil, only frames on the same display as the selected frame will be +used to display Gnus windows." + :group 'gnus-windows + :type 'boolean) + (defvar gnus-buffer-configuration '((group (vertical 1.0 @@ -519,7 +527,7 @@ should have point." (unless buffer (error "Invalid buffer type: %s" type)) (if (and (setq buf (get-buffer (gnus-window-to-buffer-helper buffer))) - (setq win (get-buffer-window buf t))) + (setq win (gnus-get-buffer-window buf t))) (if (memq 'point split) (setq all-visible win)) (setq all-visible nil))) @@ -554,6 +562,27 @@ should have point." (mapcar (lambda (b) (delete-windows-on b t)) (delq lowest-buf bufs))))) +(eval-and-compile + (cond + ((fboundp 'frames-on-display-list) + (defalias 'gnus-frames-on-display-list 'frames-on-display-list)) + ((and (featurep 'xemacs) (fboundp 'frame-device)) + (defun gnus-frames-on-display-list () + (apply 'filtered-frame-list 'identity (list (frame-device nil))))) + (t + (defalias 'gnus-frames-on-display-list 'frame-list)))) + +(defun gnus-get-buffer-window (buffer &optional frame) + (cond ((and (null gnus-use-frames-on-any-display) + (memq frame '(t 0 visible))) + (car + (let ((frames (gnus-frames-on-display-list))) + (gnus-delete-if (lambda (win) (not (memq (window-frame win) + frames))) + (get-buffer-window-list buffer nil frame))))) + (t + (get-buffer-window buffer frame)))) + (provide 'gnus-win) ;;; gnus-win.el ends here diff --git a/lisp/lpath.el b/lisp/lpath.el index 3d50f72..a50cfd7 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -28,6 +28,7 @@ charsetp sort-coding-systems coding-system-p coding-system-list propertize make-mode-line-mouse2-map + frames-on-display-list make-mode-line-mouse-map rmail-select-summary rmail-summary-exists rmail-update-summary rmail-toggle-header diff --git a/lisp/nnwarchive.el b/lisp/nnwarchive.el index 11625a5..e2683d2 100644 --- a/lisp/nnwarchive.el +++ b/lisp/nnwarchive.el @@ -522,7 +522,7 @@ subject (match-string 2)) (forward-line 1) (unless (assq article nnwarchive-headers) - (if (looking-at "
  • From:\\([^&]+\\)<\\([^&]+\\)>") + (if (looking-at "
    • From: *\\([^<]*[^< ]\\) *<\\([^&]+\\)>") (progn (setq from (match-string 1) date (identity (match-string 2))))