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
;; for widen-window.el | |
(defun ewm:fix-widen-window-pre-start () | |
;; widen-window でエラーを起きないようする | |
(defadvice wlf:layout-internal (around disable-ww-mode activate) | |
(ad-deactivate-regexp "widen-window") | |
(unwind-protect | |
ad-do-it | |
(ad-activate-regexp "widen-window"))) |
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
;;; inao-mode.el --- major mode for writing inao manuscripts | |
;; Copyright (C) 2010 SAKURAI Masashi | |
;; Author: SAKURAI Masashi <m.sakurai at kiwanami.net> | |
;; Keywords: outlines, convenience | |
;; This program 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 3 of the License, or |
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
;; for kansai_emacs #0x02 | |
(require 'deferred) | |
;; ■ 基本的使い方 | |
(deferred:$ | |
(deferred:next | |
(lambda (x) (message "deferred start"))) | |
(deferred:nextc it |
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
;; HTTP POST by url-retrieve | |
;; ref: http://www.emacswiki.org/emacs/UrlPackage | |
(defun deferred:url-retrieve-post (url args &optional cbargs) | |
(lexical-let ((nd (deferred:new)) | |
(url url) (args args) | |
(cbargs cbargs) | |
buf) | |
(deferred:next | |
(lambda (x) |
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
(defun py-doc-exec () | |
(interactive) | |
(save-current-buffer | |
(let ((symbol | |
(with-syntax-table python-dotty-syntax-table (current-word))) | |
(tmpbuf (get-buffer-create "*py-doc-popup*")) | |
(enable-recursive-minibuffers t)) | |
(if (equal symbol "") (error "No symbol")) | |
(set-buffer "*py-doc-popup*") | |
(comint-redirect-send-command-to-process |
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
;;; eval-last-sexp-popup.el --- eval here | |
;; Copyright (C) 2010, 2011 SAKURAI Masashi | |
;; Author: SAKURAI Masashi <m.sakurai at kiwanami.net> | |
;; Keywords: convenience | |
;; This program 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 3 of the License, or |
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
;;; concurrent.el --- Concurrent utility functions (PLAN!) | |
;; Copyright (C) 2010 SAKURAI Masashi | |
;; Author: SAKURAI Masashi <sakurai@liza2> | |
;; Keywords: deferred, async, thread | |
;; This program 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 3 of the License, or |
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
;; generator | |
(setq fib-list nil) | |
(setq fib-gen | |
(lexical-let ((a1 0) (a2 1)) | |
(cc:generator | |
(lambda (x) (push x fib-list)) | |
(yield a1) | |
(yield a2) |
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
;; http://d.hatena.ne.jp/kiwanami/20101022/1287770278 | |
;; ■■再帰と非同期 | |
;; ■同期的に実行 | |
(defun fib (n) | |
(if (<= n 1) n | |
(+ (fib (- n 1)) | |
(fib (- n 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
;; kill-region or backward-kill-word | |
(defun kill-region-or-backward-kill-word () | |
(interactive) | |
(if (region-active-p) | |
(kill-region (point) (mark)) | |
(backward-kill-word 1))) | |
;; swap quotes |
OlderNewer