home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / FREEMACS / ETAGS.ZIP / ETAGS.MIN < prev    next >
Internet Message Format  |  1990-02-20  |  3KB

  1. From KOHONEN@finfun.bitnet Sun Nov 27 23:51:00 1988
  2. Date: Tue, 22 Nov 88 17:41 O
  3. From: Teuvo Kohonen <KOHONEN@finfun.bitnet>
  4. Subject: RE: Freemacs 1.5c
  5. To: nelson@sun.soe.clarkson.edu
  6. X-Vms-To: edu%"nelson@sun.soe.clarkson.edu"
  7.  
  8.  
  9. The etags.c which comes with GNU Emacs works fine with Turbo C, with minor
  10. modifications:
  11.  
  12. 146,147c146,147
  13. <    *white  = " \f\t\n",    /* white chars                          */
  14. <    *endtk  = " \t\n\"'#()[]{}=-+%*/&|^~!<>;,.:?",
  15. ---
  16. >    *white  = " \f\t\n\r",  /* white chars                          */
  17. >    *endtk  = " \t\n\r\"'#()[]{}=-+%*/&|^~!<>;,.:?",
  18. 386a387,389
  19. > #ifdef __MSDOS__
  20. >   if ((inf=fopen(file,"rb")) == NULL)
  21. > #else
  22. 387a391
  23. > #endif
  24.  
  25.  
  26. Name:Ufilename
  27. Tag finding functions.
  28. [*]user[*]
  29.  
  30.  
  31. Name:K.C-x 4 .
  32. [*]U:find-tag-other-window[*]
  33.  
  34.  
  35. Name:U:find-tag-other-window
  36. [*]    
  37. #(F:split-window-vertically)
  38. #(U:find-tag,arg1)[*]
  39.  
  40.  
  41. Name:K.M-.
  42. [*]U:find-tag[*]
  43.  
  44.  
  45. Name:U:find-tag
  46. Attempts to locate definition for a tag containing arg2.
  47. Default for tag name substring is the word around point.
  48. With a numerical argument (arg1), finds next alternative definition for
  49. the tag last specified.
  50. [*]    
  51. #(==,arg1,,(
  52.     #(==,arg2,,(
  53.         #(ds,value,#(Ucurrent-word))
  54.         #(Fread-filename,Find tag: ,(#(Ufind-tag-do,##(value),1)),n)
  55.     ),(
  56.         #(Ufind-tag-do,arg2,1)
  57.     ))
  58. ),(
  59.     #(Ufind-tag-do,##(tag-last-tag),##(tag-last-line))
  60. ))
  61. [*]
  62.  
  63.  
  64. Name:Ucurrent-word
  65. The mb is for the cases when is point in whitespace before the first word
  66.  of buffer.
  67. [*]
  68. #(pm,2)
  69. #(sm,1)
  70. #(sp,>-{)
  71. #(sm,0,#(mb,[,,+))
  72. #(sp,+})
  73. ##(rm,0)
  74. #(sp,1)
  75. #(pm)
  76. [*]
  77.  
  78.  
  79. Name:Ufetch-tag
  80. Searches for tag arg1 in tag table, which is assumed to be current buffer,
  81. beginning at current line.
  82. Sets ##(tag-beginning) to the beginning of line and ##(tag-line) to its
  83. line number.
  84. Returns arg2 if tag was found, arg3 otherwise.
  85. [*]
  86. #(pm,2)
  87. #(lp,^.*arg1.*##(bc,127,d,a),,r)
  88. #(l?,.,],,0,(
  89.     #(sp,0)
  90.     #(lp,(,))
  91.     #(l?,.,$,1,,(#(ds,tag-line,##(rm,1))))
  92.     #(sp,<)
  93.     #(ds,tag-beginning,##(rm,^))
  94.     #(ds,tag-last-tag,arg1)
  95.     #(ds,tag-last-line,##(++,1,#(lv,cl)))
  96.     arg2
  97. ),(
  98.     arg3
  99.     #(Fmessage,No tag entries containing arg1)
  100. ))
  101. #(pm)
  102. [*]
  103.  
  104.  
  105. Name:Ufile-of-tag
  106. Returns name of the file whose tags point is within.
  107. [*]
  108. #(pm,1)
  109. #(lp,#(bc,12,d,a))
  110. #(l?,.,[,,0,(
  111.     #(sp,0$>)
  112.     #(lp,(,))
  113.     #(l?,^,$,0,,(##(rm,0)))
  114. ))
  115. #(pm)
  116. [*]
  117.  
  118.  
  119. Name:Ufind-tag-do
  120. [*]
  121. #(ds,tag-old-buffer,##(ba,-1))
  122. #(ds,value,tags.)
  123. #(Ffind-buffer,##(value),,,(
  124.     #(Ffind-unused-buffer,##(value))
  125.     #(==,##(ff,##(value)),,(
  126.         #(Fbuffer-set-fn,##(value))
  127.     ),(
  128.         #(Fvisit-do)
  129.     ))
  130. ))
  131. #(Fbury-buffer)
  132. #(sv,cl,arg2)
  133. #(Ufetch-tag,(arg1),(
  134.     #(Ffind-file-do,#(Ufile-of-tag))
  135.     #(SELF-do,##(tag-line),5)
  136. ),(
  137.     #(ba,##(tag-old-buffer))
  138. ))
  139. [*]
  140.  
  141.  
  142. Name:Ufind-tag-do-do
  143. [*]
  144. #(pm,2)
  145. #(sv,cl,##(++,arg1,arg2))
  146. #(sm,1)
  147. #(sv,cl,##(--,arg1,arg2))
  148. #(lp,#(Fregexp-quote,(##(tag-beginning))),,r)
  149. #(l?,.,1,0,,(
  150.     #(sp,0^)
  151. ),(
  152.     #(mb,[,(
  153.         #(SELF,arg1,##(**,arg2,3))
  154.     ),(
  155.         #(sp,])
  156.         #(mb,1,(
  157.             #(SELF,arg1,##(**,arg2,3))
  158.         ),(
  159.             #(Fmessage,Definition ##(tag-beginning) not found)
  160.         ))
  161.     ))
  162. ))
  163. #(pm)
  164. [*]
  165.