夕やけだんだんのノラネコたち

月1回ぐらいは会いにいっているネコたち.
昼過ぎに着いたが日差しが強く,ネコたちも暑いのがイヤなのか,まだだんだんにはいなかった.しばらく近所を廻ってから夕方もどるといつもの場所(TORIYAさんの入り口)に5匹が集合,休日の散策客たちになぜられていた.

「シマ」(もどき)というのだそうだ

夕やけだんだん

firefox3用deliciousアドオン

firefox3 が速くなった(というか他のブラウザなみになった?)のは大歓迎だったけど,firefox2用アドオン(20個ほど)のうち7個がまだ使えず困っていた.

他のはともかくdeliciousのアドオンが使えないことにゃ,仕事にならない.しかたなくこれまでfirefox3新機能のsmart bookmarkでがまんしていたが,ふとdeliciousサイトへ行くとfirefox3用アドオンがベータで利用可能とのアナウンス,なんの迷いもなく即インストールし,とりあえず満足とあいなりました.

Gosling Emacs をきっかけに Emacsian になった

GNU版のEmacsを使う前はUnipress Emacs(Gosmacs)を使っていました.ホームディレクトリにその頃の.emacs_pro(GNU版でいうところの.emacs)が残っていたので,しばらく眺めてしまった.何の役にも立ちませんけど,GNU Emacs Lispとの違いの感触にと,以下に引用します.

GosmacsはJames GoslingUnix上ではじめて実装したEmacsです.その後GoslingはそれをUnipressへ売ったそうで,ボクはそのバージョンを4.2BSD上で使っていました.当時プリントアウトしたマニュアルも押入れのどっかにあります.ヌーの絵でおなじみのGNUですが,Unipress版のマニュアルの表紙には一角獣が描かれています.

エディタ拡張用言語であるMock lispはその名が示す通りいわゆるLispではなく,Lisp風シンタクスのプログラミング言語でした.なにより「cons cell」がない,というのが最大の特長でした.car/cdr/consはLispの大前堤なので…

同時期にはCCA Emacsというのも存在し職場のUnixにもありましたが,その頃の先輩の勧めもあってそちらはほとんど触っておらず,Unipress版を主体に使っていました.後にUnipress版からGNU版(Nemacs)へ移行した時はキーバインドの微妙な違いに大いに混乱した憶えがありますが,GNU版のmodelineの感じなんかはUnipress版よりCCA版のほうが似ているなぁと感じました.

また同じ職場にはSymbolicsマシンもあって,そこではZmacs(ジーマックスと発音)というZetaLispで書かれたEmacsもありました.このマシンは当時でいうワークステーションタイプ(マウス,ビットマップディスプレイ)のLispマシンで,業務の関係でこちらもほとんど触れる機会はありませんでしたが,キーボードのモディファイアが,Control, Meta, Super, Hyperと4つもあり(もちろんShift,Escapeもある),Emacsian大喜び(?)のキーボードだった気がします.またすでにマウスやウィンドウで編集作業ができてました.

なお,Unix自体を使いはじめたのもその頃でしたが,テキストエディタについてはemacsとviを同時に勉強し始めました.現在はプログラミングなどはemacsが主体ですが,スーパーユーザの時はviを使います.

gosmacsの.emacs_pro
; ================================================================
		       ; Emacs変数の設定
; ================================================================

(setq-default paren-flash-interval	10)
(setq-default interactive-shell-prompt-re   "^.*[]$%#] \\|^-> \\|^<[0-9]*>: ")
(setq-default lisp-double-defun-paren	    0)
(setq-default case-fold-search	1)


(setq	default-mode-line-format
	"%S%[%b%*(%L %p %m%<o OverWriting%>%<r ReadOnly%>%<a Abbrev%>)%<s %f%> %t %M%<d Defining%>%]")

(setq	ctlchar-with-^			1)
(setq	unlink-checkpoint-files		1)	; default 0
(setq	quick-redisplay			1)	; default 0
(setq	silently-kill-processes		1)	; default 0
(setq	show-time-in-mode-line		1)	; default 0
(setq	show-line-number-in-mode-line	1)	; default 0
(setq	enable-description-editing	1)


(declare-global
    private-database-directory
    loadst-options
    &FOLDER @storage-folder @log-folder)

(setq	loadst-options		"-a -x 30")
(setq	private-database-directory (expand-file-name "~/databases/emacs"))

