| @@ -40,18 +40,6 @@ Otherwize hook it." | |||||
| (add-hook 'after-init-hook | (add-hook 'after-init-hook | ||||
| func))) | func))) | ||||
| (defmacro defvar-set (symbol value &optional docstring) | |||||
| "Define SYMBOL as a variable and set to VALUE. | |||||
| Variable will be defined with DOCSTRING if given, otherwise do not set even | |||||
| VALUE when defining SYMBOL." | |||||
| `(set (if ,docstring | |||||
| (defvar ,symbol | |||||
| nil | |||||
| ,docstring) | |||||
| (defvar ,symbol)) | |||||
| ,value)) | |||||
| (defmacro safe-require-or-eval (feature) | (defmacro safe-require-or-eval (feature) | ||||
| "Require FEATURE if available. | "Require FEATURE if available. | ||||
| @@ -193,7 +181,7 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||||
| ;; package | ;; package | ||||
| (defvar-set my-package-list | |||||
| (set-variable 'my-package-list | |||||
| '( | '( | ||||
| markdown-mode | markdown-mode | ||||
| yaml-mode | yaml-mode | ||||
| @@ -396,8 +384,8 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| (expand-file-name "~/dbx/apps/bin")) | (expand-file-name "~/dbx/apps/bin")) | ||||
| (when window-system | (when window-system | ||||
| (defvar-set w32-enable-synthesized-fonts t)) | |||||
| (defvar-set w32-apps-modifier 'meta) | |||||
| (set-variable 'w32-enable-synthesized-fonts t)) | |||||
| (set-variable 'w32-apps-modifier 'meta) | |||||
| (setq file-name-coding-system 'sjis)) | (setq file-name-coding-system 'sjis)) | ||||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||||
| @@ -659,9 +647,9 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| (t | (t | ||||
| (:underline "black"))) | (:underline "black"))) | ||||
| "*Face used by hl-line.") | "*Face used by hl-line.") | ||||
| (defvar-set hl-line-face 'my-hl-line) ;; (setq hl-line-face nil) | |||||
| (set-variable 'hl-line-face 'my-hl-line) ;; (setq hl-line-face nil) | |||||
| (global-hl-line-mode 1) ;; (hl-line-mode 1) | (global-hl-line-mode 1) ;; (hl-line-mode 1) | ||||
| (defvar-set hl-line-global-modes | |||||
| (set-variable 'hl-line-global-modes | |||||
| '(not | '(not | ||||
| term-mode)) | term-mode)) | ||||
| @@ -752,8 +740,8 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| (add-hook 'after-save-hook | (add-hook 'after-save-hook | ||||
| 'executable-make-buffer-file-executable-if-script-p) | 'executable-make-buffer-file-executable-if-script-p) | ||||
| (defvar-set bookmark-default-file (concat user-emacs-directory | |||||
| "bmk")) | |||||
| (set-variable 'bookmark-default-file (concat user-emacs-directory | |||||
| "bmk")) | |||||
| (add-hook 'recentf-load-hook | (add-hook 'recentf-load-hook | ||||
| (lambda () | (lambda () | ||||
| (defvar recentf-exclude) | (defvar recentf-exclude) | ||||
| @@ -976,11 +964,11 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||||
| ;; some modes and hooks | ;; some modes and hooks | ||||
| (defvar-set ac-ignore-case nil) | |||||
| (set-variable 'ac-ignore-case nil) | |||||
| ;; (when (require 'ensime nil t) | ;; (when (require 'ensime nil t) | ||||
| ;; (defvar-set ensime-ac-case-sensitive t) | |||||
| ;; (defvar-set ensime-company-case-sensitive t) | |||||
| ;; (set-variable 'ensime-ac-case-sensitive t) | |||||
| ;; (set-variable 'ensime-company-case-sensitive t) | |||||
| ;; (add-hook 'scala-mode-hook | ;; (add-hook 'scala-mode-hook | ||||
| ;; 'ensime-scala-mode-hook) | ;; 'ensime-scala-mode-hook) | ||||
| ;; (add-hook 'ensime-scala-mode-hook | ;; (add-hook 'ensime-scala-mode-hook | ||||
| @@ -1108,7 +1096,7 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| (local-set-key | (local-set-key | ||||
| (kbd "C-x C-e") | (kbd "C-x C-e") | ||||
| 'my-execute-shell-command-current-line))) | 'my-execute-shell-command-current-line))) | ||||
| (defvar-set sh-here-document-word "__EOC__") | |||||
| (set-variable 'sh-here-document-word "__EOC__") | |||||
| (defun my-execute-shell-command-current-line () | (defun my-execute-shell-command-current-line () | ||||
| "Run current line as shell command." | "Run current line as shell command." | ||||
| @@ -1212,8 +1200,8 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| (add-hook 'c-mode-common-hook | (add-hook 'c-mode-common-hook | ||||
| (lambda () | (lambda () | ||||
| ;; why c-basic-offset in k&r style defaults to 5 ??? | ;; why c-basic-offset in k&r style defaults to 5 ??? | ||||
| (defvar-set c-basic-offset 4) | |||||
| (defvar-set indent-tabs-mode nil) | |||||
| (set-variable 'c-basic-offset 4) | |||||
| (set-variable 'indent-tabs-mode nil) | |||||
| ;; (set-face-foreground 'font-lock-keyword-face "blue") | ;; (set-face-foreground 'font-lock-keyword-face "blue") | ||||
| (c-toggle-hungry-state -1) | (c-toggle-hungry-state -1) | ||||
| ;; (and (require 'gtags nil t) | ;; (and (require 'gtags nil t) | ||||
| @@ -1244,7 +1232,7 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| ))) | ))) | ||||
| (eval-after-load "js" | (eval-after-load "js" | ||||
| (defvar-set js-indent-level 2)) | |||||
| (set-variable 'js-indent-level 2)) | |||||
| (add-to-list 'interpreter-mode-alist | (add-to-list 'interpreter-mode-alist | ||||
| '("node" . js-mode)) | '("node" . js-mode)) | ||||
| @@ -1302,20 +1290,20 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| (lambda () | (lambda () | ||||
| (view-mode 1) | (view-mode 1) | ||||
| (setq truncate-lines nil))) | (setq truncate-lines nil))) | ||||
| (defvar-set Man-notify-method (if window-system | |||||
| 'newframe | |||||
| 'aggressive)) | |||||
| (set-variable 'Man-notify-method (if window-system | |||||
| 'newframe | |||||
| 'aggressive)) | |||||
| (defvar-set woman-cache-filename (expand-file-name (concat user-emacs-directory | |||||
| "woman_cache.el"))) | |||||
| (set-variable 'woman-cache-filename (expand-file-name (concat user-emacs-directory | |||||
| "woman_cache.el"))) | |||||
| (defalias 'man 'woman) | (defalias 'man 'woman) | ||||
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||||
| ;; python | ;; python | ||||
| (when (autoload-eval-lazily 'python '(python-mode)) | (when (autoload-eval-lazily 'python '(python-mode)) | ||||
| (defvar-set python-python-command (or (executable-find "python3") | |||||
| (executable-find "python"))) | |||||
| (set-variable 'python-python-command (or (executable-find "python3") | |||||
| (executable-find "python"))) | |||||
| ;; (defun my-python-run-as-command () | ;; (defun my-python-run-as-command () | ||||
| ;; "" | ;; "" | ||||
| ;; (interactive) | ;; (interactive) | ||||
| @@ -1395,7 +1383,7 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| ;; (setq term-ansi-default-program shell-file-name) | ;; (setq term-ansi-default-program shell-file-name) | ||||
| (add-hook 'term-setup-hook | (add-hook 'term-setup-hook | ||||
| (lambda () | (lambda () | ||||
| (defvar-set term-display-table (make-display-table)))) | |||||
| (set-variable 'term-display-table (make-display-table)))) | |||||
| (add-hook 'term-mode-hook | (add-hook 'term-mode-hook | ||||
| (lambda () | (lambda () | ||||
| (defvar term-raw-map) | (defvar term-raw-map) | ||||
| @@ -1471,8 +1459,8 @@ IF OK-IF-ALREADY-EXISTS is true force download." | |||||
| ) | ) | ||||
| ;; (global-set-key "\C-x\C-b" 'bs-show) | ;; (global-set-key "\C-x\C-b" 'bs-show) | ||||
| (defalias 'list-buffers 'bs-show) | (defalias 'list-buffers 'bs-show) | ||||
| (defvar-set bs-default-configuration "files-and-terminals") | |||||
| (defvar-set bs-default-sort-name "by nothing") | |||||
| (set-variable 'bs-default-configuration "files-and-terminals") | |||||
| (set-variable 'bs-default-sort-name "by nothing") | |||||
| (add-hook 'bs-mode-hook | (add-hook 'bs-mode-hook | ||||
| (lambda () | (lambda () | ||||
| ;; (setq bs-default-configuration "files") | ;; (setq bs-default-configuration "files") | ||||
| @@ -1859,7 +1847,7 @@ the list." | |||||
| (put 'dired-find-alternate-file 'disabled nil) | (put 'dired-find-alternate-file 'disabled nil) | ||||
| ;; when using dired-find-alternate-file | ;; when using dired-find-alternate-file | ||||
| ;; reuse current dired buffer for the file to open | ;; reuse current dired buffer for the file to open | ||||
| (defvar-set dired-ls-F-marks-symlinks t) | |||||
| (set-variable 'dired-ls-F-marks-symlinks t) | |||||
| (when (safe-require-or-eval 'ls-lisp) | (when (safe-require-or-eval 'ls-lisp) | ||||
| (setq ls-lisp-use-insert-directory-program nil) ; always use ls-lisp | (setq ls-lisp-use-insert-directory-program nil) ; always use ls-lisp | ||||
| @@ -1869,10 +1857,10 @@ the list." | |||||
| '("%Y-%m-%d %H:%M" | '("%Y-%m-%d %H:%M" | ||||
| "%Y-%m-%d "))) | "%Y-%m-%d "))) | ||||
| (defvar-set dired-dwim-target t) | |||||
| (defvar-set dired-isearch-filenames t) | |||||
| (defvar-set dired-hide-details-hide-symlink-targets nil) | |||||
| (defvar-set dired-hide-details-hide-information-lines nil) | |||||
| (set-variable 'dired-dwim-target t) | |||||
| (set-variable 'dired-isearch-filenames t) | |||||
| (set-variable 'dired-hide-details-hide-symlink-targets nil) | |||||
| (set-variable 'dired-hide-details-hide-information-lines nil) | |||||
| ;; (add-hook 'dired-after-readin-hook | ;; (add-hook 'dired-after-readin-hook | ||||
| ;; 'my-replace-nasi-none) | ;; 'my-replace-nasi-none) | ||||
| @@ -1976,7 +1964,7 @@ Optional prefix ARG says how many lines to unflag; default is one line." | |||||
| (autoload-eval-lazily 'eshell nil | (autoload-eval-lazily 'eshell nil | ||||
| (defvar-set eshell-banner-message (format "Welcome to the Emacs shell | |||||
| (set-variable 'eshell-banner-message (format "Welcome to the Emacs shell | |||||
| %s | %s | ||||
| C-x t to toggling emacs-text-mode | C-x t to toggling emacs-text-mode | ||||
| @@ -2131,21 +2119,21 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." | |||||
| (setq eshell-history-index nil)) | (setq eshell-history-index nil)) | ||||
| ad-do-it)) | ad-do-it)) | ||||
| (defvar-set eshell-directory-name (concat user-emacs-directory | |||||
| (set-variable 'eshell-directory-name (concat user-emacs-directory | |||||
| "eshell/")) | "eshell/")) | ||||
| (defvar-set eshell-term-name "eterm-color") | |||||
| (defvar-set eshell-scroll-to-bottom-on-input t) | |||||
| (defvar-set eshell-cmpl-ignore-case t) | |||||
| (defvar-set eshell-cmpl-cycle-completions nil) | |||||
| (defvar-set eshell-highlight-prompt nil) | |||||
| (set-variable 'eshell-term-name "eterm-color") | |||||
| (set-variable 'eshell-scroll-to-bottom-on-input t) | |||||
| (set-variable 'eshell-cmpl-ignore-case t) | |||||
| (set-variable 'eshell-cmpl-cycle-completions nil) | |||||
| (set-variable 'eshell-highlight-prompt nil) | |||||
| (if (eq system-type 'darwin) | (if (eq system-type 'darwin) | ||||
| (defvar-set eshell-ls-initial-args '("-hCFG") | |||||
| (defvar-set eshell-ls-initial-args '("-hCFG" | |||||
| (set-variable 'eshell-ls-initial-args '("-hCFG") | |||||
| (set-variable 'eshell-ls-initial-args '("-hCFG" | |||||
| "--color=auto" | "--color=auto" | ||||
| "--time-style=long-iso")) ; "-hF") | "--time-style=long-iso")) ; "-hF") | ||||
| )) | )) | ||||
| (defvar-set eshell-prompt-function | |||||
| (set-variable 'eshell-prompt-function | |||||
| 'my-eshell-prompt-function) | 'my-eshell-prompt-function) | ||||
| (defvar eshell-last-command-status) | (defvar eshell-last-command-status) | ||||