|
@@ -331,6 +331,7 @@ |
|
|
(font-spec :family (nth 2 list) :size (nth 3 list)))) ; font spec is available in emacs23 and later, cannot used in emacs22 |
|
|
(font-spec :family (nth 2 list) :size (nth 3 list)))) ; font spec is available in emacs23 and later, cannot used in emacs22 |
|
|
;; (my-set-ascii-and-jp-font-with-size '("dejavu sans mono" 90 "takaogothic" 13)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("dejavu sans mono" 90 "takaogothic" 13)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("dejavu sans mono" 100 "takaogothic" 14)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("dejavu sans mono" 100 "takaogothic" 14)) |
|
|
|
|
|
;; (my-set-ascii-and-jp-font-with-size '("dejavu sans mono" 100 "ms gothic" 14)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("monaco" 75 "takaogothic" 11)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("monaco" 75 "takaogothic" 11)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("monaco" 90 "takaogothic" 13)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("monaco" 90 "takaogothic" 13)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("ProggyCleanTTSZ" 120 "takaogothic" 11)) |
|
|
;; (my-set-ascii-and-jp-font-with-size '("ProggyCleanTTSZ" 120 "takaogothic" 11)) |
|
@@ -801,32 +802,12 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." |
|
|
t) |
|
|
t) |
|
|
(require 'multi-term nil t)) |
|
|
(require 'multi-term nil t)) |
|
|
|
|
|
|
|
|
(defun my-term () |
|
|
|
|
|
"" |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(if (require 'multi-term nil t) |
|
|
|
|
|
(multi-term) |
|
|
|
|
|
(ansi-term "/bin/bash"))) |
|
|
|
|
|
|
|
|
|
|
|
(defvar my-frame-term-plist nil) |
|
|
|
|
|
(setplist my-frame-term-plist nil) |
|
|
|
|
|
(defun my-execute-or-find-term () |
|
|
|
|
|
"" |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(let* ((buf (get 'my-frame-term-plist (selected-frame)))) |
|
|
|
|
|
(if (and buf |
|
|
|
|
|
(buffer-name buf)) |
|
|
|
|
|
(switch-to-buffer buf) |
|
|
|
|
|
(put 'my-frame-term-plist |
|
|
|
|
|
(selected-frame) |
|
|
|
|
|
(my-term))))) |
|
|
|
|
|
|
|
|
|
|
|
;; http://d.hatena.ne.jp/goinger/20100416/1271399150 |
|
|
;; http://d.hatena.ne.jp/goinger/20100416/1271399150 |
|
|
;; (setq term-ansi-default-program shell-file-name) |
|
|
;; (setq term-ansi-default-program shell-file-name) |
|
|
(add-hook 'term-setup-hook (lambda () |
|
|
(add-hook 'term-setup-hook (lambda () |
|
|
(setq term-display-table (make-display-table)))) |
|
|
(setq term-display-table (make-display-table)))) |
|
|
(add-hook 'term-mode-hook (lambda () |
|
|
(add-hook 'term-mode-hook (lambda () |
|
|
(unless (memq (current-buffer) (and (require 'multi-term nil t) ; current buffer is not multi-term buffer |
|
|
|
|
|
|
|
|
(unless (memq (current-buffer) (and (featurep 'multi-term) ; current buffer is not multi-term buffer |
|
|
(multi-term-list))) |
|
|
(multi-term-list))) |
|
|
;; (define-key term-raw-map "\C-q" 'move-beginning-of-line) |
|
|
;; (define-key term-raw-map "\C-q" 'move-beginning-of-line) |
|
|
;; (define-key term-raw-map "\C-r" 'term-send-raw) |
|
|
;; (define-key term-raw-map "\C-r" 'term-send-raw) |
|
@@ -1453,9 +1434,9 @@ Optional prefix ARG says how many lines to unflag; default is one line." |
|
|
;; (goto-line line)) |
|
|
;; (goto-line line)) |
|
|
;; (view-file (pop args)))))) |
|
|
;; (view-file (pop args)))))) |
|
|
|
|
|
|
|
|
(defun eshell/git (&rest args) |
|
|
|
|
|
"" |
|
|
|
|
|
(eshell-parse-arguments (point-at-bol) (point-at-eol))) |
|
|
|
|
|
|
|
|
;; (defun eshell/git (&rest args) |
|
|
|
|
|
;; "" |
|
|
|
|
|
;; (eshell-parse-arguments (point-at-bol) (point-at-eol))) |
|
|
|
|
|
|
|
|
(defun eshell/o (&optional file) |
|
|
(defun eshell/o (&optional file) |
|
|
(my-x-open (or file "."))) |
|
|
(my-x-open (or file "."))) |
|
@@ -1578,7 +1559,8 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." |
|
|
("ut" "slogin 03110414@un001.ecc.u-tokyo.ac.jp") |
|
|
("ut" "slogin 03110414@un001.ecc.u-tokyo.ac.jp") |
|
|
("aptin" "sudo apt-get install") |
|
|
("aptin" "sudo apt-get install") |
|
|
("u" "uname") |
|
|
("u" "uname") |
|
|
("eless" "cat >>> (with-current-buffer (get-buffer-create \"*eshell output\") (erase-buffer) (setq buffer-read-only nil) (current-buffer)); (view-buffer (get-buffer \"*eshell output*\"))"))) |
|
|
|
|
|
|
|
|
("eless" "cat >>> (with-current-buffer (get-buffer-create \"*eshell output\") (erase-buffer) (setq buffer-read-only nil) (current-buffer)); (view-buffer (get-buffer \"*eshell output*\"))") |
|
|
|
|
|
("g" "git"))) |
|
|
(add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer) |
|
|
(add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer) |
|
|
(apply 'eshell/addpath exec-path) |
|
|
(apply 'eshell/addpath exec-path) |
|
|
(set (make-variable-buffer-local 'scroll-margin) 0) |
|
|
(set (make-variable-buffer-local 'scroll-margin) 0) |
|
@@ -1692,13 +1674,36 @@ when SEC is nil, stop auto save if enabled." |
|
|
(defun my-execute-terminal () |
|
|
(defun my-execute-terminal () |
|
|
"" |
|
|
"" |
|
|
(interactive) |
|
|
(interactive) |
|
|
(if window-system |
|
|
|
|
|
|
|
|
(if (and window-system |
|
|
|
|
|
(not (eq window-system 'w32))) |
|
|
(let ((process-environment (cons "TERM=xterm" process-environment))) |
|
|
(let ((process-environment (cons "TERM=xterm" process-environment))) |
|
|
(start-process "terminal" |
|
|
(start-process "terminal" |
|
|
nil |
|
|
nil |
|
|
my-desktop-terminal)) |
|
|
my-desktop-terminal)) |
|
|
(my-execute-or-find-term))) |
|
|
(my-execute-or-find-term))) |
|
|
|
|
|
|
|
|
|
|
|
(defun my-term () |
|
|
|
|
|
"" |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(if (eq window-system 'w32) |
|
|
|
|
|
(eshell t) |
|
|
|
|
|
(if (featurep 'multi-term) |
|
|
|
|
|
(multi-term) |
|
|
|
|
|
(ansi-term "/bin/bash")))) |
|
|
|
|
|
|
|
|
|
|
|
(defvar my-frame-term-plist nil) |
|
|
|
|
|
(setplist my-frame-term-plist nil) |
|
|
|
|
|
(defun my-execute-or-find-term () |
|
|
|
|
|
"" |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(let* ((buf (get 'my-frame-term-plist (selected-frame)))) |
|
|
|
|
|
(if (and buf |
|
|
|
|
|
(buffer-name buf)) |
|
|
|
|
|
(switch-to-buffer buf) |
|
|
|
|
|
(put 'my-frame-term-plist |
|
|
|
|
|
(selected-frame) |
|
|
|
|
|
(my-term))))) |
|
|
|
|
|
|
|
|
(defun my-format-time-string (&optional time) |
|
|
(defun my-format-time-string (&optional time) |
|
|
"" |
|
|
"" |
|
|
(let ((system-time-locale "C")) |
|
|
(let ((system-time-locale "C")) |
|
@@ -2001,7 +2006,7 @@ this is test, does not rename files" |
|
|
"" |
|
|
"" |
|
|
(mapcar (lambda (path) |
|
|
(mapcar (lambda (path) |
|
|
(add-to-list 'exec-path (expand-file-name path))) |
|
|
(add-to-list 'exec-path (expand-file-name path))) |
|
|
args) |
|
|
|
|
|
|
|
|
(reverse args)) |
|
|
(setenv "PATH" |
|
|
(setenv "PATH" |
|
|
(mapconcat 'convert-standard-filename |
|
|
(mapconcat 'convert-standard-filename |
|
|
exec-path |
|
|
exec-path |
|
|