SEARCH

Linux Install

Android

Linux Tools

Linux AV

Linux Memo

WINDOWS

PROGRAM

動画 Memo

音楽 Memo

モバイルアプリ Memo

FILE FORMAT

PROTOCOL

DEVICE

BookMark

その他


emacs22   

emacs UTF-8 対応

最新 emacs をcvsから取ってくる

export CVS_RSH=ssh
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs

make

cd emacs
./configure --without-x
make bootstrap
make 
make install

起動時に表示されるメッセージがウザい

あれー?なんか inhibit-startup が効かなくなった・・

変数かわったかなぁ…



しょうがないので /etc/bashrc にかいとくことにした

bash



色チェンジがうざい

``.emacs''

(setq make-backup-files nil)
(setq auto-save-default nil)
(setq inhibit-startup-message t)
(global-font-lock-mode 0)
;強引 NUMlock 対応
(define-key global-map [kp-f2] '(lambda () (interactive) (insert "/")))
(define-key global-map [kp-f3] '(lambda () (interactive) (insert "*")))
(define-key global-map [kp-f4] '(lambda () (interactive) (insert "-")))
(define-key global-map [kp-separator] '(lambda () (interactive) (insert "+")))
(define-key global-map [kp-decimal] '(lambda () (interactive) (insert ".")))
(define-key global-map [kp-enter] '(lambda () (interactive) (insert ",")))
(define-key global-map "\eOp" '(lambda () (interactive) (insert "0")))
(define-key global-map "\eOq" '(lambda () (interactive) (insert "1")))
(define-key global-map "\eOr" '(lambda () (interactive) (insert "2")))
(define-key global-map "\eOs" '(lambda () (interactive) (insert "3")))
(define-key global-map "\eOt" '(lambda () (interactive) (insert "4")))
(define-key global-map "\eOu" '(lambda () (interactive) (insert "5")))
(define-key global-map "\eOv" '(lambda () (interactive) (insert "6")))
(define-key global-map "\eOw" '(lambda () (interactive) (insert "7")))
(define-key global-map "\eOx" '(lambda () (interactive) (insert "8")))
(define-key global-map "\eOy" '(lambda () (interactive) (insert "9")))

;※下記の方法もあるが、+ や - がでない・・
; (load "vt-control")
;  (vt-numlock)

php-mode

install

http://sourceforge.net/project/showfiles.php?group_id=18584&package_id=13739

wget http://jaist.dl.sourceforge.net/sourceforge/php-mode/php-mode-1.2.0.tgz 
tar xzfp php-mode-1.2.0.tgz
emacs php-mode.el
(M-x emacs-lisp-byte-compile)
cp php-mode.elc /usr/local/share/emacs/xxxxx/lisp/progmodes/

.emacs

(autoload 'php-mode "php-mode" "PHPmode" t)
(setq auto-mode-alist (append
                      (list '("\\.php$" . php-mode)) auto-mode-alist))
(add-hook 'php-mode-user-hook
         '(lambda ()
            (progn
              (c-toggle-hungry-state 1)
              (setq c-basic-offset 4 indent-tabs-mode nil))))

コマンド

再インデント indent-region
 

参考

http://www.namazu.org/~satoru/diary/20041001.html
http://www.nijino.com/ari/emacs/mule-ucs.html
http://koh.s11.xrea.com/linux.html#utf-8