+2001-12-19 01:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-win.el (gnus-frames-on-display-list): New.
+ (gnus-get-buffer-window): Use it.
+
+2001-12-19 00:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * nnwarchive.el (nnwarchive-mail-archive-xover): Fix the regexp.
+
+2001-12-18 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-win.el (gnus-get-buffer-window): Use gnus-delete-if.
+
+2001-12-18 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+ From Harald Meland <Harald.Meland@usit.uio.no>
+
+ * 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 <huber@alum.wpi.edu>
* ChangeLog, ChangeLog.1, nnwfm.el, smiley.el:
(require 'gnus-sum)
(require 'gnus-spec)
(require 'gnus-int)
+(require 'gnus-win)
(require 'alist)
(require 'mime-view)
(require 'wid-edit)
;; 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))
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))
(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")
(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))
(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))))))
(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)))
"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)))
"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)))
"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)))
"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)))
(require 'gnus)
(require 'gnus-sum)
+(require 'gnus-win)
;;;
;;; gnus-pick-mode
(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
(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))))))
(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?!?
(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
(require 'gnus)
(require 'gnus-sum)
(require 'gnus-range)
+(require 'gnus-win)
(require 'message)
(require 'score-mode)
(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.
(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"))
(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
(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.
;; 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 ()
(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))))))
(eval-when-compile (require 'cl))
(require 'gnus)
+(require 'gnus-util)
(defgroup gnus-windows nil
"Window configuration."
: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
(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)))
(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
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
subject (match-string 2))
(forward-line 1)
(unless (assq article nnwarchive-headers)
- (if (looking-at "<UL><LI><EM>From</EM>:\\([^&]+\\)<\\([^&]+\\)>")
+ (if (looking-at "<UL><LI><EM>From</EM>: *\\([^<]*[^< ]\\) *<\\([^&]+\\)>")
(progn
(setq from (match-string 1)
date (identity (match-string 2))))