This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- Mode: Lisp; Last updated: "2007/04/07" -*- | |
;;; | |
;; This file is part of GNU Emacs. | |
;; GNU Emacs is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation; either version 2, or (at your option) | |
;; any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- Mode: Lisp; Package: EDITOR -*- | |
;;; | |
;;; This file is part of xyzzy. | |
;;; | |
(provide "abbrev") | |
(in-package "editor") | |
(export '(*encoding-iso-8bit-jp* *encoding-iso-8bit-jp-open* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/cons.h b/src/cons.h | |
index 82961bd..aeb9c86 100644 | |
--- a/src/cons.h | |
+++ b/src/cons.h | |
@@ -10,6 +10,7 @@ public: | |
}; | |
# define consp(X) typep ((X), Tcons) | |
+# define listp(X) ((X) == Qnil || consp (X)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ref. http://practical-scheme.net/gauche/man/gauche-refj_16.html#SEC18 | |
(defmacro debug-print (form) | |
`(progn | |
(format t "#?=~S~%" ',form) | |
(let ((#1=#:values (multiple-value-list ,form))) | |
(format t "#?- ~{~S~%~^#?+ ~}" #1#) | |
(values-list #1#)))) | |
(set-dispatch-macro-character #\# #\? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; detect-environment-changes | |
;; 指定したコマンド実行後に変更された環境変数を取得する | |
;; | |
;; environment | |
;; 現在のプロセスの環境変数を取得する | |
;; | |
;; system | |
;; 指定したコマンドを実行し、実行結果と実行後の環境変数を取得する | |
(defconstant +boundary+ "--- pik --- pik --- pik --- pik ---") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; save-window-excursion は多値を返さない。 #xyzzy | |
(save-window-excursion | |
(values 1 2 3)) | |
;=> 1 | |
(save-excursion | |
(values 1 2 3)) | |
;=> 1 | |
; 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 constant 引数をひとつとって、該当する定数リストをスタックにプッシュ | |
2 global_set スタックのトップをグローバル変数に設定 | |
3 global_ref グローバル変数を参照し、スタックにプッシュ | |
4 lexical_set スタックのトップをレキシカル変数に設定 | |
5 lexical_ref レキシカル変数を参照し、スタックにプッシュ | |
8 local_set スタックのトップをローカル変数に設定 | |
9 local_ref ローカル変数を参照し、スタックにプッシュ | |
10 make_closure 引数をひとつとってクロージャを作成し、スタックにプッシュ | |
11 discard スタックからポップし、値を破棄 | |
12 goto 引数をひとつとって、goto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- xyzzy -*- | |
#| | |
グローバルキーマップで[C-x RET]をプレフィックスキーに、その後 | |
ローカルキーマップで[C-x RET]にコマンドを定義するとdescribe-keyなどの | |
キーシーケンス読み込み時に最長一致のグローバルマップを(この例では)選んでしまう。 | |
※実際のコマンドでは最短一致のキーコマンドを呼び出すらしい | |
そのため、最短一致のキーを返すように修正する。 | |
【例】 |