@ -0,0 +1,8 @@ | |||
((emacs-lisp-mode | |||
(eval . (flycheck-mode)) | |||
(eval . (flycheck-cask-setup)) | |||
(eval . (checkdoc-minor-mode)) | |||
(indent-tabs-mode . nil) | |||
(fill-column . 80) | |||
(sentence-end-double-space . t) | |||
(emacs-lisp-docstring-fill-column . 75))) |
@ -0,0 +1,11 @@ | |||
# Generated files | |||
*.elc | |||
*-pkg.el | |||
*.tar | |||
TAGS | |||
doc/pass-mode.texi | |||
doc/pass-mode.info | |||
# Packages | |||
.cask | |||
elpa |
@ -0,0 +1,25 @@ | |||
language: emacs-lisp | |||
env: | |||
- EMACS=emacs24 PATH="$HOME/.cask/bin:$PATH" | |||
- EMACS=emacs-snapshot PATH="$HOME/.cask/bin:$PATH" | |||
install: | |||
- if [ "$EMACS" = "emacs24" ]; then | |||
sudo add-apt-repository -y ppa:cassou/emacs && | |||
sudo apt-get update -qq && | |||
sudo apt-get install -qq emacs24 emacs24-el; | |||
fi | |||
- if [ "$EMACS" = 'emacs-snapshot' ]; then | |||
sudo add-apt-repository -y ppa:ubuntu-elisp/ppa && | |||
sudo apt-get update -qq && | |||
sudo apt-get install -qq emacs-snapshot-el emacs-snapshot; | |||
fi | |||
- sudo apt-get install texinfo | |||
- curl -fsSkL https://raw.github.com/cask/cask/master/go | python | |||
before_script: | |||
- make env | |||
script: | |||
- make info | |||
- make check |
@ -0,0 +1,45 @@ | |||
# Contributing | |||
Contributions are welcome. If you discover bugs or issues, or have ideas for | |||
improvements or new features, please file a report on the issue tracker for this | |||
repository. Follow the guidelines below to make sure everything goes smoothly. | |||
## Issue reporting | |||
- Check that the issue has not already been reported | |||
- Check that the issue has not already been fixed in the latest code | |||
- Open an issue with a clear title | |||
- Write as grammatically correct as you can in the description. | |||
## Pull requests | |||
- Perform all changes on a topic branch for easier merging | |||
- Follow the coding conventions already in use | |||
- Verify Emacs Lisp code with `checkdoc` | |||
- Add unit tests whenever possible | |||
- Open a [pull request](https://help.github.com/articles/using-pull-requests) | |||
relating to a single issue. | |||
## Coding Conventions | |||
### Naming | |||
- Use a `pass-mode-` prefix for all public names. | |||
- Use a `pass-mode--` prefix for all internal names. | |||
### Docstrings | |||
Write meaningful docstrings for all functions and vars. | |||
- Document all functions and variables as directed by `checkdoc`. | |||
- Consider using [Flycheck](https://github.com/flycheck/flycheck) to automate | |||
`checkdoc` while you're editing. | |||
### Common Lisp functions | |||
Use `cl-lib` instead of `cl`. The `cl` library pollutes the global namespace and | |||
its usage is therefore discouraged. | |||
- Use `cl-lib`, which adds prefixes to all cl function names | |||
- Use [noflet](https://github.com/nicferrier/emacs-noflet) instead of `flet` | |||
when you need to dynamically rebind functions. |
@ -0,0 +1,6 @@ | |||
(source melpa) | |||
(package-file "pass-mode.el") | |||
(development | |||
(depends-on "ert")) |
@ -0,0 +1,52 @@ | |||
CASK ?= cask | |||
EMACS ?= emacs | |||
DIST ?= dist | |||
EMACSFLAGS = --batch -Q | |||
EMACSBATCH = $(EMACS) $(EMACSFLAGS) | |||
VERSION := $(shell EMACS=$(EMACS) $(CASK) version) | |||
PKG_DIR := $(shell EMACS=$(EMACS) $(CASK) package-directory) | |||
PROJ_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | |||
EMACS_D = ~/.emacs.d | |||
USER_ELPA_D = $(EMACS_D)/elpa | |||
SRCS = $(filter-out %-pkg.el, $(wildcard *.el)) | |||
TESTS = $(wildcard test/*.el) | |||
TAR = $(DIST)/pass-mode-$(VERSION).tar | |||
.PHONY: all deps check install uninstall reinstall clean-all clean | |||
all : deps $(TAR) | |||
deps : | |||
$(CASK) install | |||
check : deps | |||
$(CASK) exec $(EMACSBATCH) \ | |||
$(patsubst %,-l % , $(SRCS))\ | |||
$(patsubst %,-l % , $(TESTS))\ | |||
-f ert-run-tests-batch-and-exit | |||
install : $(TAR) | |||
$(EMACSBATCH) -l package -f package-initialize \ | |||
--eval '(package-install-file "$(PROJ_ROOT)/$(TAR)")' | |||
uninstall : | |||
rm -rf $(USER_ELPA_D)/pass-mode-* | |||
reinstall : clean uninstall install | |||
clean-all : clean | |||
rm -rf $(PKG_DIR) | |||
clean : | |||
rm -f *.elc | |||
rm -rf $(DIST) | |||
rm -f *-pkg.el | |||
$(TAR) : $(DIST) $(SRCS) | |||
$(CASK) package $(DIST) | |||
$(DIST) : | |||
mkdir $(DIST) |
@ -0,0 +1,32 @@ | |||
;;; pass-mode-tests.el --- Tests for pass-mode.el | |||
;; Copyright (C) 2013 Damien Cassou | |||
;; Author: Damien Cassou <damien.cassou@gmail.com> | |||
;; This file is not part of GNU Emacs. | |||
;; 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 this program. If not, see <http://www.gnu.org/licenses/>. | |||
;;; Commentary: | |||
;; Tests for pass-mode.el | |||
;;; Code: | |||
(require 'ert) | |||
(provide 'pass-mode-tests) | |||
;;; pass-mode-tests.el ends here |