[elpa] externals/exwm b12c67d: Make replacing existing WM optional

2019-03-10 Thread Chris Feng
branch: externals/exwm
commit b12c67de2ed10e2528b1c494aa08d51b43e563dd
Author: Chris Feng 
Commit: Chris Feng 

Make replacing existing WM optional

* exwm.el (exwm-replace): New user option for specifying whether to
replace existing WM.
(exwm-init): Use it.
(exwm--wmsn-acquire, exwm-init): Do not print warning message when
user gives up replacing.
* exwm-core.el (exwm--wmsn-replace): Remove dead code.
---
 exwm-core.el |  3 ---
 exwm.el  | 11 +--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/exwm-core.el b/exwm-core.el
index 9b6877b..55fbecd 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -41,9 +41,6 @@
 (defvar exwm--wmsn-acquire-timeout 3
   "Number of seconds to wait for other window managers to release the 
selection.")
 
-(defvar exwm--wmsn-replace 'ask
-  "Replace existing window manager.")
-
 (defvar exwm--guide-window nil
   "An X window separating workspaces and X windows.")
 
diff --git a/exwm.el b/exwm.el
index fca8b5d..7d301ab 100644
--- a/exwm.el
+++ b/exwm.el
@@ -99,6 +99,12 @@
   "Subrs (primitives) that would normally block EXWM."
   :type '(repeat function))
 
+(defcustom exwm-replace 'ask
+  "Whether to replace existing window manager."
+  :type '(radio (const :tag "Ask" ask)
+(const :tag "Replace by default" t)
+(const :tag "Do not replace" nil)))
+
 (defconst exwm--server-name "server-exwm"
   "Name of the subordinate Emacs server.")
 
@@ -721,7 +727,7 @@ manager.  If t, replace it, if nil, abort and ask the user 
if `ask'."
   (when (eq replace 'ask)
 (setq replace (yes-or-no-p "Replace existing window manager? ")))
   (when (not replace)
-(error "Other window manager detected")))
+(user-error "Other window manager detected")))
 (let ((new-owner (xcb:generate-id exwm--connection)))
   (xcb:+request exwm--connection
   (make-instance 'xcb:CreateWindow
@@ -812,7 +818,7 @@ manager.  If t, replace it, if nil, abort and ask the user 
if `ask'."
 (xcb:icccm:init exwm--connection t)
 (xcb:ewmh:init exwm--connection t)
 ;; Try to register window manager selection.
