View init.el
(defun write-revive-file ()
(interactive)
(let ((file "~/.emacsresume"))
(with-temp-buffer
(insert (prin1-to-string (current-window-configuration-printable)))
(when (file-writable-p file)
(write-region (point-min)
(point-max)
file)))))
View init.el
(defun point-to-middle ()
"Put cursor on middle line of window"
(interactive)
(let ((win-height (if (> (count-screen-lines) (window-height))
(window-height)
(count-screen-lines))))
(move-to-window-line (/ win-height 2))))
View gist.el
;; gist.el --- Emacs integration for gist.github.com
;; Author: Christian Neukirchen <purl.org/net/chneukirchen>
;; Maintainer: Chris Wanstrath <chris@ozmm.org>
;; Contributors:
;; Will Farrington <wcfarrington@gmail.com>
;; Michael Ivey
;; Phil Hagelberg
;; Dan McKinley
;; Version: 0.5
View keysgist
// Keysnail function that pulls up your entire session history
// Based on tips from: http://malblue.tumblr.com/post/349001250/tips-japanese-keysnail-github
ext.add("list-session-history", function () {
const fav = "chrome://mozapps/skin/places/defaultFavicon.png";
var tabHistory = [];
var faviconService = Components.classes["@mozilla.org/browser/favicon-service;1"].getService(Components.interfaces.nsIFaviconService);
var historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsINavHistoryService);
View init.el
(defun twittering-mode-exit ()
"twittering-mode を終了する。"
(interactive)
(when (y-or-n-p "Really exit twittering-mode? ")
(if twittering-timer
(twittering-stop))
(dolist (buf (twittering-get-active-buffer-list))
(if (get-buffer buf)
(kill-buffer buf))))
(garbage-collect))
View init.el
(require 'gist)
(setq gist-use-curl t)
View twspell
(defun twittering-spell-check ()
(when (eq major-mode 'twittering-edit-mode)
(progn (ispell-minor-mode)
(flyspell-mode))))
(add-hook 'text-mode-hook 'twittering-spell-check)
View emacs ui intrusions
;; just use y or n for confirmations
(defalias 'yes-or-no-p 'y-or-n-p)
;; don't use popups of any kind
(setq use-dialog-box nil)
(defalias 'message-box 'message)
;; just the frame thanks
(tool-bar-mode -1)
View gist.el
;; gist.el --- Emacs integration for gist.github.com
;; Author: Christian Neukirchen <purl.org/net/chneukirchen>
;; Maintainer: Chris Wanstrath <chris@ozmm.org>
;; Contributors:
;; Will Farrington <wcfarrington@gmail.com>
;; Michael Ivey
;; Phil Hagelberg
;; Dan McKinley
;; Version: 0.5
View *scratch*
;;;_ , my-remove-duplicates
; This little fellow is great. It removes duplicates from region i.e.
; transforms "foo baz foo bar baz" into "foo baz bar".
(defun my-remove-duplicates (start end)
(interactive "r")
(save-excursion
(goto-char start)
(narrow-to-region start end)