[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Carbon port: setting the creator code (patch)
From: |
Steven Tamm |
Subject: |
Re: Carbon port: setting the creator code (patch) |
Date: |
Fri, 8 Jul 2005 20:04:09 -0700 |
Sorry for the delay in reply, but it seems to me that using SetFile
would be easier, and more flexible.
(defun mac-set-creator-code-for-file ()
(call-process shell-file-name nil nil t shell-command-switch
(concat "/Developer/Tools/SetFile -c EMAx " buffer-file-name))
)
(add-hook 'after-save-hook 'mac-set-creator-code-for-file)
-Steven
On Jun 24, 2005, at 2:05 AM, David Reitter wrote:
I'm posting some code that introduces a function "mac-set-creator"
in the Mac (Carbon) port. The function sets the creator code
(metadata information) of a file to 'EMAx'. That enables
LaunchServices to start up Emacs whenever the file is double-clicked.
In the Aquamacs distribution, I use it as follows:
(defun mac-set-creator-code-for-file ()
(if (and aquamacs-set-creator-codes-after-writing-files
buffer-file-name
(fboundp 'mac-set-creator)
)
(mac-set-creator buffer-file-name)
)
)
(add-hook 'after-save-hook 'mac-set-creator-code-for-file)
This contains some free code from Apple.
<mac-set-creator.patch>
_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel
- Re: Carbon port: setting the creator code (patch),
Steven Tamm <=