home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 21 / CD_ASCQ_21_040595.iso / dos / prg / c / freedos3 / source / emacs16d / _file.min < prev    next >
Encoding:
Text File  |  1991-08-09  |  14.1 KB  |  693 lines

  1.  
  2.  
  3.  
  4. Name:F:cd
  5. Change the current working directory.
  6. [*]#(ds,value,##(lv,cd))
  7. #(Freadline,Change directory: ,(
  8.     #(sv,cd,##(value))
  9. ))[*]
  10.  
  11.  
  12. Name:F:delete-file
  13. An MS-LOSS file is deleted.
  14. [*]#(Finsist,(arg1),SELF,(
  15.     #(de,#(Fuse-default-ext,arg1))
  16. ))[*]
  17.  
  18.  
  19. Name:F:find-alternate-file
  20. Load the current buffer with a file.
  21. [*]#(Fok-to-trash-buffer,(
  22.     #(==,arg1,,(
  23.         #(ds,value,#(Fbuffer-fn))
  24.         #(Fread-filename,Load: ,##(gs,Fvisit-do))
  25.     ),(
  26.         #(ds,value,arg1)
  27.         #(Fvisit-do)
  28.         #(Fremember-buffer)
  29.         #(an)
  30.     ))
  31. ))
  32. [*]
  33.  
  34.  
  35. Name:F:find-file
  36. Make a buffer current if already loaded, or else load it.
  37. [*]#(==,arg1,,(
  38.     #(ds,value,#(Fbuffer-has-fn,(
  39.         #(Fonly-path,#(Fbuffer-fn))
  40.     ),(
  41.         #(lv,cd)
  42.     )))
  43.     #(ds,F-delete-or-append,
  44.         ##(F-delete-or-append)
  45.         #(ds,F-delete-or-append)
  46.         #(Fread-filename,Find: ,(
  47.             #(SELF,##(value))
  48.         ),dirs okay)
  49.     )
  50. ),(
  51.     #(Fremember-buffer)
  52.     #(ds,temp,#(Fff-with-paths,arg1))
  53.     #(==,##(temp),,(
  54.         #(Ffind-file-do,arg1)
  55.     ),(
  56.         #(Fmultiple,Ffind-file-do,##(temp),SELF)
  57.     ))
  58. ))
  59. [*]
  60.  
  61.  
  62. Name:F:find-file-other-window
  63. [*]#(==,##(lv,ow),0,(
  64.     #(F:split-window-vertically)
  65. ),(
  66.     #(..,#(ba,##(lv,ow)))
  67.     #(Fenter-local-modes)
  68.     #(==,##(lv,cw),1,(#(sv,cw,2)),(#(sv,cw,1)))
  69. ))
  70. #(Ffind-file-other-window-do,arg1)
  71. [*]
  72.  
  73.  
  74. Name:F:find-file-read-only
  75. [*]#(ds,readonly)
  76. #(F:find-file)
  77. #(es,readonly)[*]
  78.  
  79.  
  80. Name:F:insert-file
  81. Insert a file into the current buffer.
  82. [*]#(==,arg1,,(
  83.     #(ds,value,#(Fbuffer-fn))
  84.     #(Fread-filename,Insert-file: ,(
  85.         #(SELF,##(value))
  86.     ))
  87. ),(
  88.     #(ds,temp,#(Fuse-default-ext,arg1))
  89.     #(an,Inserting ##(temp),,...)
  90.     #(Fexecute-and-mark,(
  91.         #(Fr,(
  92.             #(==,ARG1,Read Only,,(#(Ferror,ARG1)))
  93.         ),#(rf,##(temp)))
  94.     ))
  95. ))
  96. [*]
  97.  
  98.  
  99. Name:F:list-directory
  100. Give a directory.  Use the default extension if none is given.
  101. [*]#(ds,line,1)
  102. #(ds,dir-more)
  103. #(Finsist,(arg1),SELF,(
  104.     #(ds,temp)
  105.     #(Fmultiple,Fdir-do,##(ff,arg1,(,)),SELF)
  106.     #(Fdir-do-do,##(temp))
  107.     #(Fhit-any-key)
  108. ))
  109. #(es,line,dir-more)
  110. [*]
  111.  
  112.  
  113. Name:Fdir-do
  114. Deal with one filename in a directory.
  115. [*]#(==,##(temp),,(
  116.     #(ds,temp,arg1)
  117. ),(
  118.     #(g?,##(nc,##(temp)),60,(
  119.         #(SELF-do,##(temp))
  120.         #(ds,temp,arg1)
  121.     ),(
  122.         #(ds,temp,##(temp)( | arg1))
  123.     ))
  124. ))[*]
  125.  
  126.  
  127. Name:Fdir-do-do
  128. [*]#(ds,line,##(++,##(line),1))
  129. #(g?,##(line),##(lv,bl),(
  130.     #(ow,(
  131. [More?]))
  132.     #(Fcase,#(g),
  133.         (C-m,(#(ds,line,##(lv,bl)))),
  134.         (Return,(#(ds,line,##(lv,bl)))),
  135.         (q,(#(ds,F:list-directory.list)#(ds,line,0))),
  136.         (C-g,(#(ds,F:list-directory.list)#(ds,line,0))),
  137.         (#(ds,line,2))
  138.     )
  139.     #(ow,(
  140. ))
  141. ))
  142. #(g?,##(line),1,(#(ow,arg1(
  143. ))))[*]
  144.  
  145.  
  146. Name:F:rename-file
  147. Rename a file to another name.
  148. [*]#(Finsist,(arg1),SELF,(
  149.     #(Freadline,M-x rename-file-to ,(#(rn,#(Fuse-default-ext,arg1),##(value))))
  150. ))[*]
  151.  
  152.  
  153. Name:F:save-buffer
  154. Write out the current buffer without asking for a filename.
  155. [*]    
  156. #(==,##(lv,mb),0,(
  157.     #(Fmessage,No modifications to save)
  158. ),(
  159.     #(Fbuffer-has-fn,(
  160.         #(Fwrite-file,#(Fbuffer-fn),arg1)
  161.     ),(
  162.         #(F:write-file,arg1)
  163.     ))
  164. ))[*]
  165.  
  166.  
  167. Name:F:save-buffers-kill-emacs
  168. [*]#(ds,unsaved-buffers)
  169. #(Fmaybe-write-abbrevs,(
  170.     #(==,#(Flist-all-strings,modified),,(
  171.         #(Ftrash-buffer,2,##(ba,-1),Fkill-emacs)
  172.     ),(
  173.         #(Fy-or-n,Editor modified - save it?,(
  174.             #(Ftrash-buffer,2,##(ba,-1),Fkill-emacs
  175.                 #(==,ARG1,y,(
  176.                     #(F:save-all-libs)
  177.                 ),(
  178.                     #(ds,unsaved-buffers,##(unsaved-buffers)n)
  179.                 ))
  180.             )
  181.         ))
  182.     ))
  183. ))[*]
  184.  
  185.  
  186. Name:F:save-some-buffers
  187. Write all files that have been modified.
  188. [*]#(Fmaybe-write-abbrevs,(
  189.     #(Ftrash-buffer,2,##(ba,-1),..)
  190. ))[*]
  191.  
  192.  
  193. Name:F:write-file
  194. Write out the current buffer, asking for a filename.
  195. [*]    
  196. #(ds,value,#(Fbuffer-has-fn,(#(Fbuffer-fn))))
  197. #(Fread-filename,Write-file: ,(
  198.     #(==,##(value),,(
  199.         #(SELF)
  200.     ),(
  201.         #(F:set-visited-filename,#(Fuse-default-ext,##(value)))
  202.         #(Fwrite-file,#(Fbuffer-fn),arg1)
  203.     ))
  204. ))[*]
  205.  
  206.  
  207. Name:F:write-region
  208. Write out the region, asking for a filename.
  209. [*]    
  210. #(ds,value,
  211.     #(Fbuffer-has-fn,(
  212.         #(Fonly-path,#(Fbuffer-fn))
  213.     ),(
  214.         #(lv,cd)
  215.     ))
  216. )
  217. #(Fread-filename,Write-region: ,(
  218.     #(==,##(value),,(
  219.         #(SELF)
  220.     ),(
  221.         #(an,Writing region to ##(value))
  222.         #(Fr,(
  223.             #(==,ARG1,,(
  224.                 #(an)
  225.             ),(
  226.                 #(Ferror,ARG1)
  227.             ))
  228.         ),#(wf,##(value),#(Fmark)))
  229.     ))
  230. ))[*]
  231.  
  232.  
  233. Name:Fabsolute-filename
  234. Given a relative filename, absolutize it.
  235. Tests:    The results assume we're on the C drive.
  236. #(Fabsolute-filename,min/min)            c:\emacs\min\min
  237. #(Fabsolute-filename,/min/min)            c:\min\min
  238. #(Fabsolute-filename,foo.bar)            c:\emacs\foo.bar
  239. #(Fabsolute-filename,\foo.bar)            c:\foo.bar
  240. #(Fabsolute-filename,/foo.bar)            c:\foo.bar
  241. #(Fabsolute-filename,c:/foo.bar)        c:\foo.bar
  242. #(Fabsolute-filename,c:\foo.bar)        c:\foo.bar
  243. #(Fabsolute-filename,c:\baz/foo.bar)        c:\baz\foo.bar
  244. #(Fabsolute-filename,c:\baz/foo.bar)        c:\baz\foo.bar
  245. #(Fabsolute-filename,c:\baz//foo.bar)        c:\foo.bar
  246. #(Fabsolute-filename,c:\baz/c:foo.bar)        c:\emacs\foo.bar
  247. #(Fabsolute-filename,c:\baz/c:/foo.bar)        c:\foo.bar
  248. #(Fabsolute-filename,c:\baz\baz\foo.bar)    c:\baz\baz\foo.bar
  249. #(Fabsolute-filename,c:\baz\..\foo.bar)        c:\foo.bar
  250. #(Fabsolute-filename,c:\baz\fie\..\foo.bar)    c:\baz\foo.bar
  251. #(Fabsolute-filename,c:foo.bar)            c:\emacs\foo.bar
  252. #(Fabsolute-filename,d:foo.bar)            d:\foo.bar
  253. [*]#(sv,cd,##(lv,cd),
  254.     #(ds,temp,arg1)
  255.     #(mp,temp,,/)
  256.     #(ds,temp,##(temp,\))
  257.     #(==,#(Fright,##(temp),1),\,(
  258.         #(ds,-SELF,\)
  259.     ))
  260.     #(..,##(go,temp))
  261.     #(==,##(go,temp),:,(
  262.         #(rs,temp)
  263.         #(sv,cd,##(gn,temp,2))
  264.     ),(
  265.         #(rs,temp)
  266.     ))
  267.     #(ds,temp,##(temp))
  268.     #(ds,temp,
  269.         #(==,##(go,temp),\,(
  270.             #(ds,temp1,##(lv,cd))
  271.             ##(gn,temp1,2)
  272.             \##(temp)
  273.         ),(
  274.             #(rs,temp)
  275.             ##(lv,cd)##(temp)
  276.         ))
  277.     )
  278. )
  279. #(Fonly-last,
  280.     ##(gn,temp,2)
  281.     #(mp,temp,,\,:)
  282.     #(SELF-do,#(temp,(,),(,:,)))
  283. )
  284. #(-SELF)
  285. #(es,-SELF)
  286. [*]
  287.  
  288.  
  289. Name:Fabsolute-filename-do
  290. Boy do we have to be tricky here.  If arg2 and arg3 are empty, then we're done,
  291. all we have to do is include the last component of the filename.  If arg2 is
  292. empty, then we must have gotten two slashes, which means restart from root.
  293. The bare comma causes the enclosing Fonly-last to drop the leading junk.  If
  294. we have a .. *after* this, then drop this component of the pathname.
  295. [*]#(Fcase,arg2,
  296.     (,(
  297.         #(==,arg3arg4arg5arg6arg7arg8arg9,,(
  298.             arg1
  299.         ),(
  300.             ,
  301.             #(Fabsolute-filename,\#(SELF,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
  302.         ))
  303.     )),
  304.     (:,(
  305.         ,
  306.         #(Fabsolute-filename,arg1:#(SELF,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
  307.     )),
  308.     (..,(#(SELF,arg3,arg4,arg5,arg6,arg7,arg8,arg9))),
  309.     (
  310.         #(==,arg1,.,,(arg1\))
  311.         #(SELF,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
  312.     )
  313. )[*]
  314.  
  315.  
  316. Name:Fdodotdot
  317. [*][*]
  318.  
  319.  
  320. Name:Fextens-only
  321. Returns only the extension of the filename in arg1.
  322. [*]#(ds,temp,#(Fonly-fn,(arg1)))
  323. #(..,##(fm,temp,.,(##(gn,temp,10000))))
  324. ##(temp)
  325. [*]
  326.  
  327.  
  328. Name:Fff-with-paths
  329. [*]#(ds,path,#(Fonly-path,arg1))
  330. #(Fmultiple,SELF-do,##(ff,arg1,(,)),SELF)[*]
  331.  
  332.  
  333. Name:Fff-with-paths-do
  334. [*]#(ds,temp,arg1 )
  335. #(mp,temp,,#(F-completion-ignored-extensions))
  336. #(==,##(temp),arg1 ,(
  337.     ##(path)arg1(,)
  338. ))[*]
  339.  
  340.  
  341. Name:Ffind-a-file
  342. Search for a file among those given in arg1.  Return arg2 if no matches,
  343. arg3 if one match, arg4 if multiple matches.
  344. [*]#(ds,path,#(Fonly-path,arg1))
  345. #(Ffind-a-match,##(ff,arg1,(,)),(
  346.     arg2
  347. ),(
  348.     #(ds,temp,##(path)##(temp))
  349.     #(es,path)
  350.     arg3
  351. ),(
  352.     #(ds,temp,##(path)##(temp))
  353.     arg4
  354. ),0)[*]
  355.  
  356.  
  357. Name:Ffind-file-do
  358. Decide whether to use an existing buffer or load a new one.
  359. [*]#(==,#(Fright,(arg1),1),\,(
  360.     #(Ddired,arg1)
  361. ),(
  362.     #(ds,value,arg1)
  363.     #(Ffind-buffer,,#(Fuse-default-ext,arg1),(
  364.         #(an,#(Fuse-default-ext,arg1) is already loaded)
  365.     ),(
  366.         #(Ffind-unused-buffer,arg1)
  367.         #(Fvisit-do)
  368.         #(Fremember-buffer)
  369.     ))
  370. ))[*]
  371.  
  372.  
  373. Name:Ffind-file-other-window-do
  374. [*]
  375. #(==,arg1,,(
  376.     #(ds,value,#(Fbuffer-fn))
  377.     #(Fread-filename,Find file in other window: ,(
  378.         #(SELF,##(value))
  379.     ),dirs okay)
  380. ),(
  381.     #(Fremember-buffer)
  382.     #(ds,temp,#(Fff-with-paths,arg1))
  383.     #(==,##(temp),,(
  384.         #(Ffind-file-do,arg1)
  385.     ),(
  386.         #(Fmultiple,Ffind-file-do,##(temp),SELF)
  387.     ))
  388. ))
  389. [*]
  390.  
  391.  
  392. Name:Fnew-extens
  393. Strips the extension off filename (arg1) and appends ext (arg2) to it.
  394. #(Fnew-extens,foo,baz)
  395. #(Fnew-extens,foo.,baz)
  396. #(Fnew-extens,foo.bar,baz)
  397. #(Fnew-extens,c:foo.bar,baz)
  398. #(Fnew-extens,c:/foo.bar,baz)
  399. #(Fnew-extens,c:\foo.bar,baz)
  400. #(Fnew-extens,c:\foo.bar\fee,baz)
  401. #(Fnew-extens,c:\foo.bar\fee.,baz)
  402. #(Fnew-extens,c:\foo.bar\fee.fie,baz)
  403. [*]#(Fonly-path,arg1)
  404. #(ds,temp,#(Fonly-fn,arg1))
  405. ##(fm,temp,.,(##(gn,temp,10000))).arg2
  406. [*]
  407.  
  408.  
  409. Name:Fonly-fn
  410. Split out just the filename from a complete path.
  411. [*]#(ds,-SELF,arg1)
  412. #(mp,-SELF,,\,/,:)
  413. #(Fonly-last,#(-SELF,(,),(,),(,)))
  414. #(es,-SELF)[*]
  415.  
  416.  
  417. Name:Fonly-path
  418. Split out just the path from a complete path.
  419. [*]#(ds,-SELF,arg1)
  420. #(mp,-SELF,,\,/,:)
  421. #(Fall-but-last,#(-SELF,(\,),(\,),(:,)))
  422. #(es,-SELF)[*]
  423.  
  424.  
  425. Name:Fread-file
  426. Read a (small!) file and return the contents.
  427. [*]#(Fexcurse-buffer,(
  428.     #(..,##(ba,1))
  429.     #(pm,1)
  430.     #(sp,])
  431.     #(is,!)
  432.     #(sm,0,<)
  433.     #(rf,arg1)
  434.     #(sp,0)
  435.     #(dm,>)
  436.     ##(rm,])
  437.     #(dm,])
  438.     #(pm)
  439. ))[*]
  440.  
  441.  
  442. Name:Fread-filename
  443. Read a filename, using arg1 as the prompt, arg2 as the thing to do.  If arg3
  444. is non-null, don't complain about specifying directory names.
  445. [*]#(Fcompleting-readline,(arg1),(
  446.     #(==,#(Fright,##(value),1),\arg3,(
  447.         #(Ferror,no directories here)
  448.     ),(
  449.         arg2
  450.     ))
  451. ),(
  452.     #(ds,temp,#(Fabsolute-filename,##(value)##(2nd-half)))
  453.     #(Fff-with-paths,
  454.         #(==,#(Fright,##(gs,temp),1),\,(
  455.             ##(gs,temp)*.*
  456.         ),(
  457.             #(ds,temp1,#(Fonly-fn,##(gs,temp)))
  458.             #(==,##(fm,temp1,.,!!!),!!!,(
  459.                 ##(gs,temp)*.*
  460.             ),(
  461.                 #(rs,temp)
  462.                 ##(gs,temp)*
  463.             ))
  464.         ))
  465.     )
  466. ),.)
  467. [*]
  468.  
  469.  
  470. Name:Fsave-all-files
  471. [*]#(Ffor-all-buffers,SELF-do)[*]
  472.  
  473.  
  474. Name:Fsave-all-files-do
  475. [*]#(Fbuffer-modified,(
  476.     #(Fbuffer-has-fn,(
  477.         #(F:save-buffer)
  478.     ))
  479. ))
  480. [*]
  481.  
  482.  
  483. Name:Fsave-buffer-if-modified
  484. #(Fsave-buffer-if-modified) will save the buffer into
  485. ##(buffer-filename).tmp if the buffer has been modified.
  486. [*]#(Fbuffer-modified,(
  487.     #(Fbuffer-has-fn,(
  488.         #(an,Auto save #(Fnew-extens,#(Fbuffer-fn),tmp),,...)
  489.         #(de,#(Fnew-extens,#(Fbuffer-fn),tmp))
  490.         #(Fwrite-file,#(Fnew-extens,#(Fbuffer-fn),tmp))
  491.     ))
  492. ))
  493. [*]
  494.  
  495.  
  496. Name:Ftrash-buffer
  497. Gives the user a chance to save unsaved changes.  First we check to see if we
  498. should ask the user about saving this buffer.  arg1 is the current buffer,
  499. arg2 is the buffer form which the command was invoked, arg3 is the name
  500. of the function to execute if none of the questions are C-g'ed.
  501. [*]#(==,##(ba,arg1),0,(
  502.     #(arg3,arg2)
  503. ),(
  504.     #(==,#(Fbuffer-modified,(
  505.         #(Fbuffer-has-fn,(
  506.             #(ds,temp,#(Fbuffer-fn))
  507.             #(==,##(go,temp),*,,(
  508.                 yes
  509.             ))
  510.         ))
  511.     )),yes,(
  512.         #(Fy-or-n,Buffer #(Fbuffer-fn) modified - save it?,(
  513.             #(==,ARG1,y,(
  514.                 #(F:save-buffer)
  515.                 #(Fbuffer-modified,n)
  516.             ),(
  517.                 #(ds,unsaved-buffers,##(unsaved-buffers)n)
  518.             ))
  519.             #(SELF,##(++,arg1,1),arg2,arg3)
  520.         ))
  521.     ),(
  522.         #(SELF,##(++,arg1,1),arg2,arg3)
  523.     ))
  524. ))[*]
  525.  
  526.  
  527. Name:Fuse-default-ext
  528. Appends the default extension to the filename if the filename doesn't
  529. already have an extension.
  530. [*]#(ds,temp,arg1)
  531. #(==,##(fm,temp,.,no),no,(
  532.     #(Fnew-extens,arg1,##(F-default-ext))
  533. ),(
  534.     arg1
  535. ))[*]
  536.  
  537.  
  538. Name:Fvisit-do
  539. [*]#(sp,[)
  540. #(dm,])
  541. #(Fbuffer-set-fn,#(Fuse-default-ext,##(value)))
  542. #(an,Loading #(Fbuffer-fn)...)
  543. #(Fvisit-do.#(rf,#(Fbuffer-fn)))
  544. [*]
  545.  
  546.  
  547. Name:Fvisit-do.
  548. [*]#(an)
  549. #(n?,readonly,(
  550.     #(sv,mb,2)
  551. ),(
  552.     #(sv,mb,0)
  553. ))
  554. #(Fvisit-hook)
  555. #(pm,2)
  556. #(sp,[$>$>$>)
  557. #(lp,-*-)
  558. #(l?,[,.,,0,(
  559.     #(sp,0)
  560.     #(ds,temp,##(rm,$))
  561.     #(ds,temp,##(fm,temp,-*-))
  562.     #(mp,temp,, ,##(bc,9,d,a))
  563.     #(Fset-modename,##(temp))
  564.     #(Fenter-local-modes)
  565. ),(
  566.     #(Fset-mode-by-ext)
  567. ))
  568. #(lp,History:)
  569. #(l?,[,.,,0,(
  570.     #(sp,0})
  571.     #(Fgoto-row-and-column,
  572.         #(==,##(rm,>),(,),(
  573.             #(sp,>})
  574.             ##(rm,{)
  575.         ,
  576.             #(sp,{<)
  577.             ##(rm,{)
  578.         ),(
  579.     ,        ##(rm,{)
  580.         ))
  581.     )
  582. ),(
  583.     #(sp,[)
  584. ))
  585. #(pm)
  586. [*]
  587.  
  588.  
  589. Name:Fvisit-do.File not found
  590. [*]#(Fset-mode-by-ext)
  591. #(Fmessage,New file)
  592. [*]
  593.  
  594.  
  595. Name:Fvisit-do.File too large
  596. [*]#(Fkill-buffer)
  597. #(Fmessage,File too large)
  598. [*]
  599.  
  600.  
  601. Name:Fvisit-do.Read Only
  602. [*]#(Fvisit-do.)
  603. #(sv,mb,2)
  604. [*]
  605.  
  606.  
  607. Name:Fwrite-backup-do
  608. [*]#(==,arg1,b,(
  609.     #(de,#(Fnew-extens,#(Fbuffer-fn),bak))
  610.     #(rn,#(Fbuffer-fn),#(Fnew-extens,#(Fbuffer-fn),bak))
  611.     arg2
  612. ),(
  613.     #(==,arg1,C-g,(arg3),(arg2))
  614. ))
  615. [*]
  616.  
  617.  
  618. Name:Fwrite-file
  619. Actually write the file to the filename given in arg1.
  620. If arg2 is zero, don't make a backup, regardless of what F-make-backups says.
  621. Fwrite hook may be used to record change log information.
  622. [*]#(==,#(==,arg2,0,,(#(F-make-backups))),,,(
  623.     #(de,#(Fnew-extens,#(Fbuffer-fn),~))
  624.     #(rn,#(Fbuffer-fn),#(Fnew-extens,#(Fbuffer-fn),~))
  625. ))
  626. #(pm,3)
  627. #(Fwrite-hook)
  628. #(sp,[)
  629. #(Fr,(
  630.     #(==,ARG1,,(
  631.         #(sv,mb,0)
  632.         #(an)
  633.     ),(
  634.         #(sv,mb,1)
  635.         #(Ferror,ARG1)
  636.     ))
  637. ),#(wf,arg1,]))
  638. #(sp,0)
  639. #(pm)
  640. [*]
  641.  
  642.  
  643. Name:Fwrite-hook
  644. If the file has a line containing "History:", the current line number and
  645. column will get inserted following the colon.  If the file has a line
  646. containing "Edit History:" OR if the variable edit-history is set to yes,
  647. then every time you save the file, you will be asked why you are saving
  648. the file, and a line with the time and date and the reason for saving will
  649. be inserted after the "Edit History:" line.
  650.  
  651. The edit-history portion of save has a bug, it appears.  If you save
  652. a file and emacs inserts a line into the file for the edit
  653. history, it fails to adjust for the line it just added in the number
  654. inserted in the file (even when the cursor is below the inserted
  655. line).  The problem also exists that if the cursor is above the
  656. inserted line, then emacs set move the cursor down a line
  657.  
  658. Also, if you have both Edit History and the edit-history variable set
  659. on (as is the default), every line of history inserted gets the word
  660. "Edit" inserted, free of charge.  Maybe you should put the test for
  661. the Edit keyword first.
  662.  
  663. [*]#(ds,temp,##(lv,cl)(,)##(lv,cs))
  664. #(sp,[$>$>$>)
  665. #(lp,History:)
  666. #(l?,[,.,2,1,(
  667.     #(sp,1)
  668.     #(is,0)
  669.     #(sp,<)
  670.     #(dm,})
  671.     #(==,##(rm,>),(,),(
  672.         #(dm,>)
  673.         #(dm,})
  674.     ))
  675.     #(sp,1)
  676.     #(is,##(temp))
  677.     #(sp,2<{)
  678.     #(For,(==,##(rm,2),Edit ),F-edit-history,(
  679.         #(ds,value)
  680.         #(Freadline,Why #(Fbuffer-fn): ,(
  681.             #(==,##(value),,,(
  682.                 #(sp,1^)
  683.                 #(is,##(rm,$))
  684.                 #(Fcrlf)
  685.                 #(sp,2<{)
  686.                 #(==,##(rm,2),Edit ,,(
  687.                     #(sp,2)
  688.                 ))
  689.                 #(dm,1)
  690.                 #(is,##(ct) ##(value))
  691.             ))
  692.         ))
  693.     ))
  694. ))
  695. [*]