Guest User

Untitled

a guest
Aug 25th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. # Emacs starter for Emacs mac port
  4.  
  5. # Thanks to Aquamacs Project and David Reitter
  6.  
  7. my $args = "";
  8. my $tmpfiles = "";
  9.  
  10. for my $f (@ARGV) {
  11. $args .= '"'.$f.'" ';
  12. $tmpfiles .= '"'.$f.'" ' if (! -e $f);
  13. }
  14.  
  15. system("touch $args") if ($tmpfiles);
  16.  
  17. system("open -a /Applications/Emacs.app $args");
  18.  
  19. # delay deletion because AE drag&drop doesn't work with non-existing documents
  20. system("(sleep 3; rm $tmpfiles) &") if ($tmpfiles);
  21.  
  22. exit;
Add Comment
Please, Sign In to add comment