(FILECREATED " 1-Feb-87 15:46:11" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH190.;2 2119   

      changes to:  (FNS NC.LinkAtCharPos)
		   (VARS RHTPATCH190COMS)

      previous date: " 1-Feb-87 14:40:25" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH190.;1)


(* Copyright (c) 1987 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT RHTPATCH190COMS)

(RPAQQ RHTPATCH190COMS ((* * Fixes the way NC.LinkAtCharPos was calling STKARG. The change made in 
			     RHTPATCH186 was buggy.)
			  (* * Change to NCLINKS)
			  (FNS NC.LinkAtCharPos)))
(* * Fixes the way NC.LinkAtCharPos was calling STKARG. The change made in RHTPATCH186 was 
buggy.)

(* * Change to NCLINKS)

(DEFINEQ

(NC.LinkAtCharPos
  (LAMBDA (CharPos TextStream)                               (* rht: " 1-Feb-87 15:45")

          (* * Returns the link right before CharPos in TextStream. Return NIL if there is no link icon located before 
	  CharPos.)



          (* * rht 1/25/87: Now takes special kludgy action if we're under a copy of multiple links. If it's past the first 
	  link in the copy then the value returned is the link just copied previously.)



          (* * rht 2/1/87: Fix to above kludgy action so that STKARG call is safe.)


    (if (TEXTSTREAMP TextStream)
	then (if (LET ((StkPos (STKPOS (QUOTE TEDIT.SELECTED.PIECES))))
		          (AND StkPos (PROG1 (STKARG (QUOTE NPC)
							   StkPos)
						 (RELSTK StkPos))))
		   then (NC.FetchUserDataProp (NC.CoerceToCard TextStream)
						  (QUOTE LastLinkCopiedOrMoved))
		 else (for LinkIconPair in (TEDIT.LIST.OF.OBJECTS (TEXTOBJ TextStream)
									  (FUNCTION 
									    NC.LinkIconImageObjP))
			   bind OldLinkIconPair while (LESSP (CADR LinkIconPair)
								   CharPos)
			   do (SETQ OldLinkIconPair LinkIconPair)
			   finally (RETURN (AND OldLinkIconPair (NC.FetchLinkFromLinkIcon
							(CAR OldLinkIconPair)))))))))
)
(PUTPROPS RHTPATCH190 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (677 2037 (NC.LinkAtCharPos 687 . 2035)))))
STOP