;; Install in Library/Preferences/Aquamacs\ Emacs/Preferences.el ;; This is the Aquamacs Preferences file. ;; Add Emacs-Lisp code here that should be executed whenever ;; you start Aquamacs Emacs. If errors occur, Aquamacs will stop ;; evaluating this file and print errors in the *Messags* buffer. ;; Use this file in place of ~/.emacs (which is loaded as well.) (setenv "PATH" (concat "/opt/local/bin" ":" (getenv "PATH"))) ; we want the default emacs behavior for new files, but still want to be able to do apple-n ; for new frames (defun my-new-frame-with-new-scratch () (interactive) (let ((one-buffer-one-frame t)) (new-frame-with-new-scratch))) (define-key osx-key-mode-map (kbd "A-n") 'my-new-frame-with-new-scratch) ; apple-w closes whatever frame you are in (defun my-close-current-window-asktosave () (interactive) (let ((one-buffer-one-frame t)) (close-current-window-asktosave))) (define-key osx-key-mode-map (kbd "A-w") 'my-close-current-window-asktosave)