Skip to content

Instantly share code, notes, and snippets.

@alexagranov
Created June 8, 2019 01:57
Show Gist options
  • Save alexagranov/08dd528952c0071970b83fa94723d3a2 to your computer and use it in GitHub Desktop.
Save alexagranov/08dd528952c0071970b83fa94723d3a2 to your computer and use it in GitHub Desktop.
Aquamacs preferences
;; ~/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.)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(delete-selection-mode t)
'(indent-tabs-mode nil)
'(inhibit-startup-screen t)
'(kill-whole-line t)
'(normal-erase-is-backspace t)
'(select-active-regions t)
'(show-paren-mode t)
'(tab-always-indent t)
'(transient-mark-mode t)
'(uniquify-buffer-name-style (quote forward) nil (uniquify))
'(use-empty-active-region t)
'(yank-pop-change-selection t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 135 :width normal :foundry "Misc" :family "Fixed")))))
(require 'find-recursive)
(require 'snippet)
(put 'downcase-region 'disabled nil)
(defun regexp-revert (regexp)
"Revert all buffers whose path matches regexp"
(interactive "sPath Regexp: ")
(dolist (buffer (buffer-list))
(if (string-match-p regexp (or (buffer-file-name buffer) ""))
(progn
(set-buffer buffer)
(revert-buffer nil t)
(message "Reverting %s" (buffer-file-name buffer))))))
(require 'multi-web-mode)
(setq mweb-default-major-mode 'html-mode)
(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
(js-mode "<script[^>]*>" "</script>")
(css-mode "<style[^>]*>" "</style>")))
(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
(multi-web-global-mode 1)
(defun please-turn-off-auto-fill ()
(auto-fill-mode 0) ; auto fill mode disabled
)
(add-hook 'html-mode-hook 'please-turn-off-auto-fill)
(add-hook 'text-mode-hook 'please-turn-off-auto-fill)
(add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode")
(require 'coffee-mode)
(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
(setq whitespace-action '(auto-cleanup)) ;; automatically clean up bad whitespace
(setq whitespace-style '(trailing space-before-tab indentation empty space-after-tab)) ;; only show bad whitespace
(global-whitespace-mode 1)
(custom-set-variables '(coffee-tab-width 4))
(when (>= emacs-major-version 24)
(require 'package)
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/")
t)
(package-initialize))
(add-hook 'ruby-mode-hook 'ruby-refactor-mode-launch)
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment