X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=sugar.git;a=blobdiff_plain;f=dot-files%2F_emacs_el;h=87d2aec2a020a5b042e49a14f297696bfc6257ef;hp=d35164ea5f7cf2c2fbda3f4ac56ef32de4b3943b;hb=8d80c9c947c1dd49c46258f52aefef6272dbc9c2;hpb=1bb303907bccb8ac3989008aaeb9a9f9ea3520f3 diff --git a/dot-files/_emacs_el b/dot-files/_emacs_el index d35164e..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,14 +176,20 @@ (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 (require-if-present 'undo-tree) (if (featurep 'undo-tree) - (global-undo-tree-mode)) + (global-undo-tree-mode)) ;; MPC ;(require-if-present 'mpc-autoloads) @@ -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) @@ -402,13 +424,22 @@ (autoload 'tsv-normal-mode "tsv-mode" "A minor mode to edit table like file" t) (setq tsv-write-annotation nil) (setq tsv-separator-list '("\t")) -(add-to-list 'auto-mode-alist '("\\.[Tt][Ss][Vv]\\'" . tsv-mode)) +;(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 @@ -482,7 +513,9 @@ ;; 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. - '(Info-additional-directory-list (quote ("/sw/share/info" "/usr/local/info" "/usr/local/share/info"))) + '(Info-additional-directory-list + (quote + ("/sw/share/info" "/usr/local/info" "/usr/local/share/info"))) '(ac-ignore-case nil) '(appt-display-format (quote window)) '(appt-message-warning-time 20) @@ -490,10 +523,19 @@ '(cleite:auto-refresh-interval nil) '(cleite:measure-srpc-call-time t) '(compilation-scroll-output (quote first-error)) - '(completion-ignored-extensions (quote (".svn/" "CVS/" ".o" "~" ".bin" ".lbin" ".so" ".a" ".ln" ".blg" ".bbl" ".elc" ".lof" ".glo" ".idx" ".lot" ".dvi" ".fmt" ".tfm" ".pdf" ".class" ".fas" ".lib" ".mem" ".x86f" ".sparcf" ".fasl" ".ufsl" ".fsl" ".dxl" ".pfsl" ".dfsl" ".lo" ".la" ".gmo" ".mo" ".toc" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" ".pyc" ".pyo" ".hi"))) + '(completion-ignored-extensions + (quote + (".svn/" "CVS/" ".o" "~" ".bin" ".lbin" ".so" ".a" ".ln" ".blg" ".bbl" ".elc" ".lof" ".glo" ".idx" ".lot" ".dvi" ".fmt" ".tfm" ".pdf" ".class" ".fas" ".lib" ".mem" ".x86f" ".sparcf" ".fasl" ".ufsl" ".fsl" ".dxl" ".pfsl" ".dfsl" ".lo" ".la" ".gmo" ".mo" ".toc" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" ".pyc" ".pyo" ".hi"))) '(cperl-merge-trailing-else nil) '(csv-align-style (quote auto)) - '(default-frame-alist (quote ((tool-bar-lines . 0) (menu-bar-lines . 1) (width . 80) (height . 25) (right-fringe) (left-fringe)))) + '(default-frame-alist + (quote + ((tool-bar-lines . 0) + (menu-bar-lines . 1) + (width . 80) + (height . 25) + (right-fringe) + (left-fringe)))) '(ditz-find-issue-directory-automatically-flag t) '(ecb-add-path-for-not-matching-files (quote (t))) '(ecb-help-info-path "/sw/share/info/ecb.info") @@ -504,47 +546,122 @@ '(ecb-tree-buffer-style (quote ascii-guides)) '(ecb-windows-width 0.2) '(elscreen-display-tab t) + '(global-whitespace-mode t) '(haskell-program-name "ghci") '(ido-enable-flex-matching t) '(ido-everywhere t) - '(ido-ignore-files (quote ("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./" "\\.ttc"))) + '(ido-ignore-files + (quote + ("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./" "\\.ttc"))) '(ido-work-directory-list-ignore-regexps (quote ("^\\(/mnt/ibm/\\|/Volumes/IBM80GB/\\)"))) '(indent-tabs-mode nil) '(jabber-nickname "PHO") '(jabber-resource "emacs") '(jabber-server "jabber.jp") '(jabber-username "phonohawk") - '(jaspace-highlight-tabs t) '(js2-auto-indent-flag nil) '(js2-basic-offset 4) '(js2-indent-on-enter-key nil) '(js2-mirror-mode nil) '(js2-use-font-lock-faces t) - '(mediawiki-site-alist (quote (("Wikipedia" "http://en.wikipedia.org/w/" "username" "password" "Main Page") ("YmirDev" "https://ymirlink:santamo@update.forcast.jp/fcdiv/mwiki/" "PHO" "" "メインページ")))) - '(mew-field-spec (quote (("^Resent-\\(From\\|To\\|Cc\\|Date\\)" t mew-face-header-important mew-face-header-important) ("^Subject:$" t mew-face-header-important mew-face-header-subject) ("^From:$" t mew-face-header-important mew-face-header-from) ("^\\(To\\|Apparently-To\\):$" t mew-face-header-important mew-face-header-to) ("^\\(Cc\\|Dcc\\|Bcc\\):$" t mew-face-header-important mew-face-header-to) ("^Newsgroups:$" t mew-face-header-important mew-face-header-to) ("^Date:$" t mew-face-header-important mew-face-header-date) ("^Reply-To:$" t) ("^X-Mailer:$" t) ("^X-Mew:$" t mew-face-header-important mew-face-header-xmew) ("^\\(Received\\|Return-Path\\|Sender\\|Errors-To\\):$" nil) ("^\\(Path\\|Distribution\\|Xref\\):$" nil) ("^NNTP-Posting-" nil) ("^\\(Message-Id\\|Posted\\|In-Reply-To\\|References\\|Precedence\\):$" nil) ("^Delivered-" nil) ("^List-" nil) ("^\\(Mime-Version\\|Lines\\):$" nil) ("^From$" nil) ("^Status:$" nil) ("^Face:$" nil mew-face-header-private mew-face-header-marginal) ("^X-Text-Classification:$" t mew-face-header-important mew-face-header-important) ("^X-POPFile-Link:$" t mew-face-header-important mew-face-body-url) ("^\\(X\\|Original\\)-" nil mew-face-header-private mew-face-header-marginal)))) - '(mew-refile-guess-alist (quote (("From:" ("noreply@adc1.apple.com" "+mm/adc") ("mag2 ID 0000022139" "+mm/2ch") ("noreply@sourceforge.net" "+from/sf-net")) ("Subject:" ("w3m-dev" "+ml/w3m-dev")) ("To:" ("glasgow-haskell-users@haskell.org" "+ml/ghc-users") ("fink-devel@lists.sourceforge.net" "+ml/fink-devel")) ("Reply-To:" ("yun@kokonoe.com" "+mm/kokonoe")) ("Cc:" ("glasgow-haskell-users@haskell.org" "+ml/ghc-users"))))) - '(mew-scan-fields (quote ("Folder:" "Filename:" "Subject:" "Date:" "From:" "To:" "Cc:" "Content-Type:" "Content-Transfer-Encoding:" "X-Mew-Uidl:" "Message-Id:" "In-Reply-To:" "References:" "X-Mew-Ref:" "X-Text-Classification:" "Body"))) + '(makefile-mode-hook (quote ((lambda nil (set-variable (quote tab-width) 8))))) + '(mediawiki-site-alist + (quote + (("Wikipedia" "http://en.wikipedia.org/w/" "username" "password" "Main Page") + ("YmirDev" "https://ymirlink:santamo@update.forcast.jp/fcdiv/mwiki/" "PHO" "" "メインページ")))) + '(mew-field-spec + (quote + (("^Resent-\\(From\\|To\\|Cc\\|Date\\)" t mew-face-header-important mew-face-header-important) + ("^Subject:$" t mew-face-header-important mew-face-header-subject) + ("^From:$" t mew-face-header-important mew-face-header-from) + ("^\\(To\\|Apparently-To\\):$" t mew-face-header-important mew-face-header-to) + ("^\\(Cc\\|Dcc\\|Bcc\\):$" t mew-face-header-important mew-face-header-to) + ("^Newsgroups:$" t mew-face-header-important mew-face-header-to) + ("^Date:$" t mew-face-header-important mew-face-header-date) + ("^Reply-To:$" t) + ("^X-Mailer:$" t) + ("^X-Mew:$" t mew-face-header-important mew-face-header-xmew) + ("^\\(Received\\|Return-Path\\|Sender\\|Errors-To\\):$" nil) + ("^\\(Path\\|Distribution\\|Xref\\):$" nil) + ("^NNTP-Posting-" nil) + ("^\\(Message-Id\\|Posted\\|In-Reply-To\\|References\\|Precedence\\):$" nil) + ("^Delivered-" nil) + ("^List-" nil) + ("^\\(Mime-Version\\|Lines\\):$" nil) + ("^From$" nil) + ("^Status:$" nil) + ("^Face:$" nil mew-face-header-private mew-face-header-marginal) + ("^X-Text-Classification:$" t mew-face-header-important mew-face-header-important) + ("^X-POPFile-Link:$" t mew-face-header-important mew-face-body-url) + ("^\\(X\\|Original\\)-" nil mew-face-header-private mew-face-header-marginal)))) + '(mew-refile-guess-alist + (quote + (("From:" + ("noreply@adc1.apple.com" "+mm/adc") + ("mag2 ID 0000022139" "+mm/2ch") + ("noreply@sourceforge.net" "+from/sf-net")) + ("Subject:" + ("w3m-dev" "+ml/w3m-dev")) + ("To:" + ("glasgow-haskell-users@haskell.org" "+ml/ghc-users") + ("fink-devel@lists.sourceforge.net" "+ml/fink-devel")) + ("Reply-To:" + ("yun@kokonoe.com" "+mm/kokonoe")) + ("Cc:" + ("glasgow-haskell-users@haskell.org" "+ml/ghc-users"))))) + '(mew-scan-fields + (quote + ("Folder:" "Filename:" "Subject:" "Date:" "From:" "To:" "Cc:" "Content-Type:" "Content-Transfer-Encoding:" "X-Mew-Uidl:" "Message-Id:" "In-Reply-To:" "References:" "X-Mew-Ref:" "X-Text-Classification:" "Body"))) '(mew-spam: "X-Text-Classification:") - '(mew-summary-form (quote (type (5 date) " " (14 from) " " t (14 x-classification) " " (30 subj) "|" (0 body)))) + '(mew-summary-form + (quote + (type + (5 date) + " " + (14 from) + " " t + (14 x-classification) + " " + (30 subj) + "|" + (0 body)))) '(mouse-wheel-progessive-speed nil) '(mouse-wheel-scroll-amount (quote (1 ((shift) . 5) ((control))))) - '(mpc-browser-tags (quote (Directory Genre Artist|Composer|Performer Album|Playlist))) + '(mpc-browser-tags + (quote + (Directory Genre Artist|Composer|Performer Album|Playlist))) '(navi2ch-browse-url-browser-function (quote browse-url-firefox)) '(navi2ch-display-splash-screen nil) - '(navi2ch-list-moved-board-alist (quote (("http://mamono.2ch.net/ihou/" . "http://hideyoshi.2ch.net/ihou/")))) + '(navi2ch-list-moved-board-alist + (quote + (("http://mamono.2ch.net/ihou/" . "http://hideyoshi.2ch.net/ihou/")))) '(navi2ch-mona-face-variable (quote navi2ch-mona12-face)) '(navi2ch-mona-on-message-mode t) '(newsticker-html-renderer (quote w3m-region)) '(newsticker-url-list nil) - '(newsticker-url-list-defaults (quote (("slashdot" "http://slashdot.org/index.rss" nil 3600)))) + '(newsticker-url-list-defaults + (quote + (("slashdot" "http://slashdot.org/index.rss" nil 3600)))) '(nxml-auto-insert-xml-declaration-flag t) '(nxml-slash-auto-complete-flag t) '(org-replace-disputed-keys t) '(rcirc-server-alist (quote (("irc1.ymir.jp" :nick "PHO`cons" nil nil)))) '(riece-layout "default") - '(riece-layout-alist (quote (("middle-right" riece-configure-windows right middle) ("middle-left" riece-configure-windows left middle) ("top-right" riece-configure-windows right top) ("top-left" riece-configure-windows left top) ("bottom-right" riece-configure-windows right bottom) ("bottom-left" riece-configure-windows left bottom) ("top" riece-configure-windows-top) ("spiral" riece-configure-windows-spiral) ("default" . "middle-right")))) + '(riece-layout-alist + (quote + (("middle-right" riece-configure-windows right middle) + ("middle-left" riece-configure-windows left middle) + ("top-right" riece-configure-windows right top) + ("top-left" riece-configure-windows left top) + ("bottom-right" riece-configure-windows right bottom) + ("bottom-left" riece-configure-windows left bottom) + ("top" riece-configure-windows-top) + ("spiral" riece-configure-windows-spiral) + ("default" . "middle-right")))) '(riece-others-buffer-mode nil) - '(rng-schema-locating-files (quote ("schemas.xml" "~/share/nxml/schemas.xml" "/usr/pkg/share/emacs/site-lisp/nxml-mode/schema/schemas.xml"))) + '(rng-schema-locating-files + (quote + ("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")))) '(session-use-package t nil (session)) @@ -554,6 +671,8 @@ '(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)) '(w3m-coding-system-priority-list (quote (utf-8))) @@ -567,7 +686,10 @@ '(w3m-output-coding-system (quote utf-8)) '(w3m-terminal-coding-system (quote utf-8)) '(w3m-use-cookies t) - '(whitespace-style (quote (face tabs trailing lines-tail space-before-tab newline indentation empty space-after-tab tab-mark))) + '(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))) '(woman-cache-filename "~/.wmncach.el") '(x-select-enable-clipboard t)) (custom-set-faces @@ -586,5 +708,7 @@ '(textile-ol-bullet-face ((t (:foreground "dark orange")))) '(textile-ul-bullet-face ((t (:foreground "deep sky blue")))) '(which-func-face ((t (:background "black" :foreground "dark orange")))) + '(whitespace-empty ((t (:background "gray20" :foreground "firebrick")))) '(whitespace-indentation ((t (:foreground "dimgray" :underline t)))) - '(whitespace-line ((t (:background "gray20"))))) + '(whitespace-line ((t (:background "gray20")))) + '(whitespace-tab ((t (:background "grey22" :foreground "dim gray" :underline (:color foreground-color :style wave))))))