Skip to content

Commit 3b22c13

Browse files
committed
Improve package template
1 parent b77a2ac commit 3b22c13

File tree

2 files changed

+69
-59
lines changed

2 files changed

+69
-59
lines changed

README.org

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,16 +1593,29 @@ When you make a new package, the =auto-insert= command will insert a set of stan
15931593
;; Copyright (C) 2017 First Last
15941594

15951595
;; Author: First Last <[email protected]>
1596-
;; URL: http://example.com/package-name.el
1596+
;; URL: https://example.com/package-name.el
15971597
;; Version: 0.1-pre
15981598
;; Package-Requires: ((emacs "25.2"))
15991599
;; Keywords: something
16001600

16011601
;; This file is not part of GNU Emacs.
16021602

1603+
;; This program is free software; you can redistribute it and/or modify
1604+
;; it under the terms of the GNU General Public License as published by
1605+
;; the Free Software Foundation, either version 3 of the License, or
1606+
;; (at your option) any later version.
1607+
1608+
;; This program is distributed in the hope that it will be useful,
1609+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
1610+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1611+
;; GNU General Public License for more details.
1612+
1613+
;; You should have received a copy of the GNU General Public License
1614+
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
1615+
16031616
;;; Commentary:
16041617

1605-
;; This is my package. It is nice. You should try it.
1618+
;; This package allows flanges to be easily frobnicated.
16061619

16071620
;;;; Installation
16081621

@@ -1641,21 +1654,6 @@ When you make a new package, the =auto-insert= command will insert a set of stan
16411654
;; [1] https://example.com/foo.el
16421655
;; [2] https://example.com/bar.el
16431656

1644-
;;; License:
1645-
1646-
;; This program is free software; you can redistribute it and/or modify
1647-
;; it under the terms of the GNU General Public License as published by
1648-
;; the Free Software Foundation, either version 3 of the License, or
1649-
;; (at your option) any later version.
1650-
1651-
;; This program is distributed in the hope that it will be useful,
1652-
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
1653-
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1654-
;; GNU General Public License for more details.
1655-
1656-
;; You should have received a copy of the GNU General Public License
1657-
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
1658-
16591657
;;; Code:
16601658

16611659
;;;; Requirements
@@ -1667,7 +1665,7 @@ When you make a new package, the =auto-insert= command will insert a set of stan
16671665

16681666
(defgroup package-name nil
16691667
"Settings for `package-name'."
1670-
:link '(url-link "http://example.com/package-name.el"))
1668+
:link '(url-link "https://example.com/package-name.el"))
16711669

16721670
(defcustom package-name-something nil
16731671
"This setting does something."
@@ -1680,7 +1678,8 @@ When you make a new package, the =auto-insert= command will insert a set of stan
16801678

16811679
;;;;; Keymaps
16821680

1683-
;; This technique makes it easier and less verbose to define keymaps.
1681+
;; This technique makes it easier and less verbose to define keymaps
1682+
;; that have many bindings.
16841683

16851684
(defvar package-name-map
16861685
;; This makes it easy and much less verbose to define keys
@@ -1697,22 +1696,28 @@ When you make a new package, the =auto-insert= command will insert a set of stan
16971696
(define-key map key fn)))
16981697
map))
16991698

1700-
;;;; Functions
1701-
1702-
;;;;; Commands
1699+
;;;; Commands
17031700

17041701
;;;###autoload
17051702
(defun package-name-command (args)
17061703
"Frobnicate the flange."
17071704
(interactive)
1708-
(package-name--something)
1709-
(bar))
1705+
(package-name-foo
1706+
(package-name--bar args)))
1707+
1708+
;;;; Functions
1709+
1710+
;;;;; Public
1711+
1712+
(defun package-name-foo (args)
1713+
"Return foo for ARGS."
1714+
(foo args))
17101715

1711-
;;;;; Support
1716+
;;;;; Private
17121717

1713-
(defun package-name--something (args)
1714-
"This function helps frobnicate the flange."
1715-
(foo))
1718+
(defun package-name--bar (args)
1719+
"Return bar for ARGS."
1720+
(bar args))
17161721

17171722
;;;; Footer
17181723

index.html

Lines changed: 36 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)