home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / AP / JED / JED097-1.TAR / jed / lib / emacsmsc.sl < prev    next >
Encoding:
Text File  |  1994-12-12  |  966 b   |  49 lines

  1. % More emacs functions.  This file is autoloaded upon demand.
  2.  
  3. define find_buffer_other_window ()
  4. {  
  5.    variable n, buf, trybuf = Null_String;
  6.    variable ch;
  7.    
  8.    n = buffer_list();
  9.    loop (n)
  10.      { 
  11.     =buf; n--;
  12.     ch = buf[0];
  13.     if ((ch == ' ') or (ch == '*') or 
  14.         not(strcmp (whatbuf (), buf)))
  15.       continue;
  16.     trybuf = buf;
  17.     break;
  18.      }
  19.    loop (n) pop ();
  20.    
  21.    trybuf = read_with_completion ("Switch to buffer:",
  22.                   trybuf, Null_String, 'b');
  23.  
  24.    if (strlen (trybuf)) pop2buf (trybuf);
  25. }
  26.  
  27. define find_file_other_window ()
  28. {
  29.    variable file;
  30.  
  31.    file = read_file_from_mini ("Find file:");
  32.    !if (strlen(extract_filename(file))) return;
  33.    
  34.    !if (read_file(file)) message ("New file.");
  35.    pop2buf (whatbuf());
  36. }
  37.  
  38. define find_alternate_file ()
  39. {
  40.    variable file;
  41.  
  42.    file = read_file_from_mini ("Find alternate file:");
  43.    !if (strlen(extract_filename(file))) return;
  44.    
  45.    delbuf (whatbuf());
  46.    !if (find_file (file)) message ("New file.");
  47. }
  48.  
  49.