🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.gnus
Article #787

Fix for gnus-kill-ring.el

#787
From: Roland McGrath
Date: Sat, 01 Apr 1989 23:43
63 lines
2782 bytes
These diffs to the last gnus-kill-ring.el I posted make yanking work at the
end of the buffer.

*** gnus-kill-ring.el.~4~	Thu Mar 23 15:27:30 1989
--- gnus-kill-ring.el	Sat Apr  1 15:35:38 1989
***************
*** 184,189 ****
--- 184,190 ----
    "Put N newsgroups from CONS before GROUP.
  Point is left on the line containing the first group yanked.
  The mark is set at the beginning of line containing GROUP.
+ If GROUP is nil, the newsgroups are put at the end.
   (nthcdr N CONS) is returned."
    (let ((buffer-read-only nil)
  	(newsrc (cons nil gnus-newsrc-assoc))
***************
*** 190,198 ****
  	(newsrc-buffer (find-file-noselect gnus-startup-file))
  	(newsgroup-buffer (current-buffer))
  	assoc)
!     ;; Find the elt of gnus-newsrc-assoc whose car matches GROUP.
!     (while (and newsrc (not (equal group (car (car newsrc)))))
!       (setq newsrc (cdr newsrc)))
      (and (null newsrc)
  	 (error "Can't find %s in gnus-newsrc-assoc!" group))
      ;; Take the yanked groups out of CONS and put
--- 191,200 ----
  	(newsrc-buffer (find-file-noselect gnus-startup-file))
  	(newsgroup-buffer (current-buffer))
  	assoc)
!     (and group
! 	 ;; Find the elt of gnus-newsrc-assoc whose car matches GROUP.
! 	 (while (and newsrc (not (equal group (car (car newsrc)))))
! 	   (setq newsrc (cdr newsrc))))
      (and (null newsrc)
  	 (error "Can't find %s in gnus-newsrc-assoc!" group))
      ;; Take the yanked groups out of CONS and put
***************
*** 201,208 ****
      (push-mark)				; Set mark after the last one yanked.
      (set-buffer newsrc-buffer)
      (goto-char (point-min))
!     (re-search-forward (concat "^" (regexp-quote group) "[:!]"))
!     (beginning-of-line)
      (while (> n 0)
        (setq n (1- n))
        (setq assoc (car cons))
--- 203,213 ----
      (push-mark)				; Set mark after the last one yanked.
      (set-buffer newsrc-buffer)
      (goto-char (point-min))
!     (if group
! 	(progn
! 	  (re-search-forward (concat "^" (regexp-quote group) "[:!]"))
! 	  (beginning-of-line))
!       (end-of-buffer))
      (while (> n 0)
        (setq n (1- n))
        (setq assoc (car cons))
--
	Roland McGrath
	Free Software Foundation, Inc.
roland@wheaties.ai.mit.edu, mit-eddie!wheaties.ai.mit.edu!roland
Technical Details
Message-ID: <MCGRATH.89Apr1154304@paris.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!paris.Berkeley.EDU!mcgrath

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!paris.Berkeley.EDU!mcgrath
From: mcgrath@paris.Berkeley.EDU (Roland McGrath)
Newsgroups: gnu.emacs.gnus
Subject: Fix for gnus-kill-ring.el
Message-ID: <MCGRATH.89Apr1154304@paris.Berkeley.EDU>
Date: 1 Apr 89 23:43:04 GMT
Sender: usenet@agate.BERKELEY.EDU
Distribution: gnu
Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome)
Lines: 63