Update CONTRIBUTE.md and add file headers

Also add default file header to layer templates.
This commit is contained in:
syl20bnr 2015-01-13 23:12:56 -05:00
parent f7938c6fc1
commit ceefe88b75
34 changed files with 465 additions and 29 deletions

View File

@ -1,3 +1,15 @@
;;; config.el --- Colors Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; ---------------------------------------------------------------------------
;; Prefixes
;; ---------------------------------------------------------------------------

View File

@ -1,3 +1,15 @@
;;; packages.el --- Colors Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar colors-packages
'(
rainbow-identifiers

View File

@ -1,3 +1,15 @@
;;; config.el --- Git Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar git-enable-github-support nil
"If non nil the Github packages and extensions are enabled.")

View File

@ -1,3 +1,15 @@
;;; packages.el --- Git Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar git-packages
'(
fringe-helper

View File

@ -1,3 +1,15 @@
;;; packages.el --- C/C++ Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar c-c++-packages
'(
cc-mode

View File

@ -1,3 +1,15 @@
;;; packages.el --- Erlang and Elixir Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar erlang-elixir-packages
'(
auto-complete

View File

@ -1,3 +1,15 @@
;;; packages.el --- ESS (R) Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar ess-packages
'(
ess

View File

@ -1,3 +1,15 @@
;;; packages.el --- Haskell Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar haskell-packages
'(
flycheck

View File

@ -1,3 +1,15 @@
;;; packages.el --- HTTP Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar html-packages
'(
emmet-mode

View File

@ -1,3 +1,15 @@
;;; packages.el --- Javascript Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar javascript-packages
'(
coffee-mode

View File

