home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / lucidem / bug / 356 < prev   
Encoding:
Text File  |  1992-11-13  |  1.1 KB  |  29 lines

  1. x-gateway: rodan.UU.NET from bug-lucid-emacs to alt.lucid-emacs.bug; Sat, 14 Nov 1992 00:48:17 EST
  2. Message-ID: <9211140545.AA01984@lucid.com>
  3. Date: Sat, 14 Nov 1992 00:38:23 EST
  4. From: Arup.Mukherjee@KALI.FTM.CS.CMU.EDU
  5. Subject: Fix for autosave bug in lucid emacs 19.3 ...
  6. Newsgroups: alt.lucid-emacs.bug
  7. Path: sparky!uunet!wendy-fate.uu.net!bug-lucid-emacs
  8. Sender: bug-lucid-emacs-request@lucid.com
  9. Lines: 18
  10.  
  11. In the function auto_save_1 (line 2673, fileio.c), there should be a check
  12. to make sure that current_buffer->filename is not actually nil before 
  13. attempting to go and stat() it. (Otherwise lemacs crashes when attempting
  14. to autosave a buffer that doesn't have a filename associated with it, 
  15. such as in the case of "*mail*"!).
  16.  
  17. The if statement in auto_save_1 should be fixed to say:
  18.  
  19.   /* Get visited file's mode to become the auto save file's mode.  */
  20.   if (!NILP (current_buffer->filename) &&
  21.       stat ((char *)XSTRING (current_buffer->filename)->data, &st) >= 0)
  22.     /* But make sure we can overwrite it later!  */
  23.     auto_save_mode_bits = st.st_mode | 0600;
  24.   else
  25.     auto_save_mode_bits = 0666;
  26.  
  27.  
  28. -Arup Mukherjee (arup@cmu.edu)
  29.