Skip to content

Commit 34d88f7

Browse files
committed
Actual code
1 parent d212572 commit 34d88f7

File tree

6 files changed

+1962
-1
lines changed

6 files changed

+1962
-1
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
makem.sh linguist-vendored

.github/workflows/test.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# * test.yml --- Test Emacs packages using makem.sh on GitHub Actions
2+
3+
# https://github.com/alphapapa/makem.sh
4+
5+
# Based on Steve Purcell's examples at
6+
# <https://github.com/purcell/setup-emacs/blob/master/.github/workflows/test.yml>,
7+
# <https://github.com/purcell/package-lint/blob/master/.github/workflows/test.yml>.
8+
9+
# * License:
10+
11+
# This program is free software; you can redistribute it and/or modify
12+
# it under the terms of the GNU General Public License as published by
13+
# the Free Software Foundation, either version 3 of the License, or
14+
# (at your option) any later version.
15+
16+
# This program is distributed in the hope that it will be useful,
17+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
# GNU General Public License for more details.
20+
21+
# You should have received a copy of the GNU General Public License
22+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
23+
24+
# * Code:
25+
26+
name: "CI"
27+
on:
28+
pull_request:
29+
push:
30+
# Comment out this section to enable testing of all branches.
31+
branches:
32+
- master
33+
34+
jobs:
35+
build:
36+
runs-on: ubuntu-latest
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
emacs_version:
41+
- 26.3
42+
- snapshot
43+
steps:
44+
- uses: purcell/setup-emacs@master
45+
with:
46+
version: ${{ matrix.emacs_version }}
47+
48+
- uses: actions/checkout@v2
49+
50+
- name: Initialize sandbox
51+
run: |
52+
SANDBOX_DIR=$(mktemp -d) || exit 1
53+
echo ::set-env name=SANDBOX_DIR::$SANDBOX_DIR
54+
./makem.sh -vv --sandbox=$SANDBOX_DIR --install-deps --install-linters
55+
56+
# The "all" rule is not used, because it treats compilation warnings
57+
# as failures, so linting and testing are run as separate steps.
58+
59+
- name: Lint
60+
# NOTE: Uncomment this line to treat lint failures as passing
61+
# so the job doesn't show failure.
62+
# continue-on-error: true
63+
run: ./makem.sh -vv --sandbox=$SANDBOX_DIR lint
64+
65+
- name: Test
66+
if: always() # Run test even if linting fails.
67+
run: ./makem.sh -vv --sandbox=$SANDBOX_DIR test
68+
69+
# Local Variables:
70+
# eval: (outline-minor-mode)
71+
# End:

Makefile

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# * makem.sh/Makefile --- Script to aid building and testing Emacs Lisp packages
2+
3+
# This Makefile is from the makem.sh repo: <https://github.com/alphapapa/makem.sh>.
4+
5+
# * Arguments
6+
7+
# For consistency, we use only var=val options, not hyphen-prefixed options.
8+
9+
# NOTE: I don't like duplicating the arguments here and in makem.sh,
10+
# but I haven't been able to find a way to pass arguments which
11+
# conflict with Make's own arguments through Make to the script.
12+
# Using -- doesn't seem to do it.
13+
14+
ifdef install-deps
15+
INSTALL_DEPS = "--install-deps"
16+
endif
17+
ifdef install-linters
18+
INSTALL_LINTERS = "--install-linters"
19+
endif
20+
21+
ifdef sandbox
22+
ifeq ($(sandbox), t)
23+
SANDBOX = --sandbox
24+
else
25+
SANDBOX = --sandbox=$(sandbox)
26+
endif
27+
endif
28+
29+
ifdef debug
30+
DEBUG = "--debug"
31+
endif
32+
33+
# ** Verbosity
34+
35+
# Since the "-v" in "make -v" gets intercepted by Make itself, we have
36+
# to use a variable.
37+
38+
verbose = $(v)
39+
40+
ifneq (,$(findstring vv,$(verbose)))
41+
VERBOSE = "-vv"
42+
else ifneq (,$(findstring v,$(verbose)))
43+
VERBOSE = "-v"
44+
endif
45+
46+
# * Rules
47+
48+
# TODO: Handle cases in which "test" or "tests" are called and a
49+
# directory by that name exists, which can confuse Make.
50+
51+
%:
52+
@./makem.sh $(DEBUG) $(VERBOSE) $(SANDBOX) $(INSTALL_DEPS) $(INSTALL_LINTERS) $(@)
53+
54+
.DEFAULT: init
55+
init:
56+
@./makem.sh $(DEBUG) $(VERBOSE) $(SANDBOX) $(INSTALL_DEPS) $(INSTALL_LINTERS)

README.md

+44-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
11
# clojure-essential-ref
2-
🔖 cider-doc to Clojure, The Essential Reference
2+
3+
An Emacs package to provide a command to browse the Clojure documentation of a symbol in book [Clojure, The Essential Reference](https://livebook.manning.com/book/clojure-the-essential-reference/).
4+
5+
It needs a CIDER session to be launched to perform fully-qualified symbol resolution.
6+
7+
It behaves similarly to `cider-clojuredocs-web`, including the default proposal of _symbol-at-point_. As such it's a nice companion to the latter (alongside `cider-doc`).
8+
9+
10+
## Installation
11+
12+
The package is not yet available on [Melpa](https://melpa.org/).
13+
14+
For now, the recommended way to install is with [use-package](https://github.com/jwiegley/use-package), [quelpa](https://github.com/quelpa/quelpa) and [quelpa-use-package](https://github.com/quelpa/quelpa-use-package).
15+
16+
```el
17+
(use-package clojure-essential-ref
18+
:quelpa (with-shell-interpreter :fetcher github :repo "p3r7/clojure-essential-ref"))
19+
```
20+
21+
22+
## Usage
23+
24+
Under a CIDER session, just call the command:
25+
26+
M-x clojure-essential-ref
27+
28+
For convenience sake, you can bind it to a keyboard shortcut:
29+
30+
```el
31+
(use-package clojure-essential-ref
32+
;; ...
33+
:bind (
34+
:map cider-mode-map
35+
("C-h F" . clojure-essential-ref)
36+
:map cider-repl-mode-map
37+
("C-h F" . clojure-essential-ref)))
38+
```
39+
40+
41+
## Legibility
42+
43+
This code uses form feeds (`^L` character) as separators.
44+
45+
Package [form-feed](https://github.com/wasamasa/form-feed) makes them appear as intended.

0 commit comments

Comments
 (0)