Skip to content
Browse files

Update everything.

  • Loading branch information...
1 parent 16563fd commit bc9fa1325ace5b3f279a6fa9dc8a67841f6563a5 @Raynes committed
Showing with 8,449 additions and 2,506 deletions.
  1. +23 −9 elpa/archives/gnu/archive-contents
  2. +1 −1 elpa/archives/marmalade/archive-contents
  3. +48 −0 elpa/clojure-mode-2.0.0/clojure-mode-autoloads.el
  4. +1 −0 elpa/clojure-mode-2.0.0/clojure-mode-pkg.el
  5. BIN elpa/clojure-mode-2.0.0/clojure-mode-pkg.elc
  6. +1,017 −0 elpa/clojure-mode-2.0.0/clojure-mode.el
  7. BIN elpa/clojure-mode-2.0.0/clojure-mode.elc
  8. +35 −0 elpa/clojure-test-mode-2.0.0/clojure-test-mode-autoloads.el
  9. +1 −0 elpa/clojure-test-mode-2.0.0/clojure-test-mode-pkg.el
  10. BIN elpa/clojure-test-mode-2.0.0/clojure-test-mode-pkg.elc
  11. +446 −0 elpa/clojure-test-mode-2.0.0/clojure-test-mode.el
  12. BIN elpa/clojure-test-mode-2.0.0/clojure-test-mode.elc
  13. +0 −1,662 elpa/haskell-mode-2.8.0/ChangeLog
  14. +0 −119 elpa/haskell-mode-2.8.0/README
  15. BIN elpa/haskell-mode-2.8.0/ghc-core.elc
  16. BIN elpa/haskell-mode-2.8.0/haskell-c.elc
  17. BIN elpa/haskell-mode-2.8.0/haskell-cabal.elc
  18. BIN elpa/haskell-mode-2.8.0/haskell-decl-scan.elc
  19. BIN elpa/haskell-mode-2.8.0/haskell-doc.elc
  20. BIN elpa/haskell-mode-2.8.0/haskell-font-lock.elc
  21. BIN elpa/haskell-mode-2.8.0/haskell-ghci.elc
  22. BIN elpa/haskell-mode-2.8.0/haskell-hugs.elc
  23. BIN elpa/haskell-mode-2.8.0/haskell-indent.elc
  24. BIN elpa/haskell-mode-2.8.0/haskell-indentation.elc
  25. +0 −2 elpa/haskell-mode-2.8.0/haskell-mode-pkg.el
  26. BIN elpa/haskell-mode-2.8.0/haskell-mode.elc
  27. BIN elpa/haskell-mode-2.8.0/haskell-simple-indent.elc
  28. +0 −300 elpa/haskell-mode-2.8.0/haskell-site-file.el
  29. BIN elpa/haskell-mode-2.8.0/haskell-site-file.elc
  30. BIN elpa/haskell-mode-2.8.0/inf-haskell.elc
  31. +51 −0 elpa/nrepl-0.1.5/nrepl-autoloads.el
  32. +1 −0 elpa/nrepl-0.1.5/nrepl-pkg.el
  33. BIN elpa/{haskell-mode-2.8.0/haskell-mode-pkg.elc → nrepl-0.1.5/nrepl-pkg.elc}
  34. +2,015 −0 elpa/nrepl-0.1.5/nrepl.el
  35. BIN elpa/nrepl-0.1.5/nrepl.elc
  36. +1 −0 eshell/history
  37. +15 −70 init.el
  38. +2 −0 non-elpa/elixir-mode/.gitignore
  39. +129 −0 non-elpa/elixir-mode/README.markdown
  40. +330 −0 non-elpa/elixir-mode/elixir-mode.el
  41. +101 −0 non-elpa/elixir-mode/elixir-smie.el
  42. +50 −0 non-elpa/elixir-mode/test.ex
  43. +1 −0 non-elpa/haskell-mode/.gitignore
  44. +5 −0 non-elpa/haskell-mode/.hgignore
  45. +71 −0 non-elpa/haskell-mode/Makefile
  46. 0 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/NEWS
  47. +149 −0 non-elpa/haskell-mode/README.md
  48. +101 −0 non-elpa/haskell-mode/examples/init.el
  49. 0 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/fontlock.hs
  50. 0 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/ghc-core.el
  51. +173 −0 non-elpa/haskell-mode/haskell-align-imports.el
  52. 0 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-c.el
  53. +72 −27 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-cabal.el
  54. +158 −0 non-elpa/haskell-mode/haskell-checkers.el
  55. 0 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-decl-scan.el
  56. +74 −53 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-doc.el
  57. +25 −4 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-font-lock.el
  58. +5 −3 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-ghci.el
  59. 0 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-hugs.el
  60. +3 −1 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-indent.el
  61. +205 −127 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-indentation.el
  62. +460 −0 non-elpa/haskell-mode/haskell-interactive-mode.el
  63. +266 −41 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-mode.el
  64. +92 −0 non-elpa/haskell-mode/haskell-move-nested.el
  65. +110 −0 non-elpa/haskell-mode/haskell-navigate-imports.el
  66. +147 −0 non-elpa/haskell-mode/haskell-package.el
  67. +819 −0 non-elpa/haskell-mode/haskell-process.el
  68. +271 −0 non-elpa/haskell-mode/haskell-session.el
  69. +252 −0 non-elpa/haskell-mode/haskell-show.el
  70. +46 −1 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/haskell-simple-indent.el
  71. +160 −28 elpa/haskell-mode-2.8.0/haskell-mode-autoloads.el → non-elpa/haskell-mode/haskell-site-file.el
  72. +78 −0 non-elpa/haskell-mode/haskell-sort-imports.el
  73. +24 −0 non-elpa/haskell-mode/haskell-string.el
  74. 0 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/indent.hs
  75. +149 −56 {elpa/haskell-mode-2.8.0 → non-elpa/haskell-mode}/inf-haskell.el
  76. +16 −0 non-elpa/haskell-mode/logo.svg
  77. +1 −1 non-elpa/nrepl.el
  78. +245 −0 old.el
  79. +4 −1 url/cookies
