(setq default-input-method "japanese")
(setq require-final-new-line t)
(setq backup-by-copying-when-linked t)
(global-set-key "\C-xG" 'goto-line)
(setq inhibit-startup-message t)
(setq initial-scratch-message "")
(cond ((eq window-system 'x)
(define-key function-key-map [delete] [8])
(put 'delete 'ascii-character 8)
(load "term/keyswap"))
(t
(keyboard-translate ?\C-h ?\C-?)))
(defun delete-other-frames ()
(interactive)
(while (not (equal (next-frame (selected-frame)) (selected-frame)))
(delete-frame (next-frame (selected-frame)))))
(global-set-key "\C-x51" 'delete-other-frames)
(defun load-safely (f)
(if (file-readable-p f) (load f)))
(load-safely (expand-file-name "~/.mew.el"))
;; package.el
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(global-set-key "\C-h" 'backward-delete-char-untabify)
;(mac-add-ignore-shortcut '(ctl ? ))
(setq home-dir (concat "/Users/" (user-login-name)))
(setq abbreviated-home-dir (concat home-dir "\\(/\\|$\\)"))
(setenv "HOME" home-dir)
(cd home-dir)
(setq load-path (cons (expand-file-name "~/.emacs.d/lisp/") load-path))
;;; Helpers for building regexps.
(defmacro c-paren-re (re)
`(concat "\\(" ,re "\\)"))
(defmacro c-identifier-re (re)
`(concat "\\[^_]"))
(autoload 'csharp-mode "csharp-mode.elc" "C# mode" t)
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode))
(defun my-csharp-mode-hook ()
;; enable the stuff you want for C# here
(electric-pair-mode 1))
(add-hook 'csharp-mode-hook 'my-csharp-mode-hook)
(setq csharp-want-imenu nil)
(defun my-c-c++-mode-init() (setq c-basic-offset 2))
(add-hook 'c-mode-hook 'my-c-c++-mode-init)
(add-hook 'c++-mode-hook 'my-c-c++-mode-init)
(add-hook 'csharp-mode-hook 'my-c-c++-mode-init)
(add-hook 'python-mode-hook
(lambda ()
(setq indent-tabs-mode nil)
(setq python-indent 2)))
;; Edit with Emacs on Google Chrome
(add-to-list 'load-path "~/.emacs.d/elpa")
;(when (and (daemonp) (locate-library "edit-server"))
; (require 'edit-server nil t)
; (edit-server-start))
(when (locate-library "edit-server")
(require 'edit-server nil t)
(edit-server-start))
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; 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.
'(package-selected-packages (quote (csharp-mode mew edit-server))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; 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.
)
;; shell
(add-hook 'shell-mode-hook
(lambda ()
(set-buffer-process-coding-system 'utf-8-unix 'utf-8-unix)
))
(defun my-comint-init ()
(setq comint-process-echoes t))
(add-hook 'comint-mode-hook 'my-comint-init)
|