"Fossies" - the Fresh Open Source Software Archive

Member "jed-0.99-19/lib/abbrev.sl" (14 Dec 2009, 846 Bytes) of package /linux/misc/jed-0.99-19.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 
    3 !if (is_defined ("Abbrev_File"))
    4 {
    5    variable Abbrev_File;
    6    $1 = getenv ("JED_HOME");
    7    if ($1 == NULL)
    8      {
    9     $1 = getenv ("HOME");
   10     if ($1 == NULL) $1 = "";
   11      }
   12    
   13 #ifdef VMS
   14    if (0 == strlen ($1))
   15      {
   16     Abbrev_File = "SYS$LOGIN:abbrevs.sl";
   17      }
   18    else Abbrev_File = dircat ($1, Abbrev_File);
   19 #else
   20    
   21 #ifdef UNIX
   22    Abbrev_File = ".abbrevs.sl";
   23 #else
   24    Abbrev_File = "abbrevs.sl";
   25 #endif
   26    Abbrev_File = dircat ($1, Abbrev_File);
   27 #endif % VMS 
   28 }
   29 
   30 if (file_status (Abbrev_File) > 0) pop (evalfile (Abbrev_File));
   31 
   32 define set_abbrev_mode (val)
   33 {
   34    if (val)
   35      _set_buffer_flag (0x800);
   36    else
   37      _unset_buffer_flag (0x800);
   38 }
   39 
   40 define abbrev_mode ()
   41 {
   42    _toggle_buffer_flag (0x800);
   43 
   44    if (_test_buffer_flag (0x800))
   45      message ("Abbrev mode ON");
   46    else
   47      message ("Abbrev mode OFF");
   48 }
   49 
   50 
   51 provide ("abbrev");