Skip to content

Commit

Permalink
update submodules - now includes CIDER 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
samaaron committed Dec 8, 2015
1 parent a43917a commit 8e09ab8
Show file tree
Hide file tree
Showing 31 changed files with 646 additions and 32 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Expand Up @@ -161,3 +161,9 @@
[submodule "packs/dev/clojure-pack/vendor/submodules/rainbow-delimiters"]
path = packs/dev/clojure-pack/vendor/submodules/rainbow-delimiters
url = https://github.com/Fanael/rainbow-delimiters
[submodule "packs/dev/clojure-pack/vendor/submodules/spinner.el"]

This comment has been minimized.

Copy link
@arichiardi

arichiardi Dec 13, 2015

Contributor

I have had a problem with the .el format and I stuck with spinner-el (-el instead of .el is constant in emacs-live). Haven't you had any error? Now I don't remember with which command (maybe ln -s).

path = packs/dev/clojure-pack/vendor/submodules/spinner.el
url = git://github.com/Malabarba/spinner.el.git
[submodule "packs/dev/foundation-pack/vendor/submodules/hydra"]
path = packs/dev/foundation-pack/vendor/submodules/hydra
url = git://github.com/abo-abo/hydra.git
1 change: 1 addition & 0 deletions packs/dev/clojure-pack/config/cider-conf.el
@@ -1,3 +1,4 @@
(live-add-pack-lib "spinner.el")
(live-add-pack-lib "cider")
(require 'cider)
(require 'cider-apropos)
Expand Down
1 change: 1 addition & 0 deletions packs/dev/clojure-pack/init.el
Expand Up @@ -9,6 +9,7 @@
(live-add-pack-lib "edn")
(require 'edn)


(live-load-config-file "paredit-conf.el")
(live-load-config-file "mic-paren-conf.el")
(live-load-config-file "auto-complete-conf.el")
Expand Down
158 changes: 158 additions & 0 deletions packs/dev/clojure-pack/lib/inflections.el
@@ -0,0 +1,158 @@
;;; inflections.el --- convert english words between singular and plural

;; Copyright (C) 2006 Dmitry Galinsky <dima dot exe at gmail dot com>

;; Author: Dmitry Galinsky, Howard Yeh
;; URL: https://github.com/eschulte/jump.el
;; Package-Version: 20121016.157
;; Version: 1.1
;; Created: 2007-11-02
;; Keywords: ruby rails languages oop

;; This file is NOT part of GNU Emacs.

;;; 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 2
;; 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 this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

;;; Code:
(require 'cl)

(defvar inflection-singulars nil)
(defvar inflection-plurals nil)
(defvar inflection-irregulars nil)
(defvar inflection-uncountables nil)

(defmacro define-inflectors (&rest specs)
(cons 'progn
(loop for (type . rest) in specs
collect (case type
(:singular `(push (quote ,rest) inflection-singulars))
(:plural `(push (quote ,rest) inflection-plurals))
(:irregular `(push (quote ,rest) inflection-irregulars))
(:uncountable `(setf inflection-uncountables
(append (quote ,rest) inflection-uncountables)))))))

(defmacro string=~ (regex string &rest body)
"regex matching similar to the =~ operator found in other languages."
(let ((str (gensym)))
`(lexical-let ((,str ,string))
;; Use lexical-let to make closures (in flet).
(when (string-match ,regex ,str)
(symbol-macrolet ,(loop for i to 9 collect
(let ((sym (intern (concat "$" (number-to-string i)))))
`(,sym (match-string ,i ,str))))
(flet (($ (i) (match-string i ,str))
(sub (replacement &optional (i 0) &key fixedcase literal-string)
(replace-match replacement fixedcase literal-string ,str i)))
(symbol-macrolet ( ;;before
($b (substring ,str 0 (match-beginning 0)))
;;match
($m (match-string 0 ,str))
;;after
($a (substring ,str (match-end 0) (length ,str))))
,@body)))))))