@ -1,4 +1,14 @@
;; Extensions are in emacs_paths/extensions
;;; extensions.el --- Python Layer extensions File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; Pre extensions are loaded *before* the packages
(defvar python-pre-extensions

View File

@ -1,3 +1,15 @@
;;; funcs.el --- Python Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; from http://pedrokroger.net/2010/07/configuring-emacs-as-a-python-ide-2/
(defun annotate-pdb ()
"Highlight break point lines."

View File

@ -1,3 +1,15 @@
;;; packages.el --- Python Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar python-packages
'(
anaconda-mode

View File

@ -1,3 +1,15 @@
;;; funcs.el --- Scala Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;;; Ensime
(defun scala/configure-ensime ()

View File

@ -1,3 +1,15 @@
;;; packages.el --- Scala Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar scala-packages
'(
ensime

View File

@ -1,3 +1,15 @@
;;; extensions.el --- Windows Scripts Layer extensions File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; Post extensions are loaded *after* the packages
(defvar windows-scripts-post-extensions '(dos))

View File

@ -1,3 +1,15 @@
;;; packages.el --- Windows Scripts Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar windows-scripts-packages
'(
powershell

View File

@ -1,3 +1,15 @@
;;; packages.el --- Perforce Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar perforce-packages '(p4)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")

View File

@ -1,3 +1,15 @@
;;; packages.el --- smex Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar smex-packages '(smex)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")

View File

@ -1,3 +1,15 @@
;;; packages.el --- Themes Mega-Pack Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar themes-megapack-packages
'(
afternoon-theme

View File

@ -1,3 +1,15 @@
;;; configuration-layer.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(require 'dotspacemacs)
(require 'ht)
(require 'package)

View File

@ -1,3 +1,15 @@
;;; dotspacemacs.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defconst dotspacemacs-template-directory
(expand-file-name (concat spacemacs-core-directory "templates/"))
"Templates directory.")

View File

@ -1,3 +1,15 @@
;;; emacs-backports.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(unless (featurep 'subr-x)
;; `subr-x' function for Emacs 24.3 and below
(defsubst string-join (strings &optional separator)

View File

@ -1,3 +1,15 @@
;;; spacemacs-mode.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(setq message-log-max 16384)
(defconst emacs-start-time (current-time))
@ -83,9 +95,8 @@
(setq cursor-type nil)
;; no welcome buffer
(setq inhibit-startup-screen t)
;; theme
(spacemacs/load-default-theme)
;; remove GUI elements if supported
(when window-system
;; those unless tests are for the case when the user has a ~/.emacs file
@ -105,7 +116,6 @@
(spacemacs/message (concat "No graphical support detected, you won't be"
"able to launch a graphical instance of Emacs"
"with this build.")))
(spacemacs/load-default-theme)
;; font
;; Dynamic font size depending on the system
(let ((font "Source Code Pro"))

View File

@ -1,3 +1,15 @@
;;; extensions.el --- NAME Layer extensions File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar NAME-pre-extensions
'(
;; pre extension names go here

View File

@ -1,3 +1,15 @@
;;; packages.el --- NAME Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar NAME-packages
'(
;; package names go here

View File

@ -1,3 +1,15 @@
;;; themes-support.el --- Spacemacs Core File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defconst spacemacs-themes
'(
(base16-chalk . base16-theme)

View File

@ -6,8 +6,12 @@
- [Contribute to Spacemacs](#contribute-to-spacemacs)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Submitting a configuration layer](#submitting-a-configuration-layer)
- [Configuration layer template](#configuration-layer-template)
- [Submitting a banner](#submitting-a-banner)
- [Credits](#credits)
- [License](#license)
- [File header](#file-header)
- [Author of a contribution layer](#author-of-a-contribution-layer)
- [Contributor of a contribution layer](#contributor-of-a-contribution-layer)
<!-- markdown-toc end -->
@ -21,9 +25,9 @@ _PR = pull request_
**Guidelines:**
1) Ideally and for simple PRs:
1) Ideally and for _simple_ PRs:
- branch from `develop` only
- branch from `develop`
- one topic per PR
- one commit per PR
- if you have several commits on different topics, close the PR and create
@ -32,14 +36,14 @@ _PR = pull request_
- rebase your PR branch on top of upstream `develop` before submitting the PR
Those PRs are _fast-forwarded_ whenever it's possible and _cherry-picked_
otherwise.
otherwise (most likely they will be cherry-picked).
2) For complex pull requests:
- squash only the commits with uninteresting changes like typos, syntax fixes,
etc... and keep the important steps in different commits.
etc... and keep the important and _isolated_ steps in different commits.
Those PRs are _merged_.
Those PRs are _merged_ and explicitly _not fast-forwarded_.
**Getting Help:**
If you have any question on this process, join the [gitter chatroom][gitter]
@ -51,31 +55,72 @@ Contributed configuration layers are stored in the `contrib` folder. If the
layer is about a programming language or script then it must be added to
`contrib/lang` folder.
It is recommended to join a `README.md` file with your layer, ideally this file
should document the packages of your layer as well as the key bindings
associated with them.
Add a TOC at the start of the file with the command `markdown-toc/generate-toc`.
If a logo exists for the layer you can add it at the top of the `README.md`
It is recommended to join a `README.md` file with your layer:
- ideally this file should document the packages of your layer as well as
the key bindings associated with them,
- a template is provided in
`~/.emacs.d/core/templates/layer-README.template`, use it as much as possible,
- another good practice is to start from the `README.md` of an existing layer,
- add a TOC at the start of the file with the command
`markdown-toc/generate-toc`,
- if a logo exists for the layer you can add it at the top of the `README.md`
before the TOC. The maximum recommended height is 200 pixels.
### Configuration layer template
You will find a template in `~/.emacs.d/core/templates/layer-README.template`.
Another good practice is to start from the `README.md` of an existing layer.
## Submitting a banner
The startup banner is randomly chosen among a pool of banners each time
`Spacemacs` starts. Banners are located in directory
The startup banner is by default randomly chosen among a pool of banners each
time `Spacemacs` starts. Banners are located in directory
`~/.emacs.d/core/banners`.
If you have some ASCII skills you can submit your artwork!
You are free to choose a reasonable height size but the recommended width
size is 75 characters to keep the code simple.
You are free to choose a reasonable height size but the width size should be
around 75 characters.
## Credits
### License
The license is GPLv3 for all parts specific to `Spacemacs`, this includes:
- the initialization and core files
- all the layer files.
For files not belonging to `Spacemacs` like extensions and libraries, refer
to the header file. Those files should not have an empty header, please
report any file imported in `Spacemacs` without a proper header.
### File header
Template:
```elisp
;;; extensions.el --- NAME Layer extensions File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
```
### Author of a contribution layer
In the file header:
- change `NAME` to the name of the layer,
- change the default author name `Sylvain Benner` to your name,
- do not remove the line: `;; Copyright (c) 2012-2014 Sylvain Benner`
- modify the second copyright line by replacing the default name and dates,
**keep** `& Contributors` in this line,
- other lines should not be modified
### Contributor of a contribution layer
You should not modify any header file. A very cool way to show your
contributions will be available in Spacemacs at some point, _Stay Tuned_.
[git-flow]: http://nvie.com/posts/a-successful-git-branching-model/
[gitter]: https://gitter.im/syl20bnr/spacemacs

12
init.el
View File

@ -1,3 +1,15 @@
;;; init.el --- Spacemacs Initialization File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(add-to-list 'load-path (concat user-emacs-directory "core/"))
(require 'spacemacs-mode)

View File

@ -1,3 +1,15 @@
;;; config.el --- Spacemacs Layer configuration File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; ---------------------------------------------------------------------------
;; Prefixes
;; ---------------------------------------------------------------------------

View File

@ -1,5 +1,16 @@
;; Extensions are in emacs_paths/extensions
;;; extensions.el --- Spacemacs Layer extensions File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; Extensions are in emacs_paths/extensions
;; Pre extensions are loaded *before* the packages
(defvar spacemacs-pre-extensions
'(

View File

@ -1,3 +1,15 @@
;;; funcs.el --- Spacemacs Layer functions File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; add emacs binary helper functions
(defun emacsbin-path()
(interactive)

View File

@ -1,3 +1,15 @@
;;; keybindings.el --- Spacemacs Layer key-bindings File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; instantly display current keystrokes in mini buffer
(setq echo-keystrokes 0.02)
;; auto-indent on RET

View File

@ -1,3 +1,15 @@
;;; packages.el --- Spacemacs Layer packages File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defvar spacemacs-packages
'(
ac-ispell