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 30if (file_status (Abbrev_File) > 0) pop (evalfile (Abbrev_File)); 31 32define set_abbrev_mode (val) 33{ 34 getbuf_info (); 35 if (val) () | 0x1000; else () & ~(0x1000); 36 setbuf_info(()); 37} 38 39define abbrev_mode () 40{ 41 variable flags = getbuf_info() xor 0x1000; 42 variable msg = "Abbrev mode OFF"; 43 setbuf_info(flags); 44 if (flags & 0x1000) msg = "Abbrev mode ON"; 45 message (msg); 46} 47 48 49