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
// 短く | |
javascript:location=decodeURI(location) |
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
;;; undo-tree.el --- Treat undo history as a tree | |
;; 2010/2/15 追記. | |
;; undo-tree-visualizer-quit のバグを修正しました. | |
;; 参考) http://d.hatena.ne.jp/kitokitoki/20100211/p1 | |
;; オリジナルからの変更点 | |
;; 1. q で *undo-tree* があったウィンドウも削除し,呼び出しもとのウィンドウ・バッファにポイントを移動 | |
;; 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
(defun my-delete-bol-space (from to) | |
(interactive "r") | |
(save-restriction | |
(narrow-to-region from to) | |
(goto-char (point-min)) | |
(while (not (eobp)) | |
(delete-horizontal-space) | |
(next-line) | |
(beginning-of-line)))) |
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://blog.livedoor.jp/naoya_t/archives/51350496.html | |
;;switch-to-buffer-other-window しないのが僕ごのみ | |
(defun gauche-info-index (topic) | |
(interactive | |
(list (read-string | |
(concat "Gauche help topic : ") | |
(current-word)))) | |
(get-buffer-create "*info*") | |
(info "/usr/share/info/gauche-refe.info.gz") | |
(Info-index topic)) |
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://at-aka.blogspot.com/2008/12/emacs-uniq.html | |
(defun my-uniq (st en) | |
(interactive "r") | |
(call-process-region st en "uniq" t t)) |
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
;;(cute-cursor t) ;開始 | |
;;(cute-cursor nil) ;終了 | |
(require 'cl) | |
(lexical-let ((interval 0.05) | |
(colors '("red" "green" "blue" "yellow" "purple" "magenta" "cyan")) | |
(cursor-nth 0) | |
(timer nil)) | |
(defun cute-cursor (flag) |
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
(remove-if 'oddp '(1 2 3 4 5 6)) | |
;;=>(2 4 6) | |
(defun complement (fn) | |
(lexical-let ((fn fn)) | |
(lambda (&rest args) (not (apply fn args))))) | |
(remove-if (complement 'oddp) '(1 2 3 4 5 6)) | |
;;=>(1 3 5) |
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 sqlf (start end) | |
"リージョンのSQLを整形する" | |
(interactive "r") | |
(let ((case-fold-search t)) | |
(let* ((s (buffer-substring-no-properties start end)) | |
(s (replace-regexp-in-string "\\(select \\)" "\n\\1\n " s)) | |
(s (replace-regexp-in-string "\\(update \\)" "\n\\1\n " s)) | |
(s (replace-regexp-in-string "\\(insert into \\)\\(fuga\\)\\(fuga\\)" "\n\\2\n " s)) | |
(s (replace-regexp-in-string "\\(delete from \\)" "\n\\1\n " s)) | |
(s (replace-regexp-in-string "\\(create table \\)" "\n\\1\n " s)) |
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 aws-cut-search-ring (n lst) | |
(if (or (>= 0 n) (null lst)) nil | |
(cons (car lst) | |
(aws-cut-search-ring (- n 1) (cdr lst))))) |
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
(setq anything-c-source-recentf | |
'((name . "Recentf") | |
(init . (lambda () | |
(require 'recentf) | |
(or recentf-mode (recentf-mode 1)) | |
;; Big value empowers anything/recentf | |
(when (and (numberp recentf-max-saved-items) | |
(<= recentf-max-saved-items 20)) | |
(setq recentf-max-saved-items 500)))) | |
(candidates . recentf-list) |