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
(progn | |
(defun tst () | |
(macrolet ((with-window-testing-buffer (lines &rest body) | |
(let ((gb (gensym))) | |
`(let ((,gb (get-buffer-create "testing"))) | |
(switch-to-buffer ,gb) | |
(erase-buffer) | |
(dotimes (_ ,lines) | |
(insert "a\n")) | |
(unwind-protect |
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
;;; http://www.emacswiki.org/emacs/anything-complete.el | |
(defun* alcs-transformer-prepend-spacer+-0 | |
(candidates source &optional (prepend (lambda (cand column) | |
(concat (make-string column ? ) | |
cand)))) | |
(let ((column (with-current-buffer anything-current-buffer | |
(save-excursion | |
(backward-char (string-width anything-complete-target)) | |
(let ((col (alcs-current-physical-column))) | |
(if (< col 0) |
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
(defun get-scores () | |
(let ((h (make-hash-table :test 'eql))) | |
(mapatoms (lambda (sym) | |
(let ((s (symbol-name sym))) | |
(unless (equal s "") | |
(if (gethash (aref s 0) h) | |
(incf (gethash (aref s 0) h)) | |
(puthash (aref s 0) 1 h)))))) | |
(let (xs) | |
(maphash (lambda (k v) |
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
(defun* my-funcall-and-eval-last-sexp (before &optional (eval-last-sexp 'eval-last-sexp)) | |
"Call 0 arg procedure BEFORE then call interactive command EVAL-LAST-SEXP." | |
(save-excursion | |
(funcall before) | |
(call-interactively eval-last-sexp))) | |
(defmacro define-my-eval-sexp* (eval-last-sexp inner-sexp inner-list) | |
(declare (indent 1)) | |
`(progn | |
(defun ,inner-sexp () | |
(interactive) |
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
--- anything-show-completion.el.orig 2009-11-11 22:10:01.705504508 +0900 | |
+++ anything-show-completion.el 2009-11-11 22:10:10.169480576 +0900 | |
@@ -245,7 +245,7 @@ (defun asc-display-function (buf) | |
(count-screen-lines | |
(window-start) | |
(point))) | |
- (- (frame-height) anything-show-completion-minimum-window-height)))))))) | |
+ (- (window-height) anything-show-completion-minimum-window-height)))))))) | |
(with-selected-window win | |
(recenter -1)) |
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
--- anything-complete.el.orig 2009-11-12 00:20:21.504232258 +0900 | |
+++ anything-complete.el 2009-11-12 00:20:43.947491221 +0900 | |
@@ -419,7 +419,11 @@ (defun alcs-transformer-prepend-spacer ( | |
(let ((column (with-current-buffer anything-current-buffer | |
(save-excursion | |
(backward-char (string-width anything-complete-target)) | |
- (alcs-current-physical-column))))) | |
+ (let ((col (alcs-current-physical-column))) | |
+ (if (< col 0) | |
+ (- (point) |
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
From b1dd9672cf42c1fe6da995cdc57783f1301a391d Mon Sep 17 00:00:00 2001 | |
From: Takeshi Banse <[email protected]> | |
Date: Wed, 6 Jan 2010 00:46:48 +0900 | |
Subject: Adapted to new code. | |
--- | |
CL バージョンがいたれりつくせりすぎます!ということをとっても実感できます>< | |
src/swank/commands/contrib/swank_arglists.clj | 12 ++++++++++++ | |
1 files changed, 12 insertions(+), 0 deletions(-) |
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
;; 裸のシンボルの値も表示させちゃおうという改悪でした。 ^^;; | |
;; (eval-after-load 'slime | |
;; '(progn | |
;; (fset 'slime-autodoc-worthwhile-p (lambda (&rest _) t)))) |
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
;; Clojure 用に slime-cursor-marker を設定しちゃいます、同時に、 | |
;; CL 用 (sbcl) に swank::+cursor-marker+ を上書きしちゃいます。 | |
(setq slime-lisp-implementations | |
`((sbcl ("sbcl") :init-function my-swank-cl-init) | |
(clojure ,(swank-clojure-cmd) :init swank-clojure-init))) | |
(eval-after-load 'slime-autodoc | |
'(progn | |
(setq slime-cursor-marker :swank/+cursor+))) | |
(eval-after-load 'slime | |
'(progn |
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
(in-package :tp) | |
;; example | |
;;; utilities | |
(defun pair* (&rest fns) | |
#'(lambda (&rest args) | |
(labels ((rec (fns acc) | |
(if (null fns) |