Skip to content

Instantly share code, notes, and snippets.

;;; Help at point
(defun kef-show-help-emacs-lisp-symbol (&optional pos) (interactive)
(save-excursion
(save-restriction
(when pos (goto-char pos))
(rlet1 symbol (intern (thing-at-point 'symbol))
(cond ((fboundp symbol)
(flet ((completing-read (&rest args) symbol))
(describe-function symbol)))
((boundp symbol)
@kenoss
kenoss / init-whitespace.el
Created August 9, 2015 07:49
My current whitespace config.
; -*- lexical-binding: t -*-
(require 'whitespace)
(require 'erfi-srfi-1)
(require 'my-init-aux)
;; see http://piyolian.blogspot.jp/2011/12/emacs-whitespace-like-jaspace.html
@kenoss
kenoss / gist:d7fb2a2f2e2fed66c45e
Last active August 29, 2015 14:23
Cycle: just-one-space, just-one-space/multi-line
;;; tmp
(require 'erfi-macros)
(defalias 'erfi:receive 'erfi%list-receive)
;;;
;; In this case, I don't use undo because undo for insert is not reliable.
;; Should I make a class `recoverable-side-effect'?

コメントが送信できないので.

http://mae.chab.in/archives/2529

いくつか日本語を読んでて引っかかった部分を再訳してみました. つまらない訳やすごい意訳の部分があるので参考まで.


どのようにHTMLのタグと作ったコンポーネントをミックスしているか理解しましょう。HTMLコンポーネントは、ひとつ違いはありますが、あなたが定義するコンポーネントと同じような標準のReactコンポーネントです。JSXのコンパイラは自動的にHTMLタグをReact.createElement(tagName) のような形式で書き換え、他のすべてから放置します。これはグローバルの名前空間の汚染を防ぐためです。

@kenoss
kenoss / .vimrc
Created April 16, 2015 14:23
Dirty growing .vimrc
" Note: Skip initialization for vim-tiny or vim-small.
if !1 | finish | endif
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
@kenoss
kenoss / trace-config.el
Created March 28, 2015 10:00
My trace command.
(defun trace-function-regexp (regexp &optional buffer)
(interactive
(list
(read-string "Trace function regexp: ")
(read-buffer "Output to buffer: " trace-buffer)))
(mapc 'trace-function (apropos-internal regexp 'fboundp)))
(defun trace-function-background-regexp (regexp &optional buffer)
(interactive
(list
(read-string "Trace function background regexp: ")
@kenoss
kenoss / linum-mode-exception.el
Created March 28, 2015 07:17
Disable global-linum-mode for some files.
(defvar linum-exceptional-regexp-list '(" \\*WM:.+" "\\*scratch\\*"))
(defadvice linum-mode (around hoge activate)
(when (or (eq linum-mode t)
(not (cl-find (buffer-name) linum-exceptional-regexp-list :test (lambda (str rx) (string-match rx str)))))
ad-do-it))
@kenoss
kenoss / init-jumar.el
Last active August 29, 2015 14:17
今の jumar.el の設定
;;; init-jumar.el --- config of jumar -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2014 Ken Okada
;; Author: Ken Okada <keno.ss57@gmail.com>
;; Apache License, Version 2.0
;;; Commentary:
@kenoss
kenoss / read-sexp.txt
Created March 3, 2015 17:53
S式を読み込む
gosh> (let1 lis '()
(let1 iport (open-input-string "Hello,world")
(while (read iport) (complement eof-object?) => x
(push! lis x)))
(reverse! lis))
(Hello ,world)
gosh> '(Hello ,world)
(Hello ,world)
@kenoss
kenoss / file0.txt
Last active August 29, 2015 14:11
Evilのカーソルにちょっとした工夫 ref: http://qiita.com/kenoss/items/f4d5a5f88af7a7477cfd
(setq evil-default-cursor 'hbar
evil-normal-state-cursor '("darkolivegreen") ; ノーマルステートでは穏かな緑の水平バーに.
evil-insert-state-cursor '("#800000" (bar . 2))) ; 挿入ステートでは目立つ赤い垂直バーに.
(blink-cursor-mode -1)