home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / FREEMACS / CONTRIB.ZIP / UNDO.MIN < prev    next >
Text File  |  1990-03-09  |  1KB  |  67 lines

  1. Impractical.  Every modification to the buffer would have to be changed into
  2. a call to Frecord-insert and Frecord-delete.  It *is* tantalizing, though.
  3.  
  4.  
  5. #(sp,$>)#(Frecord-insert,(#(is,hello there)))#(Frecord-delete,{)#(Frecord-insert,(#(is,goodbye)))
  6.  
  7. Name:Frecord-delete
  8. Enter with arg1 = the mark to delete to.
  9. Exit with the undo information updated.
  10. [*]#(ds,undo-record,
  11.     D(,)
  12.     #(lv,cl)(,)#(lv,cs)
  13.     [    -    ]##(rm,arg1)[    -    ]
  14.     ##(undo-record)
  15. )
  16. #(dm,arg1)[*]
  17.  
  18.  
  19. Name:Frecord-insert
  20. Enter with arg1 = a string to be executed that inserts text.
  21. Exit with the undo information updated.
  22. [*]#(ds,undo-record,
  23.     I(,)
  24.     #(lv,cl)(,)#(lv,cs)(,)
  25.     arg1
  26.     #(lv,cl)(,)#(lv,cs)
  27.     [    -    ]
  28.     ##(undo-record)
  29. )[*]
  30.  
  31.  
  32. Name:K.C-x u
  33. [*]F:undo[*]
  34.  
  35.  
  36. Name:F:undo
  37. Undo the most recent item in the undo record.
  38. [*]#(Fundo.#(fm,undo-record,[    -    ]))[*]
  39.  
  40. Name:Fundo.
  41. [*]#(an,No more undo information!)[*]
  42.  
  43. Name:Fundo.I
  44. arg1 == starting line,
  45. arg2 == starting column,
  46. arg3 == ending line,
  47. arg4 == ending column.
  48. [*]#(pm,1)
  49. #(sv,cl,arg1)
  50. #(sv,cs,arg2)
  51. #(sm,0)
  52. #(sv,cl,arg3)
  53. #(sv,cs,arg4)
  54. #(dm,0)
  55. #(pm)
  56. [*]
  57.  
  58.  
  59. Name:Fundo.D
  60. arg1 == line,
  61. arg2 == column.
  62. [*]#(sv,cl,arg1)
  63. #(sv,cs,arg2)
  64. #(is,##(fm,undo-record,[    -    ]))
  65. [*]
  66.  
  67.