|
@@ -41,7 +41,7 @@ changing.") |
|
|
|
|
|
|
|
|
(require 'url) |
|
|
(require 'url) |
|
|
|
|
|
|
|
|
(defun dllib-if-unfound (url &optional byte-compile-p force-download-p) |
|
|
|
|
|
|
|
|
(defun fetch-library (url &optional byte-compile-p force-download-p) |
|
|
"If library does not exist, download it from URL and locate it in |
|
|
"If library does not exist, download it from URL and locate it in |
|
|
\"~/emacs.d/lisp/\". Return nil if library unfound and failed to download, |
|
|
\"~/emacs.d/lisp/\". Return nil if library unfound and failed to download, |
|
|
otherwise the path where the library installed." |
|
|
otherwise the path where the library installed." |
|
@@ -131,7 +131,7 @@ otherwise the path where the library installed." |
|
|
(mouse-avoidance-mode 'banish) |
|
|
(mouse-avoidance-mode 'banish) |
|
|
|
|
|
|
|
|
(and window-system |
|
|
(and window-system |
|
|
(dllib-if-unfound |
|
|
|
|
|
|
|
|
(fetch-library |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/save-window-size.el" |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/save-window-size.el" |
|
|
t) |
|
|
t) |
|
|
(require 'save-window-size nil t)) |
|
|
(require 'save-window-size nil t)) |
|
@@ -361,7 +361,7 @@ otherwise the path where the library installed." |
|
|
(global-whitespace-mode t)) |
|
|
(global-whitespace-mode t)) |
|
|
|
|
|
|
|
|
(and nil |
|
|
(and nil |
|
|
(dllib-if-unfound |
|
|
|
|
|
|
|
|
(fetch-library |
|
|
"http://www.emacswiki.org/emacs/download/fill-column-indicator.el" |
|
|
"http://www.emacswiki.org/emacs/download/fill-column-indicator.el" |
|
|
t) |
|
|
t) |
|
|
(require 'fill-column-indicator nil t) |
|
|
(require 'fill-column-indicator nil t) |
|
@@ -427,7 +427,7 @@ otherwise the path where the library installed." |
|
|
;; (my-set-ascii-and-jp-font '("ProggyCleanTTSZ" 120 "takaogothic" 11)) |
|
|
;; (my-set-ascii-and-jp-font '("ProggyCleanTTSZ" 120 "takaogothic" 11)) |
|
|
;; あ a |
|
|
;; あ a |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
(and (fetch-library |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/set-modeline-color.el" |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/set-modeline-color.el" |
|
|
t) |
|
|
t) |
|
|
(progn |
|
|
(progn |
|
@@ -476,12 +476,12 @@ otherwise the path where the library installed." |
|
|
|
|
|
|
|
|
(setq bookmark-default-file "~/.emacs.d/bmk") |
|
|
(setq bookmark-default-file "~/.emacs.d/bmk") |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
(and (fetch-library |
|
|
"https://github.com/10sr/emacs-lisp/raw/master/read-only-only-mode.el" |
|
|
"https://github.com/10sr/emacs-lisp/raw/master/read-only-only-mode.el" |
|
|
t) |
|
|
t) |
|
|
(require 'read-only-only-mode nil t)) |
|
|
(require 'read-only-only-mode nil t)) |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
(and (fetch-library |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/smart-revert.el" |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/smart-revert.el" |
|
|
t) |
|
|
t) |
|
|
(require 'smart-revert nil t) |
|
|
(require 'smart-revert nil t) |
|
@@ -599,12 +599,12 @@ otherwise the path where the library installed." |
|
|
(not (equal (getenv "DISPLAY") "")) |
|
|
(not (equal (getenv "DISPLAY") "")) |
|
|
(executable-find "xclip") |
|
|
(executable-find "xclip") |
|
|
;; (< emacs-major-version 24) |
|
|
;; (< emacs-major-version 24) |
|
|
(dllib-if-unfound "http://www.emacswiki.org/emacs/download/xclip.el" t) |
|
|
|
|
|
|
|
|
(fetch-library "http://www.emacswiki.org/emacs/download/xclip.el" t) |
|
|
(require 'xclip nil t) |
|
|
(require 'xclip nil t) |
|
|
(turn-on-xclip)) |
|
|
(turn-on-xclip)) |
|
|
|
|
|
|
|
|
(and (eq system-type 'darwin) |
|
|
(and (eq system-type 'darwin) |
|
|
(dllib-if-unfound |
|
|
|
|
|
|
|
|
(fetch-library |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/pasteboard.el" |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/pasteboard.el" |
|
|
t) |
|
|
t) |
|
|
(require 'pasteboard nil t) |
|
|
(require 'pasteboard nil t) |
|
@@ -692,7 +692,7 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
;; some modes and hooks |
|
|
;; some modes and hooks |
|
|
|
|
|
|
|
|
;; http://fukuyama.co/foreign-regexp |
|
|
;; http://fukuyama.co/foreign-regexp |
|
|
'(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
'(and (fetch-library |
|
|
"https://raw.github.com/k-talo/foreign-regexp.el/master/foreign-regexp.el" |
|
|
"https://raw.github.com/k-talo/foreign-regexp.el/master/foreign-regexp.el" |
|
|
t) |
|
|
t) |
|
|
(require 'foreign-regexp nil t) |
|
|
(require 'foreign-regexp nil t) |
|
@@ -703,18 +703,18 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
|
|
|
|
|
|
(require 'session nil t) |
|
|
(require 'session nil t) |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/gtkbm.el" |
|
|
|
|
|
|
|
|
(and (fetch-library "https://raw.github.com/10sr/emacs-lisp/master/gtkbm.el" |
|
|
t) |
|
|
t) |
|
|
(require 'gtkbm nil t) |
|
|
(require 'gtkbm nil t) |
|
|
(global-set-key (kbd "C-x C-d") 'gtkbm)) |
|
|
(global-set-key (kbd "C-x C-d") 'gtkbm)) |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
(and (fetch-library |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/git-command.el" |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/git-command.el" |
|
|
t) |
|
|
t) |
|
|
(require 'git-command nil t) |
|
|
(require 'git-command nil t) |
|
|
(define-key ctl-x-map "g" 'git-command)) |
|
|
(define-key ctl-x-map "g" 'git-command)) |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
(and (fetch-library |
|
|
"http://www.emacswiki.org/emacs/download/sl.el" |
|
|
"http://www.emacswiki.org/emacs/download/sl.el" |
|
|
t) |
|
|
t) |
|
|
(require 'sl nil t)) |
|
|
(require 'sl nil t)) |
|
@@ -822,7 +822,7 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
(add-to-list 'auto-mode-alist (cons "\\.md\\'" 'outline-mode)) |
|
|
(add-to-list 'auto-mode-alist (cons "\\.md\\'" 'outline-mode)) |
|
|
(setq markdown-command (or (executable-find "markdown") |
|
|
(setq markdown-command (or (executable-find "markdown") |
|
|
(executable-find "markdown.pl"))) |
|
|
(executable-find "markdown.pl"))) |
|
|
(when (dllib-if-unfound |
|
|
|
|
|
|
|
|
(when (fetch-library |
|
|
"http://jblevins.org/projects/markdown-mode/markdown-mode.el" |
|
|
"http://jblevins.org/projects/markdown-mode/markdown-mode.el" |
|
|
t) |
|
|
t) |
|
|
(add-to-list 'auto-mode-alist (cons "\\.md\\'" 'markdown-mode)) |
|
|
(add-to-list 'auto-mode-alist (cons "\\.md\\'" 'markdown-mode)) |
|
@@ -846,7 +846,7 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
(gtags-mode 1)) |
|
|
(gtags-mode 1)) |
|
|
)) |
|
|
)) |
|
|
|
|
|
|
|
|
(when (dllib-if-unfound |
|
|
|
|
|
|
|
|
(when (fetch-library |
|
|
"https://raw.github.com/mooz/js2-mode/master/js2-mode.el" |
|
|
"https://raw.github.com/mooz/js2-mode/master/js2-mode.el" |
|
|
t) |
|
|
t) |
|
|
(autoload 'js2-mode "js2-mode" nil t) |
|
|
(autoload 'js2-mode "js2-mode" nil t) |
|
@@ -969,7 +969,7 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
;; term mode |
|
|
;; term mode |
|
|
|
|
|
|
|
|
;; (setq multi-term-program shell-file-name) |
|
|
;; (setq multi-term-program shell-file-name) |
|
|
(and (dllib-if-unfound "http://www.emacswiki.org/emacs/download/multi-term.el" |
|
|
|
|
|
|
|
|
(and (fetch-library "http://www.emacswiki.org/emacs/download/multi-term.el" |
|
|
t) |
|
|
t) |
|
|
(require 'multi-term nil t) |
|
|
(require 'multi-term nil t) |
|
|
(setq multi-term-switch-after-close nil)) |
|
|
(setq multi-term-switch-after-close nil)) |
|
@@ -1150,7 +1150,7 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
;; http://d.hatena.ne.jp/kobapan/20090305/1236261804 |
|
|
;; http://d.hatena.ne.jp/kobapan/20090305/1236261804 |
|
|
;; http://www.katch.ne.jp/~leque/software/repos/gauche-mode/gauche-mode.el |
|
|
;; http://www.katch.ne.jp/~leque/software/repos/gauche-mode/gauche-mode.el |
|
|
|
|
|
|
|
|
(when (dllib-if-unfound |
|
|
|
|
|
|
|
|
(when (fetch-library |
|
|
"http://www.katch.ne.jp/~leque/software/repos/gauche-mode/gauche-mode.el" |
|
|
"http://www.katch.ne.jp/~leque/software/repos/gauche-mode/gauche-mode.el" |
|
|
t) |
|
|
t) |
|
|
(setq auto-mode-alist |
|
|
(setq auto-mode-alist |
|
@@ -1190,7 +1190,7 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
;; (add-hook 'find-file-hook |
|
|
;; (add-hook 'find-file-hook |
|
|
;; (lambda () |
|
|
;; (lambda () |
|
|
;; (recentf-add-file default-directory))) |
|
|
;; (recentf-add-file default-directory))) |
|
|
(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
(and (fetch-library |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/recentf-show.el" |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/recentf-show.el" |
|
|
t) |
|
|
t) |
|
|
(require 'recentf-show nil t) |
|
|
(require 'recentf-show nil t) |
|
@@ -1396,14 +1396,14 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
(when nil (file-readable-p file) |
|
|
(when nil (file-readable-p file) |
|
|
(delete-file file))))) |
|
|
(delete-file file))))) |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/pack.el" |
|
|
|
|
|
|
|
|
(and (fetch-library "https://raw.github.com/10sr/emacs-lisp/master/pack.el" |
|
|
t) |
|
|
t) |
|
|
(require 'pack nil t) |
|
|
(require 'pack nil t) |
|
|
(add-hook 'dired-mode-hook |
|
|
(add-hook 'dired-mode-hook |
|
|
(lambda () |
|
|
(lambda () |
|
|
(define-key dired-mode-map "P" 'dired-do-pack-or-unpack)))) |
|
|
(define-key dired-mode-map "P" 'dired-do-pack-or-unpack)))) |
|
|
|
|
|
|
|
|
(and (dllib-if-unfound |
|
|
|
|
|
|
|
|
(and (fetch-library |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/dired-list-all-mode.el" |
|
|
"https://raw.github.com/10sr/emacs-lisp/master/dired-list-all-mode.el" |
|
|
t) |
|
|
t) |
|
|
(require 'dired-list-all-mode nil t) |
|
|
(require 'dired-list-all-mode nil t) |
|
|