(define-inflectors
(:plural "$" "s")
(:plural "s$" "s")
(:plural "\\(ax\\|test\\)is$" "\\1es")
(:plural "\\(octop\\|vir\\)us$" "\\1i")
(:plural "\\(alias\\|status\\)$" "\\1es")
(:plural "\\(bu\\)s$" "\\1ses")
(:plural "\\(buffal\\|tomat\\)o$" "\\1oes")
(:plural "\\([ti]\\)um$" "\\1a")
(:plural "sis$" "ses")
(:plural "\\(?:\\([^f]\\)fe\\|\\([lr]\\)f\\)$" "\\1\\2ves")
(:plural "\\(hive\\)$" "\\1s")
(:plural "\\([^aeiouy]\\|qu\\)y$" "\\1ies")
(:plural "\\(x\\|ch\\|ss\\|sh\\)$" "\\1es")
(:plural "\\(matr\\|vert\\|ind\\)ix\\|ex$" "\\1ices")
(:plural "\\([m\\|l]\\)ouse$" "\\1ice")
(:plural "^\\(ox\\)$" "\\1en")
(:plural "\\(quiz\\)$" "\\1zes")

(:singular "s$" "")
(:singular "\\(n\\)ews$" "\\1ews")
(:singular "\\([ti]\\)a$" "\\1um")
(:singular "\\(\\(a\\)naly\\|\\(b\\)a\\|\\(d\\)iagno\\|\\(p\\)arenthe\\|\\(p\\)rogno\\|\\(s\\)ynop\\|\\(t\\)he\\)ses$" "\\1\\2sis")
(:singular "\\(^analy\\)ses$" "\\1sis")
(:singular "\\([^f]\\)ves$" "\\1fe")
(:singular "\\(hive\\)s$" "\\1")
(:singular "\\(tive\\)s$" "\\1")
(:singular "\\([lr]\\)ves$" "\\1f")
(:singular "\\([^aeiouy]\\|qu\\)ies$" "\\1y")
(:singular "\\(s\\)eries$" "\\1eries")
(:singular "\\(m\\)ovies$" "\\1ovie")
(:singular "\\(x\\|ch\\|ss\\|sh\\)es$" "\\1")
(:singular "\\([m\\|l]\\)ice$" "\\1ouse")
(:singular "\\(bus\\)es$" "\\1")
(:singular "\\(o\\)es$" "\\1")
(:singular "\\(shoe\\)s$" "\\1")
(:singular "\\(cris\\|ax\\|test\\)es$" "\\1is")
(:singular "\\(octop\\|vir\\)i$" "\\1us")
(:singular "\\(alias\\|status\\)es$" "\\1")
(:singular "^\\(ox\\)en" "\\1")
(:singular "\\(vert\\|ind\\)ices$" "\\1ex")
(:singular "\\(matr\\)ices$" "\\1ix")
(:singular "\\(quiz\\)zes$" "\\1")

(:irregular "stratum" "strate")
(:irregular "syllabus" "syllabi")
(:irregular "radius" "radii")
(:irregular "addendum" "addenda")
(:irregular "cactus" "cacti")
(:irregular "child" "children")
(:irregular "corpus" "corpora")
(:irregular "criterion" "criteria")
(:irregular "datum" "data")
(:irregular "genus" "genera")
(:irregular "man" "men")
(:irregular "medium" "media")
(:irregular "move" "moves")
(:irregular "person" "people")
(:irregular "man" "men")
(:irregular "child" "children")
(:irregular "sex" "sexes")
(:irregular "move" "moves")

(:uncountable "equipment" "information" "rice" "money" "species" "series" "fish" "sheep" "news"))

;;;###autoload
(defun singularize-string (str)
(when (stringp str)
(or (car (member str inflection-uncountables))
(caar (member* (downcase str) inflection-irregulars :key 'cadr :test 'equal))
(loop for (from to) in inflection-singulars
for singular = (string=~ from str (sub to))
when singular do (return singular))
str)))

;;;###autoload
(defun pluralize-string (str)

This comment has been minimized.

Copy link
@rothmichaels

rothmichaels Dec 10, 2015

Contributor

Seems like this might be useful outside of clojure-pack

(when (stringp str)
(or (car (member str inflection-uncountables))
(cadar (member* (downcase str) inflection-irregulars :key 'car :test 'equal))
(loop for (from to) in inflection-plurals
for plurals = (string=~ from str (sub to))
when plurals do (return plurals))
str)))

