This file contains 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 の最後にでも書いておけば ~/*.l を全部読み込む | |
(dolist (file (directory "~/" :wild "*.l")) | |
(load-file (merge-pathnames file "~/"))) |
This file contains 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
;;; 文字コード指定を -*- coding: hoge -*- でもできるように | |
;;; .xyzzy にでも; 組み込み関数上書き注意報 | |
(defun ed::find-file-auto-encoding (filename) | |
(unwind-protect | |
(let ((encoding | |
(progn | |
(ignore-errors (insert-file-contents filename t nil 4096)) | |
(goto-char (point-min)) | |
(dolist (x *auto-encoding-alist* nil) |
This file contains 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
--- info-modoki-mode.l 2010-05-22 04:11:28.921875000 +0900 | |
+++ info-modoki-mode.l~ 2010-05-22 03:44:55.406250000 +0900 | |
@@ -227,6 +227,7 @@ | |
(defvar *imm-history-pointer* nil) | |
(defvar *imm-menu* nil) | |
+(defparameter *imm-window* nil) | |
;;; ──────────────────────────────────── ;;; | |
;;; ■ リファレンス参照 |
This file contains 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 -*- | |
;;; | |
;;; turnaround.l | |
(in-package :editor) | |
(export '(turnaround | |
turnaround-or-select-word | |
turnaround-or-self-insert)) |
This file contains 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
;;; restart-case の再起動部分を handler-case 風にする calc-lisp-indent | |
(in-package :editor) | |
(setf (get 'handler-case 'lisp-indent-handler-macro) | |
(lambda (sym) | |
(or (subtypep sym 'condition) (consp sym))) | |
(get 'restart-case 'lisp-indent-handler-macro) | |
(lambda (sym) t)) | |
(defun ed::calc-lisp-indent (opoint) |
This file contains 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
(require "condition-restart") | |
(in-package :lisp) | |
;;; | |
;;; * Condition Definitions | |
(define-condition library-condition (condition) | |
(name source-pathname compiled-pathname) |
This file contains 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
;;; setf'able な PLACE を一時的に変更して BODY を評価する | |
(defmacro letf (bindings &body body) | |
(let ((originals (mapcar (lambda (x) (gensym)) bindings))) | |
`(let (,@(mapcar (lambda (sym x) `(,sym ,(car x))) | |
originals | |
bindings)) | |
(unwind-protect | |
(progn | |
(setf ,@(mapcan #'identity bindings)) | |
,@body) |
This file contains 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
;;; struct の slot に obj.slot でアクセスする。 | |
(require "struct") | |
(require "symbol-macrolet") | |
(defun keyword (name) | |
(intern (string name) :keyword)) | |
(defun %slot-value (object slot-name) | |
(si:*slot-value object slot-name)) |
This file contains 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
;;; symbol が被ってたら、再起動で unintern とか shadow できる use-package | |
(defun %use-package-w/restart (used &optional (using *package*)) | |
(tagbody | |
#1=#:begin | |
(handler-bind | |
((simple-package-error | |
(lambda (e) | |
(let ((symbol (simple-package-error-datum2 e))) | |
(restart-case |
This file contains 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
(in-package :editor) | |
(defun find-most-left/bottom-window (&optional (start (selected-window))) | |
(if (= (count-windows) 1) | |
(selected-window) | |
(do* ((win (next-window start) (next-window win)) | |
(coord (window-coordinate win) (window-coordinate win)) | |
(most (cons start (window-coordinate start)))) | |
((eql win start) | |
(car most)) |
OlderNewer