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
(defvar my-isearch-use-region-p nil | |
"Variable that indicates that a region exists when the user starts isearch." | |
) | |
(make-variable-buffer-local 'my-isearch-use-region-p) | |
(add-hook 'isearch-mode-hook | |
'(lambda () | |
(setq my-isearch-use-region-p nil) | |
(when (or (use-region-p) | |
(and (marker-position (mark-marker)) |
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
q つ | |
w 、 | |
e と | |
r く | |
t け | |
u な | |
i た | |
o て | |
p お | |
a か |
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
;;; Use SKK without a Shift modifier. | |
;;; | |
;;; WARNING: You CANNOT use a shift modifer to set a conversion marker when you load this file in .skk. | |
;;; | |
;;; Note: I'm using the skk-tutcode. I do not assure that this setting works under other environments. | |
;;; Set the sticky-key here to load skk-sticky.el. | |
;;; This setting should be located before other sticky configurations, | |
;;; because functions must be defined before advising. | |
(setq skk-sticky-key ":") |
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 kill-buffer-and-frame () | |
"Kill the current buffer and its frame." | |
(interactive) | |
(call-interactively 'kill-buffer) | |
(call-interactively 'delete-frame) | |
) | |
(global-set-key "\C-xK" 'kill-buffer-and-frame) |
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: python -*- | |
# -*- coding: utf-8 -*- | |
# Definition: Convert a html file of Aozora Bunko to be more readable in Kindle. | |
# Author: Tomohiko KOSAKA <tomohiko.kosaka@gmail.com> | |
# Version: 0.01 | |
# Date: 2010/09/16 (Originally written in 2010/09/07) | |
# Requirements: KindleGen (http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000234621) | |
# Usage: | |
# 1. Convert an AOZORA BUNKO's HTML 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
// ============================================================ // | |
// Inside of the PRESERVE Area | |
// ============================================================ // | |
// | |
var googlePrompt = ( | |
function () { | |
var googleAPIUrl = "http://ajax.googleapis.com/ajax/services/search/"; | |
var page_index = null; |
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
;;; toggle-php-mode.el | |
;;; Toggle php-mode and html-mode. | |
;;; Version: 0.02: 2010/11/24 | |
;;; Version: 0.01: 2010/05/08 | |
(defvar php-html-major-mode 'html-mode | |
"Major mode for editing html files with `php-mode'.") | |
(defvar php-activate-html-mode-command 'html-mode | |
"Command that activates a major-mode for html." |
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
// ============================================================ // | |
// Inside of the PRESERVE Area | |
// ============================================================ // | |
// | |
// * IMPORTANT | |
// You have to install _scrollet.ks.js in order to use this script. | |
// | |
var myMarkKeys = ["1", "2", "3", "4", "5"]; | |
var autoMarkInterval = 5000; |
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 fib (n) | |
(let ((x-pre 0)) | |
(loop repeat n | |
for x = 0 then y | |
for y = 1 then (+ x-pre y) | |
do | |
(setq x-pre x) | |
finally return y))) |
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
// Post a tweet with a hash tag. | |
// Add this code to .keysnail.js. | |
hook.addToHook('PluginLoaded', | |
function () { | |
if (!plugins.twitterClient) { | |
return; | |
} | |
var tsuda_hash_tag = null; |
NewerOlder