jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: new version of recent.sl


On 12.04.05, G. Milde wrote:
> > > I finished a new version of the "Recent Files" mode recent.sl.

I found one more bug in add_to_cache adding noise in case of files matching
the Recent_Files_Exclude_Pattern. The full diff to the last posted version
is now:


--- recent-3.2pre.sl	2005-04-12 14:05:36.000000000 +0200
+++ recent.sl	2005-04-12 15:34:42.000000000 +0200
@@ -313,7 +313,12 @@
 static define add_to_cache()
 {
    _pop_n(_NARGS); % remove spurious arguments from stack (when used as hook)
-   variable fp, filerecord_string = getbuf_filerecord() + ":0\n";
+   variable fp, filerecord_string = getbuf_filerecord();
+   
+   if (filerecord_string = "")
+     return;
+   
+   filerecord_string += ":0\n";
    if (Recent_Files_Synchronize_Cache)
      {
 	variable file = recent_cachefile_name[Recent_Use_Local_Cache]; 
@@ -450,6 +455,8 @@
 static define clear_cache()
 {
    recent_files_cache = "";
+   if (Recent_Files_Synchronize_Cache)
+     () = delete_file(recent_cachefile_name[Recent_Use_Local_Cache]);
 }
 
 
@@ -516,10 +523,9 @@
 % ---------------------------------------------
 
 % Load the filerecords list
-!if (Recent_Files_Synchronize_Cache)
+if (Restore_Last_Session or not(Recent_Files_Synchronize_Cache))
   recent_files_cache = load_cache();
 
-
 % Hooks
 
 % update the cache_file when loading and saving a buffer


GM

-- 
G.Milde web.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]