;; Local Variables:
;; byte-compile-warnings: (not cl-functions)
;; End:

(provide 'inflections)
;;; inflections.el ends here
1 change: 1 addition & 0 deletions packs/dev/clojure-pack/lib/spinner.el
2 changes: 1 addition & 1 deletion packs/dev/clojure-pack/vendor/submodules/ac-cider
Submodule ac-cider updated 1 files
+1 −1 ac-cider.el
2 changes: 1 addition & 1 deletion packs/dev/clojure-pack/vendor/submodules/align-cljlet
Submodule align-cljlet updated 3 files
+5 −0 README.md
+31 −10 align-cljlet-test.el
+38 −13 align-cljlet.el
2 changes: 1 addition & 1 deletion packs/dev/clojure-pack/vendor/submodules/auto-complete
Submodule auto-complete updated 2 files
+2 −1 auto-complete.el
+2 −0 dict/python-mode
2 changes: 1 addition & 1 deletion packs/dev/clojure-pack/vendor/submodules/edn
Submodule edn updated 1 files
+2 −2 edn.el
2 changes: 1 addition & 1 deletion packs/dev/clojure-pack/vendor/submodules/popup-el
Submodule popup-el updated 1 files
+9 −10 popup.el
1 change: 1 addition & 0 deletions packs/dev/clojure-pack/vendor/submodules/spinner.el
Submodule spinner.el added at 8d8c45
4 changes: 4 additions & 0 deletions packs/dev/foundation-pack/init.el
@@ -1,3 +1,5 @@
(require 'queue)
(require 'seq)
(live-add-pack-lib "dash")
(require 'dash)

Expand All @@ -18,6 +20,8 @@
(live-add-pack-lib "pkg-info")
(require 'pkg-info)

(live-add-pack-lib "hydra")

(live-load-config-file "backup-dir-conf.el")
(live-load-config-file "util-fns.el")
(live-load-config-file "built-in.el")
Expand Down
1 change: 1 addition & 0 deletions packs/dev/foundation-pack/lib/hydra
24 changes: 12 additions & 12 deletions packs/dev/foundation-pack/lib/queue.el
Expand Up @@ -50,10 +50,10 @@
(defstruct (queue
;; A tagged list is the pre-defstruct representation.
;; (:type list)
:named
(:constructor nil)
(:constructor queue-create ())
(:copier nil))
:named
(:constructor nil)
(:constructor queue-create ())
(:copier nil))
head tail)


Expand All @@ -66,9 +66,9 @@
"Append an ELEMENT to the end of the QUEUE."
(if (queue-head queue)
(setcdr (queue-tail queue)
(setf (queue-tail queue) (cons element nil)))
(setf (queue-tail queue) (cons element nil)))
(setf (queue-head queue)
(setf (queue-tail queue) (cons element nil)))))
(setf (queue-tail queue) (cons element nil)))))

(defalias 'queue-append 'queue-enqueue)

Expand All @@ -78,7 +78,7 @@
(if (queue-head queue)
(push element (queue-head queue))
(setf (queue-head queue)
(setf (queue-tail queue) (cons element nil)))))
(setf (queue-tail queue) (cons element nil)))))


(defun queue-dequeue (queue)
Expand Down Expand Up @@ -123,13 +123,13 @@ The oldest element in the queue is the first in the list."
The new queue contains the elements of QUEUE in the same
order. The elements themselves are *not* copied."
(let ((q (queue-create))
(list (queue-head queue)))
(list (queue-head queue)))
(when (queue-head queue)
(setf (queue-head q) (cons (car (queue-head queue)) nil)
(queue-tail q) (queue-head q))
(queue-tail q) (queue-head q))
(while (setq list (cdr list))
(setf (queue-tail q)
(setcdr (queue-tail q) (cons (car list) nil)))))
(setf (queue-tail q)
(setcdr (queue-tail q) (cons (car list) nil)))))
q))


Expand All @@ -141,7 +141,7 @@ order. The elements themselves are *not* copied."
(defun queue-clear (queue)
"Remove all elements from QUEUE."
(setf (queue-head queue) nil
(queue-tail queue) nil))
(queue-tail queue) nil))


(provide 'queue)
Expand Down

0 comments on commit 8e09ab8

Please sign in to comment.