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 e2wm-frame-size-save () | |
(interactive) | |
(let ((file "~/.emacs.d/framesize.el") | |
(width (int-to-string (frame-parameter nil 'width))) | |
(height (int-to-string (frame-parameter nil 'height))) | |
(top (int-to-string (frame-parameter nil 'top))) | |
(left (int-to-string (frame-parameter nil 'left))) | |
buf beg line init-line) | |
(if (get-file-buffer (expand-file-name file)) | |
(setq buf (get-file-buffer (expand-file-name 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
class Foo(object): | |
_d = {} | |
def __init__(self, *names): | |
for name in names: | |
self.add_property(name, name) | |
def add_property(self, name, value): | |
self._d[name] = value | |
def getter(self, value): |
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
class Foo: | |
def __init__(self, *names): | |
for name in names: | |
def getter(name): | |
def _getter(self): | |
return "[[ {0} ]]".format(name) | |
return _getter | |
setattr(Foo, name, property(fget=getter(name))) | |
foo = Foo("foo", "bar", "baz") |
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
class Foo(object): | |
def __init__(self, *names): | |
self._d = {} | |
for name in names: | |
self.add_property(name, name) | |
def add_property(self, name, default): | |
self._d[name] = default | |
if not hasattr(Foo, name): | |
setattr(Foo, name, self._add_property(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
import new | |
class myclassmethod(object): | |
def __init__(self, func): | |
self.func = func | |
self._first = True | |
def __get__(self, instance, klass): | |
if self._first: |
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
diff --git keysnail/plugins/K2Emacs.ks.js keysnail/plugins/K2Emacs.ks.js | |
index 122d32a..31dd6bc 100644 | |
--- keysnail/plugins/K2Emacs.ks.js | |
+++ keysnail/plugins/K2Emacs.ks.js | |
@@ -284,7 +284,7 @@ var ucjs_ExternalEditor = { | |
var editorFile; | |
var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"] | |
.getService(Components.interfaces.nsIXULRuntime); | |
- if ("Darwin" == xulRuntime.OS) | |
+ if ("Darwin" == xulRuntime.OS && editorPath.match('\.app$')) |
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 'formula' | |
class Cmigemo < Formula | |
url 'http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip' | |
homepage 'http://www.kaoriya.net/software/cmigemo' | |
sha1 '25e279c56d3a8f1e82cbfb3526d1b38742d1d66c' | |
depends_on 'nkf' | |
def patches |
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 'formula' | |
class Apel < Formula | |
url 'http://kanji.zinbun.kyoto-u.ac.jp/~tomo/lemi/dist/apel/apel-10.8.tar.gz' | |
homepage 'http://kanji.zinbun.kyoto-u.ac.jp/~tomo/elisp/APEL/' | |
md5 '20b82300094b4377e1fb74d83ebbd972' | |
depends_on 'emacs' | |
def install |
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 'formula' | |
class Flim < Formula | |
url 'http://www.kanji.zinbun.kyoto-u.ac.jp/~tomo/comp/emacsen/lisp/flim/flim-1.14/flim-1.14.9.tar.gz' | |
homepage 'http://kanji.zinbun.kyoto-u.ac.jp/~tomo/elisp/FLIM/' | |
md5 '3dca42e2a1af4b089bb3f177bcf9321b' | |
depends_on 'emacs' | |
depends_on 'apel' |
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 'formula' | |
class Semi < Formula | |
url 'http://kanji.zinbun.kyoto-u.ac.jp/~tomo/lemi/dist/semi/semi-1.14-for-flim-1.14/semi-1.14.6.tar.gz' | |
homepage 'http://www.kanji.zinbun.kyoto-u.ac.jp/~tomo/elisp/SEMI/' | |
md5 '22d735fa218c8c6268cd2c9395cd837b' | |
depends_on 'emacs' | |
depends_on 'apel' | |
depends_on 'flim' |
OlderNewer