Skip to content

Commit 3c7f3b7

Browse files
committed
Add a command to view the Clojure style guide
1 parent 253289f commit 3c7f3b7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* New interactive command `clojure-view-reference-section`.
1010
* New interactive command `clojure-view-cheatsheet`.
1111
* New interactive command `clojure-view-grimoire`.
12+
* New interactive command `clojure-view-style-guide`.
1213
* Make the refactoring keymap prefix customizable via `clojure-refactor-map-prefix`.
1314

1415
## 5.5.2 (2016-08-03)

clojure-mode.el

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ Out-of-the box clojure-mode understands lein, boot and gradle."
263263
["View a Clojure guide" clojure-view-guide]
264264
["View a Clojure reference section" clojure-view-reference-section]
265265
["View the Clojure cheatsheet" clojure-view-cheatsheet]
266-
["View the Clojure Grimoire" clojure-view-grimoire])
266+
["View the Clojure Grimoire" clojure-view-grimoire]
267+
["View the Clojure style guide" clojure-view-style-guide])
267268
"--"
268269
["Report a clojure-mode bug" clojure-mode-report-bug]
269270
["Clojure-mode version" clojure-mode-display-version]))
@@ -384,6 +385,14 @@ The command will prompt you to select one of the available sections."
384385
(interactive)
385386
(browse-url clojure-grimoire-url))
386387

388+
(defconst clojure-style-guide-url "https://github.com/bbatsov/clojure-style-guide"
389+
"The URL of the Clojure style guide.")
390+
391+
(defun clojure-view-style-guide ()
392+
"Open the Clojure style guide in your default browser."
393+
(interactive)
394+
(browse-url clojure-style-guide-url))
395+
387396
(defun clojure-space-for-delimiter-p (endp delim)
388397
"Prevent paredit from inserting useless spaces.
389398
See `paredit-space-for-delimiter-predicates' for the meaning of

0 commit comments

Comments
 (0)