X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fgnus-salt.el;h=cd2aec850d370b075785eadb86220f5a07ad73cd;hp=075fc44486f35ea502662f8b097080d441170f0f;hb=bbaa6736e285258f29be9409b7b75751bb847e96;hpb=3e2287c43a3bfcad1353b6a2b6fc98b01ebbd6e1 diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index 075fc4448..cd2aec850 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -230,7 +230,7 @@ This must be bound to a button-down mouse event." (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)) @@ -266,17 +266,18 @@ This must be bound to a button-down mouse event." ;; 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, + ;; 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))) + ;; 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) @@ -787,7 +788,7 @@ Two predefined functions are available: (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)) @@ -858,7 +859,8 @@ Two predefined functions are available: (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 @@ -1027,11 +1029,11 @@ The following commands are available: (setq button (car buttons) buttons (cdr buttons)) (if (stringp button) - (gnus-set-text-properties + (set-text-properties (point) (prog2 (insert button) (point) (insert " ")) (list 'face gnus-carpal-header-face)) - (gnus-set-text-properties + (set-text-properties (point) (prog2 (insert (car button)) (point) (insert " ")) (list 'gnus-callback (cdr button) @@ -1062,4 +1064,5 @@ The following commands are available: (provide 'gnus-salt) +;; arch-tag: 35449164-77b3-4398-bcbd-a2e3e998f810 ;;; gnus-salt.el ends here