Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Drop as many site-lisp submodules as possible; use package.el to get …

…them instead.
  • Loading branch information...
commit 531059f44a731936dbe52efd2d9148ca6bbc6617 1 parent 2b90b0d
@bodil authored
Showing with 39 additions and 1,135 deletions.
  1. +0 −75 .gitmodules
  2. +1 −1  bodil-dired.el
  3. +4 −5 bodil-editing.el
  4. +1 −2  bodil-erlang.el
  5. +1 −1  bodil-flycheck.el
  6. +1 −1  bodil-ido.el
  7. +4 −5 bodil-js.el
  8. +4 −4 bodil-lisp.el
  9. +4 −2 bodil-magit.el
  10. +1 −2  bodil-markdown.el
  11. +4 −2 bodil-markup.el
  12. +2 −2 bodil-python.el
  13. +1 −0  bodil-snippets.el
  14. +1 −2  bodil-terminal.el
  15. +8 −1 bodil-theme.el
  16. +1 −1  bodil-twitter.el
  17. +1 −1  init.el
  18. +0 −1  site-lisp/ace-jump-mode
  19. +0 −1  site-lisp/autopair
  20. +0 −1  site-lisp/cljsbuild-mode
  21. +0 −1  site-lisp/clojure-mode
  22. +0 −1  site-lisp/coffee-mode
  23. +0 −1  site-lisp/dash
  24. +0 −1  site-lisp/dired-plus
  25. +0 −1  site-lisp/expand-region
  26. +0 −1  site-lisp/flycheck
  27. +0 −1  site-lisp/google-maps
  28. +0 −1  site-lisp/js2-mode
  29. +0 −1  site-lisp/js2-refactor
  30. +0 −1  site-lisp/magit
  31. +0 −1  site-lisp/mingus
  32. +0 −774 site-lisp/misc/multi-term.el
  33. +0 −144 site-lisp/misc/pytest.el
  34. +0 −1  site-lisp/multiple-cursors
  35. +0 −1  site-lisp/nrepl
  36. +0 −1  site-lisp/nyan-mode
  37. +0 −1  site-lisp/popup
  38. +0 −1  site-lisp/python-mode-el
  39. +0 −1  site-lisp/roy-mode
  40. +0 −1  site-lisp/smex
  41. +0 −1  site-lisp/twittering-mode
  42. +0 −1  site-lisp/yasnippet
  43. +0 −85 themes/monokai-theme.el
  44. +0 −1  themes/solarized
  45. +0 −1  themes/zenburn
