;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2001
+;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
(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-line (1+ (count-lines (point-min) start-point)))
(start-window (posn-window start-posn))
(bounds (gnus-window-edges start-window))
(top (nth 1 bounds))
(let* ((this-line (1+ (count-lines 1 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)
(gnus-set-work-buffer)
(gnus-tree-node-insert (make-mail-header "") nil)
(setq gnus-tree-node-length (1- (point))))
- (gnus-run-hooks 'gnus-tree-mode-hook))
+ (gnus-run-mode-hooks 'gnus-tree-mode-hook))
(defun gnus-tree-read-summary-keys (&optional arg)
"Read a summary buffer key sequence and execute it."
(setq beg (point))
(forward-char -1)
;; Draw "-" lines leftwards.
- (while (and (> (point) 1)
+ (while (and (not (bobp))
(eq (char-after (1- (point))) ? ))
(delete-char -1)
(insert (car gnus-tree-parent-child-edges))
(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))
+ (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
(buffer-disable-undo)
(setq buffer-read-only t)
(make-local-variable 'gnus-carpal-attached-buffer)
- (gnus-run-hooks 'gnus-carpal-mode-hook))
+ (gnus-run-mode-hooks 'gnus-carpal-mode-hook))
(defun gnus-carpal-setup-buffer (type)
(let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type)))))