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
toolScripts.afterPowerOn = "FALSE" | |
toolScripts.afterResume = "FALSE" | |
toolScripts.beforePowerOff = "FALSE" | |
toolScripts.beforeSuspend = "FALSE" |
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
;; windows drive mapper for emacs on cygwin | |
(add-to-list 'file-name-handler-alist | |
'("\\<[a-zA-Z]:" . w32-map-drive)) | |
(defun w32-map-drive (operation &rest args) | |
(let ((fn (get operation 'w32-map-drive))) | |
(if fn | |
(apply fn args) | |
(w32-map-drive-run-real-handler operation args)))) |
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
;; mozc のステータス取得系 | |
(defvar ini:mozc-status-alist nil | |
"`mozc-mode' の状態を表す alist.") | |
(defconst ini:mozc-status-default-mode | |
(if (memq system-type '(windows-nt cygwin)) 'direct 'hiragana) | |
"`mozc-mode' の初期変換モード.") | |
(defadvice mozc-mode (after ini:mozc-status-init activate) |
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
;; helm のサスペンドステータス更新系 | |
(with-eval-after-load "helm" | |
(defun ini:helm-set-suspend-update-flag (status) | |
(when (and status (not helm-suspend-update-flag)) | |
(helm-kill-async-processes) | |
(setq helm-pattern "")) | |
(setq helm-suspend-update-flag status)) | |
(defadvice mozc-mode (after ini:mozc-helm-suspender-init activate) | |
(when (helm-alive-p) |
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
;;; locate-file-cache.el --- Support cache for locate-file. | |
;; Copyright (C) 2013 Daisuke Kobayashi | |
;; Author: Daisuke Kobayashi <d5884jp@gmail.com> | |
;; Keywords: extensions | |
;; 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
(defmacro in:set-function-coding-system (function decoding encoding) | |
"関数使用時のコーディングシステムを設定する. | |
関数 FUNCTION に対し、実行時に DECODING を `coding-system-for-read' に、 | |
ENCODING を `coding-system-for-write' に設定する advice を作成、活性化する." | |
`(defadvice ,function (around | |
,(intern (format "in:ad-%s-coding-setup" function)) | |
activate compile) | |
,(format "関数実行時のコーディングシステムを以下に置き換える. | |
`coding-system-for-read': %s | |
`coding-system-for-write': %s" (eval decoding) (eval encoding)) |
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
;; 明るさ変更 | |
(labels ((rgb-to-ycrcb (r g b) | |
(mapcar (lambda (v) | |
(round v 1000)) | |
(list (+ (* 299 r) (* 587 g) (* 114 b)) | |
(+ (* 500 r) (* -418.69 g) (* -81.31 b)) | |
(+ (* -168.74 r) (* -331.26 g) (* 500 b))))) | |
(ycrcb-to-rgb (y cr cb) | |
(let ((y (* y 1000))) | |
(mapcar (lambda (v) |
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
;; google-map / git clone http://git.naquadah.org/git/google-maps.git | |
(when (locate-library "google-maps") | |
(autoload 'google-maps "google-maps" nil t) | |
(eval-after-load "google-maps" | |
'(progn | |
(when (require 'popwin nil t) | |
(add-to-list 'popwin:special-display-config '("*Google Maps*"))) | |
(defadvice google-maps-static-show (before ini:ad-google-maps-set-lang |
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 'inf-ruby) | |
;; from http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/20892 | |
(define-key inferior-ruby-mode-map (kbd "TAB") 'inferior-ruby-complete-or-tab) | |
(defun inferior-ruby-completions (seed) | |
"Return a list of completions for the line of ruby code starting with SEED." | |
(let* ((proc (get-buffer-process ruby-buffer)) | |
(comint-filt (process-filter proc)) | |
(kept "") completions) |
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 'cl nil t) | |
(setq byte-compile-warnings '(not cl-functions)) | |
;; to use cl-lib |
NewerOlder