Customising Aquamacs

Here's a simple but effective way of customising Aquamacs so that it opens by default with certain preferences. (Aquamacs is the default code editor used by the slippery chicken OSX app.)

NB: There are reports that this customisation can mess with native keyboard shortcuts. If this happens to you, then do let me know! mr.danielross@gmail.com

Here's a screen-shot:

If you want to do make your slippery chicken interface look similar then just copy the following code to the bottom of the init file and save. It's as easy as that!

Of course you can always hack the code to make it look however you want it to too.

The init file can be found here: “/Applications/slippery-chicken-osx.app/Contents/Resources/sc.el”

NB: I do not know where your init file is if you are not running sc on a mac using the app. You'll have to locate it for yourself.

;;; Aquamacs Customisation code. Just add it to your init file!

;; Set the colour theme and highlighting
;; Taken from http://www.cs.berkeley.edu/~prmohan/emacs/
;; Thanks to Prashanth Mohan
(require 'color-theme)
(color-theme-initialize)
(color-theme-clarity)
(defface hl-line '((t (:background "DarkSlateGrey")))
 "Face to use for `hl-line-face'." :group 'hl-line)
(setq hl-line-face 'hl-line)
(global-hl-line-mode t) ; turn it on for all modes by default

;; Turn on line numbering
(global-linum-mode t)

;; Split the window into 2 panes, left and the right (rather
;; than up and down)
(split-window-horizontally)

;; Sizes of the new panes in 1280 x 800 display
(setq default-frame-alist 
    (add-to-list 'default-frame-alist '(width . 640)))
(setq default-frame-alist 
    (add-to-list 'default-frame-alist '(height . 400)))

;; Use the commands "control+x" followed by an arrow to 
;; navigate between panes
(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <left>") 'windmove-left)
(global-set-key (kbd "C-x <right>") 'windmove-right)

;; DJR - Thu 13 Oct 2016 10:55:12 BST
;; Stop Aquamacs asking to save changes each time
(custom-set-variables '(aquamacs-save-options-on-quit nil))