; -*- lisp -*- (defun taglibro-update() (interactive) (save-buffer-dialog) (call-process "sh /virtual/lowreal/taglibro.sh" :exec-directory "D:\\virtual\\lowreal" :no-std-handles t)) (global-set-key '(#\C-c #\C-c) 'taglibro-update) (defun lftp-mirror-lowreal() (interactive) (save-buffer-dialog) (call-process "sh /virtual/lowreal/lowreal.net.sh" :exec-directory "D:\\virtual\\lowreal\\public_html\\lowreal.net" :no-std-handles t)) (global-set-key '(#\C-b #\C-b) 'lftp-mirror-lowreal) ; 文字コード (setq *default-fileio-encoding* *encoding-utf8n*) ; 改行コード (setq *default-eol-code* *eol-lf*) (setq-default *clipboard-char-encoding* *encoding-utf16*) ;関連付け設定 ;lisp に正規表現リテラルはないので、正規表現も文字列として書く。 ;正規表現のメタ文字はエスケープする。 ;(pushnew '("\\.xyzzy$" . lisp-mode) *auto-mode-alist* :test 'equal) (pushnew '("\\.\\(body\\|svg\\|xul\\|rdf\\|xsl\\|rss\\|html\\|txt\\|opml\\)$" . xml-mode) *auto-mode-alist* :test 'equal) ; モードごとの行コメント設定 (setq line-comment-string '((lisp-mode . ";") (ruby-mode . "#") (perl-mode . "#") (c-mode . "//") (c++-mode . "//"))) ;対応するカッコにいちいち飛ばない。 ;(setq *show-matched-parenthesis* nil) (in-package "user") ; bnf-mode (require "bnf-mode") (pushnew '("\\.[ae]?bnf$" . bnf-mode) *auto-mode-alist* :test 'equal) ; 前の行の空白状態を保持するように。 (defun indent-relative () (interactive "*") (delete-horizontal-spaces) (insert (save-excursion (goto-bol) (skip-chars-backward " \t\n") (goto-bol) (looking-at "^[ \t#]*") (buffer-substring (match-beginning 0) (match-end 0))))) (require "racc-mode") (require "io-mode") (push '("\\.io$" . io-mode) *auto-mode-alist*) ; リモートファイルのパーミッション対策 (setq backup-by-copying :remote)