X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=dot-files%2F_emacs_el;h=80357297a3a7d2cf16c6c69dc28c55a41c103129;hb=ef68f6d3f4ac731c93d98437968afc459e6ac3c1;hp=94bd1835948d02b4866b95f7381d8fd7f902818c;hpb=7c338bc9cba43a152f2caf236c52e79763ea8b56;p=sugar.git diff --git a/dot-files/_emacs_el b/dot-files/_emacs_el index 94bd183..8035729 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)) @@ -56,7 +57,6 @@ )))))) ;; Settings for Browser -------------------------------------------------------- -(setq browse-url-browser-function 'w3m-browse-url) (global-set-key "\C-xm" 'browse-url-at-point) ;; Setting for the Mode Line --------------------------------------------------- @@ -70,12 +70,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 +147,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 +175,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 +213,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) @@ -272,6 +293,11 @@ (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) (add-to-list 'auto-mode-alist '("\\.json$" . javascript-mode)) +;; typescript +(autoload 'typescript-mode "typescript-mode" + "Major mode for editing typescript." t) +(add-to-list 'auto-mode-alist '("\\.ts$" . typescript-mode)) + ;; vimrc (autoload 'vimrc-mode "vimrc-mode" "Major mode for editing `.vimrc', `xxx.vim' and `.exrc' files." t) @@ -404,11 +430,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 @@ -488,6 +523,7 @@ '(ac-ignore-case nil) '(appt-display-format (quote window)) '(appt-message-warning-time 20) + '(browse-url-browser-function (quote browse-url-firefox)) '(canlock-password "a14fa4d2601465d55585c291fa8b3943e189e716") '(cleite:auto-refresh-interval nil) '(cleite:measure-srpc-call-time t) @@ -534,6 +570,7 @@ '(js2-mirror-mode nil) '(js2-use-font-lock-faces t) '(makefile-mode-hook (quote ((lambda nil (set-variable (quote tab-width) 8))))) + '(markdown-live-preview-delete-export (quote delete-on-export)) '(mediawiki-site-alist (quote (("Wikipedia" "http://en.wikipedia.org/w/" "username" "password" "Main Page") @@ -633,6 +670,7 @@ ("schemas.xml" "~/share/nxml/schemas.xml" "/usr/pkg/share/emacs/site-lisp/nxml-mode/schema/schemas.xml"))) '(rst-level-face-base-light 50) '(safe-local-variable-values (quote ((todo-categories "Todo" "Todo" "Todo" "Todo")))) + '(select-enable-clipboard t) '(session-use-package t nil (session)) '(tramp-auto-save-directory "/tmp/tramp-auto-save") '(tramp-completion-reread-directory-timeout 2) @@ -659,8 +697,7 @@ '(whitespace-style (quote (face tabs trailing space-before-tab newline indentation empty space-after-tab))) - '(woman-cache-filename "~/.wmncach.el") - '(x-select-enable-clipboard t)) + '(woman-cache-filename "~/.wmncach.el")) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.