View
75 .gitmodules
@@ -1,87 +1,12 @@
-[submodule "themes/solarized"]
- path = themes/solarized
- url = git://github.com/sellout/emacs-color-theme-solarized.git
-[submodule "themes/zenburn"]
- path = themes/zenburn
- url = git://github.com/bbatsov/zenburn-emacs.git
-[submodule "site-lisp/autopair"]
- path = site-lisp/autopair
- url = git://github.com/capitaomorte/autopair.git
-[submodule "site-lisp/smex"]
- path = site-lisp/smex
- url = git://github.com/nonsequitur/smex.git
-[submodule "site-lisp/magit"]
- path = site-lisp/magit
- url = git://github.com/magit/magit.git
-[submodule "site-lisp/js2-mode"]
- path = site-lisp/js2-mode
- url = git://github.com/mooz/js2-mode.git
-[submodule "site-lisp/coffee-mode"]
- path = site-lisp/coffee-mode
- url = git://github.com/defunkt/coffee-mode.git
-[submodule "site-lisp/js2-refactor"]
- path = site-lisp/js2-refactor
- url = git://github.com/magnars/js2-refactor.el.git
-[submodule "site-lisp/expand-region"]
- path = site-lisp/expand-region
- url = git://github.com/magnars/expand-region.el.git
[submodule "site-lisp/ethan-wspace"]
path = site-lisp/ethan-wspace
url = git://github.com/glasserc/ethan-wspace.git
[submodule "site-lisp/nxhtml"]
path = site-lisp/nxhtml
url = git://github.com/emacsmirror/nxhtml.git
-[submodule "site-lisp/nrepl"]
- path = site-lisp/nrepl
- url = git://github.com/kingtim/nrepl.el.git
-[submodule "site-lisp/clojure-mode"]
- path = site-lisp/clojure-mode
- url = git://github.com/technomancy/clojure-mode.git
[submodule "site-lisp/clang-complete-async"]
path = site-lisp/clang-complete-async
url = git@github.com:bodil/emacs-clang-complete-async.git
-[submodule "site-lisp/yasnippet"]
- path = site-lisp/yasnippet
- url = git://github.com/capitaomorte/yasnippet.git
[submodule "site-lisp/auto-complete"]
path = site-lisp/auto-complete
url = git://github.com/auto-complete/auto-complete.git
-[submodule "site-lisp/popup"]
- path = site-lisp/popup
- url = git://github.com/auto-complete/popup-el.git
-[submodule "site-lisp/ace-jump-mode"]
- path = site-lisp/ace-jump-mode
- url = git://github.com/winterTTr/ace-jump-mode.git
-[submodule "site-lisp/python-mode-el"]
- path = site-lisp/python-mode-el
- url = git://github.com/emacsmirror/python-mode.git
-[submodule "site-lisp/twittering-mode"]
- path = site-lisp/twittering-mode
- url = git://github.com/hayamiz/twittering-mode.git
-[submodule "site-lisp/roy-mode"]
- path = site-lisp/roy-mode
- url = git://github.com/folone/roy-mode.git
-[submodule "site-lisp/google-maps"]
- path = site-lisp/google-maps
- url = git://git.naquadah.org/google-maps.git
-[submodule "site-lisp/mingus"]
- path = site-lisp/mingus
- url = git://github.com/pft/mingus.git
-[submodule "site-lisp/dash"]
- path = site-lisp/dash
- url = git://github.com/magnars/dash.el.git
-[submodule "site-lisp/flycheck"]
- path = site-lisp/flycheck
- url = git://github.com/lunaryorn/flycheck.git
-[submodule "site-lisp/nyan-mode"]
- path = site-lisp/nyan-mode
- url = git://github.com/TeMPOraL/nyan-mode.git
-[submodule "site-lisp/cljsbuild-mode"]
- path = site-lisp/cljsbuild-mode
- url = git://github.com/kototama/cljsbuild-mode.git
-[submodule "site-lisp/dired-plus"]
- path = site-lisp/dired-plus
- url = git://github.com/emacsmirror/dired-plus.git
-[submodule "site-lisp/multiple-cursors"]
- path = site-lisp/multiple-cursors
- url = git://github.com/magnars/multiple-cursors.el.git
View
2  bodil-dired.el
@@ -1,6 +1,6 @@
;;; bodil-dired.el -- Dired extensions
-(require 'dired+)
+(package-require 'dired+)
;; Auto refresh buffers
(global-auto-revert-mode 1)
View
9 bodil-editing.el
@@ -5,7 +5,7 @@
(setq delete-selection-mode t)
;; Autopair mode
-(require 'autopair)
+(package-require 'autopair)
(setq autopair-pair-criteria 'help-balance)
(autopair-global-mode)
@@ -14,7 +14,7 @@
; TODO: remove this if not using auto-complete
;; Multiple cursors!
-(require 'multiple-cursors)
+(package-require 'multiple-cursors)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C-æ") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-'") 'mc/mark-next-like-this)
@@ -22,7 +22,7 @@
(global-set-key (kbd "C-*") 'mc/mark-all-like-this-dwim)
;; expand-region <3 @magnars
-(require 'expand-region)
+(package-require 'expand-region)
(global-set-key (kbd "C-+") 'er/expand-region)
;; Smart home key
@@ -68,8 +68,7 @@
(global-set-key (kbd "C-M-<down>") 'duplicate-start-of-line-or-region)
;; ace-jump-mode!
-(autoload 'ace-jump-mode "ace-jump-mode" nil t)
-(autoload 'ace-jump-mode-pop-mark "ace-jump-mode" nil t)
+(package-require 'ace-jump-mode)
(global-set-key (kbd "C-ø") 'ace-jump-mode)
(global-set-key (kbd "M-ø") 'ace-jump-mode-pop-mark)
(eval-after-load "ace-jump-mode"
View
3  bodil-erlang.el
@@ -1,12 +1,11 @@
;;; bodil-erlang.el --- <3 Joe Armstrong <3
-(autoload 'erlang-mode "erlang" nil t)
+(package-require 'erlang)
(add-hook 'erlang-mode-hook
(lambda ()
(define-key erlang-mode-map (kbd "C-\\")
'erlang-complete-tag)))
-(autoload 'erlang-shell-mode "erlang" nil t)
(add-hook 'erlang-shell-mode-hook
(lambda ()
(define-key erlang-shell-mode-map (kbd "C-\\")
View
2  bodil-flycheck.el
@@ -1,6 +1,6 @@
;;; bodil-flycheck.el --- Flycheck setup
-(autoload 'flycheck-mode "flycheck" nil t)
+(package-require 'flycheck)
(add-hook 'find-file-hook 'flycheck-mode)
(provide 'bodil-flycheck)
View
2  bodil-ido.el
@@ -16,7 +16,7 @@
(setq ido-use-virtual-buffers t)
;; Use smex to provide ido-like interface for M-x
-(require 'smex)
+(package-require 'smex)
(smex-initialize)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
View
9 bodil-js.el
@@ -1,7 +1,7 @@
;;; js.el -- Javascript and friends
;; js2-mode
-(autoload 'js2-mode "js2-mode" nil t)
+(package-require 'js2-mode)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
@@ -29,13 +29,14 @@
(add-hook 'js2-mode-hook (lambda () (js2-highlight-vars-mode)))
;; Install js2-refactor when js2-mode loads
+(package-require 'js2-refactor)
(eval-after-load "js2-mode"
'(progn (require 'js2-refactor)
(define-key js2-mode-map (kbd "C-c C-r") 'js2r-rename-var)))
;;; Coffeescript
-(autoload 'coffee-mode "coffee-mode" nil t)
+(package-require 'coffee-mode)
(add-hook 'coffee-mode-hook
(lambda ()
@@ -93,9 +94,7 @@
;; Roy
-(autoload 'roy-mode "roy-mode" nil t)
-(autoload 'roy-repl "roy-mode" nil t)
-
+(package-require 'roy-mode)
(add-to-list 'auto-mode-alist '("\\.roy$" . roy-mode))
View
8 bodil-lisp.el
@@ -46,7 +46,7 @@
;;; Clojure
-(autoload 'clojure-mode "clojure-mode" nil t)
+(package-require 'clojure-mode)
(add-to-list 'auto-mode-alist '("\\.cljs?$" . clojure-mode))
(lambda-as-lambda 'clojure-mode "(\\(\\<fn\\>\\)")
@@ -56,8 +56,8 @@
(lambda () (define-key clojure-mode-map (kbd "DEL") 'paredit-backward-delete)))
;; nRepl
-(autoload 'nrepl-jack-in "clojure-mode" nil t)
-(eval-after-load "clojure-mode" '(require 'nrepl))
+(package-require 'nrepl)
+;(eval-after-load "clojure-mode" '(require 'nrepl))
(setq nrepl-lein-command "lein")
(setq nrepl-server-command "echo \"lein repl :headless\" | $SHELL -l")
@@ -86,7 +86,7 @@ Display the results in a hyperlinked *compilation* buffer."
(compile "lein kibit"))
;; Cljsbuild
-(require 'cljsbuild-mode)
+(package-require 'cljsbuild-mode)
;;; Lolisp
View
6 bodil-magit.el
@@ -1,9 +1,11 @@
;;; magit.el -- Git better
-(autoload 'magit-status "magit.el" nil t)
-(autoload 'magit-get-top-dir "magit.el" nil t)
+(package-require 'magit)
+
(global-set-key (kbd "C-x g") 'magit-status)
+;; Github integration
+(package-require 'gist)
;; Utility functions
(defcustom git-project-files-filter-history-variable 'git-project-files-filter-history
View
3  bodil-markdown.el
@@ -1,7 +1,6 @@
;;; bodil-markdown.el -- Markdown setup
-(when (not (package-installed-p 'markdown-mode))
- (package-install 'markdown-mode))
+(package-require 'markdown-mode)
(setq-default markdown-command "pandoc -S -s --self-contained -f markdown -t html5 ")
View
6 bodil-markup.el
@@ -1,5 +1,8 @@
;;; markup.el -- HTML and friends
+;; Useful major modes
+(package-require 'less-css-mode)
+
;; nXhtml
(autoload 'nxhtml-mumamo-mode "autostart" nil t)
(add-to-list 'auto-mode-alist '("\\.\\(html\\|ejs\\|jsp\\)$" . nxhtml-mumamo-mode))
@@ -13,8 +16,7 @@
'(setq mumamo-per-buffer-local-vars (delq 'buffer-file-name mumamo-per-buffer-local-vars)))
;; Key for renaming tags
-(autoload 'rename-sgml-tag "rename-sgml-tag" nil t)
(eval-after-load "nxhtml-mode"
- '(define-key nxhtml-mode-map (kbd "C-c C-r") 'rename-sgml-tag))
+ '(define-key nxhtml-mode-map (kbd "C-c C-r") 'mc/mark-sgml-tag-pair))
(provide 'bodil-markup)
View
4 bodil-python.el
@@ -1,10 +1,10 @@
;;; bodil-python.el -- Python configuration
;; Require, not autoload, to override Emacs bundled python.el
-(require 'python-mode)
+(package-require 'python-mode)
;; Pytest bindings
-(require 'pytest)
+(package-require 'pytest)
(add-hook
'python-mode-hook
(lambda ()
View
1  bodil-snippets.el
@@ -1,5 +1,6 @@
;;; bodil-snippets.el --- Yasnippets
+(package-require 'yasnippet)
(require 'yasnippet)
(setq yas/root-directory (concat dotfiles-dir "snippets"))
(yas/global-mode 1)
View
3  bodil-terminal.el
@@ -1,8 +1,7 @@
;;; bodil-terminal.el -- Terminals
;; Configure multi-term
-(autoload 'multi-term "multi-term" nil t)
-(autoload 'multi-term-next "multi-term" nil t)
+(package-require 'multi-term)
(global-set-key (kbd "C-x C-m") 'multi-term)
(global-set-key (kbd "C-x m") 'multi-term-next)
View
9 bodil-theme.el
@@ -6,6 +6,9 @@
;; No splash screen
(setq inhibit-startup-message t)
+;; Don't defer screen updates when performing operations
+(setq redisplay-dont-pause t)
+
;; Some X11 setup
(when window-system
(setq frame-title-format '(buffer-file-name "%f" ("%b")))
@@ -41,6 +44,10 @@
(when (file-directory-p path)
(add-to-list 'custom-theme-load-path path)))
+;; Install themes
+(package-require 'zenburn-theme)
+(package-require 'solarized-theme)
+
;; Prepare colour themes
(defun theme-light ()
(interactive)
@@ -72,7 +79,7 @@
(global-set-key (kbd "C-<f9>") 'toggle-presentation-font)
;; Engage!
-(require 'nyan-mode)
+(package-require 'nyan-mode)
(nyan-mode 1)
(provide 'bodil-theme)
View
2  bodil-twitter.el
@@ -1,5 +1,5 @@
;;; bodil-twitter.el -- Twittering-mode
-(require 'twittering-mode)
+(package-require 'twittering-mode)
(provide 'bodil-twitter)
View
2  init.el
@@ -88,7 +88,7 @@
bodil-terminal
bodil-twitter
bodil-orgmode
- ;; bodil-flycheck
+ bodil-flycheck
bodil-codestyle
bodil-dired))
(require file))
1  site-lisp/ace-jump-mode
@@ -1 +0,0 @@
-Subproject commit f6fe85fe9157b1df8b8d57d162c437444937c48d
1  site-lisp/autopair
@@ -1 +0,0 @@
-Subproject commit 274a54a8a7182330d924b118815b352803396977
1  site-lisp/cljsbuild-mode
@@ -1 +0,0 @@
-Subproject commit 8d2aee1db3ffc2d9e77d8527ef5964787cc27769
1  site-lisp/clojure-mode
@@ -1 +0,0 @@
-Subproject commit f5f2fe4f13e4d55036de2f63d95dd0775f0f5542
1  site-lisp/coffee-mode
@@ -1 +0,0 @@
-Subproject commit 6449f14ad2b23b4ca70abde4c966e0363249e218
1  site-lisp/dash
@@ -1 +0,0 @@
-Subproject commit fb75a7fe19b0c79d4d358fdbfc14fa596c1393cb
1  site-lisp/dired-plus
@@ -1 +0,0 @@
-Subproject commit 14dc0b37469d16601b93e983351b68e98f0d3c61
1  site-lisp/expand-region
@@ -1 +0,0 @@
-Subproject commit 35ddbf79f07b3d66bbc794ec3411337fa3ce59a9
1  site-lisp/flycheck
@@ -1 +0,0 @@
-Subproject commit b7727f1ba6d49ce95159418c379864feaf52a9de
1  site-lisp/google-maps
@@ -1 +0,0 @@
-Subproject commit e9b4a1cad22c94d5e1ed0087f3f774554d4a6e3f
1  site-lisp/js2-mode
@@ -1 +0,0 @@
-Subproject commit 8b78584fd26a465f66ecd3c32c5f4106823bae51
1  site-lisp/js2-refactor
@@ -1 +0,0 @@
-Subproject commit 8af7835b53cbe90dc2ae22db9d2657674162acbe
1  site-lisp/magit
@@ -1 +0,0 @@
-Subproject commit f2a2ad512792ec5cc8937dd7142d9f22a664b526
1  site-lisp/mingus
@@ -1 +0,0 @@
-Subproject commit 4a698a76b57046c85fe84a846196ca0b11badc8f
View
774 site-lisp/misc/multi-term.el
@@ -1,774 +0,0 @@
-;;; multi-term.el --- Managing multiple terminal buffers in Emacs.
-
-;; Author: Andy Stewart <lazycat.manatee@gmail.com>
-;; Maintainer: ahei <ahei0802@gmail.com>
-;; Copyright (C) 2008, 2009, Andy Stewart, all rights reserved.
-;; Copyright (C) 2010, ahei, all rights reserved.
-;; Created: <2008-09-19 23:02:42>
-;; Version: 0.8.8
-;; Last-Updated: <2010-05-13 00:40:24 Thursday by ahei>
-;; URL: http://www.emacswiki.org/emacs/download/multi-term.el
-;; Keywords: term, terminal, multiple buffer
-;; Compatibility: GNU Emacs 23.2.1
-
-;; 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, or (at your option)
-;; any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
-;; Floor, Boston, MA 02110-1301, USA.
-
-;; Features that might be required by this library:
-;;
-;; `term' `cl' `advice'
-;;
-
-;;; Commentary:
-;;
-;; This package is for creating and managing multiple terminal buffers in Emacs.
-;;
-;; By default, term.el provides a great terminal emulator in Emacs.
-;; But I have some troubles with term-mode:
-;;
-;; 1. term.el just provides commands `term' or `ansi-term'
-;; for creating a terminal buffer.
-;; And there is no special command to create or switch
-;; between multiple terminal buffers quickly.
-;;
-;; 2. By default, the keystrokes of term.el conflict with global-mode keystrokes,
-;; which makes it difficult for the user to integrate term.el with Emacs.
-;;
-;; 3. By default, executing *NIX command “exit” from term-mode,
-;; it will leave an unused buffer.
-;;
-;; 4. term.el won’t quit running sub-process when you kill terminal buffer forcibly.
-;;
-;; 5. Haven’t a dedicated window for debug program.
-;;
-;; And multi-term.el is enhanced with those features.
-;;
-
-;;; Installation:
-;;
-;; Copy multi-term.el to your load-path and add to your ~/.emacs
-;;
-;; (require 'multi-term)
-;;
-;; And setup program that `multi-term' will need:
-;;
-;; (setq multi-term-program "/bin/bash")
-;;
-;; or setup like me "/bin/zsh" ;)
-;;
-;; Below are the commands you can use:
-;;
-;; `multi-term' Create a new term buffer.
-;; `multi-term-next' Switch to next term buffer.
-;; `multi-term-prev' Switch to previous term buffer.
-;; `multi-term-dedicated-open' Open dedicated term window.
-;; `multi-term-dedicated-close' Close dedicated term window.
-;; `multi-term-dedicated-toggle' Toggle dedicated term window.
-;; `multi-term-dedicated-select' Select dedicated term window.
-;;
-;; Tips:
-;;
-;; You can type `C-u' before command `multi-term' or `multi-term-dedicated-open'
-;; then will prompt you shell name for creating terminal buffer.
-;;
-
-;;; Customize:
-;;
-;; `multi-term-program' default is nil, so when creating new term buffer,
-;; send environment variable of `SHELL' (`ESHELL', `/bin/sh') to `make-term'.
-;;
-;; And you can set it to your liking, like me: ;-)
-;;
-;; (setq multi-term-program "/bin/zsh")
-;;
-;; `multi-term-default-dir' default is `~/', only use when current buffer
-;; is not in a real directory.
-;;
-;; `multi-term-buffer-name' is the name of term buffer.
-;;
-;; `multi-term-scroll-show-maximum-output' controls how interpreter
-;; output causes window to scroll.
-;;
-;; `multi-term-scroll-to-bottom-on-output' controls whether interpreter
-;; output causes window to scroll.
-;;
-;; `multi-term-switch-after-close' try to switch other `multi-term' buffer
-;; after close current one.
-;; If you don't like this feature just set it with nil.
-;;
-;; `term-unbind-key-list' is a key list to unbind some keystroke.
-;;
-;; `term-bind-key-alist' is a key alist that binds some keystroke.
-;; If you don't like default, modify it.
-;;
-;; `multi-term-dedicated-window-height' the height of a dedicated term window.
-;;
-;; `multi-term-dedicated-max-window-height' the max height limit that dedicated
-;; window is allowed.
-;;
-;; `multi-term-dedicated-skip-other-window-p' whether skip dedicated term
-;; window when use command `other-window' to cycle windows order.
-;;
-;; All of the above can be customize by:
-;; M-x customize-group RET multi-term RET
-;;
-
-;;; Change log:
-;;
-;; 2009/07/04
-;; * Add new option `multi-term-dedicated-select-after-open-p'.
-;;
-;; 2009/06/29
-;; * Fix regexp bug.
-;;
-;; 2009/04/21
-;; * Fix a bug that bring at `2009/03/28':
-;; It will kill sub-process in other multi-term buffer
-;; when we kill current multi-term buffer.
-;;
-;; 2009/03/29
-;; * Add new command `term-send-reverse-search-history'.
-;;
-;; 2009/03/28
-;; * Add new option `multi-term-switch-after-close'.
-;;
-;; 2009/02/18
-;; * Fix bug between ECB and `multi-term-dedicated-close'.
-;;
-;; 2009/02/05
-;; * Prompt user shell name when type `C-u' before command
-;; `multi-term' or `multi-term-dedicated-open'.
-;; * Fix doc.
-;;
-;; 2009/01/29
-;; * Use `term-quit-subjob' instead `term-interrupt-subjob'.
-;; * Fix doc.
-;;
-;; 2009/01/13
-;; * Rewrite advice for `pop-to-buffer' to avoid `pop-to-buffer' not effect
-;; when have many dedicated window in current frame.
-;; * Rewrite advice for `delete-other-windows' to avoid use common variable
-;; `delete-protected-window-list' and use `window-dedicated-p' instead.
-;; Remove variable `delete-protected-window-list' and function
-;; `multi-term-dedicated-match-protected-window-p'.
-;;
-;; 2009/01/06
-;; * Improve document.
-;;
-;; 2008/12/29
-;; * Remove option `multi-term-current-window-height' and
-;; function `multi-term-current-directory'.
-;; * Add some functions to make get dedicated term buffer,
-;; those functions is beginning with `multi-term-dedicated-'.
-;; * Modified advice `delete-window', make command `delete-window'
-;; and delete dedicated window, but will remember window height
-;; before deleted.
-;; * Don't remember dedicated window height if larger than max value.
-;; * Fix some bug with `delete-other-windows' and window configuration.
-;; And this bug exists with another extension `sr-speedbar'.
-;; * Add new variable `delete-protected-window-list' for protected
-;; special window that won't be deleted.
-;; This variable is common for any extension that use dedicated
-;; window.
-;; * Fix doc.
-;;
-;; 2008/12/21
-;; * Default bind `C-m' with `term-send-input'.
-;;
-;; 2008/12/10
-;; * Improve customize interface.
-;; * Setup customize automatically, don't need to user setup it up.
-;; * Add option `multi-term-try-create'.
-;; * Make function `multi-term-switch' accept offset argument.
-;; * Fix doc.
-;;
-;; 2008/10/22
-;; * Add variable `multi-term-current-window-height'.
-;; * Add variable `multi-term-buffer-name'.
-;; * Add variable `term-unbind-key-list'.
-;; * Add variable `term-rebind-key-alist'.
-;; * Move key setup and some extension from `term-extension.el'.
-;; * Create new function `multi-term-keystroke-setup'.
-;; * Fix doc.
-;;
-;; 2008/09/19
-;; * First released.
-;;
-
-;;; Acknowledgments:
-;;
-;; Mark Triggs <mst@dishevelled.net>
-;; For create multi-shell.el
-;; Aaron S. Hawley <aaron.s.hawley@gmail.com>
-;; For improve document.
-;;
-
-;;; Bug
-;;
-;;
-
-;;; TODO
-;;
-;;
-;;
-
-;;; Require:
-(require 'term)
-(require 'cl)
-(require 'advice)
-
-;;; Code:
-
-;;; Customize
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Customize ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defgroup multi-term nil
- "Multi term manager."
- :group 'term)
-
-(defcustom multi-term-program nil
- "The program of term.
-If this is nil, setup to environment variable of `SHELL'."
- :type 'string
- :group 'multi-term)
-
-(defcustom multi-term-program-switches nil
- "The command-line switches to pass to the term program."
- :type 'string
- :group 'multi-term)
-
-(defcustom multi-term-try-create t
- "Try to create a new term buffer when switch.
-
-When use `multi-term-next' or `multi-term-prev', switch term buffer,
-and try to create a new term buffer if no term buffers exist."
- :type 'boolean
- :group 'multi-shell)
-
-(defcustom multi-term-default-dir "~/"
- "The default directory for terms if current directory doesn't exist."
- :type 'string
- :group 'multi-term)
-
-(defcustom multi-term-buffer-name "terminal"
- "The buffer name of term buffer."
- :type 'string
- :group 'multi-term)
-
-(defcustom multi-term-scroll-show-maximum-output nil
- "*Controls how interpreter output causes window to scroll.
-If non-nil, then show the maximum output when the window is scrolled.
-
-See variable `multi-term-scroll-to-bottom-on-output'."
- :type 'boolean
- :group 'multi-term)
-
-(defcustom multi-term-scroll-to-bottom-on-output nil
- "*Controls whether interpreter output causes window to scroll.
-If nil, then do not scroll. If t or `all', scroll all windows showing buffer.
-If `this', scroll only the selected window.
-If `others', scroll only those that are not the selected window.
-
-The default is nil.
-
-See variable `multi-term-scroll-show-maximum-output'."
- :type 'boolean
- :group 'multi-term)
-
-(defcustom multi-term-switch-after-close 'NEXT
- "Try to switch other `multi-term' buffer after close current one.
-If this option is 'NEXT, switch to next `multi-term' buffer;
-If this option is 'PREVIOUS, switch to previous `multi-term' buffer.
-If this option is nil, don't switch other `multi-term' buffer."
- :type 'symbol
- :group 'multi-term)
-
-(defcustom term-unbind-key-list
- '("C-z" "C-x" "C-c" "C-h" "C-y" "<ESC>")
- "The key list that will need to be unbind."
- :type 'list
- :group 'multi-term)
-
-(defcustom term-bind-key-alist
- '(
- ("C-c C-c" . term-interrupt-subjob)
- ("C-p" . previous-line)
- ("C-n" . next-line)
- ("C-s" . isearch-forward)
- ("C-r" . isearch-backward)
- ("C-m" . term-send-raw)
- ("M-f" . term-send-forward-word)
- ("M-b" . term-send-backward-word)
- ("M-o" . term-send-backspace)
- ("M-p" . term-send-up)
- ("M-n" . term-send-down)
- ("M-M" . term-send-forward-kill-word)
- ("M-N" . term-send-backward-kill-word)
- ("M-r" . term-send-reverse-search-history)
- ("M-," . term-send-input)
- ("M-." . comint-dynamic-complete))
- "The key alist that will need to be bind.
-If you do not like default setup, modify it, with (KEY . COMMAND) format."
- :type 'alist
- :group 'multi-term)
-
-(defcustom multi-term-dedicated-window-height 14
- "The height of `multi-term' dedicated window."
- :type 'integer
- :group 'multi-term)
-
-(defcustom multi-term-dedicated-max-window-height 30
- "The max height limit of `multi-term' dedicated window.
-Default, when hide `multi-term' dedicated window, will remember
-window height before hide, except height is larger than this.`"
- :type 'integer
- :group 'multi-term)
-
-(defcustom multi-term-dedicated-skip-other-window-p nil
- "Default, can have `other-window' select window in cyclic ordering of windows.
-In cases you don't want to select `multi-term' dedicated window, use `other-window'
-and make `multi-term' dedicated window as a viewable sidebar.
-
-So please turn on this option if you want to skip `multi-term' dedicated window with `other-window'.
-
-Default is nil."
- :type 'boolean
- :set (lambda (symbol value)
- (set symbol value)
- (when (ad-advised-definition-p 'other-window)
- (multi-term-dedicated-handle-other-window-advice value)))
- :group 'multi-term)
-
-(defcustom multi-term-dedicated-select-after-open-p nil
- "Default, multi-term won't focus terminal window after you open dedicated window.
-Please make this option with t if you want focus terminal window.
-
-Default is nil."
- :type 'boolean
- :group 'multi-term)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Constant ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defconst multi-term-dedicated-buffer-name "MULTI-TERM-DEDICATED"
- "The buffer name of dedicated `multi-term'.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Variable ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar multi-term-dedicated-window nil
- "The dedicated `multi-term' window.")
-
-(defvar multi-term-dedicated-buffer nil
- "The dedicated `multi-term' buffer.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Interactive Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;###autoload
-(defun multi-term ()
- "Create new term buffer.
-Will prompt you shell name when you type `C-u' before this command."
- (interactive)
- (let (term-buffer)
- ;; Set buffer.
- (setq term-buffer (multi-term-get-buffer current-prefix-arg))
- (set-buffer term-buffer)
- ;; Internal handle for `multi-term' buffer.
- (multi-term-internal)
- ;; Switch buffer
- (switch-to-buffer term-buffer)))
-
-(defun multi-term-next (&optional offset)
- "Go to the next term buffer.
-If OFFSET is `non-nil', will goto next term buffer with OFFSET."
- (interactive "P")
- (multi-term-switch 'NEXT (or offset 1)))
-
-(defun multi-term-prev (&optional offset)
- "Go to the previous term buffer.
-If OFFSET is `non-nil', will goto previous term buffer with OFFSET."
- (interactive "P")
- (multi-term-switch 'PREVIOUS (or offset 1)))
-
-(defun multi-term-dedicated-open ()
- "Open dedicated `multi-term' window.
-Will prompt you shell name when you type `C-u' before this command."
- (interactive)
- (if (not (multi-term-dedicated-exist-p))
- (let ((current-window (selected-window)))
- (if (multi-term-buffer-exist-p multi-term-dedicated-buffer)
- (unless (multi-term-window-exist-p multi-term-dedicated-window)
- (multi-term-dedicated-get-window))
- ;; Set buffer.
- (setq multi-term-dedicated-buffer (multi-term-get-buffer current-prefix-arg t))
- (set-buffer (multi-term-dedicated-get-buffer-name))
- ;; Get dedicate window.
- (multi-term-dedicated-get-window)
- ;; Whether skip `other-window'.
- (multi-term-dedicated-handle-other-window-advice multi-term-dedicated-skip-other-window-p)
- ;; Internal handle for `multi-term' buffer.
- (multi-term-internal))
- (set-window-buffer multi-term-dedicated-window (get-buffer (multi-term-dedicated-get-buffer-name)))
- (set-window-dedicated-p multi-term-dedicated-window t)
- ;; Select window.
- (select-window
- (if multi-term-dedicated-select-after-open-p
- ;; Focus dedicated terminal window if option `multi-term-dedicated-select-after-open-p' is enable.
- multi-term-dedicated-window
- ;; Otherwise focus current window.
- current-window)))
- (message "`multi-term' dedicated window has exist.")))
-
-(defun multi-term-dedicated-close ()
- "Close dedicated `multi-term' window."
- (interactive)
- (if (multi-term-dedicated-exist-p)
- (let ((current-window (selected-window)))
- ;; Remember height.
- (multi-term-dedicated-select)
- (multi-term-dedicated-remember-window-height)
- ;; Close window.
- (if (and (require 'ecb nil t)
- ecb-activated-window-configuration)
- ;; Toggle ECB window when ECB window activated.
- (progn
- (ecb-deactivate)
- (ecb-activate))
- ;; Otherwise delete dedicated window.
- (delete-window multi-term-dedicated-window)
- (if (multi-term-window-exist-p current-window)
- (select-window current-window))))
- (message "`multi-term' window is not exist.")))
-
-(defun multi-term-dedicated-remember-window-height ()
- "Remember window height."
- (let ((win-height (multi-term-current-window-take-height)))
- (if (and (multi-term-dedicated-window-p) ;in `multi-term' window
- (> win-height 1)
- (<= win-height multi-term-dedicated-max-window-height))
- (setq multi-term-dedicated-window-height win-height))))
-
-(defun multi-term-dedicated-toggle ()
- "Toggle dedicated `multi-term' window."
- (interactive)
- (if (multi-term-dedicated-exist-p)
- (multi-term-dedicated-close)
- (multi-term-dedicated-open)))
-
-(defun multi-term-dedicated-select ()
- "Select the `multi-term' dedicated window."
- (interactive)
- (if (multi-term-dedicated-exist-p)
- (select-window multi-term-dedicated-window)
- (message "`multi-term' window is not exist.")))
-
-(defun term-send-backward-kill-word ()
- "Backward kill word in term mode."
- (interactive)
- (term-send-raw-string "\C-w"))
-
-(defun term-send-forward-kill-word ()
- "Kill word in term mode."
- (interactive)
- (term-send-raw-string "\ed"))
-
-(defun term-send-backward-word ()
- "Move backward word in term mode."
- (interactive)
- (term-send-raw-string "\eb"))
-
-(defun term-send-forward-word ()
- "Move forward word in term mode."
- (interactive)
- (term-send-raw-string "\ef"))
-
-(defun term-send-reverse-search-history ()
- "Search history reverse."
- (interactive)
- (term-send-raw-string "\C-r"))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Utilise Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun multi-term-internal ()
- "Internal handle for `multi-term' buffer."
- ;; Add customize keystroke with `term-mode-hook'
- (remove-hook 'term-mode-hook 'multi-term-keystroke-setup)
- (add-hook 'term-mode-hook 'multi-term-keystroke-setup)
- ;; Load term mode
- (term-mode)
- (term-char-mode)
- ;; Handle term buffer close
- (multi-term-handle-close)
- ;; Handle `output' variable.
- (setq term-scroll-show-maximum-output multi-term-scroll-show-maximum-output
- term-scroll-to-bottom-on-output multi-term-scroll-to-bottom-on-output)
- ;; Add hook to be sure `term' quit subjob before buffer killed.
- (add-hook 'kill-buffer-hook 'multi-term-kill-buffer-hook))
-
-(defun multi-term-get-buffer (&optional special-shell dedicated-window)
- "Get term buffer.
-If option SPECIAL-SHELL is `non-nil', will use shell from user input.
-If option DEDICATED-WINDOW is `non-nil' will create dedicated `multi-term' window ."
- (with-temp-buffer
- (let ((shell-name (or multi-term-program ;shell name
- (getenv "SHELL")
- (getenv "ESHELL")
- "/bin/sh"))
- term-list-length ;get length of term list
- index ;setup new term index
- term-name) ;term name
- (if dedicated-window
- (setq term-name multi-term-dedicated-buffer-name)
- ;; Compute index.
- (setq term-list-length (length (multi-term-list)))
- (setq index (if term-list-length (1+ term-list-length) 1))
- ;; switch to current local directory,
- ;; if in-existence, switch to `multi-term-default-dir'.
- (cd (or default-directory (expand-file-name multi-term-default-dir)))
- ;; adjust value N when max index of term buffer is less than length of term list
- (while (buffer-live-p (get-buffer (format "*%s<%s>*" multi-term-buffer-name index)))
- (setq index (1+ index)))
- (setq term-name (format "%s<%s>" multi-term-buffer-name index)))
- ;; Try get other shell name if `special-shell' is non-nil.
- (if special-shell
- (setq shell-name (read-from-minibuffer "Run program: " shell-name)))
- ;; Make term, details to see function `make-term' in `term.el'.
- (if multi-term-program-switches
- (make-term term-name shell-name nil multi-term-program-switches)
- (make-term term-name shell-name)))))
-
-
-(defun multi-term-handle-close ()
- "Close current term buffer when `exit' from term buffer."
- (when (ignore-errors (get-buffer-process (current-buffer)))
- (set-process-sentinel (get-buffer-process (current-buffer))
- (lambda (proc change)
- (when (string-match "\\(finished\\|exited\\)" change)
- (kill-buffer (process-buffer proc)))))))
-
-(defun multi-term-kill-buffer-hook ()
- "Function that hook `kill-buffer-hook'."
- (when (eq major-mode 'term-mode)
- ;; Quit the current subjob
- ;; when have alive process with current term buffer.
- ;; Must do this job BEFORE `multi-term-switch-after-close' action.
- (when (term-check-proc (current-buffer))
- ;; Quit sub-process.
- (term-quit-subjob))
- ;; Remember dedicated window height.
- (multi-term-dedicated-remember-window-height)
- ;; Try to switch other multi-term buffer
- ;; when option `multi-term-switch-after-close' is non-nil.
- (when multi-term-switch-after-close
- (multi-term-switch-internal multi-term-switch-after-close 1))))
-
-(defun multi-term-list ()
- "List term buffers presently active."
- ;; Autload command `remove-if-not'.
- (autoload 'remove-if-not "cl-seq")
- (sort
- (remove-if-not (lambda (b)
- (setq case-fold-search t)
- (string-match
- (format "^\\\*%s<[0-9]+>\\\*$" multi-term-buffer-name)
- (buffer-name b)))
- (buffer-list))
- (lambda (a b)
- (< (string-to-number
- (cadr (split-string (buffer-name a) "[<>]")))
- (string-to-number
- (cadr (split-string (buffer-name b) "[<>]")))))))
-
-(defun multi-term-switch (direction offset)
- "Switch `multi-term' buffers.
-If DIRECTION is `NEXT', switch to the next term.
-If DIRECTION `PREVIOUS', switch to the previous term.
-Option OFFSET for skip OFFSET number term buffer."
- (unless (multi-term-switch-internal direction offset)
- (if multi-term-try-create
- (progn
- (multi-term)
- (message "Create a new `multi-term' buffer."))
- (message "Haven't any `multi-term' buffer exist."))))
-
-(defun multi-term-switch-internal (direction offset)
- "Internal `multi-term' buffers switch function.
-If DIRECTION is `NEXT', switch to the next term.
-If DIRECTION `PREVIOUS', switch to the previous term.
-Option OFFSET for skip OFFSET number term buffer."
- (let (terms this-buffer)
- (setq terms (multi-term-list))
- (if (consp terms)
- (progn
- (setf (cdr (last terms)) terms)
- (setq this-buffer (position (current-buffer) (multi-term-list)))
- (if this-buffer
- (if (eql direction 'NEXT)
- (switch-to-buffer (nth (+ this-buffer offset) terms))
- (switch-to-buffer (nth (+ (- (length (multi-term-list)) offset)
- this-buffer) terms)))
- (switch-to-buffer (car terms)))
- t)
- nil)))
-
-(defun multi-term-keystroke-setup ()
- "Keystroke setup of `term-char-mode'.
-
-By default, the key bindings of `term-char-mode' conflict with user's keystroke.
-So this function unbinds some keys with `term-raw-map',
-and binds some keystroke with `term-raw-map'."
- (let (bind-key bind-command)
- ;; Unbind base key that conflict with user's keys-tokes.
- (dolist (unbind-key term-unbind-key-list)
- (cond
- ((stringp unbind-key) (setq unbind-key (read-kbd-macro unbind-key)))
- ((vectorp unbind-key) nil)
- (t (signal 'wrong-type-argument (list 'array unbind-key))))
- (define-key term-raw-map unbind-key nil))
- ;; Add some i use keys.
- ;; If you don't like my keystroke,
- ;; just modified `term-bind-key-alist'
- (dolist (element term-bind-key-alist)
- (setq bind-key (car element))
- (setq bind-command (cdr element))
- (cond
- ((stringp bind-key) (setq bind-key (read-kbd-macro bind-key)))
- ((vectorp bind-key) nil)
- (t (signal 'wrong-type-argument (list 'array bind-key))))
- (define-key term-raw-map bind-key bind-command))))
-
-(defun multi-term-dedicated-handle-other-window-advice (activate)
- "Handle advice for function `other-window'.
-If ACTIVATE is `non-nil', will enable advice
-`multi-term-dedicated-other-window-advice'.
-Otherwise, disable it."
- (if activate
- (ad-enable-advice 'other-window 'after 'multi-term-dedicated-other-window-advice)
- (ad-disable-advice 'other-window 'after 'multi-term-dedicated-other-window-advice))
- (ad-activate 'other-window))
-
-(defun multi-term-current-window-take-height (&optional window)
- "Return the height the `window' takes up.
-Not the value of `window-height', it returns usable rows available for WINDOW.
-If `window' is nil, get current window."
- (let ((edges (window-edges window)))
- (- (nth 3 edges) (nth 1 edges))))
-
-(defun multi-term-dedicated-get-window ()
- "Get `multi-term' dedicated window."
- (setq multi-term-dedicated-window
- (split-window
- (selected-window)
- (- (multi-term-current-window-take-height) multi-term-dedicated-window-height))))
-
-(defun multi-term-dedicated-get-buffer-name ()
- "Get the buffer name of `multi-term' dedicated window."
- (format "*%s*" multi-term-dedicated-buffer-name))
-
-(defun multi-term-dedicated-exist-p ()
- "Return `non-nil' if `multi-term' dedicated window exist."
- (and (multi-term-buffer-exist-p multi-term-dedicated-buffer)
- (multi-term-window-exist-p multi-term-dedicated-window)))
-
-(defun multi-term-window-exist-p (window)
- "Return `non-nil' if WINDOW exist.
-Otherwise return nil."
- (and window (window-live-p window)))
-
-(defun multi-term-buffer-exist-p (buffer)
- "Return `non-nil' if `BUFFER' exist.
-Otherwise return nil."
- (and buffer (buffer-live-p buffer)))
-
-(defun multi-term-dedicated-window-p ()
- "Return `non-nil' if current window is `multi-term' dedicated window.
-Otherwise return nil."
- (equal (multi-term-dedicated-get-buffer-name) (buffer-name (window-buffer))))
-
-(defun multi-term-window-dedicated-only-one-p ()
- "Only have one non-dedicated window."
- (interactive)
- (let ((window-number 0)
- (dedicated-window-number 0))
- (walk-windows
- (lambda (w)
- (with-selected-window w
- (incf window-number)
- (if (window-dedicated-p w)
- (incf dedicated-window-number)))))
- (if (and (> dedicated-window-number 0)
- (= (- window-number dedicated-window-number) 1))
- t nil)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Advice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defadvice delete-other-windows (around multi-term-delete-other-window-advice activate)
- "This is advice to make `multi-term' avoid dedicated window deleted.
-Dedicated window can't deleted by command `delete-other-windows'."
- (let ((multi-term-dedicated-active-p (multi-term-window-exist-p multi-term-dedicated-window)))
- (if multi-term-dedicated-active-p
- (let ((current-window (selected-window)))
- (dolist (win (window-list))
- (when (and (window-live-p win)
- (not (eq current-window win))
- (not (window-dedicated-p win)))
- (delete-window win))))
- ad-do-it)))
-
-(defadvice delete-window (before multi-term-delete-window-advice activate)
- "Use `delete-window' delete `multi-term' dedicated window.
-Have same effect as command `multi-term-dedicated-close'.
-This advice to remember `multi-term' dedicated window height before deleting."
- ;; Remember window height before deleted.
- (multi-term-dedicated-remember-window-height))
-
-(defadvice pop-to-buffer (before multi-term-pop-to-buffer-advice activate)
- "This advice fix the problem between `pop-to-buffer' and dedicated window.
-By default, function `display-buffer' can't display buffer in selected window
-if current window is `dedicated'.
-
-So function `display-buffer' conflicts with `sr-speedbar' window, because
-`sr-speedbar' window is a `dedicated' window.
-
-That is to say, when current frame just have one `non-dedicated' window,
-any functions that uses `display-buffer' can't split windows
-to display buffer, even when the option `pop-up-windows' is enabled.
-
-And the example function that can induce the problem is `pop-to-buffer'.
-
-This advice will fix this problem when current frame just have one `non-dedicated' window."
- (when (and pop-up-windows ;`pop-up-windows' is enable
- (multi-term-window-dedicated-only-one-p) ;just have one `non-dedicated' window.
- (multi-term-window-exist-p multi-term-dedicated-window)
- (not (multi-term-dedicated-window-p))) ;not in `sr-speedbar' window
- (split-window-vertically)
- (windmove-down)))
-
-(defadvice other-window (after multi-term-dedicated-other-window-advice)
- "Default, can use `other-window' select window in cyclic ordering of windows.
-But sometimes we don't want to select `sr-speedbar' window,
-but use `other-window' and just make `multi-term' dedicated
-window as a viewable sidebar.
-
-This advice can make `other-window' skip `multi-term' dedicated window."
- (let ((count (or (ad-get-arg 0) 1)))
- (when (and (multi-term-window-exist-p multi-term-dedicated-window)
- (eq multi-term-dedicated-window (selected-window)))
- (other-window count))))
-
-(provide 'multi-term)
-
-;; Local Variables:
-;; time-stamp-line-limit: 10
-;; time-stamp-start: "Last-Updated: <"
-;; time-stamp-end: ">"
-;; End:
-
-;;; multi-term.el ends here
-
-;;; LocalWords: multi el dir sr Hawley eb ef cd
View
144 site-lisp/misc/pytest.el
@@ -1,144 +0,0 @@
-;;; pytest.el --- integration with py.test
-;;; version: 0.1
-
-;; Copyright (C) 2011 Antonio Cuni
-;; Author: Antonio Cuni <anto.cuni@gmail.com>
-
-;; Description
-;; -----------
-;;
-;; This file contains some useful functions to run py.test from within emacs.
-;;
-;; If you are editing a test file (i.e., a file named test_*.py), you can run
-;; pytest-run-file to start py.test on that file. You will be able to edit
-;; the actual py.test command to run in the minibuffer, so you can add all the
-;; flags you want (e.g., -s or --pdb).
-;;
-;; If you are editing a non-test file, pytest-run-file by default will start
-;; py.test on the directory where the file is in.
-;;
-;; If you are editing a test file and want to run the very specific test you
-;; are editing, you can run pytest-run-method, which will add the
-;; corresponding "-k" option to py.test. You can still edit the command in
-;; the minibuffer before running it.
-;;
-;; If you want to re-run the last py.test command, you can use
-;; pytest-run-again. By default, pytest-run-again does not ask you to edit
-;; the minibuffer, but you can still do it by prefixing pytest-run-again with
-;; C-u.
-;;
-;; The py.test process is run inside an ansi term provided by term.el: this
-;; means that if you use --pdb or explicitly have a pdb.set_trace() in your
-;; code, the (Pdb) prompt will "just work", including the colored output and
-;; the TAB-completion provided by e.g. pdb++.
-;;
-;; Default keybindings
-;; -------------------
-;;
-;; By default, the functions are bound to the "C-x t" map, which is unused in
-;; the default emacs settings.
-;;
-;; key binding
-;; --- -------
-;; C-x t f pytest-run-file
-;; C-x t m pytest-run-method
-;; C-x t t pytest-run-again
-;; C-u C-x t t pytest-run-again (after editing in the minibuffer)
-
-
-(require 'term)
-
-;; (defvar ctl-x-t-map (make-sparse-keymap)
-;; "Keymap for subcommands of C-x t.")
-;; (define-key ctl-x-map "t" ctl-x-t-map)
-;; (define-key ctl-x-t-map "t" 'pytest-run-again)
-;; (define-key ctl-x-t-map "f" 'pytest-run-file)
-;; (define-key ctl-x-t-map "m" 'pytest-run-method)
-
-(defvar pytest-run-history nil)
-
-(defconst pytest-def-re "def \\(test_[A-Za-z0-9_]+\\)")
-
-(defun pytest-term-sentinel (proc msg)
- (term-sentinel proc msg)
- (when (memq (process-status proc) '(signal exit))
- (with-selected-window (get-buffer-window "*pytest*")
- (setq buffer-read-only t)
- (local-set-key "q" 'quit-window)
- (local-set-key "g" 'pytest-run-again)
- (goto-char (point-max))
- (when (> (count-lines (point-min) (point-max))
- (window-total-height))
- (scroll-down (- (/ (window-total-height) 2) 2))))))
-
-(defun pytest-run (cmdline show-prompt)
- (let ((cmdline (if show-prompt
- (read-shell-command "Run: " cmdline
- 'pytest-run-history)
- cmdline))
- (buffer (get-buffer-create "*pytest*")))
- (add-to-list 'pytest-run-history cmdline)
- (display-buffer buffer)
- (with-current-buffer buffer
- (if (get-buffer-process (current-buffer))
- (term-kill-subjob))
- (setq buffer-read-only nil)
- (erase-buffer)
- (insert cmdline)
- (newline)
- (term-ansi-make-term "*pytest*" "/bin/sh" nil "-c" cmdline)
- (term-char-mode)
- (let ((proc (get-buffer-process buffer)))
- ; override the default sentinel set by term-ansi-make-term
- (set-process-sentinel proc 'pytest-term-sentinel)))))
-
-
-;; (defun pytest-arg-from-path (path)
-;; (let ((filename (file-name-nondirectory path)))
-;; (if (or (string-match "test_.*\\.py$" filename)
-;; (string-match ".*_test\\.py$" filename))
-;; path
-;; (file-name-directory path))))
-
-(defun pytest-current-function-name ()
- (save-excursion
- (if (search-backward-regexp pytest-def-re)
- (match-string 1)
- nil)))
-
-(defun pytest-run-file ()
- "Run py.test on the current file."
- (interactive)
- (let ((cmdline (format "cd; py.test %s "
- ;(pytest-arg-from-path (buffer-file-name))
- (buffer-file-name))))
- (save-buffer)
- (pytest-run cmdline nil)))
-
-(defun pytest-run-method ()
- "Run py.test on the current test.
-
-If invokes py.test by adding \"-k funcname\", where funcname is the
-name of the test_* function you are editing.
-"
- (interactive)
- (let ((cmdline (format "cd; py.test %s -k %s "
- ;(pytest-arg-from-path (buffer-file-name))
- (buffer-file-name)
- (pytest-current-function-name))))
- (pytest-run cmdline t)))
-
-(defun pytest-run-again ()
- "Re-run the last py.test command.
-
-If prefixed by C-u, it lets you to edit the command in the
-minibuffer before executing it.
-"
- (interactive)
- (if (not pytest-run-history)
- (message "No preceding pytest commands in history")
- (let ((cmdline (car pytest-run-history))
- (show-prompt (equal current-prefix-arg '(4))))
- (pytest-run cmdline show-prompt))))
-
-(provide 'pytest)
1  site-lisp/multiple-cursors
@@ -1 +0,0 @@
-Subproject commit bfb293f2001a41dc3d6593c88c1918ceaaea2f7b
1  site-lisp/nrepl
@@ -1 +0,0 @@
-Subproject commit cdbe9debf022dedd01e8338443f0a894b9adb046
1  site-lisp/nyan-mode
@@ -1 +0,0 @@
-Subproject commit 7ca42ee526466dda4665658296017b2554ffc979
1  site-lisp/popup
@@ -1 +0,0 @@
-Subproject commit d655fd293399a8fbbd18da4db5a98b89dc3db888
1  site-lisp/python-mode-el
@@ -1 +0,0 @@
-Subproject commit 6f9ae67ac49ee8eebf916acf46048261ea69df6f
1  site-lisp/roy-mode
@@ -1 +0,0 @@
-Subproject commit e1a4fb5ec0f46e82f569865ca47042ba5934e425
1  site-lisp/smex
@@ -1 +0,0 @@
-Subproject commit 14ddd74cc5d9303bae67a74cb1d5b40ff416d76a
1  site-lisp/twittering-mode
@@ -1 +0,0 @@
-Subproject commit c692ee9bb5d54208038776ea4429900e9eddcfc5
1  site-lisp/yasnippet
@@ -1 +0,0 @@
-Subproject commit 618cf506ee2bb7c9e11eeda31090c19dc433f856
View
85 themes/monokai-theme.el
@@ -1,85 +0,0 @@
-;;; monokai-theme.el --- REQUIRES EMACS 24: Monokai Color Theme for Emacs.
-
-;; Copyright (C) 2012 Lorenzo Villani.
-;;
-;; Author: Lorenzo Villani <lorenzo@villani.me>
-;; URL: https://github.com/lvillani/el-monokai-theme
-;; Version: 0.0.8
-;;
-;; 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, version 3 of the License.
-;;
-;; This file is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.
-
-(unless (>= 24 emacs-major-version)
- (error "monokai-theme requires Emacs 24 or later."))
-
-(deftheme monokai
- "Monokai color theme")
-
-(let ((monokai-blue-light "#89BDFF")
- (monokai-gray "#595959")
- (monokai-gray-darker "#383830")
- (monokai-gray-darkest "#141411")
- (monokai-gray-lightest "#595959")
- (monokai-gray-light "#E6E6E6")
- (monokai-green "#A6E22A")
- (monokai-green-light "#A6E22E")
- (monokai-grey-dark "#272822")
- (monokai-magenta "#F92672")
- (monokai-purple "#AE81FF")
- (monokai-purple-light "#FD5FF1")
- (monokai-yellow "#E6DB74")
- (monokai-yellow-dark "#75715E")
- (monokai-yellow-light "#F8F8F2"))
- (custom-theme-set-faces
- 'monokai
- ;; Frame
- `(default ((t (:foreground ,monokai-yellow-light :background ,monokai-grey-dark))))
- `(cursor ((t (:foreground ,monokai-magenta))))
- `(hl-line ((t (:background ,monokai-gray-darkest))))
- `(minibuffer-prompt ((t (:foreground ,monokai-yellow-dark))))
- `(modeline ((t (:background ,monokai-gray-lightest :foreground ,monokai-gray-light))))
- `(region ((t (:background ,monokai-gray-darker))))
- `(show-paren-match-face ((t (:background ,monokai-gray-darker))))
- ;; Main
- `(font-lock-builtin-face ((t (:foreground ,monokai-green))))
- `(font-lock-comment-face ((t (:foreground ,monokai-yellow-dark))))
- `(font-lock-constant-face ((t (:foreground ,monokai-purple))))
- `(font-lock-doc-string-face ((t (:foreground ,monokai-yellow))))
- `(font-lock-function-name-face ((t (:foreground ,monokai-green))))
- `(font-lock-keyword-face ((t (:foreground ,monokai-magenta))))
- `(font-lock-string-face ((t (:foreground ,monokai-yellow))))
- `(font-lock-type-face ((t (:foreground ,monokai-blue-light))))
- `(font-lock-variable-name-face ((t (:foreground ,monokai-magenta))))
- `(font-lock-warning-face ((t (:bold t :foreground ,monokai-purple-light))))
- ;; CUA
- `(cua-rectangle ((t (:background ,monokai-gray-darkest))))
- ;; IDO
- `(ido-first-match ((t (:foreground ,monokai-purple))))
- `(ido-only-match ((t (:foreground ,monokai-green))))
- `(ido-subdir ((t (:foreground ,monokai-blue-light))))
- ;; Whitespace
- `(whitespace-space ((t (:foreground ,monokai-gray))))
- ;; Yasnippet
- `(yas/field-highlight-face ((t (:background ,monokai-gray-darker))))))
-
-;;;###autoload
-(when load-file-name
- (add-to-list 'custom-theme-load-path
- (file-name-as-directory (file-name-directory load-file-name))))
-
-(provide-theme 'monokai)
-
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
-
-;;; monokai-theme.el ends here
1  themes/solarized
@@ -1 +0,0 @@
-Subproject commit bb4897a3d792721f515de4c221e0a5c594ca3809
1  themes/zenburn
@@ -1 +0,0 @@
-Subproject commit cec8d444bcc477b4dd79ad3d060699d3689d968a
Please sign in to comment.
Something went wrong with that request. Please try again.