X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=sugar.git;a=blobdiff_plain;f=dot-files%2F_emacs_el;h=87d2aec2a020a5b042e49a14f297696bfc6257ef;hp=0e55b9adc33cf4fe1cdf317f90b1c58da498818d;hb=8d80c9c947c1dd49c46258f52aefef6272dbc9c2;hpb=4eb4cdfe581f274c84c8ca686becefd892be7c48 diff --git a/dot-files/_emacs_el b/dot-files/_emacs_el index 0e55b9a..87d2aec 100644 --- a/dot-files/_emacs_el +++ b/dot-files/_emacs_el @@ -21,6 +21,7 @@ (global-set-key (kbd "C-\\" ) 'toggle-input-method) (global-set-key (kbd "C-RET") 'completion-at-point) +(global-set-key (kbd "C-") 'completion-at-point) (unless window-system (normal-erase-is-backspace-mode t)) @@ -70,12 +71,18 @@ (cond ((equal host "seras") (set-frame-font "Dejavu Sans Mono 11" t)) + ((equal host "yukari.cielonegro.org") + (set-frame-font "Dejavu Sans Mono 11" t)) + ((equal host "aria.cielonegro.org") (progn (set-frame-font "Dejavu Sans Mono 13" t) - (set-fontset-font nil 'japanese-jisx0208 "さざなみゴシック") - (set-fontset-font nil 'japanese-jisx0212 "さざなみゴシック") - (set-fontset-font nil 'katakana-jisx0201 "さざなみゴシック")))))) + ;; Emacs 24.4.1 somehow gets very slow when the following + ;; lines are uncommented. + ;;(set-fontset-font nil 'japanese-jisx0208 "さざなみゴシック") + ;;(set-fontset-font nil 'japanese-jisx0212 "さざなみゴシック") + ;;(set-fontset-font nil 'katakana-jisx0201 "さざなみゴシック") + ))))) ;; Hooks for newline-and-indent ------------------------------------------------ ;(mapcar (lambda (hook) @@ -141,6 +148,11 @@ (color-theme-initialize) (color-theme-subtle-hacker))) +;; multi-term +(autoload 'multi-term "multi-term" + "Create new term buffer. +Will prompt you shell name when you type `C-u' before this command." t) + ;; auto-complete (require-if-present 'auto-complete-config) (if (featurep 'auto-complete-config) @@ -164,8 +176,14 @@ (paren-activate)) ;; elscreen -(load "elscreen" "ElScreen" t) -(elscreen-start) +(condition-case e + (load "elscreen" "ElScreen" t) + (file-error + (if (equal (cadr e) "Cannot open load file") + (message "Warning: feature %s is absent" feature) ; warn and ignore + (apply 'signal (car e) (cdr e))))) ; rethrow +(if (featurep 'elscreen) + (elscreen-start)) (require-if-present 'elscreen-w3m) ;; undo-tree @@ -196,6 +214,10 @@ (autoload 'lua-mode "lua-mode" "Lua editing mode." t) (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode)) +;; protobuf-mode +(autoload 'protobuf-mode "protobuf-mode") +(add-to-list 'auto-mode-alist '("\\.proto\\'" . protobuf-mode)) + ;; scala-mode2 (add-to-list 'load-path "~/sandbox/_scala/scala-mode2") (require-if-present 'scala-mode2) @@ -404,11 +426,20 @@ (setq tsv-separator-list '("\t")) ;(add-to-list 'auto-mode-alist '("\\.[Tt][Ss][Vv]\\'" . tsv-mode)) +;; markdown-mode +;; http://jblevins.org/projects/markdown-mode/ +(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t) +(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + ;; yaml-mode (autoload 'yaml-mode "yaml-mode" "Major mode for editing YAML files." t) (add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode)) +;; less-css-mode +(autoload 'less-css-mode "less-css-mode" "Major mode for editing LESS files" t) +(add-to-list 'auto-mode-alist '("\\.less\\'" . less-css-mode)) + ;; Troublesome Tasks (if (equal (system-name) "seras") (progn @@ -640,6 +671,7 @@ '(tramp-default-method "sshx") '(uniquify-buffer-name-style (quote forward) nil (uniquify)) '(uniquify-trailing-separator-p t) + '(vc-cvs-diff-switches (quote ("-u"))) '(vc-cvs-stay-local nil) '(w3m-bookmark-file-coding-system (quote utf-8)) '(w3m-coding-system (quote utf-8)) @@ -654,7 +686,7 @@ '(w3m-output-coding-system (quote utf-8)) '(w3m-terminal-coding-system (quote utf-8)) '(w3m-use-cookies t) - '(whitespace-global-modes (quote (not mew-summary-mode))) + '(whitespace-global-modes (quote (not mew-draft-mode mew-summary-mode))) '(whitespace-style (quote (face tabs trailing space-before-tab newline indentation empty space-after-tab)))