Source of Nothingness - xyzzy"

* Menu

[[About:self:AboutPage.txt]] | [[Profile:http://iddy.jp/profile/southly/]] | [[まとめ:self:1163859357.txt]] | [[オリジナル:http://ninjinix.x0.com/rn/]] | [[xyzzy:http://raido.sakura.ne.jp/southly/xyzzy/site-lisp/]] | [[あんてな:http://i-know.jp/southly/listall]] | [[■:http://raido.sakura.ne.jp/southly/lisp/ni/view.lisp]] | [[buzz:http://www.google.com/profiles/southly#buzz]]

* xyzzy : WSHでxyzzy起動

の情報をまとめてみる。

まず起動用のスクリプト。起動時にやることは
// xyzzy.js
var shell  = WScript.CreateObject("Wscript.Shell");
var fs     = WScript.CreateObject("Scripting.FileSystemObject");
var env = shell.Environment("PROCESS");
var dir = env("TMP") + "\\xyzzy";
var path = fs.GetParentFolderName(WScript.ScriptFullName);

if (! fs.FolderExists(dir)) {
  fs.CreateFolder(dir);
}

env("XYZZYHOME") = path;
env("XYZZYCONFIGPATH") = dir;
if (fs.FileExists(path + "\\usr\\xyzzy.ini")) {
  fs.CopyFile(path + "\\usr\\xyzzy.ini", dir + "\\xyzzy.ini");
}
if (fs.FileExists(path + "\\usr\\.xyzzy.history")) {
  fs.CopyFile(path + "\\usr\\.xyzzy.history", dir + "\\.xyzzy.history");
}

shell.Exec("xyzzy -image " + dir + "\\xyzzy.dump");

一度起動した後のことは考えていませんので注意。

さらに、
をやっておくべきでしょう。
(setq lisp::*documentation-path*
      (merge-pathnames "XYZZYDOC"
                       (directory-namestring (si:dump-image-path))))
(delete-hook '*kill-xyzzy-hook* 'ed::save-history-file)
(add-hook '*kill-xyzzy-hook*
          #'(lambda ()
              (ed::save-history-file)
              (let ((ini (merge-pathnames "xyzzy.ini" (user-config-path)))
                    (his (merge-pathnames ".xyzzy.history" (user-config-path))))
                (copy-file ini (merge-pathnames "usr/xyzzy.ini" (si:system-root)) :if-exists :overwrite :if-access-denied :skip)
                (copy-file his (merge-pathnames "usr/.xyzzy.history" (si:system-root)) :if-exists :overwrite :if-access-denied :skip)
                (delete-file ini :if-does-not-exist :skip :if-access-denied :skip)
                (delete-file his :if-does-not-exist :skip :if-access-denied :skip)
                (delete-file (si:dump-image-path) :if-does-not-exist :skip :if-access-denied :skip)
                (delete-file (merge-pathnames "XYZZYDOC" (user-config-path)) :if-does-not-exist :skip :if-access-denied :skip)))
          t)
ただ、*kill-xyzzy-hook*の実行よりも後にxyzzy.iniへ書き込まれる設定があるため、xyzzy.iniの削除は完全ではありません。

煮るなり焼くなりご自由に。
[[(ReadMore...) index.rb?1154158495.txt]]

* xyzzy lisp : format ~\n(改行)

(format nil "xy~
   zzy")
"xyzzy"
(format nil "xy~:
   zzy")
"xy   zzy"

(format nil "xy~@
   zzy")
"xy
zzy"