[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode eec34c9 19/22: Merge pull request #11 from ser
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode eec34c9 19/22: Merge pull request #11 from sergeyklay/info-page |
Date: |
Tue, 3 Mar 2020 10:56:56 -0500 (EST) |
branch: externals/bnf-mode
commit eec34c9a97c4acb119cd9e648fa5c056696f3b26
Merge: 11b19fa 25d962f
Author: Serghei Iakovlev <address@hidden>
Commit: GitHub <address@hidden>
Merge pull request #11 from sergeyklay/info-page
Rework documentation and provide Info-file
---
.codecov.yml | 2 +-
.dir-locals.el | 10 ++
.elpaignore | 7 +-
.github/workflows/build.yml | 2 +-
.github/workflows/release.yml | 2 +-
.gitignore | 23 ++-
Makefile | 155 +++++++----------
NEWS | 2 +-
README.org | 7 +-
bnf-mode.el | 56 +------
bnf-mode.info | 377 +++++++++++++++++++++++++++++++++++++++++
bnf-mode.texi | 382 ++++++++++++++++++++++++++++++++++++++++++
default.mk | 60 +++++++
dir | 4 +-
test/bnf-mode-font-test.el | 2 +-
test/test-helper.el | 2 +-
16 files changed, 934 insertions(+), 159 deletions(-)
diff --git a/.codecov.yml b/.codecov.yml
index 1751a40..7615a12 100644
--- a/.codecov.yml
+++ b/.codecov.yml
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 Serghei Iakovlev
+# Copyright (C) 2019, 2020 Free Software Foundation, Inc.
#
# License
#
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..1e6a968
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,10 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((nil
+ (sentence-end-double-space . t))
+ (emacs-lisp-mode
+ (indent-tabs-mode . nil)
+ (outline-regexp . ";;[;*]+[\s\t]+"))
+ (makefile-gmake-mode
+ (outline-regexp . "##")))
diff --git a/.elpaignore b/.elpaignore
index 570e5e3..20d9e1e 100644
--- a/.elpaignore
+++ b/.elpaignore
@@ -1,5 +1,10 @@
-.github
+.codecov.yml
+.dir-locals.el
+.elpaignore
.ert-runner
+.github
.gitignore
+Cask
Makefile
+default.mk
test
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6e63292..2a16457 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 Serghei Iakovlev
+# Copyright (C) 2019, 2020 Free Software Foundation, Inc.
#
# License
#
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3a185e5..ed6da36 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 Serghei Iakovlev
+# Copyright (C) 2019, 2020 Free Software Foundation, Inc.
#
# License
#
diff --git a/.gitignore b/.gitignore
index a59fd18..c6a55bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,11 +7,30 @@
*~
*.elc
+
+# Directories to ignore (do not add trailing '/'s, they skip symlinks).
.cask
-bnf-mode.info
+
+# Documentation artefacts.
+*.aux
+*.cp
+*.cps
+*.epub
+*.html
+*.pdf
+*.toc
+*.vr
+*.vrs
+
+# Build artefacts.
bnf-mode-pkg.el
bnf-mode-autoloads.el
bnf-mode-*.tar
-coverage-final.json
ChangeLog
README
+
+# Code coverage report.
+coverage-final.json
+
+# Use this as your own wish list or a temporary buffer.
+LATER
diff --git a/Makefile b/Makefile
index 08e1f05..5e95d6c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 Serghei Iakovlev
+# Copyright (C) 2019, 2020 Free Software Foundation, Inc.
#
# License
#
@@ -13,92 +13,53 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-SHELL := $(shell which bash)
-ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
-
-EMACS ?= emacs
-CASK ?= cask
-PANDOC ?= pandoc
-TAR ?= tar
-
-EMACSFLAGS ?=
-TESTFLAGS ?= --reporter ert+duration
-PANDOCLAGS ?= --fail-if-warnings \
- --reference-links \
- --atx-headers \
- -f org+empty_paragraphs
-
-PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
-
-# File lists
-SRCS = bnf-mode.el
-OBJS = $(SRCS:.el=.elc)
-
-ARCHIVE_NAME = bnf-mode
-VERSION ?= $(shell $(CASK) version)
-PACKAGE_NAME = $(ARCHIVE_NAME)-$(VERSION)
-
-.SILENT: ; # no need for @
-.ONESHELL: ; # recipes execute in same shell
-.NOTPARALLEL: ; # wait for this target to finish
-.EXPORT_ALL_VARIABLES: ; # send all vars to shell
-Makefile: ; # skip prerequisite discovery
-
-# Run make help by default
-.DEFAULT_GOAL = build
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
+
+include default.mk
-# Internal variables
-EMACSBATCH = $(EMACS) -Q --batch -L . $(EMACSFLAGS)
-RUNEMACS =
+.DEFAULT_GOAL = build
-# Program availability
-HAVE_CASK := $(shell sh -c "command -v $(CASK)")
-ifndef HAVE_CASK
-$(warning "$(CASK) is not available. Please run make help")
-RUNEMACS = $(EMACSBATCH)
-else
-RUNEMACS = $(CASK) exec $(EMACSBATCH)
-endif
+%.info: %.texi
+ $(info Generating $@)
+ @$(MAKEINFO) --no-split $< -o $@
-%.elc: %.el $(PKGDIR)
- $(RUNEMACS) --eval '(setq byte-compile-error-on-warn t)' -f
batch-byte-compile $<
+%.elc: %.el
+ @printf "Compiling $<\n"
+ @$(RUNEMACS) --eval '(setq byte-compile-error-on-warn t)' \
+ -f batch-byte-compile $<
-$(PKGDIR): Cask
- $(CASK) install
- touch $(PKGDIR)
+dir: $(INFOPAGES)
+ $(info Generating dir)
+ @echo $^ | xargs -n 1 $(INSTALL_INFO) --dir=$@
# Remove badges
define org-clean
- cat $^ | sed -e "s/\[\[.*\.svg\]\]//g"
+ @cat $^ | sed -e "s/\[\[.*\.svg\]\]//g"
endef
-$(ARCHIVE_NAME).info: README.org
- $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t texinfo | makeinfo -o
$@
-
README: README.org
- $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t plain | sed -e
"s/\[\]//g" > $@
+ $(call org-clean,$^) | \
+ $(PANDOC) $(PANDOCLAGS) -t plain | sed -e "s/\[\]//g" > $@
ChangeLog: NEWS
- cp $^ $@
+ @cp $^ $@
-$(ARCHIVE_NAME)-pkg.el: $(ARCHIVE_NAME).el
- $(CASK) pkg-file
+$(PACKAGE)-pkg.el: $(PACKAGE).el
+ @$(CASK) pkg-file
-$(PACKAGE_NAME).tar: README ChangeLog LICENSE $(ARCHIVE_NAME).el
$(ARCHIVE_NAME)-pkg.el $(ARCHIVE_NAME).info dir
- $(TAR) -c -v -f $(PACKAGE_NAME).tar --transform "s@^@$(PACKAGE_NAME)/@"
$^
+$(ARCHIVE_NAME).tar: $(ARCHIVE_CONTENTS)
+ @$(TAR) -c -v -f $(ARCHIVE_NAME).tar \
+ --transform "s@^@$(ARCHIVE_NAME)/@" $^
-# Public targets
+## Public targets
.PHONY: .title
.title:
$(info BNF Mode $(VERSION))
.PHONY: init
-init: $(PKGDIR)
+init: Cask
+ @$(CASK) install
.PHONY: checkdoc
checkdoc:
@@ -109,40 +70,48 @@ build: $(OBJS)
.PHONY: test
test:
- $(CASK) exec ert-runner $(TESTFLAGS)
+ @$(CASK) exec ert-runner $(TESTFLAGS)
.PHONY: clean
clean:
- $(CASK) clean-elc
- $(RM) -f README ChangeLog $(ARCHIVE_NAME).info coverage-final.json
- $(RM) -f $(ARCHIVE_NAME)-pkg.el $(ARCHIVE_NAME)-*.tar
+ $(info Remove all byte compiled Elisp files...)
+ @$(CASK) clean-elc
+ $(info Remove build artefacts...)
+ @$(RM) README ChangeLog coverage-final.json
+ @$(RM) $(PACKAGE)-pkg.el $(PACKAGE)-*.tar
.PHONY: package
-package: $(PACKAGE_NAME).tar
+package: $(ARCHIVE_NAME).tar
.PHONY: install
-install: $(PACKAGE_NAME).tar
- $(EMACS) --batch -l package -f package-initialize --eval \
- "(let ((debug-on-error t))(package-install-file
\"$(PWD)/$(PACKAGE_NAME).tar\"))"
+install: $(ARCHIVE_NAME).tar
+ @$(EMACS) --batch -l package -f package-initialize --eval \
+ "(let ((debug-on-error t))(package-install-file
\"$(PWD)/$(ARCHIVE_NAME).tar\"))"
+
+.PHONY: info
+info: $(INFOPAGES) dir
.PHONY: help
help: .title
- echo 'Run "make init" first to install and update all local
dependencies.'
- echo ''
- echo 'Available targets:'
- echo ' help: Show this help and exit'
- echo ' init: Initialize the project (has to be launched first)'
- echo ' checkdoc: Checks BNF Mode code for errors in the documentation'
- echo ' build: Byte compile BNF Mode package'
- echo ' test: Run the non-interactive unit test suite'
- echo ' clean: Remove all byte compiled Elisp files as well as build'
- echo ' artifacts'
- echo ' package: Build package'
- echo ' install: Install BNF Mode'
- echo ''
- echo 'Available programs:'
- echo ' $(CASK): $(if $(HAVE_CASK),yes,no)'
- echo ''
- echo 'You need $(CASK) to develop BNF Mode.'
- echo 'See http://cask.readthedocs.io/ for more.'
- echo ''
+ @echo ''
+ @echo 'Run "make init" first to install and update all local
dependencies.'
+ @echo 'See "default.mk" for variables you might want to set.'
+ @echo ''
+ @echo 'Available targets:'
+ @echo ' help: Show this help and exit'
+ @echo ' init: Initialize the project (has to be launched first)'
+ @echo ' checkdoc: Checks BNF Mode code for errors in the
documentation'
+ @echo ' build: Byte compile BNF Mode package'
+ @echo ' test: Run the non-interactive unit test suite'
+ @echo ' clean: Remove all byte compiled Elisp files,
documentation,'
+ @echo ' build artefacts and tarball'
+ @echo ' package: Build package'
+ @echo ' install: Install BNF Mode'
+ @echo ' info: Generate info manual'
+ @echo ''
+ @echo 'Available programs:'
+ @echo ' $(CASK): $(if $(HAVE_CASK),yes,no)'
+ @echo ''
+ @echo 'You need $(CASK) to develop BNF Mode.'
+ @echo 'See http://cask.readthedocs.io/ for more.'
+ @echo ''
diff --git a/NEWS b/NEWS
index 39ec924..4ec365d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
bnf-mode NEWS -- history of user-visible changes.
-Copyright (C) 2019-2020 Free Software Foundation, Inc.
+Copyright (C) 2019, 2020 Free Software Foundation, Inc.
See the end of the file for license conditions.
This file is about changes in BNF Mode.
diff --git a/README.org b/README.org
index b94a936..6647b07 100644
--- a/README.org
+++ b/README.org
@@ -14,9 +14,10 @@ A GNU Emacs major mode for editing BNF grammars.
Richard Feynman
#+end_quote
-Currently provides basic syntax and font-locking for BNF files. BNF notation is
+Currently provides basic syntax and font-locking for BNF files. BNF notation
is
supported exactly form as it was first announced in the ALGOL 60 report.
-EBNF and ABNF are not supported but in my plans for the near future.
+EBNF and ABNF are not supported but their implementation is planned in the near
+future.
When developing this mode, the following documents were taken into account:
@@ -93,4 +94,4 @@ https://github.com/sergeyklay/bnf-mode/blob/master/NEWS .
** License
BNF Mode is open source software licensed under the
[[https://github.com/sergeyklay/bnf-mode/blob/master/LICENSE][GNU General
Public Licence version 3]].
-Copyright © 2019-2020, Free Software Foundation, Inc.
+Copyright © 2019, 2020, Free Software Foundation, Inc.
diff --git a/bnf-mode.el b/bnf-mode.el
index b33bda1..bf3b25b 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -1,6 +1,6 @@
;;; bnf-mode.el --- Major mode for editing BNF grammars. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2019-2020 Free Software Foundation, Inc
+;; Copyright (C) 2019, 2020 Free Software Foundation, Inc
;; Author: Serghei Iakovlev <address@hidden>
;; Maintainer: Serghei Iakovlev <address@hidden>
@@ -26,57 +26,9 @@
;;; Commentary:
-;; GNU Emacs major mode for editing BNF grammars. Currently this mode
-;; provides basic syntax and font-locking for BNF files. BNF notation is
-;; supported exactly form as it was first announced in the ALGOL 60 report.
-;;
-;; When developing this mode, the following documents were taken into account:
-;;
-;; - RFC822: Standard for ARPA Internet Text Messages
-;; (see URL `https://www.ietf.org/rfc/rfc822.txt')
-;; - RFC5234: Augmented BNF for Syntax Specifications: ABNF
-;; (see URL `https://www.ietf.org/rfc/rfc5234.txt')
-;; - FRC7405: Case-Sensitive String Support in ABNF
-;; (see URL `https://www.ietf.org/rfc/rfc7405.txt')
-;; - Revised Report on the Algorithmic Language Algol 60
-;; (see URL `https://www.masswerk.at/algol60/report.htm')
-;;
-;; Installation:
-;;
-;; The recommended way is to use ELPA (see URL `https://elpa.gnu.org'),
-;; MELPA (see URL `https://melpa.org') or MELPA Stable
-;; (see URL `https://stable.melpa.org'). If either is in your
-;; `package-archives', do:
-;;
-;; M-x package-install RET bnf-mode RET
-;;
-;; To learn on how to use any other installation methods refer to relevant
-;; documentation.
-;;
-;; Usage:
-;;
-;; To toggle the mode in the current buffer:
-;;
-;; M-x bnf-mode RET
-;;
-;; By default any file that matches the glob *.bnf is automatically opened
-;; in `bnf-mode'.
-;;
-;; Customization:
-;;
-;; To customize various options, use command as follows:
-;;
-;; M-x customize-group bnf RET
-;;
-;; Bugs:
-;;
-;; Bug tracking is currently handled using the GitHub issue tracker
-;; (see URL `https://github.com/sergeyklay/bnf-mode/issues')
-;;
-;; History:
-;;
-;; History is tracked in the Git repository rather than in this file.
-;; (see URL `https://github.com/sergeyklay/bnf-mode/blob/master/NEWS')
+;; BNF Mode is a GNU Emacs major mode for editing BNF grammars. Currently
+;; this mode provides basic syntax and font-locking for BNF files. BNF
notation
+;; is supported exactly form as it was first announced in the ALGOL 60 report.
;;; Code:
diff --git a/bnf-mode.info b/bnf-mode.info
new file mode 100644
index 0000000..bab6b4e
--- /dev/null
+++ b/bnf-mode.info
@@ -0,0 +1,377 @@
+This is bnf-mode.info, produced by makeinfo version 6.5 from
+bnf-mode.texi.
+
+ Copyright © 2019, 2020 Free Software Foundation, Inc.
+
+ You can redistribute this document 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 document 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.
+INFO-DIR-SECTION Emacs
+START-INFO-DIR-ENTRY
+* BNF Mode: (bnf-mode). Major mode for editing BNF grammars.
+END-INFO-DIR-ENTRY
+
+
+File: bnf-mode.info, Node: Top, Next: Introduction, Up: (dir)
+
+BNF Mode User Manual
+********************
+
+BNF Mode is a GNU Emacs major mode for editing BNF grammars. Currently
+this mode provides basic syntax and font-locking for BNF files. BNF
+notation is supported exactly form as it was first announced in the
+ALGOL 60 report.
+
+This manual is for BNF Mode version 0.4.4.
+
+ Copyright © 2019, 2020 Free Software Foundation, Inc.
+
+ You can redistribute this document 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 document 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.
+
+* Menu:
+
+* Introduction:: The mode description and concepts.
+* Installation:: The ways of instalation BNF Mode.
+* Usage:: BNF Mode usage.
+* Customizing:: Customizing BNF Mode.
+* Project Links:: Some important project links.
+* Bibliography:: External resources used in the project.
+* Index:: Complete index.
+* Variable Index:: Variable index.
+
+— The Detailed Node Listing —
+
+Installation
+
+* Installing from Elpa or Melpa::
+* Installing using El-get::
+* Installing from the Git Repository::
+
+
+Project Links
+
+* Bugs Tracker::
+* Change Log::
+
+
+
+File: bnf-mode.info, Node: Introduction, Next: Installation, Prev: Top,
Up: Top
+
+1 Introduction
+**************
+
+BNF Mode is a GNU Emacs major mode for editing BNF grammars. Currently
+this mode provides basic syntax and font-locking for BNF files. BNF
+notation is supported exactly form as it was first announced in the
+ALGOL 60 report.
+
+
+File: bnf-mode.info, Node: Installation, Next: Usage, Prev: Introduction,
Up: Top
+
+2 Installation
+**************
+
+BNF Mode known to work with GNU Emacs 24.3 and later. BNF Mode may work
+with older versions of Emacs, or with other flavors of Emacs (e.g.
+XEmacs) but this is not guaranteed. Bug reports for problems related to
+using BNF Mode with older versions of Emacs will most like not be
+addressed.
+
+* Menu:
+
+* Installing from Elpa or Melpa::
+* Installing using El-get::
+* Installing from the Git Repository::
+
+
+File: bnf-mode.info, Node: Installing from Elpa or Melpa, Next: Installing
using El-get, Up: Installation
+
+2.1 Installing from Elpa or Melpa
+=================================
+
+BNF Mode is available from Elpa, Melpa and Melpa-Stable. If you haven’t
+used Emacs’ package manager before, then it is high time you familiarize
+yourself with it by reading the documentation in the Emacs manual, see
+*note (emacs)Packages::. Then add one of the archives to
+‘package-archives’:
+
+ • To use Elpa:
+
+ (require 'package)
+ (add-to-list 'package-archives
+ '("gnu" . "https://elpa.gnu.org/packages/") t)
+ (package-initialize)
+
+ • For those who want only formal, tagged releases use Melpa Stable:
+
+ (require 'package)
+ (add-to-list 'package-archives
+ '("melpa-stable" . "http://stable.melpa.org/packages/") t)
+ (package-initialize)
+
+ • For those who want rolling releases as they happen use Melpa:
+
+ (require 'package)
+ (add-to-list 'package-archives
+ '("melpa" . "http://melpa.org/packages/") t)
+ (package-initialize)
+
+ Melpa tracks BNF Mode’s Git repository and updates relatively soon
+after each commit or formal release. For more detail on setting up see
+MELPA Getting Started (https://melpa.org/#/getting-started).
+
+ Once you have added your preferred archive, you need to update the
+local package list using ‘M-x’ ‘package-refresh-contents’ ‘RET’.
+Finally, use ‘M-x’ ‘package-list-packages’ ‘RET’ to get to the package
+listing and install ‘bnf-mode’ from there.
+
+ There are several ways to install ‘bnf-mode’ after package
+initialization:
+
+ • You can install ‘bnf-mode’ manually by adding following to your
+ init file:
+
+ (unless (package-installed-p 'bnf-mode)
+ (package-refresh-contents)
+ (package-install 'bnf-mode))
+
+ • To use Cask (https://cask.github.io/) add following to your ‘Cask’
+ file:
+
+ (source melpa)
+ (depends-on "bnf-mode")
+
+ • To install ‘bnf-mode’ using ‘use-package’ add following to your
+ init file:
+
+ (use-package bnf-mode
+ :ensure t
+ ;; To use MELPA Stable use ":pin mepla-stable",
+ ;; to use ELPA remove ":pin" line
+ :pin melpa
+ :mode "\\.bnf\\'")
+
+
+File: bnf-mode.info, Node: Installing using El-get, Next: Installing from
the Git Repository, Prev: Installing from Elpa or Melpa, Up: Installation
+
+2.2 Installing using El-get
+===========================
+
+If you use el-get, just create a recipe file ‘bnf.rcp’:
+
+ (:name bnf-mode
+ :website "https://github.com/sergeyklay/bnf-mode"
+ :description "BNF Mode: A major mode for editing BNF grammars"
+ :type github
+ :pkgname "sergeyklay/bnf-mode")
+
+ Then add it to a directory present in ‘el-get-recipe-path’. Then,
+use ‘M-x’ ‘el-get-install’ ‘RET’ ‘bnf-mode’ ‘RET’ or add to your init
+file:
+
+ (el-get-bundle bnf-mode)
+
+
+File: bnf-mode.info, Node: Installing from the Git Repository, Prev:
Installing using El-get, Up: Installation
+
+2.3 Installing from the Git Repository
+======================================
+
+BNF Mode depends only on the ‘cl-lib’, which is bundled with GNU Emacs.
+Thus you don’t have to install any additional library to satisfy BNF
+Mode dependencies. Below are simple steps to install BNF Mode using
+manual approach:
+
+ Clone the BNF Mode repository:
+
+ $ git clone https://github.com/sergeyklay/bnf-mode.git \
+ ~/.emacs.d/site-lisp/bnf-mode
+
+ Add this to your init file:
+
+ (add-to-list 'load-path "~/.emacs.d/site-lisp/bnf-mode")
+
+ Add either of the two following lines to your initialization file.
+The first only loads BNF Mode when necessary, the 2nd always during
+startup of GNU Emacs:
+
+ (autoload 'bnf-mode "bnf-mode" nil t)
+ ;; OR
+ (require 'bnf-mode)
+
+
+File: bnf-mode.info, Node: Usage, Next: Customizing, Prev: Installation,
Up: Top
+
+3 Usage
+*******
+
+By default any file that matches the glob ‘*.bnf’ is automatically
+opened in ‘bnf-mode’. To toggle the mode in the current buffer use
+‘M-x’ ‘bnf-mode’ ‘RET’.
+
+
+File: bnf-mode.info, Node: Customizing, Next: Project Links, Prev: Usage,
Up: Top
+
+4 Customizing
+*************
+
+There are not so much BNF Mode customize options yet. The most
+interested option is ‘bnf-mode-algol-comments-style’. Setting it to
+non-nill means use for BNF comments style introduced in ALGOL 60. The
+following "comment" conventions will hold:
+
+The sequence of basic symbols Is equivalent to
+--------------------------------------------------------------------------
+‘; comment <any sequence not containing ;>;’ ‘;’
+‘begin comment <any sequence not containing ;>;’ ‘begin’
+
+
+ Enabling this feature will disable comments recognition which use
+semicolon only (‘;’).
+
+
+ To customize BNF Mode options, use command as follows:
+
+ M-x customize-group bnf RET
+
+
+File: bnf-mode.info, Node: Project Links, Next: Bibliography, Prev:
Customizing, Up: Top
+
+5 Project Links
+***************
+
+* Menu:
+
+* Bugs Tracker::
+* Change Log::
+
+
+File: bnf-mode.info, Node: Bugs Tracker, Next: Change Log, Up: Project Links
+
+5.1 Bugs Tracker
+================
+
+Bug tracking is currently handled using the GitHub issue tracker
+(https://github.com/sergeyklay/bnf-mode/issues).
+
+
+File: bnf-mode.info, Node: Change Log, Prev: Bugs Tracker, Up: Project Links
+
+5.2 Change Log
+==============
+
+History is tracked in the Git repository
+(https://github.com/sergeyklay/bnf-mode/blob/master/NEWS) rather than in
+this documentation.
+
+
+File: bnf-mode.info, Node: Bibliography, Next: Index, Prev: Project Links,
Up: Top
+
+6 Bibliography
+**************
+
+Below are some links to external resources used when developed BNF Mode:
+
+ • RFC822: Standard for ARPA Internet Text Messages.
+
+ <https://www.ietf.org/rfc/rfc822.txt>
+
+ • RFC5234: Augmented BNF for Syntax Specifications ABNF.
+
+ <https://www.ietf.org/rfc/rfc5234.txt>
+
+ • RFC7405: Case-Sensitive String Support in ABNF.
+
+ <https://www.ietf.org/rfc/rfc7405.txt>
+
+ • Revised Report on the Algorithmic Language Algol 60.
+
+ <https://www.masswerk.at/algol60/report.htm>
+
+ • Wikipedia: Backus–Naur form.
+
+ <https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form>
+
+ • Wikipedia: Extended Backus–Naur form.
+
+ <https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form>
+
+ • Wikipedia: Augmented Backus–Naur form.
+
+ <https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form>
+
+ • ISO/IEC 14977: 1996(E).
+
+ <https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf>
+
+ • EBNF: A Notation to Describe Syntax.
+
+ <https://www.ics.uci.edu/~pattis/ICS-33/lectures/ebnf.pdf>
+
+
+File: bnf-mode.info, Node: Index, Next: Variable Index, Prev: Bibliography,
Up: Top
+
+Index
+*****
+
+ [index ]
+* Menu:
+
+* Cask, installation: Installing from Elpa or Melpa.
+ (line 52)
+* Customizing: Customizing. (line 6)
+* Elpa, installation: Installing from Elpa or Melpa.
+ (line 12)
+* Installation: Installation. (line 6)
+* Melpa, installation: Installing from Elpa or Melpa.
+ (line 19)
+
+
+File: bnf-mode.info, Node: Variable Index, Prev: Index, Up: Top
+
+Variable Index
+**************
+
+ [index ]
+* Menu:
+
+* bnf-mode-algol-comments-style: Customizing. (line 6)
+
+
+
+Tag Table:
+Node: Top767
+Node: Introduction2295
+Node: Installation2640
+Node: Installing from Elpa or Melpa3162
+Node: Installing using El-get5478
+Node: Installing from the Git Repository6157
+Node: Usage7058
+Node: Customizing7343
+Node: Project Links8178
+Node: Bugs Tracker8349
+Node: Change Log8582
+Node: Bibliography8831
+Node: Index9989
+Node: Variable Index10696
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
diff --git a/bnf-mode.texi b/bnf-mode.texi
new file mode 100644
index 0000000..c08acda
--- /dev/null
+++ b/bnf-mode.texi
@@ -0,0 +1,382 @@
+\input texinfo @c -*- texinfo -*-
+
+@c %**start of header
+@setfilename bnf-mode.info
+@settitle BNF Mode User Manual
+@documentencoding UTF-8
+@documentlanguage en_US
+@c %**end of header
+
+@copying
+@quotation
+Copyright @copyright{} 2019, 2020 Free Software Foundation, Inc.
+
+You can redistribute this document 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 document 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.
+@end quotation
+@end copying
+
+@dircategory Emacs
+@direntry
+* BNF Mode: (bnf-mode). Major mode for editing BNF grammars.
+@end direntry
+
+@finalout
+@titlepage
+@title BNF Mode User Manual
+@subtitle for version 0.4.4
+@author Serghei Iakovlev
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top BNF Mode User Manual
+
+BNF Mode is a GNU Emacs major mode for editing BNF grammars.
+Currently this mode provides basic syntax and font-locking for BNF
+files. BNF notation is supported exactly form as it was first
+announced in the ALGOL 60 report.
+
+@noindent
+This manual is for BNF Mode version 0.4.4.
+
+@insertcopying
+@end ifnottex
+
+@menu
+* Introduction:: The mode description and concepts.
+* Installation:: The ways of instalation BNF Mode.
+* Usage:: BNF Mode usage.
+* Customizing:: Customizing BNF Mode.
+* Project Links:: Some important project links.
+* Bibliography:: External resources used in the project.
+* Index:: Complete index.
+* Variable Index:: Variable index.
+
+@detailmenu
+--- The Detailed Node Listing ---
+
+Installation
+
+* Installing from Elpa or Melpa::
+* Installing using El-get::
+* Installing from the Git Repository::
+
+
+Project Links
+
+* Bugs Tracker::
+* Change Log::
+
+@end detailmenu
+
+@end menu
+
+@node Introduction
+@chapter Introduction
+
+BNF Mode is a GNU Emacs major mode for editing BNF grammars.
+Currently this mode provides basic syntax and font-locking for BNF
+files. BNF notation is supported exactly form as it was first
+announced in the ALGOL 60 report.
+
+@node Installation
+@chapter Installation
+
+@cindex Installation
+
+BNF Mode known to work with GNU Emacs 24.3 and later. BNF Mode may
+work with older versions of Emacs, or with other flavors of Emacs
+(e.g. XEmacs) but this is @i{not} guaranteed. Bug reports for problems
+related to using BNF Mode with older versions of Emacs will most like
+not be addressed.
+
+@menu
+* Installing from Elpa or Melpa::
+* Installing using El-get::
+* Installing from the Git Repository::
+@end menu
+
+@node Installing from Elpa or Melpa
+@section Installing from Elpa or Melpa
+
+BNF Mode is available from Elpa, Melpa and Melpa-Stable. If you
+haven't used Emacs' package manager before, then it is high time you
+familiarize yourself with it by reading the documentation in the Emacs
+manual, see @ref{Packages,,,emacs,}. Then add one of the archives to
+@code{package-archives}:
+
+@cindex Elpa, installation
+@itemize
+@item
+To use Elpa:
+@end itemize
+
+@lisp
+(require 'package)
+(add-to-list 'package-archives
+ '("gnu" . "https://elpa.gnu.org/packages/") t)
+(package-initialize)
+@end lisp
+
+@cindex Melpa, installation
+@itemize
+@item
+For those who want only formal, tagged releases use Melpa Stable:
+@end itemize
+
+@lisp
+(require 'package)
+(add-to-list 'package-archives
+ '("melpa-stable" . "http://stable.melpa.org/packages/") t)
+(package-initialize)
+@end lisp
+
+@itemize
+@item
+For those who want rolling releases as they happen use Melpa:
+@end itemize
+
+@lisp
+(require 'package)
+(add-to-list 'package-archives
+ '("melpa" . "http://melpa.org/packages/") t)
+(package-initialize)
+@end lisp
+
+Melpa tracks BNF Mode's Git repository and updates relatively soon
+after each commit or formal release. For more detail on setting up
+see @uref{https://melpa.org/#/getting-started, MELPA Getting Started}.
+
+Once you have added your preferred archive, you need to update the
+local package list using @kbd{M-x} @code{package-refresh-contents}
+@kbd{RET}. Finally, use @kbd{M-x} @code{package-list-packages}
+@kbd{RET} to get to the package listing and install @code{bnf-mode}
+from there.
+
+There are several ways to install @code{bnf-mode} after package
+initialization:
+
+@itemize
+@item
+You can install @code{bnf-mode} manually by adding following to your
+init file:
+@end itemize
+
+@lisp
+(unless (package-installed-p 'bnf-mode)
+ (package-refresh-contents)
+ (package-install 'bnf-mode))
+@end lisp
+
+@cindex Cask, installation
+@itemize
+@item
+To use @uref{https://cask.github.io/, Cask} add following to your
+@code{Cask} file:
+@end itemize
+
+@lisp
+(source melpa)
+(depends-on "bnf-mode")
+@end lisp
+
+@itemize
+@item
+To install @code{bnf-mode} using @code{use-package} add following to
+your init file:
+@end itemize
+
+@lisp
+(use-package bnf-mode
+ :ensure t
+ ;; To use MELPA Stable use ":pin mepla-stable",
+ ;; to use ELPA remove ":pin" line
+ :pin melpa
+ :mode "\\.bnf\\'")
+@end lisp
+
+@node Installing using El-get
+@section Installing using El-get
+
+If you use el-get, just create a recipe file @code{bnf.rcp}:
+
+@lisp
+(:name bnf-mode
+ :website "https://github.com/sergeyklay/bnf-mode"
+ :description "BNF Mode: A major mode for editing BNF grammars"
+ :type github
+ :pkgname "sergeyklay/bnf-mode")
+@end lisp
+
+Then add it to a directory present in @code{el-get-recipe-path}.
+Then, use @kbd{M-x} @code{el-get-install} @kbd{RET} @code{bnf-mode}
+@kbd{RET} or add to your init file:
+
+@lisp
+(el-get-bundle bnf-mode)
+@end lisp
+
+@node Installing from the Git Repository
+@section Installing from the Git Repository
+
+BNF Mode depends only on the @code{cl-lib}, which is bundled with GNU
+Emacs. Thus you don't have to install any additional library to
+satisfy BNF Mode dependencies. Below are simple steps to install BNF
+Mode using manual approach:
+
+Clone the BNF Mode repository:
+
+@example
+$ git clone https://github.com/sergeyklay/bnf-mode.git \
+ ~/.emacs.d/site-lisp/bnf-mode
+@end example
+
+Add this to your init file:
+
+@lisp
+(add-to-list 'load-path "~/.emacs.d/site-lisp/bnf-mode")
+@end lisp
+
+Add @i{either} of the two following lines to your initialization file.
+The first only loads BNF Mode when necessary, the 2nd always during
+startup of GNU Emacs:
+
+@lisp
+(autoload 'bnf-mode "bnf-mode" nil t)
+;; OR
+(require 'bnf-mode)
+@end lisp
+
+@node Usage
+@chapter Usage
+
+By default any file that matches the glob @code{*.bnf} is
+automatically opened in @code{bnf-mode}. To toggle the mode in the
+current buffer use @kbd{M-x} @code{bnf-mode} @kbd{RET}.
+
+@node Customizing
+@chapter Customizing
+
+@cindex Customizing
+@vindex bnf-mode-algol-comments-style
+
+There are not so much BNF Mode customize options yet. The most
+interested option is @code{bnf-mode-algol-comments-style}. Setting it
+to non-nill means use for BNF comments style introduced in ALGOL 60.
+The following "comment" conventions will hold:
+
+@multitable @columnfractions .7 .3
+@headitem The sequence of basic symbols @tab Is equivalent to
+@item @code{; comment <any sequence not containing ;>;}
+@tab @code{;}
+@item @code{begin comment <any sequence not containing ;>;}
+@tab @code{begin}
+@end multitable
+
+@*Enabling this feature will disable comments recognition which use
+semicolon only (@code{;}).
+
+@*To customize BNF Mode options, use command as follows:
+
+@example
+M-x customize-group bnf RET
+@end example
+
+@node Project Links
+@chapter Project Links
+
+@menu
+* Bugs Tracker::
+* Change Log::
+@end menu
+
+@node Bugs Tracker
+@section Bugs Tracker
+
+Bug tracking is currently handled using the GitHub
+@uref{https://github.com/sergeyklay/bnf-mode/issues, issue tracker}.
+
+@node Change Log
+@section Change Log
+
+History is tracked in the
+@uref{https://github.com/sergeyklay/bnf-mode/blob/master/NEWS, Git
+repository} rather than in this documentation.
+
+@node Bibliography
+@chapter Bibliography
+
+Below are some links to external resources used when developed BNF Mode:
+
+@itemize @bullet
+@item
+RFC822: Standard for ARPA Internet Text Messages.
+
+@url{https://www.ietf.org/rfc/rfc822.txt}
+
+@item
+RFC5234: Augmented BNF for Syntax Specifications ABNF.
+
+@url{https://www.ietf.org/rfc/rfc5234.txt}
+
+@item
+RFC7405: Case-Sensitive String Support in ABNF.
+
+@url{https://www.ietf.org/rfc/rfc7405.txt}
+
+@item
+Revised Report on the Algorithmic Language Algol 60.
+
+@url{https://www.masswerk.at/algol60/report.htm}
+
+@item
+Wikipedia: Backus–Naur form.
+
+@url{https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form}
+
+@item
+Wikipedia: Extended Backus–Naur form.
+
+@url{https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form}
+
+@item
+Wikipedia: Augmented Backus–Naur form.
+
+@url{https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form}
+
+@item
+ISO/IEC 14977: 1996(E).
+
+@url{https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf}
+
+@item
+EBNF: A Notation to Describe Syntax.
+
+@url{https://www.ics.uci.edu/~pattis/ICS-33/lectures/ebnf.pdf}
+
+@end itemize
+
+@node Index
+@unnumbered Index
+
+@printindex cp
+
+@node Variable Index
+@unnumbered Variable Index
+
+@printindex vr
+
+@bye
diff --git a/default.mk b/default.mk
new file mode 100644
index 0000000..f7bf1ee
--- /dev/null
+++ b/default.mk
@@ -0,0 +1,60 @@
+# Copyright (C) 2019, 2020 Free Software Foundation, Inc.
+#
+# License
+#
+# This file 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 file 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 file. If not, see <https://www.gnu.org/licenses/>.
+
+TOP := $(dir $(lastword $(MAKEFILE_LIST)))
+
+EMACS ?= emacs
+CASK ?= cask
+PANDOC ?= pandoc
+TAR ?= tar
+
+INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info)
+MAKEINFO ?= makeinfo
+
+EMACSBATCH = $(EMACS) -Q --batch -L . $(EMACSFLAGS)
+RUNEMACS =
+
+HAVE_CASK := $(shell sh -c "command -v $(CASK)")
+ifndef HAVE_CASK
+$(warning "$(CASK) is not available. Please run make help")
+RUNEMACS = $(EMACSBATCH)
+else
+RUNEMACS = $(CASK) exec $(EMACSBATCH)
+endif
+
+EMACSFLAGS ?=
+TESTFLAGS ?= --reporter ert+duration
+PANDOCLAGS ?= --fail-if-warnings \
+ --reference-links \
+ --atx-headers \
+ -f org+empty_paragraphs
+
+PACKAGE = bnf-mode
+ARCHIVE_NAME = $(PACKAGE)-$(VERSION)
+
+VERSION = 0.4.4
+
+SRCS = bnf-mode.el
+OBJS = $(SRCS:.el=.elc)
+
+INFOPAGES = $(addsuffix .info,$(PACKAGE))
+ARCHIVE_CONTENTS = README \
+ ChangeLog \
+ LICENSE \
+ $(PACKAGE).el \
+ $(PACKAGE)-pkg.el \
+ $(INFOPAGES) dir
diff --git a/dir b/dir
index d3137ed..4d37888 100644
--- a/dir
+++ b/dir
@@ -5,7 +5,7 @@ The first time you invoke Info you start off looking at this
node.
File: dir, Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
- Typing "q" exits, "?" lists all Info commands, "d" returns here,
+ Typing "q" exits, "H" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.
@@ -14,5 +14,5 @@ File: dir, Node: Top This is the top of the INFO tree
* Menu:
-Languages
+Emacs
* BNF Mode: (bnf-mode). Major mode for editing BNF grammars.
diff --git a/test/bnf-mode-font-test.el b/test/bnf-mode-font-test.el
index bb3991b..10fcfa2 100644
--- a/test/bnf-mode-font-test.el
+++ b/test/bnf-mode-font-test.el
@@ -1,6 +1,6 @@
;;; bnf-mode-font-test.el --- BNF Mode: Font highlighting test suite -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2019, 2020 Free Software Foundation, Inc.
;; Author: Serghei Iakovlev <address@hidden>
;; Maintainer: Serghei Iakovlev <address@hidden>
diff --git a/test/test-helper.el b/test/test-helper.el
index a3f5204..1f2ad12 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -1,6 +1,6 @@
;;; test-helper.el --- BNF Mode: Non-interactive unit-test setup -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2020 Free Software Foundation, Inc
+;; Copyright (C) 2019, 2020 Free Software Foundation, Inc
;; Author: Serghei Iakovlev <address@hidden>
;; Maintainer: Serghei Iakovlev <address@hidden>
- [elpa] externals/bnf-mode 7535299 13/22: Add initial ability to generate info page, (continued)
- [elpa] externals/bnf-mode 7535299 13/22: Add initial ability to generate info page, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 61c4601 12/22: Correct copyright notice format, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 99d3931 16/22: Updated make package targed to provide info files, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 25d962f 18/22: Cleaned up .elpaignore, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 67fea1d 11/22: Amended documentation, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 026dfcd 09/22: Mode variables definition from Makefile to the common place, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 360bd7f 15/22: Update documentation, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode bdba298 20/22: Fixed misspelling, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 934fba4 21/22: Update change log, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode 4bc5d15 17/22: Move documentation to the project root, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode eec34c9 19/22: Merge pull request #11 from sergeyklay/info-page,
Stefan Monnier <=
- [elpa] externals/bnf-mode 4a7aff6 22/22: Bump version, Stefan Monnier, 2020/03/03
- [elpa] externals/bnf-mode e1adbb7 14/22: Create documentation in Texinfo format, Stefan Monnier, 2020/03/03