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
(let ((max-sym t) | |
(max-len 1)) | |
(do-all-symbols (sym (list max-sym max-len)) | |
(when (< max-len (length (string sym))) | |
(setf max-sym sym max-len (length (string sym)))))) |
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
;; カーソル化の文書を分かち書きして単語を取りだす。 | |
;; あとで tiny-segmenter に取り込む。 | |
(require "tiny-segmenter") | |
(defun segment-before (&optional (point (point))) | |
(segment-at point :before t)) | |
(defun segment-after (&optional (point (point))) | |
(segment-at point :before 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
;; monday.l の置換ルールを適当に追加できるようにした。 | |
--- monday.l.orig Thu Jun 3 11:00:49 2010 | |
+++ monday.l Thu Jun 3 11:04:16 2010 | |
@@ -147,6 +147,16 @@ | |
("november" . "december") | |
("december" . "january"))) | |
+(defvar *monday-alist-list* | |
+ (list *monday-bool-alist* |
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
;; monday.l で日本語の置換に適当に対応してみた。以下も必要。 | |
;; | |
;; - http://gist.github.com/423444 | |
;; - http://gist.github.com/423449 | |
;; | |
;; == 設定 == | |
;; | |
;; (defvar *monday-weekj-alist* | |
;; '(("月曜" . "火曜") | |
;; ("火曜" . "水曜") |
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
;; フォロワーからの「いっその事 0 か 1 のみで話せばいいのに」 | |
;; という返信には「無理。。」と答えている。 | |
;; http://www.itmedia.co.jp/news/articles/1007/07/news065.html | |
;; http://twitter.com/yoichiw/status/17930186153 | |
(defun binary->string (bin-str) | |
(format nil "~{~A~}" | |
(mapcar #'(lambda (bin) | |
(code-char (parse-integer bin :radix 2))) |
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
;; 今開いているソースを GitHub で開く | |
;; xyzzy 0.2.2.235 のソース | |
(defvar *github-xyzzy-src* | |
"http://github.com/southly/xyzzy.src/blob/0.2.2.235") | |
(defun show-current-source-on-github () | |
(interactive) | |
(let ((file (get-buffer-file-name)) | |
(lineno (current-line-number))) |
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-interaction-mode: package: hoge -*- ってファイルの先頭に書いておくと | |
;; hoge パッケージ内で評価する | |
(defun eval-print-last-sexp/buffer-package () | |
(interactive "*") | |
(let* ((current-package | |
(or (save-excursion | |
(when (scan-buffer "^[ \t]*(in-package[ \t\n]+[:'\"]\\([^\")]+\\)" | |
:regexp t :reverse t) | |
(match-string 1))) |
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
;; meadow で開く | |
(defun meadow() | |
(interactive) | |
(let* ((emacs-dir (read-registry "SOFTWARE\\GNU\\Meadow\\netinstall3" "emacs_dir" :local-machine)) | |
(runmw32 (merge-pathnames "bin/RunMW32.exe" emacs-dir)) | |
(file (get-buffer-file-name (selected-buffer)))) | |
(if file | |
(call-process (format nil "~A +~A:~A ~A" | |
runmw32 (current-line-number) (current-column) file)) | |
(call-process runmw32)))) |
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
;; 拡張名を指定して Chrome Extension をファイラで開く | |
;; M-x open-chrome-extension | |
;; つづきは GitHub で! | |
;; http://github.com/miyamuko/chrome-extension-mode | |
(require "json") | |
(defun open-chrome-extension (&optional pattern) | |
(interactive "sExtension Name (Regexp): ") |
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
;; 指定したシンボルの refwiki を開く | |
(defun refwiki (symbol) | |
(interactive "SSymbol: ") | |
(shell-execute (format nil "http://xyzzy.s53.xrea.com/reference/wiki.cgi?p=~A" | |
(si:www-url-encode (string symbol) nil "0-9A-Za-z._~ ")) | |
t)) |
OlderNewer