emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Carbon port: setting the creator code (patch)


From: David Reitter
Subject: Carbon port: setting the creator code (patch)
Date: Fri, 24 Jun 2005 10:05:46 +0100

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.

Attachment: mac-set-creator.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]