; Variables for "rmail.ml" (not for berkmail)
(setq	&FOLDER			"~/folder")
;(setq	@storage-folder		(expand-file-name "~/folder/general"))
;(setq	@log-folder		"+misc")

; ================================================================
		 ; Emacsライブラリのロ−ド
; ================================================================

(load	"info")
(load	"window")
(load	"killring")
(load	"incr-search")
(load	"tags")
(load	"paren")
(load	"markring")
(load	"compat-2.10")

; ================================================================
; 		Emacsライブラリの自動ロ−ド指定
; ================================================================

(autoload	"one-line-buffer-list"	"buff")
(autoload	"buffer-edit"		"buffer-edit")
(autoload	"dired"	    		"dired")
(autoload	"Occurrences"		"occur")
(autoload	"copy-region-to-file"	"writeregion")
(autoload	"abbrev-word-in-buffer"	"abbrev")
(autoload	"clock"			"clock")
(autoload	"edit-variable"		"editvar")
(autoload	"lisp"			"process")
(autoload	"expand-inline-filename"	"process")
(autoload	"rmail"			"rmail")
(autoload	"rmail-com"		"rmail")
(autoload	"smail"			"smail")
(autoload	"manual-entry"		"newman")
(autoload	"pascal-mode"		"pascal1")
(autoload	"whist"			"whist")
;(autoload	"nroff-mode"		"nroff")
(autoload	"lint"			"lint")
(autoload	"aton"			"aton")
(autoload	"read-only"		"readonly")
(autoload	"tag-visit-function"	"vi-tags")
(autoload	"tag-goto"		"vi-tags")
(autoload	"dirs"			"pwd")
(autoload	"pushd"			"pwd")
(autoload	"box-region"		"boxcomments")
(autoload	"find-token"		"token")
(autoload	"grep-token"		"token")
(autoload	"grep-function-call"	"token")
(autoload	"join-lines"		"indent")

; ================================================================
		; コマンドの自動起動指定
; ================================================================

(auto-execute	"elec-mlisp-mode"	"*.ml")
(auto-execute	"elec-mlisp-mode"	"*_pro")
(auto-execute	"elec-lisp-mode"	"*.l")
(auto-execute	"elec-lisp-mode"	"*.s")
(auto-execute	"elec-c-mode"		"*.c")
(auto-execute	"elec-c-mode"		"*.h")
(auto-execute	"nroff-mode"		"*.n")
(auto-execute	"nroff-mode"		"*.ms")
(auto-execute	"nroff-mode"		"tmac.*")

; ================================================================
	       ; キ−バインディングの変更
; ================================================================

;(bind-to-key	"previous-page"				"\^C")
(bind-to-key	"reverse-incremental-re-search"		"\^R")
(bind-to-key	"incremental-re-search"			"\^S")

(bind-to-key	"abbrev-word-in-buffer"			"\^X\^A")
(bind-to-key	"save-recursive-edit"			"\^X\^C")
(bind-to-key	"shrink-window-half"			"\^X\^Z")

(bind-to-key	"aton"					"\^XL")

(bind-to-key	"add-tag"				"\^Xa")
(bind-to-key	"expand-inline-filename"		"\^Xf")
(bind-to-key	"goto-tag"				"\^Xg")
(bind-to-key	"join-lines"				"\^Xj")
(bind-to-key	"delete-buffer"				"\^Xk")
(bind-to-key	"shell"					"\^Xs")
(bind-to-key	"visit-function"			"\^Xv")
(bind-to-key	"expand-mlisp-word"			"\^Xw")
(bind-to-key	"enlarge-window-twice"			"\^Xz")

(bind-to-key	"line-to-bottom-of-window"		"\e@")
(bind-to-key	"append-region-to-buffer"		"\eA")
(bind-to-key	"buffer-edit"				"\eB")
(bind-to-key	"copy-region-to-buffer"			"\eC")
(bind-to-key	"dired"					"\eD")
(bind-to-key	"copy-line-to-next-window"		"\eL")

(bind-to-key	"previous-window"			"\eOA")
(bind-to-key	"next-window"				"\eOB")
(bind-to-key	"next-page"				"\eOC")
(bind-to-key	"previous-page"				"\eOD")

(bind-to-key	"copy-region-to-next-window"		"\eR")

(bind-to-key	"manual-entry"				"\em")
(bind-to-key	"re-query-replace-string"		"\eq")