View
32 elpa/archives/gnu/archive-contents
@@ -3,7 +3,7 @@
[(0 8)
nil "Interface to ack, a source code search tool" tar])
(adaptive-wrap .
- [(0 1)
+ [(0 2)
nil "Smart line-wrapping with wrap-prefix" single])
(all .
[(1 0)
@@ -14,6 +14,9 @@
(auctex .
[(11 86)
nil "Integrated environment for *TeX*" tar])
+ (cl-lib .
+ [(0 2)
+ nil "Properly prefixed CL functions and macros" single])
(coffee-mode .
[(0 4 1)
nil "Major mode for CoffeeScript files" tar])
@@ -24,7 +27,7 @@
[(1 1)
nil "Major mode for editing comma/char separated values" single])
(debbugs .
- [(0 3)
+ [(0 4)
nil "SOAP library to access debbugs servers" tar])
(dict-tree .
[(0 12 8)
@@ -57,11 +60,13 @@
[(2 4)
nil "Incremental occur" single])
(jgraph-mode .
- [(0 0)
+ [(1 0)
nil "Major mode for Jgraph files" single])
(js2-mode .
- [(20090814)
- nil "Improved JavaScript editing mode" single])
+ [(1 1)
+ ((emacs
+ (24 1)))
+ "Improved JavaScript editing mode" single])
(lmc .
[(1 0)
nil "Little Man Computer in Elisp" single])
@@ -72,7 +77,7 @@
[(0 2 0)
nil "Mark chars fitting certain characteristics" single])
(memory-usage .
- [(0 1)
+ [(0 2)
nil "Analyze the memory usage of Emacs in various ways" single])
(minimap .
[(1 0)
@@ -84,14 +89,20 @@
[(0 1)
nil "Minor mode to edit files via hex-dump format" single])
(nlinum .
- [(1 0)
+ [(1 1)
nil "Show line numbers in the margin" single])
+ (notes-mode .
+ [(1 30)
+ nil "Organizing on-line note-taking" tar])
(num3-mode .
[(1 1)
nil "highlight groups of digits in long numbers" single])
(oauth2 .
[(0 8)
nil "OAuth 2.0 Authorization Protocol" single])
+ (org .
+ [(20121224)
+ nil "Outline-based notes management and organizer" tar])
(quarter-plane .
[(0 1)
nil "Minor mode for quarter-plane style editing" single])
@@ -99,7 +110,7 @@
[(0 1)
nil "Queue data structure" single])
(rainbow-mode .
- [(0 2)
+ [(0 6)
nil "Colorize color names in buffers" single])
(register-list .
[(0 1)
@@ -113,6 +124,9 @@
(smart-operator .
[(4 0)
nil "Insert operators with surrounding spaces smartly" single])
+ (sml-mode .
+ [(6 2)
+ nil "Major mode for editing (Standard) ML" single])
(svg-clock .
[(0 4)
nil "Analog clock using Scalable Vector Graphics" single])
@@ -129,7 +143,7 @@
(0 3)))
"Trie data structure" single])
(undo-tree .
- [(0 5 5)
+ [(0 6 3)
nil "Treat undo history as a tree" single])
(uni-confusables .
[(0 1)
View
2 elpa/archives/marmalade/archive-contents
1 addition, 1 deletion not shown because the diff is too large. Please use a local Git client to view these changes.
View
48 elpa/clojure-mode-2.0.0/clojure-mode-autoloads.el
@@ -0,0 +1,48 @@
+;;; clojure-mode-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+
+;;;### (autoloads (clojure-mode) "clojure-mode" "clojure-mode.el"
+;;;;;; (20703 55362 0 0))
+;;; Generated autoloads from clojure-mode.el
+
+(autoload 'clojure-mode "clojure-mode" "\
+Major mode for editing Clojure code - similar to Lisp mode.
+Commands:
+Delete converts tabs to spaces as it moves back.
+Blank lines separate paragraphs. Semicolons start comments.
+\\{clojure-mode-map}
+Note that `run-lisp' may be used either to start an inferior Lisp job
+or to switch back to an existing one.
+
+Entry to this mode calls the value of `clojure-mode-hook'
+if that value is non-nil.
+
+\(fn)" t nil)
+
+(put 'clojure-test-ns-segment-position 'safe-local-variable 'integerp)
+
+(put 'clojure-mode-load-command 'safe-local-variable 'stringp)
+
+(add-to-list 'auto-mode-alist '("\\.clj\\'" . clojure-mode))
+
+(add-to-list 'interpreter-mode-alist '("jark" . clojure-mode))
+
+(add-to-list 'interpreter-mode-alist '("cake" . clojure-mode))
+
+;;;***
+
+;;;### (autoloads nil nil ("clojure-mode-pkg.el") (20703 55362 767835
+;;;;;; 0))
+
+;;;***
+
+(provide 'clojure-mode-autoloads)
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; clojure-mode-autoloads.el ends here
View
1 elpa/clojure-mode-2.0.0/clojure-mode-pkg.el
@@ -0,0 +1 @@
+(define-package "clojure-mode" "2.0.0" "Major mode for Clojure code" (quote nil))
View
BIN elpa/clojure-mode-2.0.0/clojure-mode-pkg.elc
Binary file not shown.
View
1,017 elpa/clojure-mode-2.0.0/clojure-mode.el
@@ -0,0 +1,1017 @@
+;;; clojure-mode.el --- Major mode for Clojure code
+
+;; Copyright © 2007-2013 Jeffrey Chu, Lennart Staflin, Phil Hagelberg
+;;
+;; Authors: Jeffrey Chu <jochu0@gmail.com>
+;; Lennart Staflin <lenst@lysator.liu.se>
+;; Phil Hagelberg <technomancy@gmail.com>
+;; URL: http://github.com/technomancy/clojure-mode
+;; Version: 2.0.0
+;; Keywords: languages, lisp
+
+;; This file is not part of GNU Emacs.
+
+;;; Commentary:
+
+;; Provides font-lock, indentation, and navigation for the Clojure
+;; language. (http://clojure.org)
+
+;; Users of older Emacs (pre-22) should get version 1.4:
+;; http://github.com/technomancy/clojure-mode/tree/1.4
+
+;; Slime integration has been removed; see the 1.x releases if you need it.
+
+;; Using clojure-mode with paredit is highly recommended. Use paredit
+;; as you would with any other minor mode; for instance:
+;;
+;; ;; require or autoload paredit-mode
+;; (add-hook 'clojure-mode-hook 'paredit-mode)
+
+;; See nREPL.el (http://github.com/kingtim/nrepl.el) for
+;; better interaction with subprocesses via nREPL.
+
+;;; License:
+
+;; 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 (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 GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(eval-when-compile
+ (defvar calculate-lisp-indent-last-sexp)
+ (defvar font-lock-beg)
+ (defvar font-lock-end)
+ (defvar paredit-version)
+ (defvar paredit-mode))
+
+(require 'cl)
+(require 'tramp)
+(require 'inf-lisp)
+(require 'imenu)
+
+(declare-function clojure-test-jump-to-implementation "clojure-test-mode.el")
+
+(defconst clojure-font-lock-keywords
+ (eval-when-compile
+ `( ;; Definitions.
+ (,(concat "(\\(?:clojure.core/\\)?\\("
+ (regexp-opt '("defn" "defn-" "def" "defonce"
+ "defmulti" "defmethod" "defmacro"
+ "defstruct" "deftype" "defprotocol"
+ "defrecord" "deftest" "def\\[a-z\\]"))
+ ;; Function declarations.
+ "\\)\\>"
+ ;; Any whitespace
+ "[ \r\n\t]*"
+ ;; Possibly type or metadata
+ "\\(?:#?^\\(?:{[^}]*}\\|\\sw+\\)[ \r\n\t]*\\)*"
+ "\\(\\sw+\\)?")
+ (1 font-lock-keyword-face)
+ (2 font-lock-function-name-face nil t))
+ ;; (fn name? args ...)
+ (,(concat "(\\(?:clojure.core/\\)?\\(fn\\)[ \t]+"
+ ;; Possibly type
+ "\\(?:#?^\\sw+[ \t]*\\)?"
+ ;; Possibly name
+ "\\(t\\sw+\\)?" )
+ (1 font-lock-keyword-face)
+ (2 font-lock-function-name-face nil t))
+
+ (,(concat "(\\(\\(?:[a-z\.-]+/\\)?def\[a-z\]*-?\\)"
+ ;; Function declarations.
+ "\\>"
+ ;; Any whitespace
+ "[ \r\n\t]*"
+ ;; Possibly type or metadata
+ "\\(?:#?^\\(?:{[^}]*}\\|\\sw+\\)[ \r\n\t]*\\)*"
+ "\\(\\sw+\\)?")
+ (1 font-lock-keyword-face)
+ (2 font-lock-function-name-face nil t))
+ ;; Deprecated functions
+ (,(concat
+ "(\\(?:clojure.core/\\)?"
+ (regexp-opt
+ '("add-watcher" "remove-watcher" "add-classpath") t)
+ "\\>")
+ 1 font-lock-warning-face)
+ ;; Control structures
+ (,(concat
+ "(\\(?:clojure.core/\\)?"
+ (regexp-opt
+ '("let" "letfn" "do"
+ "case" "cond" "condp"
+ "for" "loop" "recur"
+ "when" "when-not" "when-let" "when-first"
+ "if" "if-let" "if-not"
+ "." ".." "->" "->>" "doto"
+ "and" "or"
+ "dosync" "doseq" "dotimes" "dorun" "doall"
+ "load" "import" "unimport" "ns" "in-ns" "refer"
+ "try" "catch" "finally" "throw"
+ "with-open" "with-local-vars" "binding"
+ "gen-class" "gen-and-load-class" "gen-and-save-class"
+ "handler-case" "handle") t)
+ "\\>")
+ 1 font-lock-keyword-face)
+ ;; Built-ins
+ (,(concat
+ "(\\(?:clojure.core/\\)?"
+ (regexp-opt
+ '("*" "*1" "*2" "*3" "*agent*"
+ "*allow-unresolved-vars*" "*assert*" "*clojure-version*" "*command-line-args*" "*compile-files*"
+ "*compile-path*" "*e" "*err*" "*file*" "*flush-on-newline*"
+ "*in*" "*macro-meta*" "*math-context*" "*ns*" "*out*"
+ "*print-dup*" "*print-length*" "*print-level*" "*print-meta*" "*print-readably*"
+ "*read-eval*" "*source-path*" "*use-context-classloader*" "*warn-on-reflection*" "+"
+ "-" "/"
+ "<" "<=" "=" "==" ">"
+ ">=" "accessor" "aclone"
+ "agent" "agent-errors" "aget" "alength" "alias"
+ "all-ns" "alter" "alter-meta!" "alter-var-root" "amap"
+ "ancestors" "and" "apply" "areduce" "array-map"
+ "aset" "aset-boolean" "aset-byte" "aset-char" "aset-double"
+ "aset-float" "aset-int" "aset-long" "aset-short" "assert"
+ "assoc" "assoc!" "assoc-in" "associative?" "atom"
+ "await" "await-for" "await1" "bases" "bean"
+ "bigdec" "bigint" "binding" "bit-and" "bit-and-not"
+ "bit-clear" "bit-flip" "bit-not" "bit-or" "bit-set"
+ "bit-shift-left" "bit-shift-right" "bit-test" "bit-xor" "boolean"
+ "boolean-array" "booleans" "bound-fn" "bound-fn*" "butlast"
+ "byte" "byte-array" "bytes" "case" "cast" "char"
+ "char-array" "char-escape-string" "char-name-string" "char?" "chars"
+ "chunk" "chunk-append" "chunk-buffer" "chunk-cons" "chunk-first"
+ "chunk-next" "chunk-rest" "chunked-seq?" "class" "class?"
+ "clear-agent-errors" "clojure-version" "coll?" "comment" "commute"
+ "comp" "comparator" "compare" "compare-and-set!" "compile"
+ "complement" "concat" "cond" "condp" "conj"
+ "conj!" "cons" "constantly" "construct-proxy" "contains?"
+ "count" "counted?" "create-ns" "create-struct" "cycle"
+ "dec" "decimal?" "declare" "definline" "defmacro"
+ "defmethod" "defmulti" "defn" "defn-" "defonce"
+ "defstruct" "delay" "delay?" "deliver" "deref"
+ "derive" "descendants" "destructure" "disj" "disj!"
+ "dissoc" "dissoc!" "distinct" "distinct?" "doall"
+ "doc" "dorun" "doseq" "dosync" "dotimes"
+ "doto" "double" "double-array" "doubles" "drop"
+ "drop-last" "drop-while" "empty" "empty?" "ensure"
+ "enumeration-seq" "eval" "even?" "every?"
+ "extend" "extend-protocol" "extend-type" "extends?" "extenders"
+ "false?" "ffirst" "file-seq" "filter" "find" "find-doc"
+ "find-ns" "find-var" "first" "flatten" "float" "float-array"
+ "float?" "floats" "flush" "fn" "fn?"
+ "fnext" "for" "force" "format" "future"
+ "future-call" "future-cancel" "future-cancelled?" "future-done?" "future?"
+ "gen-class" "gen-interface" "gensym" "get" "get-in"
+ "get-method" "get-proxy-class" "get-thread-bindings" "get-validator" "group-by"
+ "hash" "hash-map" "hash-set" "identical?" "identity" "if-let"
+ "if-not" "ifn?" "import" "in-ns" "inc"
+ "init-proxy" "instance?" "int" "int-array" "integer?"
+ "interleave" "intern" "interpose" "into" "into-array"
+ "ints" "io!" "isa?" "iterate" "iterator-seq"
+ "juxt" "key" "keys" "keyword" "keyword?"
+ "last" "lazy-cat" "lazy-seq" "let" "letfn"
+ "line-seq" "list" "list*" "list?" "load"
+ "load-file" "load-reader" "load-string" "loaded-libs" "locking"
+ "long" "long-array" "longs" "loop" "macroexpand"
+ "macroexpand-1" "make-array" "make-hierarchy" "map" "map?"
+ "mapcat" "max" "max-key" "memfn" "memoize"
+ "merge" "merge-with" "meta" "method-sig" "methods"
+ "min" "min-key" "mod" "name" "namespace"
+ "neg?" "newline" "next" "nfirst" "nil?"
+ "nnext" "not" "not-any?" "not-empty" "not-every?"
+ "not=" "ns" "ns-aliases" "ns-imports" "ns-interns"
+ "ns-map" "ns-name" "ns-publics" "ns-refers" "ns-resolve"
+ "ns-unalias" "ns-unmap" "nth" "nthnext" "num"
+ "number?" "odd?" "or" "parents" "partial"
+ "partition" "partition-all" "partition-by" "pcalls" "peek" "persistent!" "pmap"
+ "pop" "pop!" "pop-thread-bindings" "pos?" "pr"
+ "pr-str" "prefer-method" "prefers" "primitives-classnames" "print"
+ "print-ctor" "print-doc" "print-dup" "print-method" "print-namespace-doc"
+ "print-simple" "print-special-doc" "print-str" "printf" "println"
+ "println-str" "prn" "prn-str" "promise" "proxy"
+ "proxy-call-with-super" "proxy-mappings" "proxy-name" "proxy-super" "push-thread-bindings"
+ "pvalues" "quot" "rand" "rand-int" "range"
+ "ratio?" "rational?" "rationalize" "re-find" "re-groups"
+ "re-matcher" "re-matches" "re-pattern" "re-seq" "read"
+ "read-line" "read-string" "reify" "reduce" "ref" "ref-history-count"
+ "ref-max-history" "ref-min-history" "ref-set" "refer" "refer-clojure"
+ "release-pending-sends" "rem" "remove" "remove-method" "remove-ns"
+ "repeat" "repeatedly" "replace" "replicate"
+ "require" "reset!" "reset-meta!" "resolve" "rest"
+ "resultset-seq" "reverse" "reversible?" "rseq" "rsubseq"
+ "satisfies?" "second" "select-keys" "send" "send-off" "seq"
+ "seq?" "seque" "sequence" "sequential?" "set"
+ "set-validator!" "set?" "short" "short-array" "shorts"
+ "shutdown-agents" "slurp" "some" "sort" "sort-by"
+ "sorted-map" "sorted-map-by" "sorted-set" "sorted-set-by" "sorted?"
+ "special-form-anchor" "special-symbol?" "spit" "split-at" "split-with" "str"
+ "stream?" "string?" "struct" "struct-map" "subs"
+ "subseq" "subvec" "supers" "swap!" "symbol"
+ "symbol?" "sync" "syntax-symbol-anchor" "take" "take-last"
+ "take-nth" "take-while" "test" "the-ns" "time"
+ "to-array" "to-array-2d" "trampoline" "transient" "tree-seq"
+ "true?" "type" "unchecked-add" "unchecked-dec" "unchecked-divide"
+ "unchecked-inc" "unchecked-multiply" "unchecked-negate" "unchecked-remainder" "unchecked-subtract"
+ "underive" "unquote" "unquote-splicing" "update-in" "update-proxy"
+ "use" "val" "vals" "var-get" "var-set"
+ "var?" "vary-meta" "vec" "vector" "vector?"
+ "when" "when-first" "when-let" "when-not" "while"
+ "with-bindings" "with-bindings*" "with-in-str" "with-loading-context" "with-local-vars"
+ "with-meta" "with-open" "with-out-str" "with-precision" "xml-seq" "zipmap"
+ ) t)
+ "\\>")
+ 1 font-lock-builtin-face)
+ ;;Other namespaces in clojure.jar
+ (,(concat
+ "(\\(?:\.*/\\)?"
+ (regexp-opt
+ '(;; clojure.inspector
+ "atom?" "collection-tag" "get-child" "get-child-count" "inspect"
+ "inspect-table" "inspect-tree" "is-leaf" "list-model" "list-provider"
+ ;; clojure.main
+ "load-script" "main" "repl" "repl-caught" "repl-exception"
+ "repl-prompt" "repl-read" "skip-if-eol" "skip-whitespace" "with-bindings"
+ ;; clojure.set
+ "difference" "index" "intersection" "join" "map-invert"
+ "project" "rename" "rename-keys" "select" "union"
+ ;; clojure.stacktrace
+ "e" "print-cause-trace" "print-stack-trace" "print-throwable" "print-trace-element"
+ ;; clojure.template
+ "do-template" "apply-template"
+ ;; clojure.test
+ "*initial-report-counters*" "*load-tests*" "*report-counters*" "*stack-trace-depth*" "*test-out*"
+ "*testing-contexts*" "*testing-vars*" "are" "assert-any" "assert-expr"
+ "assert-predicate" "compose-fixtures" "deftest" "deftest-" "file-position"
+ "function?" "get-possibly-unbound-var" "inc-report-counter" "is" "join-fixtures"
+ "report" "run-all-tests" "run-tests" "set-test" "successful?"
+ "test-all-vars" "test-ns" "test-var" "testing" "testing-contexts-str"
+ "testing-vars-str" "try-expr" "use-fixtures" "with-test" "with-test-out"
+ ;; clojure.walk
+ "keywordize-keys" "macroexpand-all" "postwalk" "postwalk-demo" "postwalk-replace"
+ "prewalk" "prewalk-demo" "prewalk-replace" "stringify-keys" "walk"
+ ;; clojure.xml
+ "*current*" "*sb*" "*stack*" "*state*" "attrs"
+ "content" "content-handler" "element" "emit" "emit-element"
+ ;; clojure.zip
+ "append-child" "branch?" "children" "down" "edit"
+ "end?" "insert-child" "insert-left" "insert-right" "left"
+ "leftmost" "lefts" "make-node" "next" "node"
+ "path" "prev" "remove" "replace" "right"
+ "rightmost" "rights" "root" "seq-zip" "up"
+ ) t)
+ "\\>")
+ 1 font-lock-type-face)
+ ;; Constant values (keywords), including as metadata e.g. ^:static
+ ("\\<^?:\\(\\sw\\|#\\)+\\>" 0 font-lock-constant-face)
+ ;; Meta type annotation #^Type or ^Type
+ ("#?^\\sw+" 0 font-lock-preprocessor-face)
+ ("\\<io\\!\\>" 0 font-lock-warning-face)
+
+ ;;Java interop highlighting
+ ("\\<\\.-?[a-z][a-zA-Z0-9]*\\>" 0 font-lock-preprocessor-face) ;; .foo .barBaz .qux01 .-flibble .-flibbleWobble
+ ("\\<[A-Z][a-zA-Z0-9_]*[a-zA-Z0-9/$_]+\\>" 0 font-lock-preprocessor-face) ;; Foo Bar$Baz Qux_ World_OpenUDP
+ ("\\<[a-zA-Z]+\\.[a-zA-Z0-9._]*[A-Z]+[a-zA-Z0-9/.$]*\\>" 0 font-lock-preprocessor-face) ;; Foo/Bar foo.bar.Baz foo.Bar/baz
+ ("[a-z]*[A-Z]+[a-z][a-zA-Z0-9$]*\\>" 0 font-lock-preprocessor-face) ;; fooBar
+ ("\\<[A-Z][a-zA-Z0-9$]*\\.\\>" 0 font-lock-preprocessor-face))) ;; Foo. BarBaz. Qux$Quux. Corge9.
+
+
+ "Default expressions to highlight in Clojure mode.")
+
+(defgroup clojure-mode nil
+ "A mode for Clojure"
+ :prefix "clojure-mode-"
+ :group 'applications)
+
+(defcustom clojure-mode-font-lock-comment-sexp nil
+ "Set to non-nil in order to enable font-lock of (comment...)
+forms. This option is experimental. Changing this will require a
+restart (ie. M-x clojure-mode) of existing clojure mode buffers."
+ :type 'boolean
+ :group 'clojure-mode)
+
+(defcustom clojure-mode-load-command "(clojure.core/load-file \"%s\")\n"
+ "*Format-string for building a Clojure expression to load a file.
+This format string should use `%s' to substitute a file name
+and should result in a Clojure expression that will command the inferior
+Clojure to load that file."
+ :type 'string
+ :group 'clojure-mode)
+
+(defcustom clojure-mode-use-backtracking-indent t
+ "Set to non-nil to enable backtracking/context sensitive indentation."
+ :type 'boolean
+ :group 'clojure-mode)
+
+(defcustom clojure-max-backtracking 3
+ "Maximum amount to backtrack up a list to check for context."
+ :type 'integer
+ :group 'clojure-mode)
+
+(defvar clojure-mode-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map lisp-mode-shared-map)
+ (define-key map "\e\C-x" 'lisp-eval-defun)
+ (define-key map "\C-x\C-e" 'lisp-eval-last-sexp)
+ (define-key map "\C-c\C-e" 'lisp-eval-last-sexp)
+ (define-key map "\C-c\C-l" 'clojure-load-file)
+ (define-key map "\C-c\C-r" 'lisp-eval-region)
+ (define-key map (kbd "C-c C-t") 'clojure-jump-between-tests-and-code)
+ (define-key map "\C-c\C-z" 'clojure-display-inferior-lisp-buffer)
+ (define-key map (kbd "C-c M-q") 'clojure-fill-docstring)
+ map)
+ "Keymap for Clojure mode. Inherits from `lisp-mode-shared-map'.")
+
+(defvar clojure-mode-syntax-table
+ (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table)))
+ (modify-syntax-entry ?~ "' " table)
+ ;; can't safely make commas whitespace since it will apply even
+ ;; inside string literals--ick!
+ ;; (modify-syntax-entry ?, " " table)
+ (modify-syntax-entry ?\{ "(}" table)
+ (modify-syntax-entry ?\} "){" table)
+ (modify-syntax-entry ?\[ "(]" table)
+ (modify-syntax-entry ?\] ")[" table)
+ (modify-syntax-entry ?^ "'" table)
+ table))
+
+(defvar clojure-mode-abbrev-table nil
+ "Abbrev table used in clojure-mode buffers.")
+
+(define-abbrev-table 'clojure-mode-abbrev-table ())
+
+(defvar clojure-prev-l/c-dir/file nil
+ "Record last directory and file used in loading or compiling.
+This holds a cons cell of the form `(DIRECTORY . FILE)'
+describing the last `clojure-load-file' or `clojure-compile-file' command.")
+
+(defvar clojure-test-ns-segment-position -1
+ "Which segment of the ns is \"test\" inserted in your test name convention.
+
+Customize this depending on your project's conventions. Negative
+numbers count from the end:
+
+ leiningen.compile -> leiningen.test.compile (uses 1)
+ clojure.http.client -> clojure.http.test.client (uses -1)")
+
+(defun clojure-mode-version ()
+ "Currently package.el doesn't support prerelease version numbers."
+ "2.0.0")
+
+;;;###autoload
+(defun clojure-mode ()
+ "Major mode for editing Clojure code - similar to Lisp mode.
+Commands:
+Delete converts tabs to spaces as it moves back.
+Blank lines separate paragraphs. Semicolons start comments.
+\\{clojure-mode-map}
+Note that `run-lisp' may be used either to start an inferior Lisp job
+or to switch back to an existing one.
+
+Entry to this mode calls the value of `clojure-mode-hook'
+if that value is non-nil."
+ (interactive)
+ (kill-all-local-variables)
+ (use-local-map clojure-mode-map)
+ (setq mode-name "Clojure"
+ major-mode 'clojure-mode
+ imenu-create-index-function
+ (lambda ()
+ (imenu--generic-function '((nil clojure-match-next-def 0))))
+ local-abbrev-table clojure-mode-abbrev-table
+ indent-tabs-mode nil)
+ (lisp-mode-variables nil)
+ (set-syntax-table clojure-mode-syntax-table)
+ (set (make-local-variable 'comment-start-skip)
+ "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
+ (set (make-local-variable 'lisp-indent-function)
+ 'clojure-indent-function)
+ (when (< emacs-major-version 24)
+ (set (make-local-variable 'forward-sexp-function)
+ 'clojure-forward-sexp))
+ (set (make-local-variable 'lisp-doc-string-elt-property)
+ 'clojure-doc-string-elt)
+ (set (make-local-variable 'inferior-lisp-program) "lein repl")
+ (set (make-local-variable 'parse-sexp-ignore-comments) t)
+
+ (clojure-mode-font-lock-setup)
+
+ (add-hook 'paredit-mode-hook
+ (lambda ()
+ (when (>= paredit-version 21)
+ (define-key clojure-mode-map "{" 'paredit-open-curly)
+ (define-key clojure-mode-map "}" 'paredit-close-curly))))
+
+ (run-mode-hooks 'clojure-mode-hook)
+ (run-hooks 'prog-mode-hook))
+
+(defun clojure-display-inferior-lisp-buffer ()
+ "Display a buffer bound to `inferior-lisp-buffer'."
+ (interactive)
+ (if (and inferior-lisp-buffer (get-buffer inferior-lisp-buffer))
+ (pop-to-buffer inferior-lisp-buffer t)
+ (run-lisp inferior-lisp-program)))
+
+(defun clojure-load-file (file-name)
+ "Load a Lisp file into the inferior Lisp process."
+ (interactive (comint-get-source "Load Clojure file: "
+ clojure-prev-l/c-dir/file
+ '(clojure-mode) t))
+ (comint-check-source file-name) ; Check to see if buffer needs saved.
+ (setq clojure-prev-l/c-dir/file (cons (file-name-directory file-name)
+ (file-name-nondirectory file-name)))
+ (comint-send-string (inferior-lisp-proc)
+ (format clojure-mode-load-command file-name))
+ (switch-to-lisp t))
+
+
+
+(defun clojure-match-next-def ()
+ "Scans the buffer backwards for the next top-level definition.
+Called by `imenu--generic-function'."
+ (when (re-search-backward "^\\s *(def\\S *[ \n\t]+" nil t)
+ (save-excursion
+ (goto-char (match-end 0))
+ (when (looking-at "#?\\^")
+ (let (forward-sexp-function) ; using the built-in one
+ (forward-sexp))) ; skip the metadata
+ (re-search-forward "[^ \n\t)]+"))))
+
+(defun clojure-mode-font-lock-setup ()
+ "Configures font-lock for editing Clojure code."
+ (interactive)
+ (set (make-local-variable 'font-lock-multiline) t)
+ (add-to-list 'font-lock-extend-region-functions
+ 'clojure-font-lock-extend-region-def t)
+
+ (when clojure-mode-font-lock-comment-sexp
+ (add-to-list 'font-lock-extend-region-functions
+ 'clojure-font-lock-extend-region-comment t)
+ (make-local-variable 'clojure-font-lock-keywords)
+ (add-to-list 'clojure-font-lock-keywords
+ 'clojure-font-lock-mark-comment t)
+ (set (make-local-variable 'open-paren-in-column-0-is-defun-start) nil))
+
+ (setq font-lock-defaults
+ '(clojure-font-lock-keywords ; keywords
+ nil nil
+ (("+-*/.<>=!?$%_&~^:@" . "w")) ; syntax alist
+ nil
+ (font-lock-mark-block-function . mark-defun)
+ (font-lock-syntactic-face-function
+ . lisp-font-lock-syntactic-face-function))))
+
+(defun clojure-font-lock-def-at-point (point)
+ "Find the position range between the top-most def* and the
+fourth element afterwards. Note that this means there's no
+gaurantee of proper font locking in def* forms that are not at
+top-level."
+ (goto-char point)
+ (condition-case nil
+ (beginning-of-defun)
+ (error nil))
+
+ (let ((beg-def (point)))
+ (when (and (not (= point beg-def))
+ (looking-at "(def"))
+ (condition-case nil
+ (progn
+ ;; move forward as much as possible until failure (or success)
+ (forward-char)
+ (dotimes (i 4)
+ (forward-sexp)))
+ (error nil))
+ (cons beg-def (point)))))
+
+(defun clojure-font-lock-extend-region-def ()
+ "Move fontification boundaries to always include the first four
+elements of a def* forms."
+ (let ((changed nil))
+ (let ((def (clojure-font-lock-def-at-point font-lock-beg)))
+ (when def
+ (destructuring-bind (def-beg . def-end) def
+ (when (and (< def-beg font-lock-beg)
+ (< font-lock-beg def-end))
+ (setq font-lock-beg def-beg
+ changed t)))))
+
+ (let ((def (clojure-font-lock-def-at-point font-lock-end)))
+ (when def
+ (destructuring-bind (def-beg . def-end) def
+ (when (and (< def-beg font-lock-end)
+ (< font-lock-end def-end))
+ (setq font-lock-end def-end
+ changed t)))))
+ changed))
+
+(defun clojure-find-block-comment-start (limit)
+ "Search for (comment...) or #_ style block comments and put
+ point at the beginning of the expression."
+ (let ((pos (re-search-forward "\\((comment\\>\\|#_\\)" limit t)))
+ (when pos
+ (forward-char (- (length (match-string 1))))
+ pos)))
+
+(defun clojure-font-lock-extend-region-comment ()
+ "Move fontification boundaries to always contain
+ entire (comment ..) and #_ sexp. Does not work if you have a
+ white-space between ( and comment, but that is omitted to make
+ this run faster."
+ (let ((changed nil))
+ (goto-char font-lock-beg)
+ (condition-case nil (beginning-of-defun) (error nil))
+ (let ((pos (clojure-find-block-comment-start font-lock-end)))
+ (when pos
+ (when (< (point) font-lock-beg)
+ (setq font-lock-beg (point)
+ changed t))
+ (condition-case nil (forward-sexp) (error nil))
+ (when (> (point) font-lock-end)
+ (setq font-lock-end (point)
+ changed t))))
+ changed))
+
+(defun clojure-font-lock-mark-comment (limit)
+ "Marks all (comment ..) and #_ forms with font-lock-comment-face."
+ (let (pos)
+ (while (and (< (point) limit)
+ (setq pos (clojure-find-block-comment-start limit)))
+ (when pos
+ (condition-case nil
+ (add-text-properties (point)
+ (progn
+ (forward-sexp)
+ (point))
+ '(face font-lock-comment-face multiline t))
+ (error (forward-char 8))))))
+ nil)
+
+;; Docstring positions
+(put 'ns 'clojure-doc-string-elt 2)
+(put 'defn 'clojure-doc-string-elt 2)
+(put 'defn- 'clojure-doc-string-elt 2)
+(put 'defmulti 'clojure-doc-string-elt 2)
+(put 'defmacro 'clojure-doc-string-elt 2)
+(put 'definline 'clojure-doc-string-elt 2)
+(put 'defprotocol 'clojure-doc-string-elt 2)
+
+
+
+(defun clojure-forward-sexp (n)
+ "Treat record literals like #user.Foo[1] and #user.Foo{:size 1}
+as a single sexp so that slime will send them properly. Arguably
+this behavior is unintuitive for the user pressing (eg) C-M-f
+himself, but since these are single objects I think it's right."
+ (let ((dir (if (> n 0) 1 -1))
+ (forward-sexp-function nil)) ; force the built-in version
+ (while (not (zerop n))
+ (forward-sexp dir)
+ (when (save-excursion ; move back to see if we're in a record literal
+ (and
+ (condition-case nil
+ (progn (backward-sexp) 't)
+ ('scan-error nil))
+ (looking-at "#\\w")))
+ (forward-sexp dir)) ; if so, jump over it
+ (setq n (- n dir)))))
+
+(defun clojure-indent-function (indent-point state)
+ "This function is the normal value of the variable `lisp-indent-function'.
+It is used when indenting a line within a function call, to see if the
+called function says anything special about how to indent the line.
+
+INDENT-POINT is the position where the user typed TAB, or equivalent.
+Point is located at the point to indent under (for default indentation);
+STATE is the `parse-partial-sexp' state for that position.
+
+If the current line is in a call to a Lisp function
+which has a non-nil property `lisp-indent-function',
+that specifies how to do the indentation. The property value can be
+* `defun', meaning indent `defun'-style;
+* an integer N, meaning indent the first N arguments specially
+ like ordinary function arguments and then indent any further
+ arguments like a body;
+* a function to call just as this function was called.
+ If that function returns nil, that means it doesn't specify
+ the indentation.
+
+This function also returns nil meaning don't specify the indentation."
+ (let ((normal-indent (current-column)))
+ (goto-char (1+ (elt state 1)))
+ (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
+ (if (and (elt state 2)
+ (not (looking-at "\\sw\\|\\s_")))
+ ;; car of form doesn't seem to be a symbol
+ (progn
+ (if (not (> (save-excursion (forward-line 1) (point))
+ calculate-lisp-indent-last-sexp))
+ (progn (goto-char calculate-lisp-indent-last-sexp)
+ (beginning-of-line)
+ (parse-partial-sexp (point)
+ calculate-lisp-indent-last-sexp 0 t)))
+ ;; Indent under the list or under the first sexp on the same
+ ;; line as calculate-lisp-indent-last-sexp. Note that first
+ ;; thing on that line has to be complete sexp since we are
+ ;; inside the innermost containing sexp.
+ (backward-prefix-chars)
+ (if (and (eq (char-after (point)) ?\[)
+ (eq (char-after (elt state 1)) ?\())
+ (+ (current-column) 2) ;; this is probably inside a defn
+ (current-column)))
+ (let* ((function (buffer-substring (point)
+ (progn (forward-sexp 1) (point))))
+ (open-paren (elt state 1))
+ (method nil)
+ (function-tail (first
+ (last
+ (split-string (substring-no-properties function) "/")))))
+ (setq method (get (intern-soft function-tail) 'clojure-indent-function))
+
+ (cond ((member (char-after open-paren) '(?\[ ?\{))
+ (goto-char open-paren)
+ (1+ (current-column)))
+ ((or (eq method 'defun)
+ (and (null method)
+ (> (length function) 3)
+ (string-match "\\`\\(?:\\S +/\\)?def\\|with-"
+ function)))
+ (lisp-indent-defform state indent-point))
+
+ ((integerp method)
+ (lisp-indent-specform method state
+ indent-point normal-indent))
+ (method
+ (funcall method indent-point state))
+ (clojure-mode-use-backtracking-indent
+ (clojure-backtracking-indent
+ indent-point state normal-indent)))))))
+
+(defun clojure-backtracking-indent (indent-point state normal-indent)
+ "Experimental backtracking support. Will upwards in an sexp to
+check for contextual indenting."
+ (let (indent (path) (depth 0))
+ (goto-char (elt state 1))
+ (while (and (not indent)
+ (< depth clojure-max-backtracking))
+ (let ((containing-sexp (point)))
+ (parse-partial-sexp (1+ containing-sexp) indent-point 1 t)
+ (when (looking-at "\\sw\\|\\s_")
+ (let* ((start (point))
+ (fn (buffer-substring start (progn (forward-sexp 1) (point))))
+ (meth (get (intern-soft fn) 'clojure-backtracking-indent)))
+ (let ((n 0))
+ (when (< (point) indent-point)
+ (condition-case ()
+ (progn
+ (forward-sexp 1)
+ (while (< (point) indent-point)
+ (parse-partial-sexp (point) indent-point 1 t)
+ (incf n)
+ (forward-sexp 1)))
+ (error nil)))
+ (push n path))
+ (when meth
+ (let ((def meth))
+ (dolist (p path)
+ (if (and (listp def)
+ (< p (length def)))
+ (setq def (nth p def))
+ (if (listp def)
+ (setq def (car (last def)))
+ (setq def nil))))
+ (goto-char (elt state 1))
+ (when def
+ (setq indent (+ (current-column) def)))))))
+ (goto-char containing-sexp)
+ (condition-case ()
+ (progn
+ (backward-up-list 1)
+ (incf depth))
+ (error (setq depth clojure-max-backtracking)))))
+ indent))
+
+;; clojure backtracking indent is experimental and the format for these
+;; entries are subject to change
+(put 'implement 'clojure-backtracking-indent '(4 (2)))
+(put 'letfn 'clojure-backtracking-indent '((2) 2))
+(put 'proxy 'clojure-backtracking-indent '(4 4 (2)))
+(put 'reify 'clojure-backtracking-indent '((2)))
+(put 'deftype 'clojure-backtracking-indent '(4 4 (2)))
+(put 'defrecord 'clojure-backtracking-indent '(4 4 (2)))
+(put 'defprotocol 'clojure-backtracking-indent '(4 (2)))
+(put 'extend-type 'clojure-backtracking-indent '(4 (2)))
+(put 'extend-protocol 'clojure-backtracking-indent '(4 (2)))
+
+(defun put-clojure-indent (sym indent)
+ (put sym 'clojure-indent-function indent))
+
+(defmacro define-clojure-indent (&rest kvs)
+ `(progn
+ ,@(mapcar (lambda (x) `(put-clojure-indent
+ (quote ,(first x)) ,(second x))) kvs)))
+
+(defun add-custom-clojure-indents (name value)
+ (custom-set-default name value)
+ (mapcar (lambda (x)
+ (put-clojure-indent x 'defun))
+ value))
+
+(defcustom clojure-defun-indents nil
+ "List of symbols to give defun-style indentation to in Clojure
+code, in addition to those that are built-in. You can use this to
+get emacs to indent your own macros the same as it does the
+built-ins like with-open. To set manually from lisp code,
+use (put-clojure-indent 'some-symbol 'defun)."
+ :type '(repeat symbol)
+ :group 'clojure-mode
+ :set 'add-custom-clojure-indents)
+
+(define-clojure-indent
+ ;; built-ins
+ (ns 1)
+ (fn 'defun)
+ (def 'defun)
+ (defn 'defun)
+ (bound-fn 'defun)
+ (if 1)
+ (if-not 1)
+ (case 1)
+ (condp 2)
+ (when 1)
+ (while 1)
+ (when-not 1)
+ (when-first 1)
+ (do 0)
+ (future 0)
+ (comment 0)
+ (doto 1)
+ (locking 1)
+ (proxy 2)
+ (with-open 1)
+ (with-precision 1)
+ (with-local-vars 1)
+
+ (reify 'defun)
+ (deftype 2)
+ (defrecord 2)
+ (defprotocol 1)
+ (extend 1)
+ (extend-protocol 1)
+ (extend-type 1)
+
+ (try 0)
+ (catch 2)
+ (finally 0)
+
+ ;; binding forms
+ (let 1)
+ (letfn 1)
+ (binding 1)
+ (loop 1)
+ (for 1)
+ (doseq 1)
+ (dotimes 1)
+ (when-let 1)
+ (if-let 1)
+
+ ;; data structures
+ (defstruct 1)
+ (struct-map 1)
+ (assoc 1)
+
+ (defmethod 'defun)
+
+ ;; clojure.test
+ (testing 1)
+ (deftest 'defun)
+ (use-fixtures 'defun))
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; Better docstring filling for clojure-mode
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defun clojure-string-start ()
+ "Return the position of the \" that begins the string at point."
+ (save-excursion
+ (save-match-data
+ ;; Find a quote that appears immediately after whitespace,
+ ;; beginning of line, or an open paren, brace, or bracket
+ (re-search-backward "\\(\\s-\\|^\\|(\\|\\[\\|{\\)\\(\"\\)")
+ (match-beginning 2))))
+
+(defun clojure-char-at-point ()
+ "Return the char at point or nil if at buffer end."
+ (when (not (= (point) (point-max)))
+ (buffer-substring-no-properties (point) (1+ (point)))))
+
+(defun clojure-char-before-point ()
+ "Return the char before point or nil if at buffer beginning."
+ (when (not (= (point) (point-min)))
+ (buffer-substring-no-properties (point) (1- (point)))))
+
+;; TODO: Deal with the fact that when point is exactly at the
+;; beginning of a string, it thinks that is the end.
+(defun clojure-string-end ()
+ "Return the position of the \" that ends the string at point.
+
+Note that point must be inside the string - if point is
+positioned at the opening quote, incorrect results will be
+returned."
+ (save-excursion
+ (save-match-data
+ ;; If we're at the end of the string, just return point.
+ (if (and (string= (clojure-char-at-point) "\"")
+ (not (string= (clojure-char-before-point) "\\")))
+ (point)
+ ;; We don't want to get screwed by starting out at the
+ ;; backslash in an escaped quote.
+ (when (string= (clojure-char-at-point) "\\")
+ (backward-char))
+ ;; Look for a quote not preceeded by a backslash
+ (re-search-forward "[^\\]\\\(\\\"\\)")
+ (match-beginning 1)))))
+
+(defun clojure-docstring-start+end-points ()
+ "Return the start and end points of the string at point as a cons."
+ (if (and (fboundp 'paredit-string-start+end-points) paredit-mode)
+ (paredit-string-start+end-points)
+ (cons (clojure-string-start) (clojure-string-end))))
+
+(defun clojure-mark-string ()
+ "Mark the string at point."
+ (interactive)
+ (goto-char (clojure-string-start))
+ (forward-char)
+ (set-mark (clojure-string-end)))
+
+(defun clojure-fill-docstring (&optional argument)
+ "Fill the definition that the point is on appropriate for Clojure.
+
+ Fills so that every paragraph has a minimum of two initial spaces,
+ with the exception of the first line. Fill margins are taken from
+ paragraph start, so a paragraph that begins with four spaces will
+ remain indented by four spaces after refilling."
+ (interactive "P")
+ (if (and (fboundp 'paredit-in-string-p) paredit-mode)
+ (unless (paredit-in-string-p)
+ (error "Must be inside a string")))
+ ;; Oddly, save-excursion doesn't do a good job of preserving point.
+ ;; It's probably because we delete the string and then re-insert it.
+ (let ((old-point (point)))
+ (save-restriction
+ (save-excursion
+ (let* ((string-region (clojure-docstring-start+end-points))
+ (string-start (1+ (car string-region)))
+ (string-end (cdr string-region))
+ (string (buffer-substring-no-properties (1+ (car string-region))
+ (cdr string-region))))
+ (delete-region string-start string-end)
+ (insert
+ (with-temp-buffer
+ (insert string)
+ (let ((left-margin 2))
+ (delete-trailing-whitespace)
+ (fill-region (point-min) (point-max))
+ (buffer-substring-no-properties (+ 2 (point-min)) (point-max))))))))
+ (goto-char old-point)))
+
+
+
+(defconst clojure-namespace-name-regex
+ (rx line-start
+ "("
+ (zero-or-one (group (regexp "clojure.core/")))
+ (zero-or-one (submatch "in-"))
+ "ns"
+ (zero-or-one "+")
+ (one-or-more (any whitespace "\n"))
+ (zero-or-more (or (submatch (zero-or-one "#")
+ "^{"
+ (zero-or-more (not (any "}")))
+ "}")
+ (zero-or-more "^:"
+ (one-or-more (not (any whitespace)))))
+ (one-or-more (any whitespace "\n")))
+ ;; why is this here? oh (in-ns 'foo) or (ns+ :user)
+ (zero-or-one (any ":'"))
+ (group (one-or-more (not (any "()\"" whitespace))) word-end)))
+
+;; for testing clojure-namespace-name-regex, you can evaluate this code and make
+;; sure foo (or whatever the namespace name is) shows up in results. some of
+;; these currently fail.
+;; (mapcar (lambda (s) (let ((n (string-match clojure-namespace-name-regex s)))
+;; (if n (match-string 4 s))))
+;; '("(ns foo)"
+;; "(ns
+;; foo)"
+;; "(ns foo.baz)"
+;; "(ns ^:bar foo)"
+;; "(ns ^:bar ^:baz foo)"
+;; "(ns ^{:bar true} foo)"
+;; "(ns #^{:bar true} foo)"
+;; "(ns #^{:fail {}} foo)"
+;; "(ns ^{:fail2 {}} foo.baz)"
+;; "(ns ^{} foo)"
+;; "(ns ^{:skip-wiki true}
+;; aleph.netty
+;; "
+;; "(ns
+;; foo)"
+;; "foo"))
+
+
+
+(defun clojure-expected-ns ()
+ "Returns the namespace name that the file should have."
+ (let* ((project-dir (file-truename
+ (locate-dominating-file default-directory
+ "project.clj")))
+ (relative (substring (buffer-file-name) (length project-dir) -4)))
+ (replace-regexp-in-string
+ "_" "-" (mapconcat 'identity (cdr (split-string relative "/")) "."))))
+
+(defun clojure-insert-ns-form ()
+ (interactive)
+ (goto-char (point-min))
+ (insert (format "(ns %s)" (clojure-expected-ns))))
+
+(defun clojure-update-ns ()
+ "Updates the namespace of the current buffer. Useful if a file has been renamed."
+ (interactive)
+ (let ((nsname (clojure-expected-ns)))
+ (when nsname
+ (save-restriction
+ (save-excursion
+ (save-match-data
+ (if (clojure-find-ns)
+ (replace-match nsname nil nil nil 4)
+ (error "Namespace not found"))))))))
+
+(defun clojure-find-ns ()
+ (let ((regexp clojure-namespace-name-regex))
+ (save-restriction
+ (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward regexp nil t)
+ (match-string-no-properties 4))))))
+
+(defalias 'clojure-find-package 'clojure-find-ns)
+
+;; Test navigation:
+(defun clojure-in-tests-p ()
+ (or (string-match-p "test\." (clojure-find-ns))
+ (string-match-p "/test" (buffer-file-name))))
+
+(defun clojure-underscores-for-hyphens (namespace)
+ (replace-regexp-in-string "-" "_" namespace))
+
+(defun clojure-test-for (namespace)
+ (let* ((namespace (clojure-underscores-for-hyphens namespace))
+ (segments (split-string namespace "\\.")))
+ (mapconcat 'identity segments "/")))
+
+(defun clojure-jump-to-test ()
+ "Jump from implementation file to test."
+ (interactive)
+ (find-file (format "%stest/%s_test.clj"
+ (file-name-as-directory
+ (locate-dominating-file buffer-file-name "src/"))
+ (clojure-test-for (clojure-find-ns)))))
+
+(defun clojure-jump-between-tests-and-code ()
+ (interactive)
+ (if (clojure-in-tests-p)
+ (clojure-test-jump-to-implementation)
+ (clojure-jump-to-test)))
+
+;;;###autoload
+(progn
+ (put 'clojure-test-ns-segment-position 'safe-local-variable 'integerp)
+ (put 'clojure-mode-load-command 'safe-local-variable 'stringp)
+
+ (add-to-list 'auto-mode-alist '("\\.clj\\'" . clojure-mode))
+ (add-to-list 'interpreter-mode-alist '("jark" . clojure-mode))
+ (add-to-list 'interpreter-mode-alist '("cake" . clojure-mode)))
+
+(provide 'clojure-mode)
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
+
+;;; clojure-mode.el ends here
View
BIN elpa/clojure-mode-2.0.0/clojure-mode.elc
Binary file not shown.
View
35 elpa/clojure-test-mode-2.0.0/clojure-test-mode-autoloads.el
@@ -0,0 +1,35 @@
+;;; clojure-test-mode-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+
+;;;### (autoloads (clojure-test-mode) "clojure-test-mode" "clojure-test-mode.el"
+;;;;;; (20703 55393 0 0))
+;;; Generated autoloads from clojure-test-mode.el
+
+(autoload 'clojure-test-mode "clojure-test-mode" "\
+A minor mode for running Clojure tests.
+
+\(fn &optional ARG)" t nil)
+
+(defun clojure-test-maybe-enable nil "\
+Enable clojure-test-mode if the current buffer contains a namespace
+with a \"test.\" bit on it." (let ((ns (clojure-find-package))) (when (and ns (string-match "test\\(\\.\\|$\\)" ns)) (save-window-excursion (clojure-test-mode t)))))
+
+(add-hook 'clojure-mode-hook 'clojure-test-maybe-enable)
+
+;;;***
+
+;;;### (autoloads nil nil ("clojure-test-mode-pkg.el") (20703 55393
+;;;;;; 587182 0))
+
+;;;***
+
+(provide 'clojure-test-mode-autoloads)
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; clojure-test-mode-autoloads.el ends here
View
1 elpa/clojure-test-mode-2.0.0/clojure-test-mode-pkg.el
@@ -0,0 +1 @@
+(define-package "clojure-test-mode" "2.0.0" "Minor mode for Clojure tests" (quote ((clojure-mode "1.7") (nrepl "0.1.5"))))
View
BIN elpa/clojure-test-mode-2.0.0/clojure-test-mode-pkg.elc
Binary file not shown.
View
446 elpa/clojure-test-mode-2.0.0/clojure-test-mode.el
@@ -0,0 +1,446 @@
+;;; clojure-test-mode.el --- Minor mode for Clojure tests
+
+;; Copyright © 2009-2011 Phil Hagelberg
+
+;; Author: Phil Hagelberg <technomancy@gmail.com>
+;; URL: http://emacswiki.org/cgi-bin/wiki/ClojureTestMode
+;; Version: 2.0.0
+;; Keywords: languages, lisp, test
+;; Package-Requires: ((clojure-mode "1.7") (nrepl "0.1.5"))
+
+;; This file is not part of GNU Emacs.
+
+;;; Commentary:
+
+;; This file provides support for running Clojure tests (using the
+;; clojure.test framework) via nrepl.el and seeing feedback in the test
+;; buffer about which tests failed or errored.
+
+;;; Usage:
+
+;; Once you have an nrepl session active, you can run the tests in the
+;; current buffer with C-c C-,. Failing tests and errors will be
+;; highlighted using overlays. To clear the overlays, use C-c k.
+
+;; You can jump between implementation and test files with C-c t if
+;; your project is laid out in a way that clojure-test-mode
+;; expects. Your project root should have a src/ directory containing
+;; files that correspond to their namespace. It should also have a
+;; test/ directory containing files that correspond to their
+;; namespace, and the test namespaces should mirror the implementation
+;; namespaces with the addition of "test" as the second-to-last
+;; segment of the namespace.
+
+;; So my.project.frob would be found in src/my/project/frob.clj and
+;; its tests would be in test/my/project/test/frob.clj in the
+;; my.project.test.frob namespace.
+
+;;; History:
+
+;; 1.0: 2009-03-12
+;; * Initial Release
+
+;; 1.1: 2009-04-28
+;; * Fix to work with latest version of test-is. (circa Clojure 1.0)
+
+;; 1.2: 2009-05-19
+;; * Add clojure-test-jump-to-(test|implementation).
+
+;; 1.3: 2009-11-10
+;; * Update to use clojure.test instead of clojure.contrib.test-is.
+;; * Fix bug suppressing test report output in repl.
+
+;; 1.4: 2010-05-13
+;; * Fix jump-to-test
+;; * Update to work with Clojure 1.2.
+;; * Added next/prev problem.
+;; * Depend upon slime, not swank-clojure.
+;; * Don't move the mark when activating.
+
+;; 1.5: 2010-09-16
+;; * Allow customization of clojure-test-ns-segment-position.
+;; * Fixes for Clojure 1.2.
+;; * Check for active slime connection.
+;; * Fix test toggling with negative segment-position.
+
+;; 1.5.1: 2010-11-27
+;; * Add marker between each test run.
+
+;; 1.5.2: 2011-03-11
+;; * Make clojure-test-run-tests force reload. Requires swank-clojure 1.3.0.
+
+;; 1.5.3 2011-03-14
+;; * Fix clojure-test-run-test to use fixtures.
+
+;; 1.5.4 2011-03-16
+;; * Fix clojure-test-run-tests to wait until tests are reloaded.
+
+;; 1.5.5 2011-04-08
+;; * Fix coloring/reporting
+;; * Don't trigger slime-connected-hook.
+
+;; 1.5.6 2011-06-15
+;; * Remove heinous clojure.test/report monkeypatch.
+
+;; 1.6.0 2011-11-06
+;; * Compatibility with Clojure 1.3.
+;; * Support narrowing.
+;; * Fix a bug in clojure-test-mode-test-one-in-ns.
+
+;; 2.0.0 2012-12-29
+;; * Replace slime with nrepl.el
+
+;;; TODO:
+
+;; * Prefix arg to jump-to-impl should open in other window
+;; * Put Testing indicator in modeline while tests are running
+;; * Integrate with M-x next-error
+;; * Error messages need line number.
+;; * Currently show-message needs point to be on the line with the
+;; "is" invocation; this could be cleaned up.
+
+;;; Code:
+
+(require 'cl)
+(require 'clojure-mode)
+(require 'which-func)
+(require 'nrepl)
+
+(declare-function nrepl-repl-buffer "nrepl.el")
+(declare-function nrepl-make-response-handler "nrepl.el")
+(declare-function nrepl-send-string "nrepl.el")
+(declare-function nrepl-current-ns "nrepl.el")
+
+;; Faces
+
+(defface clojure-test-failure-face
+ '((((class color) (background light))
+ :background "orange red") ;; TODO: Hard to read strings over this.
+ (((class color) (background dark))
+ :background "firebrick"))
+ "Face for failures in Clojure tests."
+ :group 'clojure-test-mode)
+
+(defface clojure-test-error-face
+ '((((class color) (background light))
+ :background "orange1")
+ (((class color) (background dark))
+ :background "orange4"))
+ "Face for errors in Clojure tests."
+ :group 'clojure-test-mode)
+
+(defface clojure-test-success-face
+ '((((class color) (background light))
+ :foreground "black"
+ :background "green")
+ (((class color) (background dark))
+ :foreground "black"
+ :background "green"))
+ "Face for success in Clojure tests."
+ :group 'clojure-test-mode)
+
+;; Counts
+
+(defvar clojure-test-count 0)
+(defvar clojure-test-failure-count 0)
+(defvar clojure-test-error-count 0)
+
+;; Consts
+
+(defconst clojure-test-ignore-results
+ '(:end-test-ns :begin-test-var :end-test-var)
+ "Results from test-is that we don't use")
+
+;; Support Functions
+
+(defun clojure-test-nrepl-connected-p ()
+ (get-buffer "*nrepl-connection*"))
+
+(defun clojure-test-make-handler (callback)
+ (lexical-let ((buffer (current-buffer))
+ (callback callback))
+ (nrepl-make-response-handler buffer
+ (lambda (buffer value)
+ (funcall callback buffer value))
+ (lambda (buffer value)
+ (nrepl-emit-interactive-output value))
+ (lambda (buffer err)
+ (nrepl-emit-interactive-output err))
+ '())))
+
+(defun clojure-test-eval (string &optional handler)
+ (nrepl-send-string string
+ (clojure-test-make-handler (or handler #'identity))
+ (or (nrepl-current-ns) "user")))
+
+(defun clojure-test-load-reporting ()
+ "Redefine the test-is report function to store results in metadata."
+ (when (clojure-test-nrepl-connected-p)
+ (nrepl-send-string-sync
+ "(ns clojure.test.mode
+ (:use [clojure.test :only [file-position *testing-vars* *test-out*
+ join-fixtures *report-counters* do-report
+ test-var *initial-report-counters*]]))
+
+ (def #^{:dynamic true} *clojure-test-mode-out* nil)
+ (defn report [event]
+ (if-let [current-test (last clojure.test/*testing-vars*)]
+ (alter-meta! current-test
+ assoc :status (conj (:status (meta current-test))
+ [(:type event) (:message event)
+ (str (:expected event))
+ (str (:actual event))
+ (if (and (= (:major *clojure-version*) 1)
+ (< (:minor *clojure-version*) 2))
+ ((file-position 2) 1)
+ (if (= (:type event) :error)
+ ((file-position 3) 1)
+ (:line event)))])))
+ (binding [*test-out* (or *clojure-test-mode-out* *out*)]
+ ((.getRawRoot #'clojure.test/report) event)))
+
+ (defn clojure-test-mode-test-one-var [test-ns test-name]
+ (let [v (ns-resolve test-ns test-name)
+ once-fixture-fn (join-fixtures (::once-fixtures (meta (find-ns test-ns))))
+ each-fixture-fn (join-fixtures (::each-fixtures (meta (find-ns test-ns))))]
+ (once-fixture-fn
+ (fn []
+ (when (:test (meta v))
+ (each-fixture-fn (fn [] (test-var v))))))))
+
+ ;; adapted from test-ns
+ (defn clojure-test-mode-test-one-in-ns [ns test-name]
+ (binding [*report-counters* (ref *initial-report-counters*)]
+ (let [ns-obj (the-ns ns)]
+ (do-report {:type :begin-test-ns, :ns ns-obj})
+ ;; If the namespace has a test-ns-hook function, call that:
+ (if-let [v (find-var (symbol (str (ns-name ns-obj)) \"test-ns-hook\"))]
+ ((var-get v))
+ ;; Otherwise, just test every var in the namespace.
+ (clojure-test-mode-test-one-var ns test-name))
+ (do-report {:type :end-test-ns, :ns ns-obj}))
+ (do-report (assoc @*report-counters* :type :summary))))")))
+
+(defun clojure-test-get-results (buffer result)
+ (with-current-buffer buffer
+ (clojure-test-eval
+ (concat "(map #(cons (str (:name (meta %)))
+ (:status (meta %))) (vals (ns-interns '"
+ (clojure-find-ns) ")))")
+ #'clojure-test-extract-results)))
+
+(defun clojure-test-extract-results (buffer results)
+ (with-current-buffer buffer
+ (let ((result-vars (read results)))
+ (mapc #'clojure-test-extract-result result-vars)
+ (clojure-test-echo-results))))
+
+(defun clojure-test-extract-result (result)
+ "Parse the result from a single test. May contain multiple is blocks."
+ (dolist (is-result (rest result))
+ (unless (member (aref is-result 0) clojure-test-ignore-results)
+ (incf clojure-test-count)
+ (destructuring-bind (event msg expected actual line) (coerce is-result 'list)
+ (if (equal :fail event)
+ (progn (incf clojure-test-failure-count)
+ (clojure-test-highlight-problem
+ line event (format "Expected %s, got %s" expected actual)))
+ (when (equal :error event)
+ (incf clojure-test-error-count)
+ (clojure-test-highlight-problem line event actual))))))
+ (clojure-test-echo-results))
+
+(defun clojure-test-echo-results ()
+ (message
+ (propertize
+ (format "Ran %s tests. %s failures, %s errors."
+ clojure-test-count clojure-test-failure-count
+ clojure-test-error-count)
+ 'face
+ (cond ((not (= clojure-test-error-count 0)) 'clojure-test-error-face)
+ ((not (= clojure-test-failure-count 0)) 'clojure-test-failure-face)
+ (t 'clojure-test-success-face)))))
+
+(defun clojure-test-highlight-problem (line event message)
+ (save-excursion
+ (goto-char (point-min))
+ (forward-line (1- line))
+ (let ((beg (point)))
+ (end-of-line)
+ (let ((overlay (make-overlay beg (point))))
+ (overlay-put overlay 'face (if (equal event :fail)
+ 'clojure-test-failure-face
+ 'clojure-test-error-face))
+ (overlay-put overlay 'message message)))))
+
+;; Problem navigation
+(defun clojure-test-find-next-problem (here)
+ "Go to the next position with an overlay message.
+Retuns the problem overlay if such a position is found, otherwise nil."
+ (let ((current-overlays (overlays-at here))
+ (next-overlays (next-overlay-change here)))
+ (while (and (not (equal next-overlays (point-max)))
+ (or
+ (not (overlays-at next-overlays))
+ (equal (overlays-at next-overlays)
+ current-overlays)))
+ (setq next-overlays (next-overlay-change next-overlays)))
+ (if (not (equal next-overlays (point-max)))
+ (overlay-start (car (overlays-at next-overlays))))))
+
+(defun clojure-test-find-previous-problem (here)
+ "Go to the next position with the `clojure-test-problem' text property.
+Retuns the problem overlay if such a position is found, otherwise nil."
+ (let ((current-overlays (overlays-at here))
+ (previous-overlays (previous-overlay-change here)))
+ (while (and (not (equal previous-overlays (point-min)))
+ (or
+ (not (overlays-at previous-overlays))
+ (equal (overlays-at previous-overlays)
+ current-overlays)))
+ (setq previous-overlays (previous-overlay-change previous-overlays)))
+ (if (not (equal previous-overlays (point-min)))
+ (overlay-start (car (overlays-at previous-overlays))))))
+
+;; File navigation
+
+(defun clojure-test-implementation-for (namespace)
+ (let* ((namespace (clojure-underscores-for-hyphens namespace))
+ (segments (split-string namespace "\\."))
+ (namespace-end (split-string (car (last segments)) "_"))
+ (namespace-end (mapconcat 'identity (butlast namespace-end 1) "_"))
+ (impl-segments (append (butlast segments 1) (list namespace-end))))
+ (mapconcat 'identity impl-segments "/")))
+
+;; Commands
+
+(defun clojure-test-run-tests ()
+ "Run all the tests in the current namespace."
+ (interactive)
+ (save-some-buffers nil (lambda () (equal major-mode 'clojure-mode)))
+ (message "Testing...")
+ (if (not (clojure-in-tests-p))
+ (nrepl-load-file (buffer-file-name)))
+ (save-window-excursion
+ (if (not (clojure-in-tests-p))
+ (clojure-jump-to-test))
+ (clojure-test-clear)
+ (clojure-test-eval (format "(binding [clojure.test/report clojure.test.mode/report]
+ (clojure.test/run-tests '%s))"
+ (clojure-find-ns))
+ #'clojure-test-get-results)))
+
+(defun clojure-test-run-test ()
+ "Run the test at point."
+ (interactive)
+ (save-some-buffers nil (lambda () (equal major-mode 'clojure-mode)))
+ (clojure-test-clear)
+ (let* ((f (which-function))
+ (test-name (if (listp f) (first f) f)))
+ (clojure-test-eval (format "(binding [clojure.test/report clojure.test.mode/report]
+ (load-file \"%s\")
+ (clojure.test.mode/clojure-test-mode-test-one-in-ns '%s '%s)
+ (cons (:name (meta (var %s))) (:status (meta (var %s)))))"
+ (buffer-file-name) (clojure-find-ns)
+ test-name test-name test-name)
+ (lambda (buffer result-str)
+ (with-current-buffer buffer
+ (let ((result (read result-str)))
+ (if (cdr result)
+ (clojure-test-extract-result result)
+ (message "Not in a test."))))))))
+
+(defun clojure-test-show-result ()
+ "Show the result of the test under point."
+ (interactive)
+ (let ((overlay (find-if (lambda (o) (overlay-get o 'message))
+ (overlays-at (point)))))
+ (if overlay
+ (message (replace-regexp-in-string "%" "%%"
+ (overlay-get overlay 'message))))))
+
+(defun clojure-test-load-current-buffer ()
+ (let ((command (format "(clojure.core/load-file \"%s\")\n(in-ns '%s)"
+ (buffer-file-name)
+ (clojure-find-ns))))
+ (nrepl-send-string-sync command)))
+
+(defun clojure-test-clear (&optional callback)
+ "Remove overlays and clear stored results."
+ (interactive)
+ (remove-overlays)
+ (setq clojure-test-count 0
+ clojure-test-failure-count 0
+ clojure-test-error-count 0)
+ (clojure-test-load-current-buffer))
+
+(defun clojure-test-next-problem ()
+ "Go to and describe the next test problem in the buffer."
+ (interactive)
+ (let* ((here (point))
+ (problem (clojure-test-find-next-problem here)))
+ (if problem
+ (goto-char problem)
+ (goto-char here)
+ (message "No next problem."))))
+
+(defun clojure-test-previous-problem ()
+ "Go to and describe the previous compiler problem in the buffer."
+ (interactive)
+ (let* ((here (point))
+ (problem (clojure-test-find-previous-problem here)))
+ (if problem
+ (goto-char problem)
+ (goto-char here)
+ (message "No previous problem."))))
+
+(defun clojure-test-jump-to-implementation ()
+ "Jump from test file to implementation."
+ (interactive)
+ (find-file (format "%s/src/%s.clj"
+ (locate-dominating-file buffer-file-name "src/")
+ (clojure-test-implementation-for (clojure-find-package)))))
+
+(defvar clojure-test-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "C-c C-,") 'clojure-test-run-tests)
+ (define-key map (kbd "C-c ,") 'clojure-test-run-tests)
+ (define-key map (kbd "C-c M-,") 'clojure-test-run-test)
+ (define-key map (kbd "C-c C-'") 'clojure-test-show-result)
+ (define-key map (kbd "C-c '") 'clojure-test-show-result)
+ (define-key map (kbd "C-c k") 'clojure-test-clear)
+ (define-key map (kbd "C-c C-t") 'clojure-jump-between-tests-and-code)
+ (define-key map (kbd "M-p") 'clojure-test-previous-problem)
+ (define-key map (kbd "M-n") 'clojure-test-next-problem)
+ map)
+ "Keymap for Clojure test mode.")
+
+;;;###autoload
+(define-minor-mode clojure-test-mode
+ "A minor mode for running Clojure tests."
+ nil " Test" clojure-test-mode-map
+ (when (clojure-test-nrepl-connected-p)
+ (clojure-test-load-reporting)))
+
+(add-hook 'nrepl-connected-hook 'clojure-test-load-reporting)
+
+;;;###autoload
+(progn
+ (defun clojure-test-maybe-enable ()
+ "Enable clojure-test-mode if the current buffer contains a namespace
+with a \"test.\" bit on it."
+ (let ((ns (clojure-find-package))) ; defined in clojure-mode.el
+ (when (and ns (string-match "test\\(\\.\\|$\\)" ns))
+ (save-window-excursion
+ (clojure-test-mode t)))))
+
+ (add-hook 'clojure-mode-hook 'clojure-test-maybe-enable))
+
+(provide 'clojure-test-mode)
+
+;; Local Variables:
+;; byte-compile-warnings: (not cl-functions)
+;; End:
+
+;;; clojure-test-mode.el ends here
+
View
BIN elpa/clojure-test-mode-2.0.0/clojure-test-mode.elc
Binary file not shown.
View
1,662 elpa/haskell-mode-2.8.0/ChangeLog
0 additions, 1,662 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
119 elpa/haskell-mode-2.8.0/README
@@ -1,119 +0,0 @@
-Haskell Mode for Emacs -*-text-*-
-----------------------
-Version number: v2.8.0.
-
-This is the Haskell mode package for Emacs. Its use should be mostly
-self-explanatory if you're accustomed to Emacs.
-
-When Emacs is started up, it normally runs a file called ~/.emacs located in
-your home directory. This file should contain all of your personal
-customisations written as a series of Elisp commands. In order to install
-the Haskell mode, you have to tell Emacs where to find it. This is done by
-adding some commands to the init file.
-
-Installation
-------------
-
-- If you are using XEmacs, the haskell-mode package may be available for
- installation through the XEmacs package UI.
-
-- If you are using Debian, you may be able to install the package
- haskell-mode with a command like "apt-get install haskell-mode".
-
-Otherwise:
-
-- Download and unpack the basic mode and modules into a suitable directory,
- e.g. ~/lib/emacs/haskell-mode/ where ~ stands for your home directory.
-
-- If you are using Emacs 21, you need an additional library, "syntax", from
- a later version of Emacs. The one you can get as
- http://cvs.savannah.gnu.org/viewcvs/*checkout*/emacs/emacs/lisp/emacs-lisp/syntax.el?rev=1.16
- definitely works.
-
-- Assuming you have placed the basic mode haskell-mode.el and the modules
- you want to use in the directory ~/lib/emacs/haskell-mode/, add the
- following command to your init file (~/.emacs):
-
- (load "~/lib/emacs/haskell-mode/haskell-site-file")
-
- This only loads the bare-bones haskell-mode. To make it useful, you
- need additional modules; you can use the haskell customize-group
- to edit the Haskell mode hook or, if you prefer manual setup, try
- adding the following lines according to which modules you want to use:
-
- (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
- (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
- ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
- ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
-
- Note that the three indentation modules are mutually exclusive - add at
- most one. Note that the line of code for simple indentation is commented
- out (using a preceeding ;) in preference for the more advanced
- indentation module. Installation is now complete!
-
-The other modules are automatically loaded when needed in the following way:
-
-- Font locking: just turn it on via `global-font-lock-mode' or do
- (add-hook 'haskell-mode-hook 'font-lock-mode)
-
-- Declaration scanning: just use M-x imenu or bind `imenu' to a key. E.g.
- (global-set-key [(control meta down-mouse-3)] 'imenu) or you can also add
- it to the menubar with (add-hook 'haskell-mode-hook 'imenu-add-menubar-index)
-
-- Interaction with inferior Haskell interpreter: just hit C-c C-z or C-c C-l.
-
-
-Setup
------
-
-Normally, inf-haskell automatically finds ghci or hugs in your PATH, but if
-that's not the case (common under Windows), or if you need to specify your
-preference, just tell Emacs which executable to use with:
-
- (setq haskell-program-name "/some/where/ghci.exe")
-
-If you want to use different settings when you use Cygwin Emacs and NTEmacs,
-you can test the value of `system-type':
-
- (setq haskell-program-name
- (if (eq system-type 'cygwin)
- "/cygdrive/c/ghc/ghc-6.8.1/bin/ghcii.sh"
- "c:/ghc/ghc-6.8.1/bin/ghci.exe"))
-
-Note that Cygwin binaries tend to interact poorly with NTEmacs, especially
-w.r.t signal-handling.
-
-
-Customization
--------------
-
-Most customizations are on the functionality of a particular module.
-See the documentation of that module for information on its
-customisation.
-
-There is also a wiki page listing tips and tricks at
-http://trac.haskell.org/haskellmode-emacs/wiki/Tips
-
-Known problems
---------------
-
-It seems that some versions of XEmacs come without the fsf-compat package
-(which provides functions such as `line-end-position') and it seems that
-even if your XEmacs does have the fsf-compat package installed it does not
-autoload its part. Thus you may have to install the fsf-compat package and
-add (require 'goto-addr) in your .emacs.
-
-
-Multi-mode editing
-------------------
-
-For LaTeX-based literate Haskell, you might be interested in the
-multiple major mode package haskell-latex.el (plus multi-mode.el) from
-http://www.loveshack.ukfsn.org/emacs/.
-
-
-Support
--------
-
-Mailing list: http://projects.haskell.org/cgi-bin/mailman/listinfo/haskellmode-emacs
-Bug tracker: http://trac.haskell.org/haskellmode-emacs/
View
BIN elpa/haskell-mode-2.8.0/ghc-core.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-c.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-cabal.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-decl-scan.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-doc.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-font-lock.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-ghci.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-hugs.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-indent.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-indentation.elc
Binary file not shown.
View
2 elpa/haskell-mode-2.8.0/haskell-mode-pkg.el
@@ -1,2 +0,0 @@
-(define-package "haskell-mode" "2.8.0"
- "Haskell editing mode")
View
BIN elpa/haskell-mode-2.8.0/haskell-mode.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/haskell-simple-indent.elc
Binary file not shown.
View
300 elpa/haskell-mode-2.8.0/haskell-site-file.el
@@ -1,300 +0,0 @@
-
-;;;### (autoloads (ghc-core-mode ghc-core-create-core) "ghc-core"
-;;;;;; "ghc-core.el" (19501 55706))
-;;; Generated autoloads from ghc-core.el
-
-(autoload 'ghc-core-create-core "ghc-core" "\
-Compiled and load the current buffer as tidy core
-
-\(fn)" t nil)
-
-(add-to-list 'auto-mode-alist '("\\.hcr\\'" . ghc-core-mode))
-
-(autoload 'ghc-core-mode "ghc-core" "\
-Major mode for GHC Core files.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (haskell-c-mode) "haskell-c" "haskell-c.el" (19501
-;;;;;; 55706))
-;;; Generated autoloads from haskell-c.el
-
-(add-to-list 'auto-mode-alist '("\\.hsc\\'" . haskell-c-mode))
-
-(autoload 'haskell-c-mode "haskell-c" "\
-Major mode for Haskell FFI files.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (haskell-cabal-mode) "haskell-cabal" "haskell-cabal.el"
-;;;;;; (19501 55706))
-;;; Generated autoloads from haskell-cabal.el
-
-(add-to-list 'auto-mode-alist '("\\.cabal\\'" . haskell-cabal-mode))
-
-(autoload 'haskell-cabal-mode "haskell-cabal" "\
-Major mode for Cabal package description files.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (haskell-decl-scan-mode) "haskell-decl-scan" "haskell-decl-scan.el"
-;;;;;; (19501 55706))
-;;; Generated autoloads from haskell-decl-scan.el
-
-(autoload 'haskell-decl-scan-mode "haskell-decl-scan" "\
-Minor mode for declaration scanning for Haskell mode.
-Top-level declarations are scanned and listed in the menu item \"Declarations\".
-Selecting an item from this menu will take point to the start of the
-declaration.
-
-\\[haskell-ds-forward-decl] and \\[haskell-ds-backward-decl] move forward and backward to the start of a declaration.
-
-Under XEmacs, the following keys are also defined:
-
-\\[fume-list-functions] lists the declarations of the current buffer,
-\\[fume-prompt-function-goto] prompts for a declaration to move to, and
-\\[fume-mouse-function-goto] moves to the declaration whose name is at point.
-
-This may link with `haskell-doc' (only for Emacs currently).
-
-For non-literate and LaTeX-style literate scripts, we assume the
-common convention that top-level declarations start at the first
-column. For Bird-style literate scripts, we assume the common
-convention that top-level declarations start at the third column,
-ie. after \"> \".
-
-Anything in `font-lock-comment-face' is not considered for a
-declaration. Therefore, using Haskell font locking with comments
-coloured in `font-lock-comment-face' improves declaration scanning.
-
-To turn on declaration scanning for all Haskell buffers, add this to
-.emacs:
-
- (add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
-
-To turn declaration scanning on for the current buffer, call
-`turn-on-haskell-decl-scan'.
-
-Literate Haskell scripts are supported: If the value of
-`haskell-literate' (automatically set by the Haskell mode of
-Moss&Thorn) is `bird', a Bird-style literate script is assumed. If it
-is nil or `tex', a non-literate or LaTeX-style literate script is
-assumed, respectively.
-
-Invokes `haskell-decl-scan-mode-hook'.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (haskell-doc-show-type haskell-doc-mode) "haskell-doc"
-;;;;;; "haskell-doc.el" (19501 55706))
-;;; Generated autoloads from haskell-doc.el
-
-(autoload 'haskell-doc-mode "haskell-doc" "\
-Enter `haskell-doc-mode' for showing fct types in the echo area.
-See variable docstring.
-
-\(fn &optional ARG)" t nil)
-
-(defalias 'turn-on-haskell-doc-mode 'haskell-doc-mode)
-
-(autoload 'haskell-doc-show-type "haskell-doc" "\
-Show the type of the function near point.
-For the function under point, show the type in the echo area.
-This information is extracted from the `haskell-doc-prelude-types' alist
-of prelude functions and their types, or from the local functions in the
-current buffer.
-
-\(fn &optional SYM)" t nil)
-
-;;;***
-
-;;;### (autoloads (haskell-indent-mode) "haskell-indent" "haskell-indent.el"
-;;;;;; (19501 55706))
-;;; Generated autoloads from haskell-indent.el
-
-(autoload 'haskell-indent-mode "haskell-indent" "\
-``Intelligent'' Haskell indentation mode.
-This deals with the layout rule of Haskell.
-\\[haskell-indent-cycle] starts the cycle which proposes new
-possibilities as long as the TAB key is pressed. Any other key
-or mouse click terminates the cycle and is interpreted except for
-RET which merely exits the cycle.
-Other special keys are:
- \\[haskell-indent-insert-equal]
- inserts an =
- \\[haskell-indent-insert-guard]
- inserts an |
- \\[haskell-indent-insert-otherwise]
- inserts an | otherwise =
-these functions also align the guards and rhs of the current definition
- \\[haskell-indent-insert-where]
- inserts a where keyword
- \\[haskell-indent-align-guards-and-rhs]
- aligns the guards and rhs of the region
- \\[haskell-indent-put-region-in-literate]
- makes the region a piece of literate code in a literate script
-
-Invokes `haskell-indent-hook' if not nil.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (haskell-indentation-mode) "haskell-indentation"
-;;;;;; "haskell-indentation.el" (19501 55706))
-;;; Generated autoloads from haskell-indentation.el
-
-(autoload 'haskell-indentation-mode "haskell-indentation" "\
-Haskell indentation mode that deals with the layout rule.
-It rebinds RET, DEL and BACKSPACE, so that indentations can be
-set and deleted as if they were real tabs. It supports
-autofill-mode.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (haskell-hayoo haskell-hoogle literate-haskell-mode
-;;;;;; haskell-mode) "haskell-mode" "haskell-mode.el" (19501 55706))
-;;; Generated autoloads from haskell-mode.el
-
-(add-to-list 'load-path (or (file-name-directory load-file-name) (car load-path)))
-
-(autoload 'haskell-mode "haskell-mode" "\
-Major mode for editing Haskell programs.
-Blank lines separate paragraphs, comments start with `-- '.
-\\<haskell-mode-map>
-Literate scripts are supported via `literate-haskell-mode'.
-The variable `haskell-literate' indicates the style of the script in the
-current buffer. See the documentation on this variable for more details.
-
-Modules can hook in via `haskell-mode-hook'. The following modules
-are supported with an `autoload' command:
-
- `haskell-decl-scan', Graeme E Moss
- Scans top-level declarations, and places them in a menu.
-
- `haskell-doc', Hans-Wolfgang Loidl
- Echoes types of functions or syntax of keywords when the cursor is idle.
-
- `haskell-indentation', Kristof Bastiaensen
- Intelligent semi-automatic indentation Mk2
-
- `haskell-indent', Guy Lapalme
- Intelligent semi-automatic indentation.
-
- `haskell-simple-indent', Graeme E Moss and Heribert Schuetz
- Simple indentation.
-
-Module X is activated using the command `turn-on-X'. For example,
-`haskell-indent' is activated using `turn-on-haskell-indent'.
-For more information on a module, see the help for its `X-mode'
-function. Some modules can be deactivated using `turn-off-X'. (Note
-that `haskell-doc' is irregular in using `turn-(on/off)-haskell-doc-mode'.)
-
-Use `haskell-version' to find out what version this is.
-
-Invokes `haskell-mode-hook'.
-
-\(fn)" t nil)
-
-(autoload 'literate-haskell-mode "haskell-mode" "\
-As `haskell-mode' but for literate scripts.
-
-\(fn)" t nil)
-(add-to-list 'auto-mode-alist '("\\.\\(?:[gh]s\\|hi\\)\\'" . haskell-mode))
-(add-to-list 'auto-mode-alist '("\\.l[gh]s\\'" . literate-haskell-mode))
-(add-to-list 'interpreter-mode-alist '("runghc" . haskell-mode))
-(add-to-list 'interpreter-mode-alist '("runhaskell" . haskell-mode))
-
-(autoload 'haskell-hoogle "haskell-mode" "\
-Do a Hoogle search for QUERY.
-
-\(fn QUERY)" t nil)
-
-(defalias 'hoogle 'haskell-hoogle)
-
-(autoload 'haskell-hayoo "haskell-mode" "\
-Do a Hayoo search for QUERY.
-
-\(fn QUERY)" t nil)
-
-(defalias 'hayoo 'haskell-hayoo)
-
-;;;***
-
-;;;### (autoloads (inferior-haskell-find-haddock inferior-haskell-find-definition
-;;;;;; inferior-haskell-info inferior-haskell-type inferior-haskell-load-and-run
-;;;;;; inferior-haskell-load-file switch-to-haskell) "inf-haskell"
-;;;;;; "inf-haskell.el" (19501 55706))
-;;; Generated autoloads from inf-haskell.el
-
-(defalias 'run-haskell 'switch-to-haskell)
-
-(autoload 'switch-to-haskell "inf-haskell" "\
-Show the inferior-haskell buffer. Start the process if needed.
-
-\(fn &optional ARG)" t nil)
-
-(autoload 'inferior-haskell-load-file "inf-haskell" "\
-Pass the current buffer's file to the inferior haskell process.
-If prefix arg \\[universal-argument] is given, just reload the previous file.
-
-\(fn &optional RELOAD)" t nil)
-
-(autoload 'inferior-haskell-load-and-run "inf-haskell" "\
-Pass the current buffer's file to haskell and then run a COMMAND.
-
-\(fn COMMAND)" t nil)
-
-(autoload 'inferior-haskell-type "inf-haskell" "\
-Query the haskell process for the type of the given expression.
-If optional argument `insert-value' is non-nil, insert the type above point
-in the buffer. This can be done interactively with the \\[universal-argument] prefix.
-The returned info is cached for reuse by `haskell-doc-mode'.
-
-\(fn EXPR &optional INSERT-VALUE)" t nil)
-
-(autoload 'inferior-haskell-info "inf-haskell" "\
-Query the haskell process for the info of the given expression.
-
-\(fn SYM)" t nil)
-
-(autoload 'inferior-haskell-find-definition "inf-haskell" "\
-Attempt to locate and jump to the definition of the given expression.
-
-\(fn SYM)" t nil)
-
-(autoload 'inferior-haskell-find-haddock "inf-haskell" "\
-Find and open the Haddock documentation of SYM.
-Make sure to load the file into GHCi or Hugs first by using C-c C-l.
-Only works for functions in a package installed with ghc-pkg, or
-whatever the value of `haskell-package-manager-name' is.
-
-This function needs to find which package a given module belongs
-to. In order to do this, it computes a module-to-package lookup
-alist, which is expensive to compute (it takes upwards of five
-seconds with more than about thirty installed packages). As a
-result, we cache it across sessions using the cache file
-referenced by `inferior-haskell-module-alist-file'. We test to
-see if this is newer than `haskell-package-conf-file' every time
-we load it.
-
-\(fn SYM)" t nil)
-
-;;;***
-
-;;;### (autoloads nil nil ("haskell-font-lock.el" "haskell-ghci.el"
-;;;;;; "haskell-hugs.el" "haskell-simple-indent.el") (19501 55706
-;;;;;; 159033))
-
-;;;***
-
View
BIN elpa/haskell-mode-2.8.0/haskell-site-file.elc
Binary file not shown.
View
BIN elpa/haskell-mode-2.8.0/inf-haskell.elc
Binary file not shown.
View
51 elpa/nrepl-0.1.5/nrepl-autoloads.el
<