[SVN] r9932

Alexander John Ross alex.j.ross at gmail.com
Tue Jun 17 07:49:29 UTC 2008


Add a new method TextMate.save to the TextMate ruby module.
Calling TextMate.save ensures that one of the following hold true:
  • The current document is saved, if TM_FILEPATH is writeable.
    In this case, TM_FILEPATH, TM_FILENAME, TM_DISPLAYNAME are left as is.
  • If TM_FILEPATH is not writeable, then the contents of the current
    document will be saved in a temporary file.
    In this case:
      TM_FILEPATH, TM_FILENAME reflect the temporary file.
      TM_ORG_FILEPATH and TM_ORG_FILENAME will reflect the original unwriteable file.
      TM_DISPLAYNAME will be annotated by (M) to show that the file has not been saved.
  • If TM_FILEPATH is unset, the current document has never been saved.  
    The current document's content will be saved in a temporary
    In this case: 
      TM_FILEPATH, TM_FILENAME reflect the temporary file.
      TM_FILE_IS_UNTITLED will be set to “true”
      TM_DISPLAYNAME will be set to “untitled”
    

Changed:
A   trunk/Support/lib/tm/save.rb




More information about the textmate-dev mailing list