(global-rebind	"exit-recursive-edit"	"exit-recursive-edit"	"\e\^C")


; ================================================================
		  ; その他の関数の実行
; ================================================================

(error-occurred 
    (extend-database-search-list 
	"info"		(concat private-database-directory "/info"))
    (extend-database-search-list
	"describe"	(concat private-database-directory "/describe"))
    (extend-database-search-list
	"describe"	".describe"))

(quietly-read-abbrev-file	".abbrev")

;(modify-syntax-entry "w    _")
;(clock)

; ================================================================
; 				関数定義
; ================================================================

(defun (next-page-nicely
    (provide-prefix-argument (- (window-height)
				1)(scroll-one-line-up))))

(defun (previous-page-nicely
    (provide-prefix-argument (- (window-height) 1)(scroll-one-line-down))))


(defun (#elec-c-mode-init-hook 
    (setq left-margin 4)
    (setq use-comment-continuation 1)
    (setq paren-flash-interval 10)
    (setq elec-c-indent-style 2)
    (set-paragraph-delimiters "^\\w.*){*$")
    (local-bind-to-key	"next-c-function"	"\e]")
    (local-bind-to-key 	"previous-c-function"	"\e[")))

(defun (lisp-hook
    (setq scroll-step 1)))

(defun (shell-hook
    (setq scroll-step 1)))

(defun (#elec-lisp-mode-hook
    (setq needs-checkpointing 1)
    (setq paren-flash-interval 10)
    (visit-tag-table "~/lisp/.tags")))

(defun (#elec-mlisp-mode-init-hook
    (setq paren-flash-interval 10)))

(defun (load-dbman
    (load "dbman")
    (setq db-dir private-database-directory)
    (novalue)))

(defun (mail-com
    (argc) (cd (expand-file-name "~/folder")) (mail)))
    
(defun (move-region-to-next-window 
    (kill-region)
    (next-window)
    (unkill)
    (previous-window)))

(defun (copy-region-to-next-window
    (copy-region)
    (next-window)
    (unkill)
    (previous-window)))

(defun (enlarge-window-twice
    (provide-prefix-argument 
	(if prefix-argument-provided
	    (if (= prefix-argument 0)
		(- (screen-size)
		   (* (- (number-of-windows) 1) 2)
		   (window-height)
		   1)
		prefix-argument)
	    (window-height))
	(enlarge-window))))

(defun (shrink-window-half
    (provide-prefix-argument
	(if prefix-argument-provided
	    (if (= prefix-argument 0)
		(- (window-height) 1)
		prefix-argument)
	    (/ (window-height) 2))
	(shrink-window))))

(defun (next-c-function
    (re-search-forward &paragraph-delimiters)
    (line-to-top-of-window)))

(defun (previous-c-function
    (re-search-reverse &paragraph-delimiters)
;    (backward-entire-c-function)
    (line-to-top-of-window)))

(defun (save-recursive-edit
    (save-excursion (recursive-edit))
    (novalue)))

(defun (session-entry-hook
;    (setq &startup-message-file "/private/usr/guest/sakuma/.emacs_pro")
    (#startup-insert-message)
    (insert-string "現時刻:\t\t" (current-time) " " (current-timezone) "\n")
    (insert-string "現ディレクトリ:\t" (working-directory) "\n")
    (newline)
    (setq &startup-no-message 0)))

(defun (session-exit-hook
    (temp-use-buffer "scratch")
    (insert-string (working-directory))
    (newline)
    (write-named-file (expand-file-name "~/.dirs"))
    (delete-buffer "scratch")))

(defun (edit-entry-hook
;    (local-rebind	"exit-recursive-edit"	"exit-recursive-edit"	"\e\^C")
;    (remove-local-binding "\^C")
;    (if (recursion-depth)
;	(message "再帰レベル: " (recursion-depth)))
))

(defun (edit-exit-hook
;    (if (recursion-depth)
;	(message "再帰レベル: " (recursion-depth) " 脱出"))
))

; ================================================================
;			  キーボードマクロ定義
; ================================================================

(define-string-macro	"move-line-to-next-window"	"np")
(define-string-macro	"copy-line-to-next-window"
    "\ek\ek\^Xn\^Y\^Xp")

テストヘッダ

blogspotへのテスト

はてな内のページに手動トラックバックを送信する際は、トラックバック元の記事内に送信先の記事URL(Permalink)を記述している必要があります

http://fubabz.blogspot.com/2007/08/blog-post.html