[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-salt.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-salt.el [lexbind] |
Date: |
Wed, 15 Sep 2004 20:36:48 -0400 |
Index: emacs/lisp/gnus/gnus-salt.el
diff -c emacs/lisp/gnus/gnus-salt.el:1.7.18.1
emacs/lisp/gnus/gnus-salt.el:1.7.18.2
*** emacs/lisp/gnus/gnus-salt.el:1.7.18.1 Tue Oct 14 23:34:50 2003
--- emacs/lisp/gnus/gnus-salt.el Thu Sep 16 00:12:16 2004
***************
*** 1,6 ****
;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
! ;; Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <address@hidden>
;; Keywords: news
--- 1,7 ----
;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
! ;; Copyright (C) 1996, 1997, 1998, 1999, 2001
! ;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <address@hidden>
;; Keywords: news
***************
*** 30,42 ****
(require 'gnus)
(require 'gnus-sum)
;;;
;;; gnus-pick-mode
;;;
(defvar gnus-pick-mode nil
! "Minor mode for providing a pick-and-read interface in Gnus summary
buffers.")
(defcustom gnus-pick-display-summary nil
"*Display summary while reading."
--- 31,45 ----
(require 'gnus)
(require 'gnus-sum)
+ (require 'gnus-win)
;;;
;;; gnus-pick-mode
;;;
(defvar gnus-pick-mode nil
! "Minor mode for providing a pick-and-read interface in Gnus
! summary buffers.")
(defcustom gnus-pick-display-summary nil
"*Display summary while reading."
***************
*** 48,65 ****
:type 'hook
:group 'gnus-summary-pick)
(defcustom gnus-mark-unpicked-articles-as-read nil
"*If non-nil, mark all unpicked articles as read."
:type 'boolean
:group 'gnus-summary-pick)
(defcustom gnus-pick-elegant-flow t
! "If non-nil, `gnus-pick-start-reading' runs `gnus-summary-next-group' when
no articles have been picked."
:type 'boolean
:group 'gnus-summary-pick)
(defcustom gnus-summary-pick-line-format
! "%-5P %U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n"
"*The format specification of the lines in pick buffers.
It accepts the same format specs that `gnus-summary-line-format' does."
:type 'string
--- 51,72 ----
:type 'hook
:group 'gnus-summary-pick)
+ (when (featurep 'xemacs)
+ (add-hook 'gnus-pick-mode-hook 'gnus-xmas-pick-menu-add))
+
(defcustom gnus-mark-unpicked-articles-as-read nil
"*If non-nil, mark all unpicked articles as read."
:type 'boolean
:group 'gnus-summary-pick)
(defcustom gnus-pick-elegant-flow t
! "If non-nil, `gnus-pick-start-reading' runs
! `gnus-summary-next-group' when no articles have been picked."
:type 'boolean
:group 'gnus-summary-pick)
(defcustom gnus-summary-pick-line-format
! "%-5P %U\%R\%z\%I\%(%[%4L: %-23,23n%]%) %s\n"
"*The format specification of the lines in pick buffers.
It accepts the same format specs that `gnus-summary-line-format' does."
:type 'string
***************
*** 82,103 ****
(defun gnus-pick-make-menu-bar ()
(unless (boundp 'gnus-pick-menu)
(easy-menu-define
! gnus-pick-menu gnus-pick-mode-map ""
! '("Pick"
! ("Pick"
! ["Article" gnus-summary-mark-as-processable t]
! ["Thread" gnus-uu-mark-thread t]
! ["Region" gnus-uu-mark-region t]
! ["Regexp" gnus-uu-mark-by-regexp t]
! ["Buffer" gnus-uu-mark-buffer t])
! ("Unpick"
! ["Article" gnus-summary-unmark-as-processable t]
! ["Thread" gnus-uu-unmark-thread t]
! ["Region" gnus-uu-unmark-region t]
! ["Regexp" gnus-uu-unmark-by-regexp t]
! ["Buffer" gnus-summary-unmark-all-processable t])
! ["Start reading" gnus-pick-start-reading t]
! ["Switch pick mode off" gnus-pick-mode gnus-pick-mode]))))
(defun gnus-pick-mode (&optional arg)
"Minor mode for providing a pick-and-read interface in Gnus summary buffers.
--- 89,110 ----
(defun gnus-pick-make-menu-bar ()
(unless (boundp 'gnus-pick-menu)
(easy-menu-define
! gnus-pick-menu gnus-pick-mode-map ""
! '("Pick"
! ("Pick"
! ["Article" gnus-summary-mark-as-processable t]
! ["Thread" gnus-uu-mark-thread t]
! ["Region" gnus-uu-mark-region t]
! ["Regexp" gnus-uu-mark-by-regexp t]
! ["Buffer" gnus-uu-mark-buffer t])
! ("Unpick"
! ["Article" gnus-summary-unmark-as-processable t]
! ["Thread" gnus-uu-unmark-thread t]
! ["Region" gnus-uu-unmark-region t]
! ["Regexp" gnus-uu-unmark-by-regexp t]
! ["Buffer" gnus-summary-unmark-all-processable t])
! ["Start reading" gnus-pick-start-reading t]
! ["Switch pick mode off" gnus-pick-mode gnus-pick-mode]))))
(defun gnus-pick-mode (&optional arg)
"Minor mode for providing a pick-and-read interface in Gnus summary buffers.
***************
*** 148,158 ****
(interactive "P")
(if gnus-newsgroup-processable
(progn
! (gnus-summary-limit-to-articles nil)
! (when (or catch-up gnus-mark-unpicked-articles-as-read)
(gnus-summary-limit-mark-excluded-as-read))
! (gnus-summary-first-article)
! (gnus-configure-windows
(if gnus-pick-display-summary 'article 'pick) t))
(if gnus-pick-elegant-flow
(progn
--- 155,165 ----
(interactive "P")
(if gnus-newsgroup-processable
(progn
! (gnus-summary-limit-to-articles nil)
! (when (or catch-up gnus-mark-unpicked-articles-as-read)
(gnus-summary-limit-mark-excluded-as-read))
! (gnus-summary-first-article)
! (gnus-configure-windows
(if gnus-pick-display-summary 'article 'pick) t))
(if gnus-pick-elegant-flow
(progn
***************
*** 223,229 ****
(let* ((echo-keystrokes 0)
(start-posn (event-start start-event))
(start-point (posn-point start-posn))
! (start-line (1+ (count-lines 1 start-point)))
(start-window (posn-window start-posn))
(bounds (gnus-window-edges start-window))
(top (nth 1 bounds))
--- 230,236 ----
(let* ((echo-keystrokes 0)
(start-posn (event-start start-event))
(start-point (posn-point start-posn))
! (start-line (1+ (count-lines (point-min) start-point)))
(start-window (posn-window start-posn))
(bounds (gnus-window-edges start-window))
(top (nth 1 bounds))
***************
*** 235,241 ****
(setq mouse-selection-click-count click-count)
(setq mouse-selection-click-count-buffer (current-buffer))
(mouse-set-point start-event)
! ;; In case the down click is in the middle of some intangible text,
;; use the end of that text, and put it in START-POINT.
(when (< (point) start-point)
(goto-char start-point))
--- 242,248 ----
(setq mouse-selection-click-count click-count)
(setq mouse-selection-click-count-buffer (current-buffer))
(mouse-set-point start-event)
! ;; In case the down click is in the middle of some intangible text,
;; use the end of that text, and put it in START-POINT.
(when (< (point) start-point)
(goto-char start-point))
***************
*** 246,306 ****
;; (but not outside the window where the drag started).
(let (event end end-point (end-of-range (point)))
(track-mouse
! (while (progn
! (setq event (cdr (gnus-read-event-char)))
! (or (mouse-movement-p event)
! (eq (car-safe event) 'switch-frame)))
! (if (eq (car-safe event) 'switch-frame)
! nil
! (setq end (event-end event)
! end-point (posn-point end))
!
! (cond
! ;; Are we moving within the original window?
! ((and (eq (posn-window end) start-window)
! (integer-or-marker-p end-point))
! ;; Go to START-POINT first, so that when we move to END-POINT,
! ;; if it's in the middle of intangible text,
! ;; point jumps in the direction away from START-POINT.
! (goto-char start-point)
! (goto-char end-point)
! (gnus-pick-article)
! ;; In case the user moved his mouse really fast, pick
! ;; articles on the line between this one and the last one.
! (let* ((this-line (1+ (count-lines 1 end-point)))
! (min-line (min this-line start-line))
! (max-line (max this-line start-line)))
! (while (< min-line max-line)
! (goto-line min-line)
! (gnus-pick-article)
! (setq min-line (1+ min-line)))
! (setq start-line this-line))
! (when (zerop (% click-count 3))
! (setq end-of-range (point))))
! (t
! (let ((mouse-row (cdr (cdr (mouse-position)))))
! (cond
! ((null mouse-row))
! ((< mouse-row top)
! (mouse-scroll-subr start-window (- mouse-row top)))
! ((>= mouse-row bottom)
! (mouse-scroll-subr start-window
! (1+ (- mouse-row bottom)))))))))))
(when (consp event)
(let ((fun (key-binding (vector (car event)))))
;; Run the binding of the terminating up-event, if possible.
! ;; In the case of a multiple click, it gives the wrong results,
;; because it would fail to set up a region.
(when nil
! ;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun))
! ;; In this case, we can just let the up-event execute normally.
(let ((end (event-end event)))
;; Set the position in the event before we replay it,
;; because otherwise it may have a position in the wrong
;; buffer.
(setcar (cdr end) end-of-range)
;; Delete the overlay before calling the function,
! ;; because delete-overlay increases buffer-modified-tick.
(push event unread-command-events))))))))
(defun gnus-pick-next-page ()
--- 253,314 ----
;; (but not outside the window where the drag started).
(let (event end end-point (end-of-range (point)))
(track-mouse
! (while (progn
! (setq event (cdr (gnus-read-event-char)))
! (or (mouse-movement-p event)
! (eq (car-safe event) 'switch-frame)))
! (if (eq (car-safe event) 'switch-frame)
! nil
! (setq end (event-end event)
! end-point (posn-point end))
!
! (cond
! ;; Are we moving within the original window?
! ((and (eq (posn-window end) start-window)
! (integer-or-marker-p end-point))
! ;; Go to START-POINT first, so that when we move to END-POINT,
! ;; if it's in the middle of intangible text,
! ;; point jumps in the direction away from START-POINT.
! (goto-char start-point)
! (goto-char end-point)
! (gnus-pick-article)
! ;; In case the user moved his mouse really fast, pick
! ;; articles on the line between this one and the last one.
! (let* ((this-line (1+ (count-lines (point-min) end-point)))
! (min-line (min this-line start-line))
! (max-line (max this-line start-line)))
! ;; Why not use `forward-line'? --Stef
! (while (< min-line max-line)
! (goto-line min-line)
! (gnus-pick-article)
! (setq min-line (1+ min-line)))
! (setq start-line this-line))
! (when (zerop (% click-count 3))
! (setq end-of-range (point))))
! (t
! (let ((mouse-row (cdr (cdr (mouse-position)))))
! (cond
! ((null mouse-row))
! ((< mouse-row top)
! (mouse-scroll-subr start-window (- mouse-row top)))
! ((>= mouse-row bottom)
! (mouse-scroll-subr start-window
! (1+ (- mouse-row bottom)))))))))))
(when (consp event)
(let ((fun (key-binding (vector (car event)))))
;; Run the binding of the terminating up-event, if possible.
! ;; In the case of a multiple click, it gives the wrong results,
;; because it would fail to set up a region.
(when nil
! ;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun))
! ;; In this case, we can just let the up-event execute normally.
(let ((end (event-end event)))
;; Set the position in the event before we replay it,
;; because otherwise it may have a position in the wrong
;; buffer.
(setcar (cdr end) end-of-range)
;; Delete the overlay before calling the function,
! ;; because delete-overlay increases buffer-modified-tick.
(push event unread-command-events))))))))
(defun gnus-pick-next-page ()
***************
*** 333,341 ****
(defun gnus-binary-make-menu-bar ()
(unless (boundp 'gnus-binary-menu)
(easy-menu-define
! gnus-binary-menu gnus-binary-mode-map ""
! '("Pick"
! ["Switch binary mode off" gnus-binary-mode t]))))
(defun gnus-binary-mode (&optional arg)
"Minor mode for providing a binary group interface in Gnus summary buffers."
--- 341,349 ----
(defun gnus-binary-make-menu-bar ()
(unless (boundp 'gnus-binary-menu)
(easy-menu-define
! gnus-binary-menu gnus-binary-mode-map ""
! '("Pick"
! ["Switch binary mode off" gnus-binary-mode t]))))
(defun gnus-binary-mode (&optional arg)
"Minor mode for providing a binary group interface in Gnus summary buffers."
***************
*** 361,367 ****
(defun gnus-binary-display-article (article &optional all-header)
"Run ARTICLE through the binary decode functions."
(when (gnus-summary-goto-subject article)
! (let ((gnus-view-pseudos 'automatic))
(gnus-uu-decode-uu))))
(defun gnus-binary-show-article (&optional arg)
--- 369,375 ----
(defun gnus-binary-display-article (article &optional all-header)
"Run ARTICLE through the binary decode functions."
(when (gnus-summary-goto-subject article)
! (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-uu))))
(defun gnus-binary-show-article (&optional arg)
***************
*** 418,423 ****
--- 426,436 ----
:type 'hook
:group 'gnus-summary-tree)
+ (when (featurep 'xemacs)
+ (add-hook 'gnus-tree-mode-hook 'gnus-xmas-tree-menu-add)
+ (add-hook 'gnus-tree-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off))
+
+
;;; Internal variables.
(defvar gnus-tree-line-format-alist
***************
*** 460,468 ****
(defun gnus-tree-make-menu-bar ()
(unless (boundp 'gnus-tree-menu)
(easy-menu-define
! gnus-tree-menu gnus-tree-mode-map ""
! '("Tree"
! ["Select article" gnus-tree-select-article t]))))
(defun gnus-tree-mode ()
"Major mode for displaying thread trees."
--- 473,481 ----
(defun gnus-tree-make-menu-bar ()
(unless (boundp 'gnus-tree-menu)
(easy-menu-define
! gnus-tree-menu gnus-tree-mode-map ""
! '("Tree"
! ["Select article" gnus-tree-select-article t]))))
(defun gnus-tree-mode ()
"Major mode for displaying thread trees."
***************
*** 543,549 ****
(defun gnus-tree-recenter ()
"Center point in the tree window."
(let ((selected (selected-window))
! (tree-window (get-buffer-window gnus-tree-buffer t)))
(when tree-window
(select-window tree-window)
(when gnus-selected-tree-overlay
--- 556,562 ----
(defun gnus-tree-recenter ()
"Center point in the tree window."
(let ((selected (selected-window))
! (tree-window (gnus-get-buffer-window gnus-tree-buffer t)))
(when tree-window
(select-window tree-window)
(when gnus-selected-tree-overlay
***************
*** 555,561 ****
(bottom (save-excursion (goto-char (point-max))
(forward-line (- height))
(point))))
! ;; Set the window start to either `bottom', which is the biggest
;; possible valid number, or the second line from the top,
;; whichever is the least.
(set-window-start
--- 568,574 ----
(bottom (save-excursion (goto-char (point-max))
(forward-line (- height))
(point))))
! ;; Set the window start to either `bottom', which is the biggest
;; possible valid number, or the second line from the top,
;; whichever is the least.
(set-window-start
***************
*** 656,661 ****
--- 669,678 ----
(let* ((score (or (cdr (assq article gnus-newsgroup-scored))
gnus-summary-default-score 0))
(default gnus-summary-default-score)
+ (default-high gnus-summary-default-high-score)
+ (default-low gnus-summary-default-low-score)
+ (uncached (memq article gnus-newsgroup-undownloaded))
+ (downloaded (not uncached))
(mark (or (gnus-summary-article-mark article) gnus-unread-mark)))
;; Eval the cars of the lists until we find a match.
(while (and list
***************
*** 686,693 ****
(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))
(gnus-horizontal-recenter)
(select-window selected))))))
--- 703,710 ----
(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))))))
***************
*** 771,777 ****
(setq beg (point))
(forward-char -1)
;; Draw "-" lines leftwards.
! (while (and (> (point) 1)
(eq (char-after (1- (point))) ? ))
(delete-char -1)
(insert (car gnus-tree-parent-child-edges))
--- 788,794 ----
(setq beg (point))
(forward-char -1)
;; Draw "-" lines leftwards.
! (while (and (not (bobp))
(eq (char-after (1- (point))) ? ))
(delete-char -1)
(insert (car gnus-tree-parent-child-edges))
***************
*** 825,830 ****
--- 842,854 ----
(defun gnus-tree-close (group)
(gnus-kill-buffer gnus-tree-buffer))
+ (defun gnus-tree-perhaps-minimize ()
+ (when (and gnus-tree-minimize-window
+ (get-buffer gnus-tree-buffer))
+ (save-excursion
+ (set-buffer gnus-tree-buffer)
+ (gnus-tree-minimize))))
+
(defun gnus-highlight-selected-tree (article)
"Highlight the selected article in the tree."
(let ((buf (current-buffer))
***************
*** 835,841 ****
(gnus-extent-detached-p gnus-selected-tree-overlay))
;; Create a new overlay.
(gnus-overlay-put
! (setq gnus-selected-tree-overlay (gnus-make-overlay 1 2))
'face gnus-selected-tree-face))
;; Move the overlay to the article.
(gnus-move-overlay
--- 859,866 ----
(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
***************
*** 843,853 ****
(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))
(gnus-horizontal-recenter)
(select-window selected))))
! ;; If we remove this save-excursion, it updates the wrong mode lines?!?
(save-excursion
(set-buffer gnus-tree-buffer)
(gnus-set-mode-line 'tree))
--- 868,878 ----
(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?!?
(save-excursion
(set-buffer gnus-tree-buffer)
(gnus-set-mode-line 'tree))
***************
*** 860,866 ****
(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-carpal
--- 885,891 ----
(when (setq region (gnus-tree-article-region article))
(gnus-put-text-property (car region) (cdr region) 'face face)
(set-window-point
! (gnus-get-buffer-window (current-buffer) t) (cdr region))))))
;;;
;;; gnus-carpal
***************
*** 886,891 ****
--- 911,917 ----
("matching" . gnus-group-list-matching)
("post" . gnus-group-post-news)
("mail" . gnus-group-mail)
+ ("local" . (lambda () (interactive) (gnus-group-news 0)))
("rescan" . gnus-group-get-new-news)
("browse-foreign" . gnus-group-browse-foreign)
("exit" . gnus-group-exit)))
***************
*** 916,922 ****
("kill" . gnus-summary-kill-thread)
"post"
("post" . gnus-summary-post-news)
! ("mail" . gnus-summary-mail)
("followup" . gnus-summary-followup-with-original)
("reply" . gnus-summary-reply-with-original)
("cancel" . gnus-summary-cancel-article)
--- 942,949 ----
("kill" . gnus-summary-kill-thread)
"post"
("post" . gnus-summary-post-news)
! ("local" . gnus-summary-news-other-window)
! ("mail" . gnus-summary-mail-other-window)
("followup" . gnus-summary-followup-with-original)
("reply" . gnus-summary-reply-with-original)
("cancel" . gnus-summary-cancel-article)
***************
*** 1037,1041 ****
(provide 'gnus-salt)
! ;;; arch-tag: 35449164-77b3-4398-bcbd-a2e3e998f810
;;; gnus-salt.el ends here
--- 1064,1068 ----
(provide 'gnus-salt)
! ;; arch-tag: 35449164-77b3-4398-bcbd-a2e3e998f810
;;; gnus-salt.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-salt.el [lexbind],
Miles Bader <=