PageRenderTime 58ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/elpa/clojure-cheatsheet-0.2.2/clojure-cheatsheet.el

https://github.com/DeltaAlphaRho/.emacs.d
Emacs Lisp | 602 lines | 536 code | 49 blank | 17 comment | 9 complexity | 18eb925c5f832b5ccf397bca7005cefb MD5 | raw file
  1. ;;; clojure-cheatsheet.el --- The Clojure Cheatsheet for Emacs
  2. ;; Copyright 2013 Kris Jenkins
  3. ;; Author: Kris Jenkins <krisajenkins@gmail.com>
  4. ;; Maintainer: Kris Jenkins <krisajenkins@gmail.com>
  5. ;; Keywords: clojure nrepl cheatsheet helm
  6. ;; URL: https://github.com/krisajenkins/clojure-cheatsheet
  7. ;; Created: 7th August 2013
  8. ;; Version: 0.2.2
  9. ;; X-Original-Version: 0.2.2
  10. ;; Package-Requires: ((helm "1.5.3") (cider "0.1.8"))
  11. ;;; Commentary:
  12. ;;
  13. ;; A quick reference system for Clojure. Fast, searchable & available offline.
  14. ;;; Code:
  15. (require 'helm)
  16. (require 'helm-match-plugin)
  17. (require 'nrepl-client)
  18. (require 'cider-interaction)
  19. (defconst clojure-cheatsheet-hierarchy
  20. '(("Primitives"
  21. ("Numbers"
  22. ("Arithmetic"
  23. (clojure.core + - * / quot rem mod dec inc max min))
  24. ("Compare"
  25. (clojure.core = == not= < > <= >= compare))
  26. ("Bitwise"
  27. (clojure.core 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))
  28. ("Cast"
  29. (clojure.core byte short long int float double bigdec bigint biginteger num rationalize))
  30. ("Test"
  31. (clojure.core nil? identical? zero? pos? neg? even? odd?))
  32. ("Random"
  33. (clojure.core rand rand-int))
  34. ("BigDecimal"
  35. (clojure.core with-precision))
  36. ("Ratios"
  37. (clojure.core numerator denominator ratio?))
  38. ("Arbitrary Precision Arithmetic"
  39. (clojure.core +\' -\' *\' inc\' dec\'))
  40. ("Unchecked"
  41. (clojure.core *unchecked-math*
  42. unchecked-add
  43. unchecked-add-int
  44. unchecked-byte
  45. unchecked-char
  46. unchecked-dec
  47. unchecked-dec-int
  48. unchecked-divide-int
  49. unchecked-double
  50. unchecked-float
  51. unchecked-inc
  52. unchecked-inc-int
  53. unchecked-int
  54. unchecked-long
  55. unchecked-multiply
  56. unchecked-multiply-int
  57. unchecked-negate
  58. unchecked-negate-int
  59. unchecked-remainder-int
  60. unchecked-short
  61. unchecked-subtract
  62. unchecked-subtract-int)))
  63. ("Strings"
  64. ("Create"
  65. (clojure.core str format))
  66. ("Use"
  67. (clojure.core count get subs compare)
  68. (clojure.string join escape split split-lines replace replace-first reverse re-quote-replacement))
  69. ("Regex"
  70. (:url "Java's Regex Syntax" "http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html")
  71. (clojure.core re-find re-seq re-matches re-pattern re-matcher re-groups)
  72. (clojure.string replace replace-first re-quote-replacement))
  73. ("Letters"
  74. (clojure.string capitalize lower-case upper-case))
  75. ("Trim"
  76. (clojure.string trim trim-newline triml trimr))
  77. ("Test"
  78. (clojure.core char char? string?)
  79. (clojure.string blank?)))
  80. ("Other"
  81. ("Characters"
  82. (clojure.core char char-name-string char-escape-string))
  83. ("Keywords"
  84. (clojure.core keyword keyword? find-keyword))
  85. ("Symbols"
  86. (clojure.core symbol symbol? gensym))
  87. ("Data Readers"
  88. (clojure.core *data-readers* default-data-readers *default-data-reader-fn*))))
  89. ("Collections"
  90. ("Generic Ops"
  91. (clojure.core count empty not-empty into conj))
  92. ("Walking"
  93. (clojure.walk walk prewalk prewalk-demo prewalk-replace postwalk postwalk-demo postwalk-replace keywordize-keys stringify-keys))
  94. ("Content tests"
  95. (clojure.core distinct? empty? every? not-every? some not-any?))
  96. ("Capabilities"
  97. (clojure.core sequential? associative? sorted? counted? reversible?))
  98. ("Type tests"
  99. (clojure.core type class coll? list? vector? set? map? seq?
  100. number? integer? float? decimal? class? rational? ratio?
  101. chunked-seq? reduced? special-symbol?))
  102. ("Lists"
  103. ("Create"
  104. (clojure.core list list*))
  105. ("Examine"
  106. (clojure.core first nth peek))
  107. ("'Change'"
  108. (clojure.core cons conj rest pop)))
  109. ("Vectors"
  110. ("Create"
  111. (clojure.core vec vector vector-of))
  112. ("Examine"
  113. (clojure.core get peek))
  114. ("'Change'"
  115. (clojure.core assoc pop subvec replace conj rseq))
  116. ("Ops"
  117. (clojure.core mapv filterv reduce-kv)))
  118. ("Sets"
  119. ("Create"
  120. (clojure.core set hash-set sorted-set sorted-set-by))
  121. ("Examine"
  122. (clojure.core get contains?))
  123. ("'Change'"
  124. (clojure.core conj disj))
  125. ("Relational Algebra"
  126. (clojure.set join select project union difference intersection))
  127. ("Get map"
  128. (clojure.set index rename-keys rename map-invert))
  129. ("Test"
  130. (clojure.set subset? superset?)))
  131. ("Maps"
  132. ("Create"
  133. (clojure.core hash-map array-map zipmap sorted-map sorted-map-by bean frequencies group-by))
  134. ("Examine"
  135. (clojure.core get get-in contains? find keys vals))
  136. ("'Change'"
  137. (clojure.core assoc assoc-in dissoc merge merge-with select-keys update-in))
  138. ("Entry"
  139. (clojure.core key val))
  140. ("Sorted Maps"
  141. (clojure.core rseq subseq rsubseq))))
  142. ("Functions"
  143. ("Create"
  144. (clojure.core fn defn defn- definline identity constantly comp complement partial juxt memfn memoize fnil every-pred some-fn trampoline))
  145. ("Call"
  146. (clojure.core -> ->> some-> some->> as-> cond-> cond->>))
  147. ("Test"
  148. (clojure.core fn? ifn?)))
  149. ("Other"
  150. ("XML"
  151. (clojure.core xml-seq)
  152. (clojure.xml parse))
  153. ("REPL"
  154. (clojure.core *1 *2 *3 *e *print-dup* *print-length* *print-level* *print-meta* *print-readably*))
  155. ("EDN"
  156. (clojure.edn read read-string))
  157. ("Compiling Code & Class Generation"
  158. (:url "Documentation" "http://clojure.org/compilation")
  159. (clojure.core *compile-files* *compile-path* *file* *warn-on-reflection* compile gen-class gen-interface loaded-libs test))
  160. ("Misc"
  161. (clojure.core eval force hash name *clojure-version* clojure-version *command-line-args*))
  162. ("Pretty Printing"
  163. (clojure.pprint pprint print-table pp *print-right-margin*))
  164. ("Browser / Shell"
  165. (clojure.java.browse browse-url)
  166. (clojure.java.shell sh with-sh-dir with-sh-env)))
  167. ("Vars & Global Environment"
  168. (:url "Documentation" "http://clojure.org/vars")
  169. ("Def Variants"
  170. (:special def)
  171. (clojure.core defn defn- definline defmacro defmethod defmulti defonce defrecord))
  172. ("Interned Vars"
  173. (:special var)
  174. (clojure.core declare intern binding find-var))
  175. ("Var Objects"
  176. (clojure.core with-local-vars var-get var-set alter-var-root var?))
  177. ("Var Validators"
  178. (clojure.core set-validator! get-validator)))
  179. ("Abstractions"
  180. ("Protocols"
  181. (:url "Documentation" "http://clojure.org/protocols")
  182. (clojure.core defprotocol extend extend-type extend-protocol reify extends? satisfies? extenders))
  183. ("Records & Types"
  184. (:url "Documentation" "http://clojure.org/datatypes")
  185. (clojure.core defrecord deftype))
  186. ("Multimethods"
  187. (:url "Documentation" "http://clojure.org/multimethods")
  188. ("Define"
  189. (clojure.core defmulti defmethod))
  190. ("Dispatch"
  191. (clojure.core get-method methods))
  192. ("Remove"
  193. (clojure.core remove-method remove-all-methods))
  194. ("Prefer"
  195. (clojure.core prefer-method prefers))
  196. ("Relation"
  197. (clojure.core derive isa? parents ancestors descendants make-hierarchy))))
  198. ("Macros"
  199. (:url "Documentation" "http://clojure.org/macros")
  200. ("Create"
  201. (clojure.core defmacro definline))
  202. ("Debug"
  203. (clojure.core macroexpand-1 macroexpand)
  204. (clojure.walk macroexpand-all))
  205. ("Branch"
  206. (clojure.core and or when when-not when-let when-first if-not if-let cond condp case))
  207. ("Loop"
  208. (clojure.core for doseq dotimes while))
  209. ("Arrange"
  210. (clojure.core .. doto ->))
  211. ("Scope"
  212. (clojure.core binding locking time)
  213. (clojure.core with-in-str with-local-vars with-open with-out-str with-precision with-redefs with-redefs-fn))
  214. ("Lazy"
  215. (clojure.core lazy-cat lazy-seq delay delay?))
  216. ("Doc."
  217. (clojure.core assert comment)
  218. (clojure.repl doc dir dir-fn source-fn)))
  219. ("Java Interop"
  220. (:url "Documentation" "http://clojure.org/java_interop")
  221. ("General"
  222. (:special new set!)
  223. (clojure.core .. doto bean comparator enumeration-seq import iterator-seq memfn definterface supers bases))
  224. ("Cast"
  225. (clojure.core boolean byte short char int long float double bigdec bigint num cast biginteger))
  226. ("Java Arrays"
  227. ("Create"
  228. (clojure.core boolean-array byte-array double-array char-array float-array int-array long-array make-array object-array short-array to-array))
  229. ("Manipulate"
  230. (clojure.core aclone aget aset alength amap areduce aset-int aset-long aset-short aset-boolean aset-byte aset-char aset-double aset-float))
  231. ("Cast"
  232. (clojure.core booleans bytes chars doubles floats ints longs shorts)))
  233. ("Exceptions"
  234. (:special throw try catch finally)
  235. (clojure.core ex-info ex-data)
  236. (clojure.repl pst)))
  237. ("Namespaces"
  238. (:url "Documentation" "http://clojure.org/namespaces")
  239. ("Current"
  240. (clojure.core *ns*))
  241. ("Create Switch"
  242. (clojure.core ns in-ns create-ns))
  243. ("Add"
  244. (clojure.core alias import intern refer refer-clojure))
  245. ("Find"
  246. (clojure.core all-ns find-ns))
  247. ("Examine"
  248. (clojure.core ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers))
  249. ("From symbol"
  250. (clojure.core resolve namespace ns-resolve the-ns))
  251. ("Remove"
  252. (clojure.core ns-unalias ns-unmap remove-ns)))
  253. ("Loading"
  254. ("Load libs"
  255. (clojure.core require use import refer))
  256. ("List Loaded"
  257. (clojure.core loaded-libs))
  258. ("Load Misc"
  259. (clojure.core load load-file load-reader load-string)))
  260. ("Concurrency"
  261. (:url "Documentation" "http://clojure.org/atoms")
  262. ("Atoms"
  263. (clojure.core atom swap! reset! compare-and-set!))
  264. ("Futures"
  265. (clojure.core future future-call future-cancel future-cancelled? future-done? future?))
  266. ("Threads"
  267. (clojure.core bound-fn bound-fn* get-thread-bindings pop-thread-bindings push-thread-bindings))
  268. ("Misc"
  269. (clojure.core locking pcalls pvalues pmap seque promise deliver))
  270. ("Refs & Transactions"
  271. (:url "Documentation" "http://clojure.org/refs")
  272. ("Create"
  273. (clojure.core ref))
  274. ("Examine"
  275. (clojure.core deref))
  276. ("Transaction"
  277. (clojure.core sync dosync io!))
  278. ("In Transaction"
  279. (clojure.core ensure ref-set alter commute))
  280. ("Validators"
  281. (clojure.core get-validator set-validator!))
  282. ("History"
  283. (clojure.core ref-history-count ref-max-history ref-min-history)))
  284. ("Agents & Asynchronous Actions"
  285. (:url "Documentation" "http://clojure.org/agents")
  286. ("Create"
  287. (clojure.core agent))
  288. ("Examine"
  289. (clojure.core agent-error))
  290. ("Change State"
  291. (clojure.core send send-off restart-agent send-via set-agent-send-executor! set-agent-send-off-executor!))
  292. ("Block Waiting"
  293. (clojure.core await await-for))
  294. ("Ref Validators"
  295. (clojure.core get-validator set-validator!))
  296. ("Watchers"
  297. (clojure.core add-watch remove-watch))
  298. ("Thread Handling"
  299. (clojure.core shutdown-agents))
  300. ("Error"
  301. (clojure.core error-handler set-error-handler! error-mode set-error-mode!))
  302. ("Misc"
  303. (clojure.core *agent* release-pending-sends))))
  304. ("Sequences"
  305. ("Creating a Lazy Seq"
  306. ("From Collection"
  307. (clojure.core seq sequence keys vals rseq subseq rsubseq))
  308. ("From Producer Fn"
  309. (clojure.core lazy-seq repeatedly iterate))
  310. ("From Constant"
  311. (clojure.core repeat range))
  312. ("From Other"
  313. (clojure.core file-seq line-seq resultset-seq re-seq tree-seq xml-seq iterator-seq enumeration-seq))
  314. ("From Seq"
  315. (clojure.core keep keep-indexed)))
  316. ("Seq in, Seq out"
  317. ("Get shorter"
  318. (clojure.core distinct filter remove for))
  319. ("Get longer"
  320. (clojure.core cons conj concat lazy-cat mapcat cycle interleave interpose)))
  321. ("Tail-items"
  322. (clojure.core rest nthrest fnext nnext drop drop-while take-last for))
  323. ("Head-items"
  324. (clojure.core take take-nth take-while butlast drop-last for))
  325. ("'Change'"
  326. (clojure.core conj concat distinct flatten group-by partition partition-all partition-by split-at split-with filter remove replace shuffle))
  327. ("Rearrange"
  328. (clojure.core reverse sort sort-by compare))
  329. ("Process items"
  330. (clojure.core map pmap map-indexed mapcat for replace seque))
  331. ("Using a Seq"
  332. ("Extract item"
  333. (clojure.core first second last rest next ffirst nfirst fnext nnext nth nthnext rand-nth when-first max-key min-key))
  334. ("Construct coll"
  335. (clojure.core zipmap into reduce reductions set vec into-array to-array-2d))
  336. ("Pass to fn"
  337. (clojure.core apply))
  338. ("Search"
  339. (clojure.core some filter))
  340. ("Force evaluation"
  341. (clojure.core doseq dorun doall))
  342. ("Check for forced"
  343. (clojure.core realized?))))
  344. ("Zippers"
  345. ("Create"
  346. (clojure.zip zipper seq-zip vector-zip xml-zip))
  347. ("Get loc"
  348. (clojure.zip up down left right leftmost rightmost))
  349. ("Get seq"
  350. (clojure.zip lefts rights path children))
  351. ("'Change'"
  352. (clojure.zip make-node replace edit insert-child insert-left insert-right append-child remove))
  353. ("Move"
  354. (clojure.zip next prev))
  355. ("XML"
  356. (clojure.data.zip.xml attr attr= seq-test tag= text text= xml-> xml1->))
  357. ("Misc"
  358. (clojure.zip root node branch? end?)))
  359. ("Documentation"
  360. ("REPL"
  361. (clojure.repl doc find-doc apropos source pst)
  362. (clojure.java.javadoc javadoc)))
  363. ("Transients"
  364. (:url "Documentation" "http://clojure.org/transients")
  365. ("Create")
  366. (clojure.core transient persistent!)
  367. ("Change")
  368. (clojure.core conj! pop! assoc! dissoc! disj!))
  369. ("Misc"
  370. ("Compare"
  371. (clojure.core = == identical? not= not compare)
  372. (clojure.data diff))
  373. ("Test"
  374. (clojure.core true? false? nil? instance?)))
  375. ("IO"
  376. ("To/from ..."
  377. (clojure.core spit slurp))
  378. ("To *out*"
  379. (clojure.core pr prn print printf println newline)
  380. (clojure.pprint print-table))
  381. ("To writer"
  382. (clojure.pprint pprint cl-format))
  383. ("To string"
  384. (clojure.core format with-out-str pr-str prn-str print-str println-str))
  385. ("From *in*"
  386. (clojure.core read-line read))
  387. ("From reader"
  388. (clojure.core line-seq read))
  389. ("From string"
  390. (clojure.core read-string with-in-str))
  391. ("Open"
  392. (clojure.core with-open)
  393. (clojure.java.io reader writer input-stream output-stream))
  394. ("Interop"
  395. (clojure.java.io make-writer make-reader make-output-stream make-input-stream))
  396. ("Misc"
  397. (clojure.core flush file-seq *in* *out* *err*)
  398. (clojure.java.io file copy delete-file resource as-file as-url as-relative-path make-parents)))
  399. ("Metadata"
  400. (clojure.core meta with-meta alter-meta! reset-meta! vary-meta))
  401. ("Special Forms"
  402. (:url "Documentation" "http://clojure.org/special_forms")
  403. (:special def if do quote var recur throw try monitor-enter monitor-exit)
  404. (clojure.core fn loop)
  405. ("Binding / Destructuring"
  406. (clojure.core let fn letfn defn defmacro loop for doseq if-let when-let)))
  407. ("Async"
  408. ("Main"
  409. (clojure.core.async go go-loop <! <!! >! >!! chan put! take take! close! timeout))
  410. ("Choice"
  411. (clojure.core.async alt! alt!! alts! alts!! do-alts))
  412. ("Buffering"
  413. (clojure.core.async buffer dropping-buffer sliding-buffer unblocking-buffer?))
  414. ("Threading"
  415. (clojure.core.async thread thread-call))
  416. ("Mixing"
  417. (clojure.core.async admix solo-mode mix unmix unmix-all toggle merge pipe unique))
  418. ("Multiples"
  419. (clojure.core.async mult tap untap untap-all))
  420. ("Publish/Subscribe"
  421. (clojure.core.async pub sub unsub unsub-all))
  422. ("Higher Order"
  423. (clojure.core.async filter< filter> map map< map> mapcat< mapcat> partition partition-by reduce remove< remove> split))
  424. ("Pre-Populate"
  425. (clojure.core.async into onto-chan to-chan)))
  426. ("Unit Tests"
  427. ("Defining"
  428. (clojure.test deftest deftest- testing is are))
  429. ("Running"
  430. (clojure.test run-tests run-all-tests))
  431. ("Fixtures"
  432. (clojure.test use-fixtures join-fixtures compose-fixtures))))
  433. "A data structure designed for the maintainer's convenience, which we
  434. transform into the format that helm requires.
  435. It's a tree, where the head of each list determines the context of the rest of the list.
  436. The head may be:
  437. A string, in which case it's a (sub)heading for the rest of the items.
  438. A symbol, in which case it's the Clojure namespace of the symbols that follow it.
  439. The keyword :special, in which case it's a Clojure special form - a symbol with no
  440. Any other keyword, in which case it's a typed item that will be passed
  441. through and handled in `clojure-cheatsheet/item-to-helm-source'.")
  442. ;;; We could just make dash.el a dependency, but I'm not sure it's worth it for one utility macro.
  443. (defmacro clojure-cheatsheet/->>
  444. (&rest body)
  445. (let ((result (pop body)))
  446. (dolist (form body result)
  447. (setq result (append (if (sequencep form)
  448. form
  449. (list form))
  450. (list result))))))
  451. (defun clojure-cheatsheet/treewalk
  452. (before after node)
  453. "Walk a tree. Invoke BEFORE before the walk, and AFTER after it, on each NODE."
  454. (clojure-cheatsheet/->> node
  455. (funcall before)
  456. ((lambda (new-node)
  457. (if (listp new-node)
  458. (mapcar (lambda (child)
  459. (clojure-cheatsheet/treewalk before after child))
  460. new-node)
  461. new-node)))
  462. (funcall after)))
  463. (defun clojure-cheatsheet/symbol-qualifier
  464. (namespace symbol)
  465. "Given a (Clojure) namespace and a symbol, fully-qualify that symbol."
  466. (intern (format "%s/%s" namespace symbol)))
  467. (defun clojure-cheatsheet/string-qualifier
  468. (head subnode)
  469. (cond
  470. ((keywordp (car subnode)) (list head subnode))
  471. ((symbolp (car subnode)) (cons head subnode))
  472. ((stringp (car subnode)) (cons (format "%s : %s" head (car subnode))
  473. (cdr subnode)))
  474. (t (mapcar (apply-partially 'clojure-cheatsheet/string-qualifier head) subnode))))
  475. (defun clojure-cheatsheet/propagate-headings
  476. (node)
  477. (clojure-cheatsheet/treewalk
  478. #'identity
  479. (lambda (item)
  480. (if (listp item)
  481. (destructuring-bind (head &rest tail) item
  482. (cond ((equal :special head) tail)
  483. ((keywordp head) item)
  484. ((symbolp head) (mapcar (apply-partially #'clojure-cheatsheet/symbol-qualifier head) tail))
  485. ((stringp head) (mapcar (apply-partially #'clojure-cheatsheet/string-qualifier head) tail))
  486. (t item)))
  487. item))
  488. node))
  489. (defun clojure-cheatsheet/flatten
  490. (node)
  491. "Flatten NODE, which is a tree structure, into a list of its leaves."
  492. (cond
  493. ((not (listp node)) node)
  494. ((keywordp (car node)) node)
  495. ((listp (car node)) (apply 'append (mapcar 'clojure-cheatsheet/flatten node)))
  496. (t (list (mapcar 'clojure-cheatsheet/flatten node)))))
  497. (defun clojure-cheatsheet/group-by-head
  498. (data)
  499. "Group the DATA, which should be a list of lists, by the head of each list."
  500. (let ((result '()))
  501. (dolist (item data result)
  502. (let* ((head (car item))
  503. (tail (cdr item))
  504. (current (cdr (assoc head result))))
  505. (if current
  506. (setf (cdr (assoc head result))
  507. (append current tail))
  508. (setq result (append result (list item))))))))
  509. (defun clojure-cheatsheet/lookup-doc
  510. (symbol)
  511. (if (nrepl-current-connection-buffer)
  512. (cider-doc-handler symbol)
  513. (error "nREPL not connected!")))
  514. (defun clojure-cheatsheet/lookup-src
  515. (symbol)
  516. (if (nrepl-current-connection-buffer)
  517. (cider-src-handler symbol)
  518. (error "nREPL not connected!")))
  519. (defun clojure-cheatsheet/item-to-helm-source
  520. (item)
  521. "Turn ITEM, which will be (\"HEADING\" candidates...), into a helm-source."
  522. (destructuring-bind (heading &rest entries) item
  523. `((name . ,heading)
  524. (candidates ,@(mapcar (lambda (item)
  525. (if (and (listp item)
  526. (keywordp (car item)))
  527. (destructuring-bind (kind title value) item
  528. (cons title
  529. (list kind value)))
  530. item))
  531. entries))
  532. (match . ((lambda (candidate)
  533. (helm-mp-3-match (format "%s %s" candidate ,heading)))))
  534. (action-transformer (lambda (action-list current-selection)
  535. (if (and (listp current-selection)
  536. (eq (car current-selection) :url))
  537. '(("Browse" . (lambda (item)
  538. (helm-browse-url (cadr item)))))
  539. '(("Lookup Docs" . clojure-cheatsheet/lookup-doc)
  540. ("Lookup Source" . clojure-cheatsheet/lookup-src))))))))
  541. (defvar helm-source-clojure-cheatsheet
  542. (clojure-cheatsheet/->> clojure-cheatsheet-hierarchy
  543. clojure-cheatsheet/propagate-headings
  544. clojure-cheatsheet/flatten
  545. clojure-cheatsheet/group-by-head
  546. (mapcar 'clojure-cheatsheet/item-to-helm-source)))
  547. ;;;###autoload
  548. (defun clojure-cheatsheet ()
  549. "Use helm to show a Clojure cheatsheet."
  550. (interactive)
  551. (helm :sources helm-source-clojure-cheatsheet))
  552. (provide 'clojure-cheatsheet)
  553. ;;; clojure-cheatsheet.el ends here