From f7f9f0dcd0f5b1dfd5f2929c8789d46de65e50de Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 14 Sep 2012 01:55:41 +0200 Subject: .emacs.d/init.el --- .emacs.d/init.el | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e84ed30..22e79d2 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -121,8 +121,8 @@ actual account name." (defmacro oni:email (user at host dot com) "Turn arguments into an email address. -The resulting email address will look like: USER@HOST.COM, AT and DOT are -intentionally being skipped." +The resulting email address will look like: USER@HOST.COM, AT and +DOT are intentionally being skipped." (concat (symbol-name user) "@" (symbol-name host) "." (symbol-name com))) @@ -606,6 +606,14 @@ insert at the end of the region and at the beginning." (setq dir (replace-match "\\1/" nil nil dir))) dir) +(defun oni:start-emms () + "Check to see if the function `emms' exists, if not call +`emms-player-mpd-connect' and assume that will have loaded it." + (interactive) + (unless (fboundp 'emms) + (emms-player-mpd-connect)) + (emms)) + (defun oni:term-mode-func () "Function for `term-mode-hook'." (setq truncate-lines nil)) @@ -614,18 +622,19 @@ insert at the end of the region and at the beginning." "Function for `texinfo-mode-hook'." (auto-fill-mode)) -(defun oni:view-mail () +(defun oni:view-mail (inbox) "Show a menu with all mailbox options from `oni:mailbox-map' for easy selection." - (interactive) - (require 'tmm) - (let* ((tmm-completion-prompt "Choose a mailbox\n") - (inbox (tmm-prompt oni:mailbox-map))) - (if inbox - (progn - (require 'mu4e) - (funcall (intern (concat "oni:" inbox "-mailbox"))) - (mu4e))))) + (interactive + (list (progn + (require 'tmm) + (let ((tmm-completion-prompt "Choose a mailbox\n")) + (tmm-prompt oni:mailbox-map))))) + (if inbox + (progn + (require 'mu4e) + (funcall (intern (concat "oni:" inbox "-mailbox"))) + (mu4e)))) (defun oni:write-file-func () "Function for `write-file-hooks'." @@ -681,11 +690,6 @@ for easy selection." (eval-after-load "info" '(require 'info+)) -(eval-after-load "lua-mode" - `(progn - (modify-syntax-entry ?- "< 12" lua-mode-syntax-table) - (modify-syntax-entry ?\n ">" lua-mode-syntax-table))) - (eval-after-load "mu4e" '(add-to-list 'org-capture-templates @@ -809,7 +813,7 @@ for easy selection." (vertical-scroll-bars . nil) (menu-bar-lines . nil) (tool-bar-lines . nil) - (font . "LiberationMono:pixelsize=16") + (font . "osaka_unicode:pixelsize=18") (left-fringe . 0))) (setq emms-source-file-default-directory "/mnt/music/") (setq erc-autojoin-channels-alist @@ -937,6 +941,7 @@ for easy selection." ("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/"))) (setq package-load-list '((htmlize "1.39") + (lua-mode "20111107") all)) (setq php-function-call-face 'font-lock-function-name-face) (setq php-mode-force-pear t) @@ -953,6 +958,7 @@ for easy selection." (setq scroll-conservatively 101) (setq send-mail-function 'smtpmail-send-it) (setq sendmail-program "/usr/bin/msmtp") +(setq smex-key-advice-ignore-menu-bar t) (setq smex-save-file "~/.emacs.d/smex-items") (setq special-display-buffer-names '("*Sauron*")) (setq special-display-frame-alist '((minibuffer . nil) @@ -1007,7 +1013,7 @@ for easy selection." (global-set-key (kbd "") 'emms-stop) (global-set-key (kbd "") 'oni:raise-scratch) (global-set-key (kbd "") 'oni:view-mail) -(global-set-key (kbd "") 'emms) +(global-set-key (kbd "") 'oni:start-emms) (global-set-key (kbd "") 'oni:reload-buffer) (global-set-key (kbd "") 'jabber-switch-to-roster-buffer) (global-set-key (kbd "") 'magit-status) -- cgit v1.2.3-54-g00ecf