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 'slime) | |
(require 'dash) | |
(require 'trident-mode) | |
(defvar trident-target-process nil | |
"The process that expansions will be sent to.") | |
(defun trident-list-process-buffers () | |
"Return a list of all buffers with an associated process." | |
(-filter #'get-buffer-process (buffer-list))) |
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
" This is an updated, more powerful, version of the function discussed here: | |
" http://www.reddit.com/r/vim/comments/1rzvsm/do_any_of_you_redirect_results_of_i_to_the/ | |
" that shows ]I, [I, ]D, [D, :ilist and :dlist results in the quickfix window, even spanning multiple files. | |
function! List(command, selection, start_at_cursor, ...) | |
" derive the commands used below from the first argument | |
let excmd = a:command . "list" | |
let normcmd = toupper(a:command) | |
if a:selection |
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 'pcase) | |
;; Based on Xah Lee's: http://ergoemacs.org/emacs/modernization_upcase-word.html | |
(defun cycle-case (beg end) | |
"Cycle the word case of the active region or word at point." | |
(interactive | |
(pcase-let ((`(,beg . ,end) (if (use-region-p) | |
(cons (region-beginning) (region-end)) | |
(bounds-of-thing-at-point 'word)))) |
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
;; Just doodling on the topic of somewhat automatically initializing | |
;; `mc/cmds-to-run-for-all'. | |
;; | |
;; I always find the prompts a bit distracting when working on a new computer | |
;; but the file `multiple-cursors' maintains, .mc-lists.el, doesn't seem very | |
;; well-suited to version control. | |
(require 'pcase) | |
(defvar mc-paredit&sp-cmds-to-run-for-all-regexp |
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
;; Turns out it's not necessary to define a new ibuffer column type. Both | |
;; `list-buffers' and `ibuffer' respect `list-buffers-directory', so just do | |
;; something like this: | |
(add-hook 'magit-mode-hook | |
(lambda () | |
(let ((dir (abbreviate-file-name default-directory))) | |
(setq list-buffers-directory dir)))) |
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
;; -*- lexical-binding: t -*- | |
;; Some code I've been playing around with to automate the process of of | |
;; creating a new Octopress page or post, with appropriate metadata, from a | |
;; buffer's content. | |
;; The `octopress-rake`, `octopress-extract-filename`, and `octopress-new` | |
;; functions are derived from the octopress-emacs code here: | |
;; github.com/gfreezy/octopress-emacs |
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
;; This is just an example related to the discussion in this Emacs.SE question: | |
;; https://emacs.stackexchange.com/questions/20732/how-do-i-enable-indentation-in-an-inferior-scheme/ | |
(defun newline-indent-comint-send-input () | |
(interactive) | |
(newline-and-indent) | |
(comint-send-input)) | |
(with-eval-after-load 'cmuscheme | |
(define-key inferior-scheme-mode-map (kbd "RET") #'newline-indent-comint-send-input)) |
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 'package) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) | |
(package-initialize) | |
(defvar my-packages '(slime auto-complete ac-slime) | |
"List of packages to install automatically.") | |
(let ((need (delq nil (mapcar (lambda (pkg) |
OlderNewer