emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bnf-mode 16986ab 02/43: Simplified installation documen


From: Stefan Monnier
Subject: [elpa] externals/bnf-mode 16986ab 02/43: Simplified installation documentation
Date: Mon, 20 Jan 2020 13:38:58 -0500 (EST)

branch: externals/bnf-mode
commit 16986abb373d9463380e5a92ce8d9203e786e690
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>

    Simplified installation documentation
    
    Remove redundant documentation on how to setup package management, tune
    up Emacs, use-package usage, etc.
---
 README.org  | 125 +++---------------------------------------------------------
 bnf-mode.el |  31 +++++++++++----
 2 files changed, 30 insertions(+), 126 deletions(-)

diff --git a/README.org b/README.org
index 81ca76b..5811454 100644
--- a/README.org
+++ b/README.org
@@ -47,127 +47,13 @@ The best way of installing this major mode, at least for 
GNU Emacs 24, is to
 use the packaging system.  The following are ways to install using ELPA and
 MELPA.
 
-*** Initializing packaging system
-**** ELPA
+The recommended way is to use [[https://elpa.gnu.org/][ELPA]], 
[[https://stable.melpa.org/][MELPA Stable]] or [[https://melpa.org/][MELPA]]. 
If either is in your
+=package-archives=, do:
 
-Since version 0.4.1 BNF Mode is available for installation from ELPA.
-Add ELPA to the list of repositories to access this mode:
-
-#+begin_src emacs-lisp
-(require 'package)
-(add-to-list 'package-archives
-             '("gnu" . "https://elpa.gnu.org/packages/";) t)
-(package-initialize)
-#+end_src
-
-**** MELPA
-
-Add MELPA or MELPA Stable to the list of repositories to access this mode.
-MELPA tracks this Git repository and updates relatively soon after each commit
-or formal release.  For more detail on setting up see 
[[https://melpa.org/#/getting-started][MELPA Getting Started]].
-
-For those who want only formal, tagged releases use MELPA Stable:
-
-#+begin_src emacs-lisp
-(require 'package)
-(add-to-list 'package-archives
-             '("melpa-stable" . "https://stable.melpa.org/packages/";) t)
-(package-initialize)
-#+end_src
-
-For those who want rolling releases as they happen use MELPA:
-
-#+begin_src emacs-lisp
-(require 'package)
-(add-to-list 'package-archives
-             '("melpa" . "https://melpa.org/packages/";) t)
-(package-initialize)
-#+end_src
-
-*** Installation from package archive
-
-After initializing packaging system you can install BNF Mode using preferred 
way:
-
-***** =package-list-packages=
-
-Use ~M-x package-refresh-contents~ and ~M-x package-list-packages~ to get to
-the package listing and install ~bnf-mode~ from there.
-
-***** Manual
-
-You can install ~bnf-mode~ manually by adding following to your init file:
-
-#+begin_src emacs-lisp
-(unless (package-installed-p 'bnf-mode)
-    (package-refresh-contents)
-    (package-install 'bnf-mode))
+#+begin_src
+M-x package-install RET bnf-mode RET
 #+end_src
 
-***** Cask
-
-Add following to your [[https://cask.github.io/][Cask]] file:
-
-#+begin_src emacs-lisp
-(source melpa)
-;; In case of using ELPA
-;; (source elpa)
-
-(depends-on "bnf-mode")
-#+end_src
-
-***** =use-package=
-
-Add following to your init file:
-
-#+begin_src emacs-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_src
-
-*** El-get
-
-If you use el-get, just create a recipe file ~bnf.rcp~:
-
-#+begin_src emacs-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_src
-
-and add it to a directory present in ~el-get-recipe-path~.
-Then, use ~M-x el-get-install <RET> bnf-mode~ or add:
-
-#+begin_src emacs-lisp
-(el-get-bundle bnf-mode)
-#+end_src
-
-to your init file.
-
-*** Manual Install
-
-1. Download ~bnf-mode.el~
-2. Put the file in your Elisp common folder like ~$HOME/.emacs.d/lisp/~
-3. Then you can include like this:
-   #+begin_src emacs-lisp
-   (add-to-list 'load-path
-                (expand-file-name "lisp" user-emacs-directory))
-   #+end_src
-4. 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.
-   #+begin_src emacs-lisp
-   (autoload 'bnf-mode "bnf-mode" nil t)
-   ;; OR
-   (require 'bnf-mode)
-   #+end_src
-5. Optionally byte compile ~bnf-mode.el~ for faster startup: ~M-x byte-compile~
-
 ** Usage
 
 *** Interactive Commands
@@ -176,7 +62,8 @@ to your init file.
 |---------------------------------+----------------------------------|
 | ~bnf-mode~                      | Switches to BNF Mode.            |
 
-Any file that matches the glob ~*.bnf~ is automatically opened in ~bnf-mode~.
+By default any file that matches the glob ~*.bnf~ is automatically opened
+in ~bnf-mode~.
 
 ** Support
 
diff --git a/bnf-mode.el b/bnf-mode.el
index 73af85f..432fa0b 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -43,16 +43,33 @@
 ;; - Revised Report on the Algorithmic Language Algol 60
 ;;   (see URL `https://www.masswerk.at/algol60/report.htm')
 ;;
-;; Usage:  Put this file in your Emacs Lisp path (eg. site-lisp) and add to
-;; your .emacs file:
+;; Installation:
 ;;
-;;   (require 'bnf-mode)
+;; 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:
 ;;
-;; Bugs: Bug tracking is currently handled using the GitHub issue tracker
+;;   M-x package-install RET bnf-mode RET
+;;
+;; 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'.
+;;
+;; 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/CHANGELOG.org'
+;; History:
+;;
+;; History is tracked in the Git repository rather than in this file.
+;; (see URL `https://github.com/sergeyklay/bnf-mode/blob/master/CHANGELOG.org')
 
 ;;; Code:
 
@@ -99,7 +116,7 @@ semicolon only (\";\")."
     `((bnf-rule-name . ,(rx (and
                              (1+ (or alnum digit))
                              (0+ (or alnum digit
-                                     (in "!\"#$%&'()*+,-./:;=?@[\]^_`{|}~")
+                                     (in "!\"#$%&'()*+,-./:;=?@[]^_`{|}~")
                                      (in " \t"))))))
     "Additional special sexps for `bnf-rx'."))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]