-(exwm--wmsn-acquire 'ask)
+(exwm--wmsn-acquire exwm-replace)
 (when (xcb:+request-checked+request-check exwm--connection
   (make-instance 'xcb:ChangeWindowAttributes
  :window exwm--root
@@ -836,6 +842,7 @@ manager.  If t, replace it, if nil, abort and ask the user 
if `ask'."
 (run-hooks 'exwm-init-hook)
 ;; Manage existing windows
 (exwm-manage--scan))
+(user-error)
 ((quit error)
  (exwm-exit)
  ;; Rethrow error



[elpa] externals/ebdb updated (3b92c7a -> 03594c7)

2019-03-10 Thread Eric Abrahamsen
girzel pushed a change to branch externals/ebdb.

  from  3b92c7a   Fix international parsing of phone numbers, bump to 0.6.5
   new  6176da5   Simplify regexp in ebdb-dwim-mail
   new  2863045   Remove unused function ebdb-get-records
   new  03594c7   Tweak completion support


Summary of changes:
 ebdb-com.el  |  94 ++---
 ebdb-complete.el |  75 -
 ebdb-message.el  |  40 +++--
 ebdb-wl.el   |  13 +--
 ebdb.el  |  78 ++---
 ebdb.info| 253 +--
 ebdb.org |  93 
 ebdb.texi| 117 -
 8 files changed, 505 insertions(+), 258 deletions(-)



[elpa] externals/ebdb 6176da5 1/3: Simplify regexp in ebdb-dwim-mail

2019-03-10 Thread Eric Abrahamsen
branch: externals/ebdb
commit 6176da533b6923c005d5464ac2ea874771232c85
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Simplify regexp in ebdb-dwim-mail

* ebdb.el (ebdb-dwim-mail): Use the [:punct:] construct.
---
 ebdb.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebdb.el b/ebdb.el
index 64e4779..1408b4a 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4335,7 +4335,7 @@ to use."
  ;; well (!,%, and $) just for common sense.
  ;; `define-mail-alias' uses regexp "[^- !#$%&'*+/0-9=?A-Za-z^_`{|}~]".
 
- (format (if (string-match "[][[:cntrl:]\177()<>@,;:.!$%[:nonascii:]]" 
name)
+ (format (if (string-match "[][[:cntrl:]\177[:punct:][:nonascii:]]" 
name)
  "\"%s\" <%s>"
"%s <%s>")
  name mail))



[elpa] externals/ebdb 03594c7 3/3: Tweak completion support

2019-03-10 Thread Eric Abrahamsen
branch: externals/ebdb
commit 03594c73081c1cd8f17b3e5c80791c2b8b6f60a8
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Tweak completion support

The gist of this is that it provides two kinds of completion support:
the `ebdb-dwim-completion-cache' which is simply a list of "name
" strings for use in mail composition buffers, and the
`ebdb-record-completion-table', which is a general-purpose completion
table for selecting a record.

Squashed commit of the following:

commit 5f55a397da48d58ff411c509cc0105e1f2b60ac0
Author: Eric Abrahamsen 
Date:   Thu Mar 7 18:13:55 2019 -0800

Remove option ebdb-wl-use-ebdb-completion

* ebdb-wl.el (ebdb-insinuate-wl): We've already got the option
  ebdb-complete-mail for this.

commit 1776b0275e4c2d20713ba3a36ec849d3bb19a936
Author: Eric Abrahamsen 
Date:   Thu Mar 7 16:50:57 2019 -0800

Arrange for post-completion stuff to be called even with capf

* ebdb-message.el (ebdb-message-complete-mail-cleanup): New function
  that simply passes the correct arguments to
  `ebdb-complete-mail-cleanup'.
  (ebdb-insinuate-message): Add the above to a buffer-local value of
  `choose-completion-string-functions'.

commit efaafa1cd438e41bbcab1fd6ed8a3c32922294d0
Author: Eric Abrahamsen 
Date:   Thu Mar 7 12:02:15 2019 -0800

Docstring fixes

commit d234439f97fea6a796f097e96b65da23fbfa867d
Author: Eric Abrahamsen 
Date:   Thu Mar 7 12:01:52 2019 -0800

Update docs about completion options

commit 84b8b3d707a02196e71ba447cf7df294a088e285
Author: Eric Abrahamsen 
Date:   Wed Mar 6 13:41:30 2019 -0800

Make more interesting completion table, remove some functions

* ebdb-com.el (ebdb-record-completion-table): This function now uses
  the string to complete as an actual search.
  (ebdb-completing-read-record): Simplify this record somewhat; assume
  that there's only one matching record.
  (ebdb-completing-read-records): Delete this function, there isn't
  really a use for it.

commit 74e34625d6b9e0db4cd8ae5b00645364a1591f1c
Author: Eric Abrahamsen 
Date:   Thu Jan 17 10:41:51 2019 -0800

WIP on manual updates

commit 9892a4401d9c16f50c3f52fdb4dc86550ca4ff9d
Author: Eric Abrahamsen 
Date:   Wed Jan 16 12:21:44 2019 -0800

Turns out the completion functions could be simpler

* ebdb-com.el (ebdb-record-completion-table): So *that's* what
  `complete-with-action' is for.
* ebdb.el (ebdb-mail-dwim-collection-function): Here, too.

commit 52cbe9e94aa0f4acb4480ec75b87632c85c30ce9
Author: Eric Abrahamsen 
Date:   Mon Jan 14 13:57:50 2019 -0800

New completion mechanisms, next bit

commit 9b2087e494636333c1e66da17eef55cc69b7f121
Author: Eric Abrahamsen 
Date:   Fri Dec 28 13:44:21 2018 -0800

WIP on new completion mechanisms
---
 ebdb-com.el  |  86 ++-
 ebdb-complete.el |  75 -
 ebdb-message.el  |  40 +++--
 ebdb-wl.el   |  13 +--
 ebdb.el  |  76 +++--
 ebdb.info| 253 +--
 ebdb.org |  93 
 ebdb.texi| 117 -
 8 files changed, 504 insertions(+), 249 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index efd0798..8277a77 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2313,9 +2313,9 @@ The search results are displayed in the EBDB buffer using 
formatter FMT."
 ;;;###autoload
 (defun ebdb-search-single-record (record &optional fmt)
   "Prompt for a single RECORD, and display it."
-  (interactive (list (ebdb-completing-read-records "Display records: ")
+  (interactive (list (ebdb-completing-read-record "Display record: ")
  (ebdb-formatter-prefix)))
-  (ebdb-display-records record fmt))
+  (ebdb-display-records (list record) fmt))
 
 (defun ebdb-search-prog (function &optional fmt)
   "Search records using FUNCTION.
@@ -2424,7 +2424,39 @@ otherwise inline."
   (ebdb-cite-records records arg))
 (pop-to-buffer buf)))
 
-;;; completion
+;;; Completion
+
+(defun ebdb-record-completion-table (str pred action)
+  "Function used as a completion table for EBDB records.
+STR is used to search the database.  The return value is the
+completed name string."
+  (let* ((completion-ignore-case ebdb-case-fold-search)
+(newstring (concat "^" str))
+;; Completion searches the database, but we only use "fast
+;; lookup" search clauses which use the hashtable, instead of
+;; cycling over all records one by one.  Still pretty slow,
+;; though.  Also unfortunate is that EBDB has a broader
+;; concept of "matching string" than the completion

[elpa] externals/ebdb 2863045 2/3: Remove unused function ebdb-get-records

2019-03-10 Thread Eric Abrahamsen
branch: externals/ebdb
commit 2863045b771a9bb5d71b3ac43bb70ba4204b4e9d
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Remove unused function ebdb-get-records

* ebdb-com.el: This wasn't used anywhere.
---
 ebdb-com.el | 8 
 1 file changed, 8 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 7f5f0b1..efd0798 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -192,14 +192,6 @@ This is a vector [INVERT-M INVERT].
 
 INVERT-M is the mode line info if variable `ebdb-search-invert' is non-nil.")
 
-(defun ebdb-get-records (prompt)
-  "If inside the *EBDB* buffer get the current records.
-In other buffers ask the user.
-Argument PROMPT is passed to `ebdb-completing-read-records'."
-  (if (eql major-mode 'ebdb-mode)
-  (ebdb-do-records)
-(ebdb-completing-read-records prompt)))
-
 ;; Note about the arg RECORDS of various EBDB commands:
 ;;  - Usually, RECORDS is a list of records.  (Interactively,
 ;;this list of records is set up by `ebdb-do-records'.)



[elpa] externals/peg 3313a38 6/7: * peg.el (merge-error): Add a method for (NOT X).

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit 3313a3854a8e647eda8ef910d26313b5b910854f
Author: Helmut Eller 
Commit: Helmut Eller 

* peg.el (merge-error):  Add a method for (NOT X).
---
 ChangeLog |  4 
 peg.el| 37 +
 2 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1960686..949332a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-22  Helmut Eller  
+
+   * peg.el (merge-error):  Add a method for (NOT X).
+
 2009-11-04  Helmut Eller  
 
Add some error reporting.  If a parse fails, move to the
diff --git a/peg.el b/peg.el
index 5085eab..24f2712 100644
--- a/peg.el
+++ b/peg.el
@@ -2,7 +2,7 @@
 ;;
 ;; Copyright 2008  Helmut Eller .
 ;;
-;; Version: 0.5 (2008-Dec-21)
+;; Version: 0.6 (2009-Nov-04)
 ;;
 ;; 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
@@ -21,8 +21,8 @@
 ;;
 ;; Parsing Expression Grammars (PEG) are a formalism in the spirit of
 ;; Context Free Grammars (CFG) with some simplifications which makes
-;; the implementation of PEGs as top-down parser particularly simple
-;; and easy to understand [Ford, Baker].
+;; the implementation of PEGs as recursive descent parser particularly
+;; simple and easy to understand [Ford, Baker].
 ;;
 ;; This file implements a macro `peg-parse' which parses the current
 ;; buffer according to a PEG.  E.g. we can match integers with a PEG
@@ -32,12 +32,12 @@
 ;; (sign (or "+" "-" ""))
 ;; (digit[0-9]))
 ;;
-;; In contrast to regexps, PEGs allow us to define recursive rules.  A
-;; PEG is a list of rules.  A rule is written as (NAME PE ...).
+;; In contrast to regexps, PEGs allow us to define recursive "rules".
+;; A "grammar" is a list of rules.  A rule is written as (NAME PEX...)
 ;; E.g. (sign (or "+" "-" "")) is a rule with the name "sign".  The
-;; syntax for Parsing Expression (PE) is a follows:
+;; syntax for PEX (Parsing Expression) is a follows:
 ;;
-;; Description LispHaskell, as in Ford's paper
+;; Description LispTraditional, as in Ford's paper
 ;; Sequence(and e1 e2) e1 e2
 ;; Prioritized Choice   (or e1 e2) e1 / e2
 ;; Not-predicate   (not e) !e
@@ -62,7 +62,7 @@
 ;; Syntax-Class(syntax-class NAME)
 ;;
 ;; `peg-parse' also supports parsing actions, i.e. Lisp snippets which
-;; are executed when a PE matches.  This can be used to construct
+;; are executed when a pex matches.  This can be used to construct
 ;; syntax trees or for similar tasks.  Actions are written as
 ;;
 ;;  (action FORM)  ; evaluate FORM
@@ -85,7 +85,7 @@
 ;;
 ;; Regexp equivalents:
 ;;
-;; Here a some examples for regexps and how those could be written as PE.
+;; Here a some examples for regexps and how those could be written as pex.
 ;; [Most are taken from rx.el]
 ;;
 ;; "^[a-z]*"
@@ -128,9 +128,11 @@
 ;; Syntactic Foundation. In POPL'04: Proceedings of the 31st ACM
 ;; SIGPLAN-SIGACT symposium on Principles of Programming Languages,
 ;; pages 111-122, New York, NY, USA, 2004. ACM Press.
+;; http://pdos.csail.mit.edu/~baford/packrat/
 ;;
 ;; [Baker] Baker, Henry G. "Pragmatic Parsing in Common Lisp".  ACM Lisp
 ;; Pointers 4(2), April--June 1991, pp. 3--15.
+;; http://home.pipeline.com/~hbaker1/Prag-Parse.html
 ;;
 
 (unless (>= emacs-major-version 22)
@@ -342,7 +344,7 @@ Note: a PE can't \"call\" rules by name."
(let ((e (pop peg-stack)))
  (cond ((eq e ',marker) nil)
((null peg-stack)
-(error "Marker not longer stack"))
+(error "No marker on stack"))
(t (push e l) t
l)))
 
@@ -368,7 +370,7 @@ Note: a PE can't \"call\" rules by name."
 (stack-action (x --)
 
 (peg-add-method normalize quote (form)
-  (error "quote is reverved for future use"))
+  (error "quote is reserved for future use"))
 
 (peg-define-method-table translate)
 
@@ -655,6 +657,9 @@ input.  PATH is the list of rules that we have visited so 
far."
 (peg-add-method merge-error any (merged)
   (add-to-list 'merged '(any)))
 
+(peg-add-method merge-error not (merged x)
+  (add-to-list 'merged `(not ,x)))
+
 (peg-add-method merge-error action (merged _) merged)
 (peg-add-method merge-error null (merged) merged)
 
@@ -779,10 +784,10 @@ resp. succeded instead of signaling an error."
 ;; characters from 0 to 9.
 ;;
 ;; Notes: 
-;; 1) "" matches the empty sequence, i.e. matches without
-;; consuming input.  
+;; 1) "" matches the empty sequence, i.e. matches without consuming
+;;input.
 ;; 2) [0-9] is the character range from 0 to 9.  This can also be
-;; written as (range ?0 ?9). [Note that 0-9 is a symbol.]
+;;written as (range ?0 ?9).

[elpa] externals/peg 3604f37 5/7: Add some error reporting. If a parse fails, move to the

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit 3604f37df2d9d4e96e24f8159820ef9130a292fb
Author: Helmut Eller 
Commit: Helmut Eller 

Add some error reporting.  If a parse fails, move to the
right-most position and show the alternatives for that position.

Also only return a signle value: the stack.  Failures are
signalled with an error.  To avoid signalling errors you can add a
rule which matches everything but indicates failure in some other
way e.g. by setting a global variable.

* peg.el (peg-errors): New variable.
(peg-translate-rules): Use it.  Also raise errors at the
right-most point of failure.
(peg-translate-exp): Record failures.
(peg-record-failure): New function.
(peg-merge-errors): Used for error reporting.
(peg-postprocess): Just return the stack. Errors can be indicated
by leaving something on the stack.
(peg-parse-string): Add a NOERROR argument.  Hopefully more in
line with string-match. Update tests accordingly.
---
 ChangeLog |  21 +
 peg.el| 310 ++
 2 files changed, 213 insertions(+), 118 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5cbd460..1960686 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2009-11-04  Helmut Eller  
+
+   Add some error reporting.  If a parse fails, move to the
+   right-most position and show the alternatives for that position.
+
+   Also only return a signle value: the stack.  Failures are
+   signalled with an error.  To avoid signalling errors you can add a
+   rule which matches everything but indicates failure in some other
+   way e.g. by setting a global variable.
+
+   * peg.el (peg-errors): New variable.
+   (peg-translate-rules): Use it.  Also raise errors at the
+   right-most point of failure.
+   (peg-translate-exp): Record failures.
+   (peg-record-failure): New function.
+   (peg-merge-errors): Used for error reporting.
+   (peg-postprocess): Just return the stack. Errors can be indicated
+   by leaving something on the stack.
+   (peg-parse-string): Add a NOERROR argument.  Hopefully more in
+   line with string-match. Update tests accordingly.
+
 2009-03-06  Helmut Eller  
 
* peg.el (peg-ex-arith): Minor cleanups.
diff --git a/peg.el b/peg.el
index 11673e0..5085eab 100644
--- a/peg.el
+++ b/peg.el
@@ -159,6 +159,11 @@ Note: a PE can't \"call\" rules by name."
 ;; executed in a postprocessing step, not during parsing.
 (defvar peg-thunks)
 
+;; used at runtime to track the right-most error location.  It's a
+;; pair (POSITION . EXPS ...).  POSITION is the buffer position and
+;; EXPS is a list of rules/expressions that failed.
+(defvar peg-errors)
+
 ;; The basic idea is to translate each rule to a lisp function.
 ;; The result looks like
 ;;   (let ((rule1 (lambda () code-for-rule1))
@@ -176,15 +181,22 @@ Note: a PE can't \"call\" rules by name."
 (dolist (rule rules)
   (puthash (car rule) (peg-normalize `(and . ,(cdr rule))) peg-rules))
 (peg-check-cycles peg-rules)
-`(let ((peg-thunks '()) . ,(mapcar #'car rules))
+`(let ((peg-thunks '()) (peg-errors '(-1))
+  . ,(mapcar #'car rules))
,@(mapcar (lambda (rule)
   (let ((name (car rule)))
 `(setq ,name
(lambda ()
  ,(peg-translate-exp (gethash name peg-rules))
 rules)
-   (when (funcall ,(car (car rules)))
-(peg-postprocess peg-thunks)
+   (cond ((funcall ,(car (car rules)))
+ (peg-postprocess peg-thunks))
+(t
+ (goto-char (car peg-errors))
+ (error "Parse error at %d (expecting %S)"
+(car peg-errors)
+(peg-merge-errors (cdr peg-errors
+
 
 (eval-and-compile 
   (defun peg-method-table-name (method-name)
@@ -365,8 +377,17 @@ Note: a PE can't \"call\" rules by name."
   "Return the ELisp code to match the PE EXP."
   (let ((translator (or (gethash (car exp) peg-translate-methods)
(error "No translator for: %S" (car exp)
-(apply translator (cdr exp
-
+`(or ,(apply translator (cdr exp))
+(progn
+  (peg-record-failure ',exp) ; for error reporting
+  nil
+
+(defun peg-record-failure (exp)
+  (cond ((= (point) (car peg-errors))
+(setcdr peg-errors (cons exp (cdr peg-errors
+   ((> (point) (car peg-errors))
+(setq peg-errors (list (point) exp)
+  
 (peg-add-method translate and (e1 e2)
   `(and ,(peg-translate-exp e1)
,(peg-translate-exp e2)))
@@ -471,12 +492,11 @@ Note: a PE can't \"call\" rules by name."
(minus (member ?- chars))
(hat (member ?^ chars)))
 (dolist (c '(?\] ?- ?^))
-  (setq chars (delete c chars)))
+  (setq chars (remove c chars)))
 (format "[%s%s%s%s%s%s]"
(if rbracket 

[elpa] externals/peg cb46f6f 3/7: Introduce an operator to match string literals.

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit cb46f6f76b080c314826a4ea510336efff5b2810
Author: Helmut Eller 
Commit: Helmut Eller 

Introduce an operator to match string literals.

* peg.el (translate =): Add = operator.
(peg-ex-split): Example use.
---
 ChangeLog | 140 +++---
 peg.el|  47 -
 2 files changed, 106 insertions(+), 81 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 577288c..7abe671 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,122 +1,104 @@
-Author: Helmut Eller 
-Date:   Mon Dec 22 09:13:05 2008 +0100
+2009-03-06  Helmut Eller  
 
-Fix typo.
+   Introduce an operator to match string literals.
 
-Author: Helmut Eller 
-Date:   Sun Dec 21 09:38:06 2008 +0100
+   * peg.el (translate =): Add = operator.
+   (peg-ex-split): Example use.
 
-Version 0.5 for savannah.
+2008-12-22  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Thu Dec 18 10:19:18 2008 +0100
+   Fix typo.
 
-Remove *list op.
+2008-12-21  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Wed Dec 17 18:59:23 2008 +0100
+   Version 0.5 for savannah.
 
-Bump version number to 0.4.
+2008-12-18  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Wed Dec 17 18:52:55 2008 +0100
+   Remove *list op.
 
-Add some more operators for actions.
-list: Factored out of *list.  Collects all items on the stack.
-region: New. Pushes start and end.
-replaces: Replaces match.
+2008-12-17  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Wed Dec 17 18:08:28 2008 +0100
+   Bump version number to 0.4.
 
-Fix normalizer for \`: Push values in left-to-right order.
-peg-postprocess: turn positions in to markers to
-support replacement ops in the actions.
+2008-12-17  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Mon Dec 1 19:10:21 2008 +0100
+   Add some more operators for actions.
+   list: Factored out of *list.  Collects all items on the stack.
+   region: New. Pushes start and end.
+   replaces: Replaces match.
 
-(peg-ex-lisp): Minor change to allow comments in more places.
+2008-12-17  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Mon Dec 1 15:19:31 2008 +0100
+   Fix normalizer for \`: Push values in left-to-right order.
+   peg-postprocess: turn positions in to markers to
+   support replacement ops in the actions.
 
-(peg-ex-uri): Fix some stack actions so that the file: example works.
+2008-12-01  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Fri Nov 28 15:21:35 2008 +0100
+   (peg-ex-lisp): Minor change to allow comments in more places.
 
-Remove dups from char sets to avoid clashes with [:CLASS:] syntax.
-There's still no way to include syntax classes in charsets. There
-really should be.
+2008-12-01  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Fri Nov 28 12:09:31 2008 +0100
+   (peg-ex-uri): Fix some stack actions so that the file: example works.
 
-Handle ^ in charsets.
+2008-11-28  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Fri Nov 28 10:12:24 2008 +0100
+   Remove dups from char sets to avoid clashes with [:CLASS:] syntax.
+   There's still no way to include syntax classes in charsets. There
+   really should be.
 
-Use (declare (indent )) again.  Emacs 21 compatibility is to hard
-due to broken ,@ or something.
+2008-11-28  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Fri Nov 28 08:50:10 2008 +0100
+   Handle ^ in charsets.
 
-Don't use (declare (indent 3)) because that doesn' work in Emacs 21.
+2008-11-28  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Fri Nov 28 08:44:03 2008 +0100
+   Use (declare (indent )) again.  Emacs 21 compatibility is to hard
+   due to broken ,@ or something.
 
-Fix minor spelling error.
+2008-11-28  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Fri Nov 28 08:35:16 2008 +0100
+   Don't use (declare (indent 3)) because that doesn' work in Emacs 21.
 
-Fix range translator: we need to check for eob.
-Thanks to Hugo Schmitt.
+2008-11-28  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Thu Nov 27 23:54:18 2008 +0100
+   Fix minor spelling error.
 
-*** empty log message ***
+2008-11-28  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Thu Nov 27 23:52:25 2008 +0100
+   Fix range translator: we need to check for eob.
+   Thanks to Hugo Schmitt.
 
-Make file byte-compileable in Emacs 22.
+2008-11-28  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Thu Nov 27 10:07:40 2008 +0100
+   Make file byte-compileable in Emacs 22.
 
-Add mini test suite
-Restore subtring operator.
-Add translate method for .
+2008-11-27  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Thu Nov 27 09:26:33 2008 +0100
+   Add mini test suite
+   Restore subtring operator.
+   Add translate method for .
 
-Add *list operator.
+2008-11-27  Helmut Eller  
 
-Author: Helmut Eller 
-Date:   Sat Nov 8 14:37:40 200

[elpa] externals/peg 081efec 7/7: * peg.el: Cleanup whitespace.

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit 081efeca91d790c7fbc90871ac22c40935f4833b
Author: Helmut Eller 
Commit: Helmut Eller 

* peg.el: Cleanup whitespace.
---
 peg.el | 104 +
 1 file changed, 53 insertions(+), 51 deletions(-)

diff --git a/peg.el b/peg.el
index 24f2712..8867e82 100644
--- a/peg.el
+++ b/peg.el
@@ -37,16 +37,16 @@
 ;; E.g. (sign (or "+" "-" "")) is a rule with the name "sign".  The
 ;; syntax for PEX (Parsing Expression) is a follows:
 ;;
-;; Description LispTraditional, as in Ford's paper
-;; Sequence(and e1 e2) e1 e2
+;; Description LispTraditional, as in Ford's paper
+;; Sequence(and e1 e2) e1 e2
 ;; Prioritized Choice   (or e1 e2) e1 / e2
-;; Not-predicate   (not e) !e
+;; Not-predicate   (not e) !e
 ;; And-predicate   (if e)  &e
 ;; Any character   (any)   .
 ;; Literal string  "abc"   "abc"
 ;; Character C (char c)'c'
-;; Zero-or-more(* e)   e*
-;; One-or-more (+ e)   e+
+;; Zero-or-more(* e)   e*
+;; One-or-more (+ e)   e+
 ;; Optional(opt e) e?
 ;; Character range (range a b) [a-b]
 ;; Character set   [a-b "+*" ?x]   [a-b+*x]  ; note: [] is a elisp vector
@@ -54,12 +54,12 @@
 ;; Beginning-of-Buffer  (bob)
 ;; End-of-Buffer(eob)
 ;; Beginning-of-Line(bol)
-;; End-of-Line (eol)
+;; End-of-Line (eol)
 ;; Beginning-of-Word(bow)
-;; End-of-Word (eow)
+;; End-of-Word (eow)
 ;; Beginning-of-Symbol  (bos)
-;; End-of-Symbol   (eos)
-;; Syntax-Class(syntax-class NAME)
+;; End-of-Symbol   (eos)
+;; Syntax-Class(syntax-class NAME)
 ;;
 ;; `peg-parse' also supports parsing actions, i.e. Lisp snippets which
 ;; are executed when a pex matches.  This can be used to construct
@@ -67,7 +67,7 @@
 ;;
 ;;  (action FORM)  ; evaluate FORM
 ;;  `(VAR... -- FORM...)   ; stack action
-;; 
+;;
 ;; Actions don't consume input, but are executed at the point of
 ;; match.  A "stack action" takes VARs from the "value stack" and
 ;; pushes the result of evaluating FORMs to that stack.  See
@@ -104,8 +104,8 @@
 ;; (and (* [" \t\n"]) ":" (or (+ (not ":") (any)) (eol)))
 ;;
 ;; "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
-;; (and (bol) 
-;;  "content-transfer-encoding:" 
+;; (and (bol)
+;;  "content-transfer-encoding:"
 ;;  (* (opt "\n") ["\t "])
 ;;  "quoted-printable"
 ;;  (* (opt "\n") ["\t "]))
@@ -134,6 +134,8 @@
 ;; Pointers 4(2), April--June 1991, pp. 3--15.
 ;; http://home.pipeline.com/~hbaker1/Prag-Parse.html
 ;;
+;; Roman Redziejowski does good PEG related research
+;; http://www.romanredz.se/pubs.htm
 
 (unless (>= emacs-major-version 22)
   (error "peg.el requires Emacs version 22 or newer"))
@@ -172,7 +174,7 @@ Note: a PE can't \"call\" rules by name."
 ;; ...
 ;; (ruleN (lambda () code-for-ruleN)))
 ;; (funcall rule1))
-;; 
+;;
 ;; code-for-ruleX returns t if the rule matches and nil otherwise.
 ;;
 (defun peg-translate-rules (rules)
@@ -200,7 +202,7 @@ Note: a PE can't \"call\" rules by name."
 (peg-merge-errors (cdr peg-errors
 
 
-(eval-and-compile 
+(eval-and-compile
   (defun peg-method-table-name (method-name)
 (intern (format "peg-%s-methods" method-name
 
@@ -222,7 +224,7 @@ Note: a PE can't \"call\" rules by name."
   "Return a \"normalized\" form of EXP."
   (cond ((and (consp exp)
  (let ((fun (gethash (car exp) peg-normalize-methods)))
-   (and fun 
+   (and fun
 (apply fun (cdr exp))
((stringp exp)
 (let ((len (length exp)))
@@ -242,19 +244,19 @@ Note: a PE can't \"call\" rules by name."
  bob eob bol eol bow eow bos eos syntax-class =))
 
 (dolist (type peg-leaf-types)
-  (puthash type `(lambda (&rest args) (cons ',type args)) 
+  (puthash type `(lambda (&rest args) (cons ',type args))
   peg-normalize-methods))
 
 (peg-add-method normalize or (&rest args)
   (cond ((null args) '(fail))
((null (cdr args)) (peg-normalize (car args)))
-   (t `(or ,(peg-normalize (car args)) 
+   (t `(or ,(peg-normalize (car args))
,(peg-normalize `(or . ,(cdr args)))
 
 (peg-add-method normalize and (&rest args)
   (cond ((null args) '(null))
((null (cdr args)) (peg-normalize (car args)))
-   (t `(and ,(peg-normalize (car args)) 
+   (t `(and ,(peg-normalize (car args))
 ,(peg-normalize `(and . ,(cdr args)))
 
 (peg-add-method normalize * (&rest args)
@@ -287,7 +289,7 @@ Note: a PE can't \"call\" rules by name."
   ,@(mapcar (lambda (val) `(push ,val peg-stack)) values
   `(action ,form)

[elpa] externals/peg 47b737c 4/7: * peg.el (peg-ex-arith): Minor cleanups.

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit 47b737c0798d247dc409417109f27b94c239f595
Author: Helmut Eller 
Commit: Helmut Eller 

* peg.el (peg-ex-arith): Minor cleanups.
---
 ChangeLog |  4 
 peg.el| 27 ---
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7abe671..5cbd460 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-03-06  Helmut Eller  
 
+   * peg.el (peg-ex-arith): Minor cleanups.
+
+2009-03-06  Helmut Eller  
+
Introduce an operator to match string literals.
 
* peg.el (translate =): Add = operator.
diff --git a/peg.el b/peg.el
index d51fa2d..11673e0 100644
--- a/peg.el
+++ b/peg.el
@@ -666,6 +666,10 @@ input.  PATH is the list of rules that we have visited so 
far."
   (assert (equal (peg-parse-string ((s `(-- 1 2))) "") '(t (2 1
   (assert (equal (peg-parse-string ((s `(-- 1 2) `(a b -- a b))) "")
 '(t (2 1
+  (assert (equal (peg-parse-string ((s (or (and (any) s)
+  (substring [0-9]
+  "ab0cd1ef2gh")
+'(t ("2"
   (assert (equal (peg-parse-string ((s (list x y))
(x `(-- 1))
(y `(-- 2)))
@@ -744,22 +748,16 @@ input.  PATH is the list of rules that we have visited so 
far."
 ;; Parse arithmetic expressions and compute the result as side effect.
 (defun peg-ex-arith ()
   (peg-parse 
-   (expr (or (and ws sum eol)
+   (expr (or (and _ sum eol)
 (and (* (not eol) (any)) eol error)))
-   (sum product (* (or (and plus product `(a b -- (+ a b)))
-  (and minus product `(a b -- (- a b))
-   (product value (* (or (and times value `(a b -- (* a b)))
-(and divide value `(a b -- (/ a b))
+   (sum product (* (or (and "+" _ product `(a b -- (+ a b)))
+  (and "-" _ product `(a b -- (- a b))
+   (product value (* (or (and "*" _ value `(a b -- (* a b)))
+(and "/" _ value `(a b -- (/ a b))
(value (or (and (substring number) `(string -- (string-to-number string)))
- (and open sum close)))
-   (number (+ [0-9]) ws)
-   (plus "+" ws)
-   (minus "-" ws)
-   (times "*" ws)
-   (divide "/" ws)
-   (open "(" ws)
-   (close ")" ws)
-   (ws (* (or " " "\t")))
+ (and "(" _ sum ")" _)))
+   (number (+ [0-9]) _)
+   (_ (* [" \t"]))
(eol (or "\n" "\r\n" "\r"))
(error (action (error "Parse error at: %s" (point))
 
@@ -827,7 +825,6 @@ input.  PATH is the list of rules that we have visited so 
far."
(lowalpha [a-z])
(upalpha [A-Z])
(digit [0-9])))
-
 ;; (peg-ex-uri)file:/bar/baz.html?foo=df#x
 ;; (peg-ex-uri)http://lu...@www.foo.com:8080/bar/baz.html?x=1#foo
 



[elpa] externals/peg 585f4de 1/7: Create hg repo.

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit 585f4de6643425b1b32d07dbba7b7b77bdc79b6e
Author: Helmut Eller 
Commit: Helmut Eller 

Create hg repo.
---
 COPYING   | 674 
 ChangeLog | 122 +
 README|  29 +++
 peg.el| 863 ++
 4 files changed, 1688 insertions(+)

diff --git a/COPYING b/COPYING
new file mode 100644
index 000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+

[elpa] branch externals/peg created (now 081efec)

2019-03-10 Thread Stefan Monnier
monnier pushed a change to branch externals/peg.

at  081efec   * peg.el: Cleanup whitespace.

This branch includes the following new commits:

   new  585f4de   Create hg repo.
   new  a4286cb   Mention mailing list.
   new  cb46f6f   Introduce an operator to match string literals.
   new  47b737c   * peg.el (peg-ex-arith): Minor cleanups.
   new  3604f37   Add some error reporting.  If a parse fails, move to the 
right-most position and show the alternatives for that position.
   new  3313a38   * peg.el (merge-error):  Add a method for (NOT X).
   new  081efec   * peg.el: Cleanup whitespace.




[elpa] externals/peg a4286cb 2/7: Mention mailing list.

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit a4286cb7baf0c30c13b483bcf38170e6e9a1adbc
Author: Helmut Eller 
Commit: Helmut Eller 

Mention mailing list.
---
 README | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/README b/README
index cc764e8..9f3287e 100644
--- a/README
+++ b/README
@@ -24,6 +24,5 @@ Contact
 ---
 
   Send bug reports and suggested improvements to:
-Helmut Eller 
+http://lists.nongnu.org/mailman/listinfo/emacs-peg-devel
 
-  [mailing list coming soon]



[elpa] externals/peg e7aaa6c: * peg.el: Use lexical-binding and cl-lib. Fix copyright and header

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit e7aaa6c9eda3f62fda2280eb160b0fe0c35b8b6f
Author: Stefan Monnier 
Commit: Stefan Monnier 

* peg.el: Use lexical-binding and cl-lib.  Fix copyright and header

Don't bother testing Emacs version.
(peg-translate-rules): Use letrec.
(peg-add-method): Add debug spec.
---
 peg.el | 66 ++
 1 file changed, 38 insertions(+), 28 deletions(-)

diff --git a/peg.el b/peg.el
index 8867e82..2d3773f 100644
--- a/peg.el
+++ b/peg.el
@@ -1,8 +1,10 @@
-;;; peg.el --- Parsing Expression Grammars in Emacs Lisp
-;;
-;; Copyright 2008  Helmut Eller .
+;;; peg.el --- Parsing Expression Grammars in Emacs Lisp  -*- 
lexical-binding:t -*-
+
+;; Copyright (C) 2008-2019  Free Software Foundation, Inc.
 ;;
-;; Version: 0.6 (2009-Nov-04)
+;; Author: Helmut Eller 
+;; Maintainer: Stefan Monnier 
+;; Version: 0.7
 ;;
 ;; 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
@@ -137,11 +139,10 @@
 ;; Roman Redziejowski does good PEG related research
 ;; http://www.romanredz.se/pubs.htm
 
-(unless (>= emacs-major-version 22)
-  (error "peg.el requires Emacs version 22 or newer"))
-
 ;;; Code:
 
+(eval-when-compile (require 'cl-lib))
+
 (defmacro peg-parse (&rest rules)
   "Match RULES at point.
 Return (T STACK) if the match succeed and nil on failure."
@@ -185,27 +186,31 @@ Note: a PE can't \"call\" rules by name."
 (dolist (rule rules)
   (puthash (car rule) (peg-normalize `(and . ,(cdr rule))) peg-rules))
 (peg-check-cycles peg-rules)
-`(let ((peg-thunks '()) (peg-errors '(-1))
-  . ,(mapcar #'car rules))
-   ,@(mapcar (lambda (rule)
-  (let ((name (car rule)))
-`(setq ,name
+`(progn
+   (defvar peg-errors) (defvar peg-thunks)
+   (let ((peg-thunks '()) (peg-errors '(-1)))
+ (letrec
+ ,(mapcar (lambda (rule)
+   (let ((name (car rule)))
+ `(,name
(lambda ()
  ,(peg-translate-exp (gethash name peg-rules))
-rules)
-   (cond ((funcall ,(car (car rules)))
- (peg-postprocess peg-thunks))
-(t
- (goto-char (car peg-errors))
- (error "Parse error at %d (expecting %S)"
-(car peg-errors)
-(peg-merge-errors (cdr peg-errors
+ rules)
+   (cond ((funcall ,(car (car rules)))
+ (peg-postprocess peg-thunks))
+(t
+ (goto-char (car peg-errors))
+ (error "Parse error at %d (expecting %S)"
+(car peg-errors)
+(peg-merge-errors (cdr peg-errors))
 
 
 (eval-and-compile
   (defun peg-method-table-name (method-name)
 (intern (format "peg-%s-methods" method-name
 
+;; FIXME: Replace peg-define-method-table/peg-add-method with cl-defgeneric and
+;; cl-defmethod?
 (defmacro peg-define-method-table (name)
   (let ((tab (peg-method-table-name name)))
 `(progn
@@ -213,7 +218,8 @@ Note: a PE can't \"call\" rules by name."
(setq ,tab (make-hash-table :size 20)
 
 (defmacro peg-add-method (method type args &rest body)
-  (declare (indent 3))
+  (declare (indent 3)
+   (debug (symbolp symbolp sexp def-body)))
   `(puthash ',type (lambda ,args . ,body) ,(peg-method-table-name method)))
 
 (peg-define-method-table normalize)
@@ -371,7 +377,7 @@ Note: a PE can't \"call\" rules by name."
   (insert-before-markers ,replacement
 (stack-action (x --)
 
-(peg-add-method normalize quote (form)
+(peg-add-method normalize quote (_form)
   (error "quote is reserved for future use"))
 
 (peg-define-method-table translate)
@@ -381,6 +387,9 @@ Note: a PE can't \"call\" rules by name."
   "Return the ELisp code to match the PE EXP."
   (let ((translator (or (gethash (car exp) peg-translate-methods)
(error "No translator for: %S" (car exp)
+;; FIXME: This expansion basically duplicates `exp' in the output, which is
+;; a serious problem because it's done recursively, so it makes the output
+;; code's size exponentially larger than the input!
 `(or ,(apply translator (cdr exp))
 (progn
   (peg-record-failure ',exp) ; for error reporting
@@ -544,12 +553,13 @@ Note: a PE can't \"call\" rules by name."
 ;; graph as long as we can without consuming input.  When we find a
 ;; recursive call we signal an error.
 
-(defun peg-check-cycles (peg-rules)
-  (maphash (lambda (name exp)
-(peg-detect-cycles exp (list name))
-(dolist (node (peg-find-star-nodes exp))
-  (peg-detect-cycles node '(
-  peg-rules))
+(defun peg-check-cycles (rules)
+  (let ((peg-rules rules

[elpa] master ad9ab80: * exernals-list: Add `peg`

2019-03-10 Thread Stefan Monnier
branch: master
commit ad9ab803e774b916a76d88427f7702ef9123b7b1
Author: Stefan Monnier 
Commit: Stefan Monnier 

* exernals-list: Add `peg`
---
 externals-list | 1 +
 1 file changed, 1 insertion(+)

diff --git a/externals-list b/externals-list
index 71c249e..52019c2 100644
--- a/externals-list
+++ b/externals-list
@@ -107,6 +107,7 @@
  ("on-screen"   :subtree 
"https://github.com/michael-heerdegen/on-screen.el.git";)
  ("pabbrev" :external "https://github.com/phillord/pabbrev.git";)
  ("parsec"  :subtree 
"https://github.com/cute-jumper/parsec.el.git";)
+ ("peg":external) ;Was in 
"https://github.com/ellerh/peg.el";
  ("pinentry"   :subtree "https://github.com/ueno/pinentry-el.git";)
  ("posframe"   :external "https://github.com/tumashu/posframe";)
  ("psgml"   :external "https://github.com/lenst/psgml.git";)



[elpa] externals/peg 2fa278b: * peg.el (merge-error): Don't use add-to-list on a local var

2019-03-10 Thread Stefan Monnier
branch: externals/peg
commit 2fa278b595bbad3e40862d2a6786937bf93dc2a0
Author: Stefan Monnier 
Commit: Stefan Monnier 

* peg.el (merge-error): Don't use add-to-list on a local var

Fix remaining uses of `cl` and some compiler warnings
---
 .gitignore |   3 +
 peg.el | 186 -
 2 files changed, 100 insertions(+), 89 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..9f246e4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.elc
+peg-autoloads.el
+peg-pkg.el
diff --git a/peg.el b/peg.el
index 2d3773f..8f238f1 100644
--- a/peg.el
+++ b/peg.el
@@ -609,24 +609,24 @@ input.  PATH is the list of rules that we have visited so 
far."
   (peg-detect-cycles exp path)
   t)
 
-(peg-add-method detect-cycles any   (path)   nil)
-(peg-add-method detect-cycles char  (path c) nil)
-(peg-add-method detect-cycles set   (path r c k) nil)
-(peg-add-method detect-cycles range (path c1 c2) nil)
-(peg-add-method detect-cycles str   (path s) (equal s ""))
-(peg-add-method detect-cycles null  (path)   t)
-(peg-add-method detect-cycles fail  (path)   nil)
-(peg-add-method detect-cycles bob   (path)   t)
-(peg-add-method detect-cycles eob   (path)   t)
-(peg-add-method detect-cycles bol   (path)   t)
-(peg-add-method detect-cycles eol   (path)   t)
-(peg-add-method detect-cycles bow   (path)   t)
-(peg-add-method detect-cycles eow   (path)   t)
-(peg-add-method detect-cycles bos   (path)   t)
-(peg-add-method detect-cycles eos   (path)   t)
-(peg-add-method detect-cycles = (path s) nil)
-(peg-add-method detect-cycles syntax-class (p n) nil)
-(peg-add-method detect-cycles action (path form) t)
+(peg-add-method detect-cycles any   (_path)  nil)
+(peg-add-method detect-cycles char  (_path _c)   nil)
+(peg-add-method detect-cycles set   (_path _r _c _k) nil)
+(peg-add-method detect-cycles range (_path _c1 _c2)  nil)
+(peg-add-method detect-cycles str   (_path s)(equal s ""))
+(peg-add-method detect-cycles null  (_path)  t)
+(peg-add-method detect-cycles fail  (_path)  nil)
+(peg-add-method detect-cycles bob   (_path)  t)
+(peg-add-method detect-cycles eob   (_path)  t)
+(peg-add-method detect-cycles bol   (_path)  t)
+(peg-add-method detect-cycles eol   (_path)  t)
+(peg-add-method detect-cycles bow   (_path)  t)
+(peg-add-method detect-cycles eow   (_path)  t)
+(peg-add-method detect-cycles bos   (_path)  t)
+(peg-add-method detect-cycles eos   (_path)  t)
+(peg-add-method detect-cycles = (_path _s)   nil)
+(peg-add-method detect-cycles syntax-class (_p _n)   nil)
+(peg-add-method detect-cycles action (_path _form)   t)
 
 (peg-define-method-table merge-error)
 
@@ -649,28 +649,35 @@ input.  PATH is the list of rules that we have visited so 
far."
   (peg-merge-error e1 merged))
 
 (peg-add-method merge-error str (merged str)
-  (add-to-list 'merged str))
+  ;;(add-to-list 'merged str)
+  (cl-adjoin str merged :test #'equal))
 
 (peg-add-method merge-error call (merged rule)
-  (add-to-list 'merged rule))
+  ;; (add-to-list 'merged rule)
+  (cl-adjoin rule merged :test #'equal))
 
 (peg-add-method merge-error char (merged char)
-  (add-to-list 'merged (string char)))
+  ;; (add-to-list 'merged (string char))
+  (cl-adjoin (string char) merged :test #'equal))
 
 (peg-add-method merge-error set (merged r c k)
-  (add-to-list 'merged (peg-make-charset-regexp r c k)))
+  ;; (add-to-list 'merged (peg-make-charset-regexp r c k))
+  (cl-adjoin (peg-make-charset-regexp r c k) merged :test #'equal))
 
 (peg-add-method merge-error range (merged from to)
-  (add-to-list 'merged (format "[%c-%c]" from to)))
+  ;; (add-to-list 'merged (format "[%c-%c]" from to))
+  (cl-adjoin (format "[%c-%c]" from to) merged :test #'equal))
 
 (peg-add-method merge-error * (merged exp)
   (peg-merge-error exp merged))
 
 (peg-add-method merge-error any (merged)
-  (add-to-list 'merged '(any)))
+  ;; (add-to-list 'merged '(any))
+  (cl-adjoin '(any) merged :test #'equal))
 
 (peg-add-method merge-error not (merged x)
-  (add-to-list 'merged `(not ,x)))
+  ;; (add-to-list 'merged `(not ,x))
+  (cl-adjoin `(not ,x) merged :test #'equal))
 
 (peg-add-method merge-error action (merged _) merged)
 (peg-add-method merge-error null (merged) merged)
@@ -699,83 +706,85 @@ resp. succeded instead of signaling an error."
 
 (defun peg-test ()
   (interactive)
-  (assert (peg-parse-string ((s "a")) "a" t))
-  (assert (not (peg-parse-string ((s "a")) "b" t)))
-  (assert (peg-parse-string ((s (not "a"))) "b" t))
-  (assert (not (peg-parse-string ((s (not "a"))) "a" t)))
-  (assert (peg-parse-string ((s (if "a"))) "a" t))
-  (assert (not (peg-parse-string ((s (if "a"))) "b" t)))
-  (assert (peg-parse-string ((s "ab")) "ab" t))
-  (assert (not (peg-parse-string ((s "ab")) "ba" t)))
-  (assert (not (peg-parse-st

[elpa] master 5436d24: In packages/ada-ref-man: fix dir, bump version

2019-03-10 Thread Stephen Leake
branch: master
commit 5436d2486e475fc91f16682697a692e21387e22d
Author: Stephen Leake 
Commit: Stephen Leake 

In packages/ada-ref-man: fix dir, bump version
---
 packages/ada-ref-man/NEWS   | 6 ++
 packages/ada-ref-man/ada-ref-man.el | 2 +-
 packages/ada-ref-man/dir| 6 ++
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/packages/ada-ref-man/NEWS b/packages/ada-ref-man/NEWS
index 41f264d..428d2ab 100644
--- a/packages/ada-ref-man/NEWS
+++ b/packages/ada-ref-man/NEWS
@@ -4,6 +4,12 @@ Copyright (C) 2018 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 
+* 2012.5
+3 Mar 2019
+
+** Fix 'dir' file; it refered to arm2005, which is no longer in this
+   package.
+
 * 2012.4
 16 Sep 2018
 
diff --git a/packages/ada-ref-man/ada-ref-man.el 
b/packages/ada-ref-man/ada-ref-man.el
index 9193399..7c7cbf7 100644
--- a/packages/ada-ref-man/ada-ref-man.el
+++ b/packages/ada-ref-man/ada-ref-man.el
@@ -7,7 +7,7 @@
 ;; Keywords: languages
 ;;  ada
 ;; Package-Type: multi
-;; Version: 2012.4
+;; Version: 2012.5
 ;; url: http://stephe-leake.org/ada/arm.html
 
 ;;; ada-ref-man.el ends here
diff --git a/packages/ada-ref-man/dir b/packages/ada-ref-man/dir
index 8957649..06fae3a 100644
--- a/packages/ada-ref-man/dir
+++ b/packages/ada-ref-man/dir
@@ -15,7 +15,5 @@ File: dir,Node: Top   This is the top of the INFO tree
 * Menu:
 
 GNU Ada tools
-* Ada Reference Manual: (arm2005).
-* Ada Reference Manual TC1: (arm2012).
-* Annotated ARM: (arm2005).
-* Annotated ARM TC1: (arm2012).
+* Ada Reference Manual: (arm2012).
+* Annotated ARM: (aarm2012).