[elpa] externals/eev updated (e500a22059 -> e7b7f3fbb5)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch externals/eev.

  from  e500a22059 Added `find-advicebefore-links'.
   new  a2726972b9 Added more info to the videos. Try: (find-1stclassvideos)
   new  e7b7f3fbb5 Made `find-1stclassvideos' interactive. Try: M-x 
find-1stclassvideos


Summary of changes:
 ChangeLog   |  16 
 VERSION |   4 +-
 eev-compose-hash.el |  21 ++---
 eev-elinks.el   |  31 ++--
 eev-intro.el|   9 ++-
 eev-tlinks.el   |  70 -
 eev-videolinks.el   | 218 
 eev.el  |   2 +-
 8 files changed, 279 insertions(+), 92 deletions(-)



[elpa] externals/repology e1df51e1c5: repology-utils: Handle colorization with missing information

2022-02-11 Thread Nicolas Goaziou
branch: externals/repology
commit e1df51e1c575498cab8907296786e2040cbb1654
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

repology-utils: Handle colorization with missing information

* repology-utils.el (repology-package-colorized-status):
(repology-package-colorized-version): When trying to colorize nil,
return "-" instead of raising an error or returning nil.
---
 repology-utils.el | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/repology-utils.el b/repology-utils.el
index bd7877ba69..d4f5fd0264 100644
--- a/repology-utils.el
+++ b/repology-utils.el
@@ -132,17 +132,20 @@ Return PACKAGE's repository internal name if the full 
name is unknown."
 (defun repology-package-colorized-status (package)
   "Return colorized status string for PACKAGE.
 The version string is emphasized according to PACKAGE's status.
-Return nil if PACKAGE has no status field."
+Return \"-\" if PACKAGE has no status field."
   (let ((status (repology-package-field package 'status)))
-(and (stringp status)
- (propertize status 'face (repology--package-status-face package)
+(if (stringp status)
+(propertize status 'face (repology--package-status-face package))
+  "-")))
 
 (defun repology-package-colorized-version (package)
   "Return colorized version string for PACKAGE.
-The version string is emphasized according to PACKAGE's status."
-  (propertize (repology-package-field package 'version)
-  'face
-  (repology--package-status-face package)))
+The version string is emphasized according to PACKAGE's status.
+Return \"-\" if PACKAGE has no version field."
+  (let ((version (repology-package-field package 'version)))
+(if (stringp version)
+(propertize version 'face (repology--package-status-face package))
+  "-")))
 
 
 ;;; Projects



[elpa] externals/tempel 842f095640: Implement pre and post expansion (Fix #22)

2022-02-11 Thread ELPA Syncer
branch: externals/tempel
commit 842f095640de7752140be353b4c146e35560fbd5
Author: Daniel Mendler 
Commit: Daniel Mendler 

Implement pre and post expansion (Fix #22)

Examples:

(elisp "#+begin_src emacs-lisp" n> r> n "#+end_src"
   :post (progn (tempel-done) (org-edit-src-code)))

(pre-post (message "snippet")
  :pre (message "pre") :post (message "post"))
---
 README.org |  7 +--
 tempel.el  | 64 ++
 2 files changed, 40 insertions(+), 31 deletions(-)

diff --git a/README.org b/README.org
index 2911cc5404..856defea64 100644
--- a/README.org
+++ b/README.org
@@ -95,7 +95,9 @@ The templates are defined in a Lisp file which is stored by 
default in the
 ~user-emacs-directory~ (=~/.config/emacs/templates=). The templates are 
grouped by
 major mode with an optional ~:condition~. Each template is a list in the 
concise
 form of the Emacs Tempo syntax. The first element of each list is the name of
-the template. Behind the name, the Tempo syntax elements follow.
+the template. Behind the name, the Tempo syntax elements follow. Pre- and
+post-expansion operations can be specified per template by the optional keys
+=:pre= and =:post=.
 
 #+begin_src emacs-lisp
   ;; -*- mode: lisp -*-
@@ -179,7 +181,8 @@ the template. Behind the name, the Tempo syntax elements 
follow.
   (comment "#+begin_comment" n> r> n> "#+end_comment")
   (verse "#+begin_verse" n> r> n> "#+end_verse")
   (src "#+begin_src " p n> r> n> "#+end_src")
-  (elisp "#+begin_src emacs-lisp" n> r> n "#+end_src")
+  (elisp "#+begin_src emacs-lisp" n> r> n "#+end_src"
+ :post (progn (tempel-done) (org-edit-src-code)))
 #+end_src
 
 * Template syntax
diff --git a/tempel.el b/tempel.el
index b2fe93fb7c..d1de0bd352 100644
--- a/tempel.el
+++ b/tempel.el
@@ -318,35 +318,41 @@ PROMPT is the optional prompt/default value."
 
 (defun tempel--insert (template region)
   "Insert TEMPLATE given the current REGION."
-  ;; TODO do we want to have the ability to reactivate snippets?
-  (unless (eq buffer-undo-list t)
-(push (list 'apply #'tempel--disable) buffer-undo-list))
-  (setf (alist-get 'tempel--active minor-mode-overriding-map-alist) tempel-map)
-  (save-excursion
-;; Split existing overlays, do not expand within existing field.
-;; TODO This will be causing issues. Think more about nested expansion.
-(dolist (st tempel--active)
-  (dolist (ov (car st))
-(when (and (<= (overlay-start ov) (point)) (>= (overlay-end ov) 
(point)))
-  (setf (overlay-end ov) (point)
-;; Activate template
-(let ((st (cons nil nil))
-  (inhibit-modification-hooks t))
-  (push (make-overlay (point) (point)) (car st))
-  (overlay-put (caar st) 'face 'cursor) ;; TODO debug
-  (dolist (elt template) (tempel--element st region elt))
-  (push (make-overlay (point) (point) nil t t) (car st))
-  (overlay-put (caar st) 'face 'cursor) ;; TODO debug
-  (push st tempel--active)))
-  (if (cddaar tempel--active)
-  (unless (cl-loop for ov in (caar tempel--active)
-   thereis (and (overlay-get ov 'tempel--state)
-(eq (point) (overlay-start ov
-;; Jump to first field
-(tempel-next 1))
-;; Disable right away
-(goto-char (overlay-start (caaar tempel--active)))
-(tempel--disable)))
+  (let ((plist template))
+(while (and plist (not (keywordp (car plist
+  (pop plist))
+(eval (plist-get plist :pre) 'lexical)
+;; TODO do we want to have the ability to reactivate snippets?
+(unless (eq buffer-undo-list t)
+  (push (list 'apply #'tempel--disable) buffer-undo-list))
+(setf (alist-get 'tempel--active minor-mode-overriding-map-alist) 
tempel-map)
+(save-excursion
+  ;; Split existing overlays, do not expand within existing field.
+  ;; TODO This will be causing issues. Think more about nested expansion.
+  (dolist (st tempel--active)
+(dolist (ov (car st))
+  (when (and (<= (overlay-start ov) (point)) (>= (overlay-end ov) 
(point)))
+(setf (overlay-end ov) (point)
+  ;; Activate template
+  (let ((st (cons nil nil))
+(inhibit-modification-hooks t))
+(push (make-overlay (point) (point)) (car st))
+(overlay-put (caar st) 'face 'cursor) ;; TODO debug
+(while (and template (not (keywordp (car template
+  (tempel--element st region (pop template)))
+(push (make-overlay (point) (point) nil t t) (car st))
+(overlay-put (caar st) 'face 'cursor) ;; TODO debug
+(push st tempel--active)))
+(if (cddaar tempel--active)
+(unless (cl-loop for ov in (caar tempel--active)
+ thereis (and (overlay-get ov 'tempel--state)
+  (eq (point) (overlay-start ov
+  ;; Jump to first field
+  (tempel-next

[elpa] externals/repology 2f8f866cfd: repology: Add `repology-collect-projects'

2022-02-11 Thread Nicolas Goaziou
branch: externals/repology
commit 2f8f866cfd21e2a9b0d3c4da84adb3c8e705f9ea
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

repology: Add `repology-collect-projects'

* repology.el (repology-collect-projects): New function.
---
 repology.el | 29 +
 1 file changed, 29 insertions(+)

diff --git a/repology.el b/repology.el
index 3cc224f973..2267a9b1ed 100644
--- a/repology.el
+++ b/repology.el
@@ -515,6 +515,35 @@ according to the value of `repology-free-projects-only'."
   (lambda (p) (eq t (repology-check-freedom p
 result)
 
+;;;###autoload
+(defun repology-collect-projects (names)
+  "Collect a list of Repology projects by their name.
+
+NAMES is a list of project names, as strings.
+
+Project names can also be a list of strings. In that case, the
+project is named after the first element of the list and packages
+associated to subsequent names are merged into it, as if all were
+a single project.  This is useful when Repology has multiple names
+from the same project, or when you want the project to be
+displayed under a different name than Repology's.
+
+Return a list of Repology projects, in the order specified in
+NAMES."
+  (mapcar (lambda (name)
+(let* ((project
+(pcase name
+  (`(,project . ,_) project)
+  (_ name)))
+   (packages
+(cond
+ ((listp name)
+  (seq-mapcat #'repology-lookup-project name))
+ (t
+  (repology-lookup-project name)
+  (repology-project-create project packages)))
+  names))
+
 ;;;###autoload
 (defun repology-report-problems (repository)
   "List problems related to REPOSITORY.



[nongnu] elpa/cider f3309c3886 7/7: [Docs] describe effect of cider-show-error-buffer

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit f3309c3886eb04ed2489b6f452b6b7cda182f72c
Author: Quek Yu Han 
Commit: Bozhidar Batsov 

[Docs] describe effect of cider-show-error-buffer
---
 doc/modules/ROOT/pages/usage/dealing_with_errors.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc 
b/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc
index 6e7314843b..d016be6808 100644
--- a/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc
+++ b/doc/modules/ROOT/pages/usage/dealing_with_errors.adoc
@@ -15,7 +15,8 @@ TIP: Use kbd:[q] to quickly close an error buffer.
 
 By default, when an exception occurs, CIDER will display the exception
 in an error buffer using `cider-stacktrace-mode`. You can suppress
-this behavior, however:
+this behavior, which causes just the error message to be output as a
+temporary overlay or in the echo area:
 
 [source,lisp]
 



[nongnu] elpa/cider 50020cb2e4 1/7: Force default face on eval result overlays

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit 50020cb2e47f21c58d776c8f9fd4844b3d47eafc
Author: yuhan0 
Commit: Bozhidar Batsov 

Force default face on eval result overlays
---
 cider-overlays.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cider-overlays.el b/cider-overlays.el
index adb0463080..84954e3f0e 100644
--- a/cider-overlays.el
+++ b/cider-overlays.el
@@ -210,7 +210,9 @@ overlay."
   (pcase cider-result-overlay-position
 ('at-eol (line-end-position))
 ('at-point (point)
-   (display-string (format format value))
+   ;; Specify `default' face, otherwise unformatted text will
+   ;; inherit the face of the following text.
+   (display-string (format (propertize format 'face 'default) 
value))
(o nil))
   (remove-overlays beg end 'category type)
   (funcall (if cider-overlays-use-font-lock



[nongnu] elpa/cider 0a12a11c93 4/7: Display interactive overlays in eval-up-to-point functions

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit 0a12a11c93a256c35776c18f081d0a9bbdc905ca
Author: yuhan0 
Commit: Bozhidar Batsov 

Display interactive overlays in eval-up-to-point functions
---
 cider-eval.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cider-eval.el b/cider-eval.el
index e9d9c02225..f41e122014 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -1209,7 +1209,7 @@ buffer.  It constructs an expression to eval in the 
following manner:
 (cider-interactive-eval code
 (when output-to-current-buffer
   (cider-eval-print-handler))
-nil
+(list beg-of-defun (point))
 (cider--nrepl-pr-request-map
 
 (defun cider--matching-delimiter (delimiter)
@@ -1240,7 +1240,7 @@ buffer.  It constructs an expression to eval in the 
following manner:
 (cider-interactive-eval code
 (when output-to-current-buffer
   (cider-eval-print-handler))
-nil
+(list beg-of-sexp (point))
 (cider--nrepl-pr-request-map
 
 (defun cider-pprint-eval-defun-at-point (&optional output-to-current-buffer)



[nongnu] elpa/cider 59aac64262 3/7: Display interactive eval errors as overlays

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit 59aac642626c65bcfa67771f552ed7f74fd00fcb
Author: yuhan0 
Commit: Bozhidar Batsov 

Display interactive eval errors as overlays

When the error buffer is disabled, there is no other indication that an 
error
occured
---
 cider-eval.el | 6 +-
 cider-overlays.el | 9 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/cider-eval.el b/cider-eval.el
index 45dd7ffbdd..e9d9c02225 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -727,7 +727,11 @@ when `cider-auto-inspect-after-eval' is non-nil."
  (lambda (_buffer out)
(cider-emit-interactive-eval-output out))
  (lambda (_buffer err)
-   (cider-emit-interactive-eval-err-output err)
+   (unless cider-show-error-buffer
+ ;; Display errors as temporary overlays
+ (let ((cider-result-use-clojure-font-lock 
nil))
+   (cider--display-interactive-eval-result
+err end 'cider-error-overlay-face)))
(cider-handle-compilation-errors err 
eval-buffer))
  (when (and cider-auto-inspect-after-eval
 (boundp 'cider-inspector-buffer)
diff --git a/cider-overlays.el b/cider-overlays.el
index 577dd3c445..060a77b6c3 100644
--- a/cider-overlays.el
+++ b/cider-overlays.el
@@ -42,6 +42,15 @@ applied with lower priority than the syntax highlighting."
   :group 'cider
   :package-version '(cider "0.9.1"))
 
+(defface cider-error-overlay-face
+  'class color) (background light))
+ :background "orange red")
+(((class color) (background dark))
+ :background "firebrick"))
+  "Like `cider-result-overlay-face', but for evaluation errors."
+  :group 'cider
+  :package-version '(cider "0.25.0"))
+
 (defcustom cider-result-use-clojure-font-lock t
   "If non-nil, interactive eval results are font-locked as Clojure code."
   :group 'cider



[nongnu] elpa/cider 20a69c76a5 6/7: Update changelog

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit 20a69c76a537fcc07d5cd4e76537a231aa694462
Author: Quek Yu Han 
Commit: Bozhidar Batsov 

Update changelog
---
 CHANGELOG.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e6f58c7d7..c39f6f0d49 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
 
 * [#3127](https://github.com/clojure-emacs/cider/pull/3040): Strip all 
exec-opts flags (`-A` `-M` `-T` `-X`) if they exist in 
`cider-clojure-cli-aliases`. Also addresses a duplicate `:` in the generated 
`clj` command.
 * Enable `cider-enrich-classpath` by default.
+* [#3148](https://github.com/clojure-emacs/cider/pull/3148): Display error 
messages in multiline comment eval results, and in result overlays when 
`cider-show-error-buffer` is set to nil.
 
 ### Bugs fixed
 
@@ -13,6 +14,7 @@
   * Remember: at the moment the enrich-classpath is disabled by default. It 
will soon be enabled again. If you wish to try it out, you can customize 
`cider-enrich-classpath` to `t`.
   * Also remember: for it to work, on Linux, you'll also have to do something 
like `sudo apt install openjdk-11-source` (depending on your package manager 
and JDK of choice).
 * [#3145](https://github.com/clojure-emacs/cider/pull/3145): Allow fallback to 
other `xref` backends if cider-nrepl is not loaded.
+* [#3148](https://github.com/clojure-emacs/cider/pull/3148): Fix eval result 
overlays at point inheriting the faces of following text.
 
 ## 1.2.0 (2021-12-22)
 



[nongnu] elpa/cider 76b5f602aa 2/7: Add optional face argument to eval overlays

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit 76b5f602aa64c63ce480b511c3966040b224801f
Author: yuhan0 
Commit: Bozhidar Batsov 

Add optional face argument to eval overlays
---
 cider-overlays.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cider-overlays.el b/cider-overlays.el
index 84954e3f0e..577dd3c445 100644
--- a/cider-overlays.el
+++ b/cider-overlays.el
@@ -262,9 +262,11 @@ overlay."
 
 
 ;;; Displaying eval result
-(defun cider--display-interactive-eval-result (value &optional point)
+(defun cider--display-interactive-eval-result (value &optional point 
overlay-face)
   "Display the result VALUE of an interactive eval operation.
 VALUE is syntax-highlighted and displayed in the echo area.
+OVERLAY-FACE is the face applied to the overlay, which defaults to
+`cider-result-overlay-face' if nil.
 If POINT and `cider-use-overlays' are non-nil, it is also displayed in an
 overlay at the end of the line containing POINT.
 Note that, while POINT can be a number, it's preferable to be a marker, as
@@ -276,7 +278,8 @@ focused."
  (used-overlay (when (and point cider-use-overlays)
  (cider--make-result-overlay font-value
:where point
-   :duration cider-eval-result-duration
+   :duration cider-eval-result-duration
+   :prepend-face (or overlay-face 
'cider-result-overlay-face)
 (message
  "%s"
  (propertize (format "%s%s" cider-eval-result-prefix font-value)



[nongnu] elpa/cider updated (e8b582e1f2 -> f3309c3886)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/cider.

  from  e8b582e1f2 Fix changelog typo
   new  50020cb2e4 Force default face on eval result overlays
   new  76b5f602aa Add optional face argument to eval overlays
   new  59aac64262 Display interactive eval errors as overlays
   new  0a12a11c93 Display interactive overlays in eval-up-to-point 
functions
   new  222b3085a6 Print eval errors into multiline comment output
   new  20a69c76a5 Update changelog
   new  f3309c3886 [Docs] describe effect of cider-show-error-buffer


Summary of changes:
 CHANGELOG.md |  2 ++
 cider-eval.el| 13 +
 cider-overlays.el| 20 +---
 .../ROOT/pages/usage/dealing_with_errors.adoc|  3 ++-
 4 files changed, 30 insertions(+), 8 deletions(-)



[nongnu] elpa/cider 222b3085a6 5/7: Print eval errors into multiline comment output

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit 222b3085a683ee33e12107db0409f88588492702
Author: yuhan0 
Commit: Bozhidar Batsov 

Print eval errors into multiline comment output
---
 cider-eval.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cider-eval.el b/cider-eval.el
index f41e122014..75c307de1c 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -819,7 +819,8 @@ COMMENT-POSTFIX is the text to output after the last line."
  (lambda (_buffer value)
(setq res (concat res value)))
  nil
- nil
+ (lambda (_buffer err)
+   (setq res (concat res err)))
  (lambda (buffer)
(with-current-buffer buffer
  (save-excursion



[nongnu] elpa/projectile updated (474cd42df5 -> 0243ad7dc9)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/projectile.

  from  474cd42df5 Add support for preset-based installs in CMake projects.
   new  77570b728e Allow nil values in update-project-type
   new  99b7ff27d1 Allow changing of project type precendence
   new  e5e950edd2 Add documentation for projectile-update-project-type 
changes
   new  0243ad7dc9 Add PR link to changelog for 
projectile-update-project-type changes


Summary of changes:
 CHANGELOG.md |   1 +
 doc/modules/ROOT/pages/projects.adoc |   7 ++-
 projectile.el| 102 --
 test/projectile-test.el  | 103 +--
 4 files changed, 154 insertions(+), 59 deletions(-)



[nongnu] elpa/projectile 77570b728e 1/4: Allow nil values in update-project-type

2022-02-11 Thread ELPA Syncer
branch: elpa/projectile
commit 77570b728e9436d99c95fc93c878605f96ed699e
Author: lWarne 
Commit: Bozhidar Batsov 

Allow nil values in update-project-type
---
 projectile.el   | 82 -
 test/projectile-test.el | 57 --
 2 files changed, 101 insertions(+), 38 deletions(-)

diff --git a/projectile.el b/projectile.el
index 0c02bbb80a..a3399db58f 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2625,16 +2625,14 @@ the properties of the various project types.")
   "Create a single property list from all plists in PLISTS.
 The process starts by copying the first list, and then setting properties
 from the other lists.  Settings in the last list are the most significant
-ones and overrule settings in the other lists.  nil values are ignored in
-all but the first plist."
+ones and overrule settings in the other lists."
   (let ((rtn (copy-sequence (pop plists)))
 p v ls)
 (while plists
   (setq ls (pop plists))
   (while ls
-(setq p (pop ls) v (pop ls))
-(when v
-  (setq rtn (plist-put rtn p v)
+   (setq p (pop ls) v (pop ls))
+   (setq rtn (plist-put rtn p v
 rtn))
 
 (cl-defun projectile--build-project-plist
@@ -2671,10 +2669,6 @@ test/impl/other files as below:
  'install-command install
  'package-command package
  'run-command run)))
-;; There is no way for the function to distinguish between an
-;; explicit argument of nil and an omitted argument. However, the
-;; body of the function is free to consider nil an abbreviation
-;; for some other meaningful value
 (when (and project-file (not (member project-file 
projectile-project-root-files)))
   (add-to-list 'projectile-project-root-files project-file))
 (when test-suffix
@@ -2734,8 +2728,22 @@ test/impl/other files as below:
   projectile-project-types)))
 
 (cl-defun projectile-update-project-type
-(project-type &key marker-files project-file compilation-dir configure 
compile install package test run test-suffix test-prefix src-dir test-dir 
related-files-fn)
-  "Update an existing projectile project type.
+(project-type
+ &key (marker-files nil marker-files-specified)
+ (project-file nil project-file-specified)
+ (compilation-dir nil compilation-dir-specified)
+ (configure nil configure-specified)
+ (compile nil compile-specified)
+ (install nil install-specified)
+ (package nil package-specified)
+ (test nil test-specified)
+ (run nil run-specified)
+ (test-suffix nil test-suffix-specified)
+ (test-prefix nil test-prefix-specified)
+ (src-dir nil src-dir-specified)
+ (test-dir nil test-dir-specified)
+ (related-files-fn nil related-files-fn-specified))
+"Update an existing projectile project type.
 
 Non-nil passed items will override existing values for the project type given
 by PROJECT-TYPE.  Raise an error if PROJECT-TYPE is not already registered
@@ -2764,35 +2772,39 @@ test/impl/other files as below:
 CUSTOM-FUNCTION accepts FILE as relative path from the project root and 
returns
 a plist containing :test, :impl or :other as key and the relative 
path/paths or
 predicate as value.  PREDICATE accepts a relative path as the input."
-  (if-let ((existing-project-plist
-(cl-find-if
- (lambda (p) (eq project-type (car p))) projectile-project-types))
+(let* ((existing-project-plist
+(or (cl-find-if
+ (lambda (p) (eq project-type (car p))) 
projectile-project-types)
+(error "No existing project found for: %s" project-type)))
(new-plist
-(projectile--build-project-plist
- marker-files
- :project-file project-file
- :compilation-dir compilation-dir
- :configure configure
- :compile compile
- :install install
- :package package
- :test test
- :run run
- :test-suffix test-suffix
- :test-prefix test-prefix
- :src-dir src-dir
- :test-dir test-dir
- :related-files-fn related-files-fn))
+(append
+ (when marker-files-specified `(marker-files ,marker-files))
+ (when project-file-specified `(project-file ,project-file))
+ (when compilation-dir-specified `(compilation-dir 
,compilation-dir))
+ (when configure-specified `(configure-command ,configure))
+ (when compile-specified `(compile-command ,compile))
+ (when test-specified `(test-command ,test))
+ (when install-specified `(install-command ,install))
+ (when package-specified `(package-command ,package))
+ (when run-specified `(run-command ,run))
+ (when test-suffix-speci

[nongnu] elpa/projectile 0243ad7dc9 4/4: Add PR link to changelog for projectile-update-project-type changes

2022-02-11 Thread ELPA Syncer
branch: elpa/projectile
commit 0243ad7dc96072126fc6c23e48184a0419bab028
Author: lWarne 
Commit: Bozhidar Batsov 

Add PR link to changelog for projectile-update-project-type changes
---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc4cfa68e5..d8884fc46d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,7 @@
 
 ### New features
 
-* Allow `projectile-update-project-type` to change project type precendence 
and remove project options.
+* [#1745](https://github.com/bbatsov/projectile/pull/1745) Allow 
`projectile-update-project-type` to change project type precendence and remove 
project options.
 * [#1699](https://github.com/bbatsov/projectile/pull/1699): 
`projectile-ripgrep` now supports [`rg.el`](https://github.com/dajva/rg.el).
 * [#1712](https://github.com/bbatsov/projectile/issues/1712): Make it possible 
to hide Projectile's menu. See `projectile-show-menu`.
 * [#1718](https://github.com/bbatsov/projectile/issues/1718): Add a project 
type definition for `GNUMakefile`.



[nongnu] elpa/projectile 99b7ff27d1 2/4: Allow changing of project type precendence

2022-02-11 Thread ELPA Syncer
branch: elpa/projectile
commit 99b7ff27d1b9b328914bdfcb5caac6fb08c0e184
Author: lWarne 
Commit: Bozhidar Batsov 

Allow changing of project type precendence

Allow changing of project type precendence in
projectile-update-project-type.
---
 projectile.el   | 30 ++-
 test/projectile-test.el | 54 +
 2 files changed, 57 insertions(+), 27 deletions(-)

diff --git a/projectile.el b/projectile.el
index a3399db58f..1e987c9b56 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2729,7 +2729,8 @@ test/impl/other files as below:
 
 (cl-defun projectile-update-project-type
 (project-type
- &key (marker-files nil marker-files-specified)
+ &key precedence
+ (marker-files nil marker-files-specified)
  (project-file nil project-file-specified)
  (compilation-dir nil compilation-dir-specified)
  (configure nil configure-specified)
@@ -2745,10 +2746,14 @@ test/impl/other files as below:
  (related-files-fn nil related-files-fn-specified))
 "Update an existing projectile project type.
 
-Non-nil passed items will override existing values for the project type given
-by PROJECT-TYPE.  Raise an error if PROJECT-TYPE is not already registered
-with projectile.  The arguments to this function are as for
-projectile-register-project-type:
+Passed items will override existing values for the project type given
+by PROJECT-TYPE.  nil can be used to remove a project type attribute.  Raise
+an error if PROJECT-TYPE is not already registered with projectile.  This
+function may also take the keyword argument PRECEDENCE which when set to ‘high’
+will make projectile prioritise this project type over other clashing project
+types, and a value of ‘low’ will make projectile prefer (all) other project
+types by default.  Otherwise, the arguments to this function are as for
+`projectile-register-project-type':
 
 A project type is defined by PROJECT-TYPE, a set of MARKER-FILES,
 and optional keyword arguments:
@@ -2800,11 +2805,16 @@ test/impl/other files as below:
   (cl-flet* ((project-filter (p) (eq project-type (car p)))
  (project-map (p) (if (project-filter p) project-type-elt p)))
 (setq projectile-project-types
-  (mapcar (lambda (p) (if (eq project-type (car p))
-  project-type-elt
-p))
-  projectile-project-types))
-  (error "No existing project found for: %s" project-type)))
+  (if precedence
+  (let ((filtered-types
+   (cl-remove-if #'project-filter 
projectile-project-types)))
+(setq projectile-project-type-cache (make-hash-table))
+(cond ((eq precedence 'high)
+   (cons project-type-elt filtered-types))
+  ((eq precedence 'low)
+   (append filtered-types (list project-type-elt)))
+  (t (error "Precendence must be one of '(high 
low)"
+(mapcar #'project-map projectile-project-types))
 
 (defun projectile-cabal-project-p ()
   "Check if a project contains *.cabal files but no stack.yaml file."
diff --git a/test/projectile-test.el b/test/projectile-test.el
index c3e544e86d..bd86763e55 100644
--- a/test/projectile-test.el
+++ b/test/projectile-test.el
@@ -185,23 +185,23 @@ Just delegates OPERATION and ARGS for all operations 
except for`shell-command`'.
 
 (describe "projectile-update-project-type"
   :var ((mock-projectile-project-types
-   '((foo marker-files "marker-file"
-  project-file "project-file"
-  compilation-dir "compilation-dir"
-  configure-command "configure"
-  compile-command "compile"
-  test-command "test"
-  install-command "install"
-  package-command "package"
-  run-command "run"
+ '((foo marker-files ("marker-file")
+project-file "project-file"
+compilation-dir "compilation-dir"
+configure-command "configure"
+compile-command "compile"
+test-command "test"
+install-command "install"
+package-command "package"
+run-command "run"
   (it "Updates existing project type in projectile-project-types"
 (let ((projectile-project-types mock-projectile-project-types))
   (projectile-update-project-type
'foo
-   :marker-files "marker-file2"
+   :marker-files '("marker-file2")
:test-suffix "suffix")
   (expect projectile-project-types :to-equal
-  '((foo marker-files "marker-file2"
+  '((foo marker-files ("marker-file2")
  project-file "project-file"
  compilation-dir "compilation-

[nongnu] elpa/projectile e5e950edd2 3/4: Add documentation for projectile-update-project-type changes

2022-02-11 Thread ELPA Syncer
branch: elpa/projectile
commit e5e950edd2cc7dacddc6b0c412b0b524525b74a4
Author: lWarne 
Commit: Bozhidar Batsov 

Add documentation for projectile-update-project-type changes
---
 CHANGELOG.md | 1 +
 doc/modules/ROOT/pages/projects.adoc | 7 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1e2a61e59..cc4cfa68e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
 
 ### New features
 
+* Allow `projectile-update-project-type` to change project type precendence 
and remove project options.
 * [#1699](https://github.com/bbatsov/projectile/pull/1699): 
`projectile-ripgrep` now supports [`rg.el`](https://github.com/dajva/rg.el).
 * [#1712](https://github.com/bbatsov/projectile/issues/1712): Make it possible 
to hide Projectile's menu. See `projectile-show-menu`.
 * [#1718](https://github.com/bbatsov/projectile/issues/1718): Add a project 
type definition for `GNUMakefile`.
diff --git a/doc/modules/ROOT/pages/projects.adoc 
b/doc/modules/ROOT/pages/projects.adoc
index cb5e4bc56f..6bfbf4a320 100644
--- a/doc/modules/ROOT/pages/projects.adoc
+++ b/doc/modules/ROOT/pages/projects.adoc
@@ -475,11 +475,12 @@ You can also edit specific options of already existing 
project types:
  :related-files-fn
  (list
   (projectile-related-files-fn-test-with-suffix "scala" "Spec")
-  (projectile-related-files-fn-test-with-suffix "scala" "Test")))
+  (projectile-related-files-fn-test-with-suffix "scala" "Test"))
+ :test-prefix nil
+ :precedence 'high)
 
 
-This will keep all existing options for the `sbt` project type, but change the 
value of the `related-files-fn` option.
-
+This will change the value of the `related-files-fn` option, remove the 
`test-prefix` option and `:precedence 'high` sets the sbt project type to be 
chosen in preference to other potentially clashing project types (a value 
`'low` would do the opposite).
 
 === `:test-dir`/`:src-dir` vs `:related-files-fn`
 



[nongnu] elpa/helm 920a916cf1: Stay at nearest pos with next-error after a revert-buffer

2022-02-11 Thread ELPA Syncer
branch: elpa/helm
commit 920a916cf1dbd312bbacb93a5b4ffe62e70e49a6
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Stay at nearest pos with next-error after a revert-buffer
---
 helm-grep.el | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/helm-grep.el b/helm-grep.el
index acc6f1178f..306c08745e 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -955,8 +955,22 @@ Special commands:
'helm-realvalue line)
   "\n"
   (when (fboundp 'wgrep-cleanup-overlays)
-(wgrep-cleanup-overlays (point-min) (point-max)))
-  (message "Reverting buffer done"
+(wgrep-cleanup-overlays (point-min) (point-max
+(unless (eq major-mode 'helm-grep-mode)
+  (let ((bufname (buffer-name))
+(linum (line-number-at-pos)))
+(with-current-buffer (next-error-find-buffer)
+  (helm-grep-goto-closest-from-linum linum bufname
+(message "Reverting buffer done")))
+
+(defun helm-grep-goto-closest-from-linum (linum bufname)
+  (goto-char (point-min))
+  (catch 'break
+(while (re-search-forward (format "^%s:\\([0-9]+\\):" (regexp-quote 
bufname)) nil t)
+  (let ((numline (string-to-number (match-string 1
+(when (<= (- linum numline) 0)
+  (forward-line -1)
+  (throw 'break nil))
 
 (defun helm-gm-next-file ()
   (interactive)



[nongnu] elpa/helm-core updated (45e2751cfb -> 920a916cf1)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  45e2751cfb Add a next-error revert buffer command
  adds  920a916cf1 Stay at nearest pos with next-error after a revert-buffer

No new revisions were added by this update.

Summary of changes:
 helm-grep.el | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)



[elpa] externals/tempel updated (842f095640 -> 7dd3360af1)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch externals/tempel.

  from  842f095640 Implement pre and post expansion (Fix #22)
   new  d2b4f7ce38 Rename tempel--state to tempel--field
   new  b5e3314c8d Refactor: Use a single overlay for the entire template 
range
   new  7dd3360af1 Add modification hook to range overlay, templates can be 
deleted (Fix #37)


Summary of changes:
 tempel.el | 54 ++
 1 file changed, 30 insertions(+), 24 deletions(-)



[elpa] externals/tempel 7dd3360af1 3/3: Add modification hook to range overlay, templates can be deleted (Fix #37)

2022-02-11 Thread ELPA Syncer
branch: externals/tempel
commit 7dd3360af1a390747632eb9a87be75b79d38cec0
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add modification hook to range overlay, templates can be deleted (Fix #37)
---
 tempel.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/tempel.el b/tempel.el
index 343f74cc2c..2c63f27ead 100644
--- a/tempel.el
+++ b/tempel.el
@@ -177,6 +177,13 @@ REGION are the current region bouns"
   (tempel--delete-word name)
   (tempel--insert template region
 
+(defun tempel--range-modified (ov &rest _)
+  "Range overlay OV modified."
+  (when (= (overlay-start ov) (overlay-end ov))
+(let ((st (overlay-get ov 'tempel--range)))
+  (setq tempel--active (cons st (delq st tempel--active)))
+  (tempel--disable
+
 (defun tempel--field-modified (ov after beg end &optional _len)
   "Update field overlay OV.
 AFTER is non-nil after the modification.
@@ -340,6 +347,8 @@ PROMPT is the optional prompt/default value."
 (while (and template (not (keywordp (car template
   (tempel--element st region (pop template)))
 (push (make-overlay beg (point) nil t) (car st))
+(overlay-put (caar st) 'modification-hooks (list 
#'tempel--range-modified))
+(overlay-put (caar st) 'tempel--range st)
 ;;(overlay-put (caar st) 'face 'region) ;; TODO debug
 (push st tempel--active)))
 (cond



[nongnu] elpa/cider f556d30f68: Add option to remove result overlays after buffer change (#3149)

2022-02-11 Thread ELPA Syncer
branch: elpa/cider
commit f556d30f687cbf20703ccda6f510254bdfa0cb9e
Author: yuhan0 
Commit: GitHub 

Add option to remove result overlays after buffer change (#3149)
---
 CHANGELOG.md  |  1 +
 cider-eval.el |  6 +-
 cider-overlays.el | 24 +--
 doc/modules/ROOT/pages/usage/code_evaluation.adoc | 18 +
 4 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index c39f6f0d49..a911fca758 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
 * [#3127](https://github.com/clojure-emacs/cider/pull/3040): Strip all 
exec-opts flags (`-A` `-M` `-T` `-X`) if they exist in 
`cider-clojure-cli-aliases`. Also addresses a duplicate `:` in the generated 
`clj` command.
 * Enable `cider-enrich-classpath` by default.
 * [#3148](https://github.com/clojure-emacs/cider/pull/3148): Display error 
messages in multiline comment eval results, and in result overlays when 
`cider-show-error-buffer` is set to nil.
+* [#3149](https://github.com/clojure-emacs/cider/pull/3149): Add option 
`'change` to `cider-eval-result-duration`, allowing multiple eval result 
overlays to persist until the next change to the buffer.
 
 ### Bugs fixed
 
diff --git a/cider-eval.el b/cider-eval.el
index 75c307de1c..e0f2e9a791 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -902,7 +902,11 @@ arguments and only proceed with evaluation if it returns 
nil."
 (start (car-safe bounds))
 (end   (car-safe (cdr-safe bounds
 (when (and start end)
-  (remove-overlays start end 'cider-temporary t))
+  ;; NOTE: don't use `remove-overlays' as it splits and leaves behind
+  ;; partial overlays, leading to duplicate eval results in some 
situations.
+  (dolist (ov (overlays-in start end))
+(when (eq (overlay-get ov 'cider-temporary) t)
+  (delete-overlay ov
 (unless (and cider-interactive-eval-override
  (functionp cider-interactive-eval-override)
  (funcall cider-interactive-eval-override form callback 
bounds))
diff --git a/cider-overlays.el b/cider-overlays.el
index 060a77b6c3..95788ad029 100644
--- a/cider-overlays.el
+++ b/cider-overlays.el
@@ -44,9 +44,11 @@ applied with lower priority than the syntax highlighting."
 
 (defface cider-error-overlay-face
   'class color) (background light))
- :background "orange red")
+ :background "orange red"
+ :extend t)
 (((class color) (background dark))
- :background "firebrick"))
+ :background "firebrick"
+ :extend t))
   "Like `cider-result-overlay-face', but for evaluation errors."
   :group 'cider
   :package-version '(cider "0.25.0"))
@@ -98,9 +100,11 @@ If 'at-point, display at the end of the respective sexp."
   "Duration, in seconds, of CIDER's eval-result overlays.
 If nil, overlays last indefinitely.
 If the symbol `command', they're erased after the next command.
+If the symbol `change', they last until the next change to the buffer.
 Also see `cider-use-overlays'."
   :type '(choice (integer :tag "Duration in seconds")
  (const :tag "Until next command" command)
+ (const :tag "Until next buffer change" change)
  (const :tag "Last indefinitely" nil))
   :group 'cider
   :package-version '(cider . "0.10.0"))
@@ -125,10 +129,14 @@ PROPS is a plist of properties and values to add to the 
overlay."
 (push #'cider--delete-overlay (overlay-get o 'modification-hooks))
 o))
 
-(defun cider--remove-result-overlay ()
+(defun cider--remove-result-overlay (&rest _)
   "Remove result overlay from current buffer.
-This function also removes itself from `post-command-hook'."
-  (remove-hook 'post-command-hook #'cider--remove-result-overlay 'local)
+This function also removes itself from `post-command-hook' and
+`after-change-functions'."
+  (let ((hook (pcase cider-eval-result-duration
+(`command 'post-command-hook)
+(`change 'after-change-functions
+(remove-hook hook #'cider--remove-result-overlay 'local))
   (remove-overlays nil nil 'category 'result))
 
 (defun cider--remove-result-overlay-after-command ()
@@ -258,7 +266,11 @@ overlay."
  (add-hook 'post-command-hook
#'cider--remove-result-overlay-after-command
nil 'local)
-   (cider--remove-result-overlay-after-command
+   (cider--remove-result-overlay-after-command)))
+(`change
+ (add-hook 'after-change-functions
+   #'cider--remove-result-overlay
+   nil 'local)))
   (when-let* ((win (get-buffer-window buffer)))
 ;; Left edge is visible.
 (when (and (<= (window-start win) (point) (window-end win))
diff --git a/doc/modules/ROOT/pages/usage/code_evaluation.adoc 
b/doc/modules

[elpa] externals/tempel d2b4f7ce38 1/3: Rename tempel--state to tempel--field

2022-02-11 Thread ELPA Syncer
branch: externals/tempel
commit d2b4f7ce38cfe014c71dbde36a788c023f6173f1
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename tempel--state to tempel--field
---
 tempel.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tempel.el b/tempel.el
index d1de0bd352..b1395e5d2e 100644
--- a/tempel.el
+++ b/tempel.el
@@ -115,7 +115,7 @@ must return a list of templates which apply to the buffer 
or context."
   "List of active templates.
 Each template state is a pair, where the car is a list of overlays and
 the cdr is an alist of variable bindings. The template state is attached
-to each overlay as the property `tempel--state'. Furthermore overlays
+to each overlay as the property `tempel--field'. Furthermore overlays
 may be named with `tempel--name' or carry an evaluatable Lisp expression
 `tempel--form'.")
 
@@ -188,7 +188,7 @@ BEG and END are the boundaries of the modification."
 (delete-region (overlay-start ov) (overlay-end ov)))
;; Update field after modification
(after
-(let ((st (overlay-get ov 'tempel--state)))
+(let ((st (overlay-get ov 'tempel--field)))
   (unless undo-in-progress
 (move-overlay ov (overlay-start ov) (max end (overlay-end ov
   (when-let (name (overlay-get ov 'tempel--name))
@@ -252,7 +252,7 @@ INIT is the optional initial input."
   (insert init)
   (move-overlay ov (overlay-start ov) (point)))
 (tempel--update-mark ov)
-(overlay-put ov 'tempel--state st)
+(overlay-put ov 'tempel--field st)
 (overlay-put ov 'modification-hooks (list #'tempel--field-modified))
 (overlay-put ov 'insert-in-front-hooks (list #'tempel--field-modified))
 (overlay-put ov 'insert-behind-hooks (list #'tempel--field-modified))
@@ -345,7 +345,7 @@ PROMPT is the optional prompt/default value."
 (push st tempel--active)))
 (if (cddaar tempel--active)
 (unless (cl-loop for ov in (caar tempel--active)
- thereis (and (overlay-get ov 'tempel--state)
+ thereis (and (overlay-get ov 'tempel--field)
   (eq (point) (overlay-start ov
   ;; Jump to first field
   (tempel-next 1))
@@ -452,7 +452,7 @@ PROMPT is the optional prompt/default value."
   "Return the field overlay at point."
   (cl-loop for ov in (overlays-in (max (point-min) (1- (point)))
   (min (point-max) (1+ (point
-   thereis (and (overlay-get ov 'tempel--state) ov)))
+   thereis (and (overlay-get ov 'tempel--field) ov)))
 
 (defun tempel-kill ()
   "Kill the field contents."



[elpa] externals/tempel b5e3314c8d 2/3: Refactor: Use a single overlay for the entire template range

2022-02-11 Thread ELPA Syncer
branch: externals/tempel
commit b5e3314c8d9d8a3cda2c546c40f3250904bc08a2
Author: Daniel Mendler 
Commit: Daniel Mendler 

Refactor: Use a single overlay for the entire template range
---
 tempel.el | 37 +
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/tempel.el b/tempel.el
index b1395e5d2e..343f74cc2c 100644
--- a/tempel.el
+++ b/tempel.el
@@ -201,7 +201,7 @@ BEG and END are the boundaries of the modification."
 
 (defun tempel--synchronize-fields (st current)
   "Synchronize fields of ST, except CURRENT overlay."
-  (dolist (ov (car st))
+  (dolist (ov (cdar st))
 (unless (eq ov current)
   (save-excursion
 (goto-char (overlay-start ov))
@@ -330,28 +330,27 @@ PROMPT is the optional prompt/default value."
   ;; Split existing overlays, do not expand within existing field.
   ;; TODO This will be causing issues. Think more about nested expansion.
   (dolist (st tempel--active)
-(dolist (ov (car st))
+(dolist (ov (cdar st))
   (when (and (<= (overlay-start ov) (point)) (>= (overlay-end ov) 
(point)))
 (setf (overlay-end ov) (point)
   ;; Activate template
   (let ((st (cons nil nil))
-(inhibit-modification-hooks t))
-(push (make-overlay (point) (point)) (car st))
-(overlay-put (caar st) 'face 'cursor) ;; TODO debug
+(inhibit-modification-hooks t)
+(beg (point)))
 (while (and template (not (keywordp (car template
   (tempel--element st region (pop template)))
-(push (make-overlay (point) (point) nil t t) (car st))
-(overlay-put (caar st) 'face 'cursor) ;; TODO debug
+(push (make-overlay beg (point) nil t) (car st))
+;;(overlay-put (caar st) 'face 'region) ;; TODO debug
 (push st tempel--active)))
-(if (cddaar tempel--active)
-(unless (cl-loop for ov in (caar tempel--active)
- thereis (and (overlay-get ov 'tempel--field)
-  (eq (point) (overlay-start ov
-  ;; Jump to first field
-  (tempel-next 1))
-  ;; Disable right away
-  (goto-char (overlay-start (caaar tempel--active)))
-  (tempel--disable))
+(cond
+ ((cl-loop for ov in (caar tempel--active)
+   never (overlay-get ov 'tempel--field))
+  (goto-char (overlay-end (caaar tempel--active)))
+  (tempel--disable)) ;; Disable right away
+ ((cl-loop for ov in (caar tempel--active)
+   never (and (overlay-get ov 'tempel--field)
+  (eq (point) (overlay-start ov
+  (tempel-next 1))) ;; Jump to first field
 (eval (plist-get plist :post) 'lexical)))
 
 (defun tempel--save ()
@@ -477,14 +476,12 @@ PROMPT is the optional prompt/default value."
 (defun tempel--beginning ()
   "Return beginning of template markers."
   (and tempel--active
-   (cl-loop for st in tempel--active minimize
-(cl-loop for ov in (car st) minimize (overlay-start ov)
+   (cl-loop for st in tempel--active minimize (overlay-start (caar st)
 
 (defun tempel--end ()
   "Return end of template markers."
   (and tempel--active
-   (cl-loop for st in tempel--active maximize
-(cl-loop for ov in (car st) maximize (overlay-end ov)
+   (cl-loop for st in tempel--active maximize (overlay-end (caar st)
 
 (defun tempel-abort ()
   "Abort template insertion."



[elpa] externals/tempel 9c2302fda6: Move range overlay, fix range overlay position

2022-02-11 Thread ELPA Syncer
branch: externals/tempel
commit 9c2302fda6d3f87e2a4bf0864372af0eef8d0874
Author: Daniel Mendler 
Commit: Daniel Mendler 

Move range overlay, fix range overlay position
---
 tempel.el | 31 ++-
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/tempel.el b/tempel.el
index 2c63f27ead..f26e61b991 100644
--- a/tempel.el
+++ b/tempel.el
@@ -208,14 +208,18 @@ BEG and END are the boundaries of the modification."
 
 (defun tempel--synchronize-fields (st current)
   "Synchronize fields of ST, except CURRENT overlay."
-  (dolist (ov (cdar st))
-(unless (eq ov current)
-  (save-excursion
-(goto-char (overlay-start ov))
-(let (x)
-  (setq x (or (and (setq x (overlay-get ov 'tempel--form)) (eval x 
(cdr st)))
-  (and (setq x (overlay-get ov 'tempel--name)) (alist-get 
x (cdr st)
-  (when x (tempel--replace (overlay-start ov) (overlay-end ov) ov 
x)))
+  (let ((range (caar st)))
+(dolist (ov (cdar st))
+  (unless (eq ov current)
+(save-excursion
+  (goto-char (overlay-start ov))
+  (let (x)
+(setq x (or (and (setq x (overlay-get ov 'tempel--form)) (eval x 
(cdr st)))
+(and (setq x (overlay-get ov 'tempel--name)) 
(alist-get x (cdr st)
+(when x (tempel--replace (overlay-start ov) (overlay-end ov) ov 
x)
+  ;; Move range overlay
+  (move-overlay range (overlay-start range)
+(max (overlay-end range) (overlay-end ov))
 
 (defun tempel--replace (beg end ov str)
   "Replace region beween BEG and END with STR.
@@ -343,13 +347,14 @@ PROMPT is the optional prompt/default value."
   ;; Activate template
   (let ((st (cons nil nil))
 (inhibit-modification-hooks t)
-(beg (point)))
+(range (point)))
 (while (and template (not (keywordp (car template
   (tempel--element st region (pop template)))
-(push (make-overlay beg (point) nil t) (car st))
-(overlay-put (caar st) 'modification-hooks (list 
#'tempel--range-modified))
-(overlay-put (caar st) 'tempel--range st)
-;;(overlay-put (caar st) 'face 'region) ;; TODO debug
+(setq range (make-overlay range (point) nil t))
+(push range (car st))
+(overlay-put range 'modification-hooks (list #'tempel--range-modified))
+(overlay-put range 'tempel--range st)
+;;(overlay-put range 'face 'region) ;; TODO debug
 (push st tempel--active)))
 (cond
  ((cl-loop for ov in (caar tempel--active)



[nongnu] elpa/markdown-mode updated (e591c16c2f -> 8c7b0c4ab4)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/markdown-mode.

  from  e591c16c2f Fix link name
   new  eecf2f20b0 Update for releasing 2.5
   new  8c7b0c4ab4 Start 2.6 development


Summary of changes:
 CHANGES.md   |  4 +++-
 README.md| 10 ++
 markdown-mode.el |  6 +++---
 3 files changed, 12 insertions(+), 8 deletions(-)



[nongnu] elpa/markdown-mode 8c7b0c4ab4 2/2: Start 2.6 development

2022-02-11 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 8c7b0c4ab4483a18c3dc0c44be71630362843fc7
Author: Shohei YOSHIDA 
Commit: Shohei YOSHIDA 

Start 2.6 development
---
 CHANGES.md   | 4 
 markdown-mode.el | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index a2d6813204..0511ef0426 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,7 @@
+# Markdown Mode 2.6
+
+*Under development*
+
 # Markdown Mode 2.5
 
 *   **Breaking changes:**
diff --git a/markdown-mode.el b/markdown-mode.el
index 91f2200cc6..10342fb809 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -1,12 +1,12 @@
 ;;; markdown-mode.el --- Major mode for Markdown-formatted text -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2007-2020 Jason R. Blevins and markdown-mode
+;; Copyright (C) 2007-2022 Jason R. Blevins and markdown-mode
 ;; contributors (see the commit log for details).
 
 ;; Author: Jason R. Blevins 
 ;; Maintainer: Jason R. Blevins 
 ;; Created: May 24, 2007
-;; Version: 2.5
+;; Version: 2.6-dev
 ;; Package-Requires: ((emacs "25.1"))
 ;; Keywords: Markdown, GitHub Flavored Markdown, itex
 ;; URL: https://jblevins.org/projects/markdown-mode/
@@ -55,7 +55,7 @@
 
 ;;; Constants =
 
-(defconst markdown-mode-version "2.5"
+(defconst markdown-mode-version "2.6-dev"
   "Markdown mode version number.")
 
 (defconst markdown-output-buffer-name "*markdown-output*"



[nongnu] elpa/markdown-mode eecf2f20b0 1/2: Update for releasing 2.5

2022-02-11 Thread ELPA Syncer
branch: elpa/markdown-mode
commit eecf2f20b097f9e6a0eaf938af967122fbec35dd
Author: Shohei YOSHIDA 
Commit: Shohei YOSHIDA 

Update for releasing 2.5
---
 CHANGES.md   |  2 --
 README.md| 10 ++
 markdown-mode.el |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 042e915849..a2d6813204 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,7 +1,5 @@
 # Markdown Mode 2.5
 
-*Under development*
-
 *   **Breaking changes:**
 -   `markdown-do` supports following link [GH-666][]
 This changes behavior of `markdown-do` at table
diff --git a/README.md b/README.md
index 4103efefaf..bde33d9b30 100644
--- a/README.md
+++ b/README.md
@@ -13,15 +13,15 @@
   [leanpub-badge]: https://img.shields.io/badge/leanpub-guide-orange.svg
 
 markdown-mode is a major mode for editing [Markdown][]-formatted
-text.  The latest stable version is markdown-mode 2.4, released on
-May 30, 2020.  See the [release notes][] for details.
+text.  The latest stable version is markdown-mode 2.5, released on
+Feb 12, 2022.  See the [release notes][] for details.
 markdown-mode is free software, licensed under the GNU GPL,
 version 3 or later.
 
 ![Markdown Mode 
Screenshot](https://jblevins.org/projects/markdown-mode/screenshots/20170818-001.png)
 
 [Markdown]: http://daringfireball.net/projects/markdown/
-[release notes]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.4
+[release notes]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.5
 
 ## Documentation
 
@@ -108,7 +108,7 @@ to load automatically by adding the following to your init 
file:
 (add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode))
 ```
 
-[markdown-mode.el]: 
https://raw.githubusercontent.com/jrblevin/markdown-mode/v2.4/markdown-mode.el
+[markdown-mode.el]: 
https://raw.githubusercontent.com/jrblevin/markdown-mode/v2.5/markdown-mode.el
 
 **Development Version**
 
@@ -1092,6 +1092,7 @@ first version was released on May 24, 2007.
   * 2017-05-26: [Version 2.2][]
   * 2017-08-31: [Version 2.3][]
   * 2020-05-30: [Version 2.4][]
+  * 2022-02-12: [Version 2.5][]
 
 [Version 1.1]: https://jblevins.org/projects/markdown-mode/rev-1-1
 [Version 1.2]: https://jblevins.org/projects/markdown-mode/rev-1-2
@@ -1108,3 +1109,4 @@ first version was released on May 24, 2007.
 [Version 2.2]: https://jblevins.org/projects/markdown-mode/rev-2-2
 [Version 2.3]: https://jblevins.org/projects/markdown-mode/rev-2-3
 [Version 2.4]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.4
+[Version 2.5]: https://github.com/jrblevin/markdown-mode/releases/tag/v2.5
diff --git a/markdown-mode.el b/markdown-mode.el
index 585dc859af..91f2200cc6 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -6,7 +6,7 @@
 ;; Author: Jason R. Blevins 
 ;; Maintainer: Jason R. Blevins 
 ;; Created: May 24, 2007
-;; Version: 2.5-dev
+;; Version: 2.5
 ;; Package-Requires: ((emacs "25.1"))
 ;; Keywords: Markdown, GitHub Flavored Markdown, itex
 ;; URL: https://jblevins.org/projects/markdown-mode/
@@ -55,7 +55,7 @@
 
 ;;; Constants =
 
-(defconst markdown-mode-version "2.5-dev"
+(defconst markdown-mode-version "2.5"
   "Markdown mode version number.")
 
 (defconst markdown-output-buffer-name "*markdown-output*"



[nongnu] main b24210769c: * elpa-packages (markdown): Set `:news`

2022-02-11 Thread Stefan Monnier via
branch: main
commit b24210769c6c2eef9b0f97c7452ef4a454c0500c
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-packages (markdown): Set `:news`
---
 elpa-packages | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/elpa-packages b/elpa-packages
index 131a7f822d..512effe1c4 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -339,7 +339,7 @@
   :readme "README.md"
   ;; Not needed any more:
   ;; :dont-release "-dev\\'"
-  )
+  :news "CHANGES.md")
 
  ("material-theme" :url "https://github.com/cpaulik/emacs-material-theme";
   :ignored-files ("*.png")
@@ -378,8 +378,6 @@
   :news "CHANGELOG"
   :ignored-files (".github" ".travis.yml" "Makefile" "org-journal.svg" 
"tests"))
 
- ;; FIXME: Upstream has force-pushed, causing divergence, see
- ;; https://github.com/org-mime/org-mime/issues/74
  ("org-mime":url "https://github.com/org-mime/org-mime.git";
   :ignored-files (".travis.yml" "Makefile" "screenshot.png" "test"))
 



[nongnu] elpa/helm-core updated (920a916cf1 -> d1c8ad8e32)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  920a916cf1 Stay at nearest pos with next-error after a revert-buffer
  adds  d1c8ad8e32 Reajust position in helm-occur-mode buffer as well after 
reverting

No new revisions were added by this update.

Summary of changes:
 helm-grep.el | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)



[nongnu] elpa/helm d1c8ad8e32: Reajust position in helm-occur-mode buffer as well after reverting

2022-02-11 Thread ELPA Syncer
branch: elpa/helm
commit d1c8ad8e32ed199c96874eab7ec5a9f0639c204d
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Reajust position in helm-occur-mode buffer as well after reverting

from somewhere else.
---
 helm-grep.el | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/helm-grep.el b/helm-grep.el
index 306c08745e..7b1d303882 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -899,11 +899,18 @@ Accept to revert only `helm-grep-mode' or 
`helm-occur-mode' buffers.
 Use this when you want to revert the `next-error' buffer after
 modifications in `current-buffer'."
   (interactive)
-  (let ((buffer (next-error-find-buffer)))
+  (let ((buffer  (next-error-find-buffer))
+(linum   (line-number-at-pos))
+(bufname (buffer-name)))
 (if buffer
 (with-current-buffer buffer
-  (if (memq major-mode '(helm-grep-mode helm-occur-mode))
-  (revert-buffer)
+  (helm-aif (memq major-mode '(helm-grep-mode helm-occur-mode))
+  (progn (revert-buffer)
+ ;; helm-occur-mode revert fn is synchronous so
+ ;; reajust from here (it is done with
+ ;; helm-grep-mode in its sentinel).
+ (when (eq major-mode (car it))
+   (helm-grep-goto-closest-from-linum linum bufname)))
 (error "No suitable buffer to revert found")))
   (error "No suitable buffer to revert found"
 



[elpa] main ae9243c122: * elpa-packages (transient): Update location of :news file

2022-02-11 Thread Jonas Bernoulli
branch: main
commit ae9243c12203c37a0acbbb4919a5d3ff96555314
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

* elpa-packages (transient): Update location of :news file

That is where it is located in all my other repositories
that have such a file.  Consistency simplifies tooling.
---
 elpa-packages | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index 7d006e9af5..998f6cb542 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -541,7 +541,7 @@
  ("transient"  :url "https://github.com/magit/transient";
   :lisp-dir "lisp"
   :renames (("docs/" ""))
-  :news "docs/CHANGELOG"
+  :news "CHANGELOG"
   :doc "docs/transient.texi")
  ("trie"   :url "http://www.dr-qubit.org/git/predictive.git";)
  ("undo-tree"  :url "https://gitlab.com/tsc25/undo-tree";)



[elpa] externals/transient updated (440a341831 -> 95145311b8)

2022-02-11 Thread Jonas Bernoulli
tarsius pushed a change to branch externals/transient.

  from  440a341831 Hardcode version string for now
   new  b5f451ecb6 Sync .orgconfig with that of other packages
   new  95145311b8 Move CHANGELOG file to top-level


Summary of changes:
 docs/CHANGELOG => CHANGELOG | 0
 docs/.orgconfig | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename docs/CHANGELOG => CHANGELOG (100%)



[elpa] externals/transient 95145311b8 2/2: Move CHANGELOG file to top-level

2022-02-11 Thread Jonas Bernoulli
branch: externals/transient
commit 95145311b8c59ebdada7b3c13c150c056837c698
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Move CHANGELOG file to top-level

That is where it is located in all my other repositories
that have such a file.  Consistency simplifies tooling.
---
 docs/CHANGELOG => CHANGELOG | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/docs/CHANGELOG b/CHANGELOG
similarity index 100%
rename from docs/CHANGELOG
rename to CHANGELOG



[elpa] externals/transient b5f451ecb6 1/2: Sync .orgconfig with that of other packages

2022-02-11 Thread Jonas Bernoulli
branch: externals/transient
commit b5f451ecb681b7cdb74f4ce36bb8757dff03cdeb
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Sync .orgconfig with that of other packages

These changes don't make a difference here.  Consistency is good.
---
 docs/.orgconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/.orgconfig b/docs/.orgconfig
index 06952a1375..138fae42e2 100644
--- a/docs/.orgconfig
+++ b/docs/.orgconfig
@@ -1,6 +1,6 @@
 # -*- mode:org -*-
 
-#+options: H:4 num:4 toc:2
+#+options: H:4 num:3 toc:2 compact-itemx:t
 #+property: header-args :eval never
 
 #+macro: kbd (eval (let ((case-fold-search nil) (regexp (regexp-opt '("SPC" 
"RET" "LFD" "TAB" "BS" "ESC" "DELETE" "SHIFT" "Ctrl" "Meta" "Alt" "Cmd" "Super" 
"UP" "LEFT" "RIGHT" "DOWN") 'words))) (format 
"@@texinfo:@kbd{@@%s@@texinfo:}@@" (replace-regexp-in-string regexp 
"@@texinfo:@key{@@\\&@@texinfo:}@@" $1 t



[nongnu] elpa/git-commit 98bebafa1b: magit-tag-release: Abort if sisyphus-create-release should be used

2022-02-11 Thread ELPA Syncer
branch: elpa/git-commit
commit 98bebafa1b77f4376de578fb64557d63318d53fc
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-tag-release: Abort if sisyphus-create-release should be used

I haven't released that package (yet?).  If it is not available,
then this change has no effect.
---
 lisp/magit-tag.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/lisp/magit-tag.el b/lisp/magit-tag.el
index cf53c0acac..7c3fd0cd6c 100644
--- a/lisp/magit-tag.el
+++ b/lisp/magit-tag.el
@@ -170,6 +170,11 @@ like \"/path/to/foo-bar\"."
   (msg (magit-rev-format "%s"))
   (ver (and (string-match magit-release-commit-regexp msg)
 (match-string 1 msg)))
+  (_   (and (not ver)
+(require (quote sisyphus) nil t)
+(string-match magit-release-commit-regexp
+  (magit-rev-format "%s" ptag))
+(user-error "Use `sisyphus-create-release' first")))
   (tag (if ver
(concat (and (string-match magit-release-tag-regexp ptag)
 (match-string 1 ptag))



[nongnu] elpa/helm f75e1d82be: Add a Commentary header in helm.el

2022-02-11 Thread ELPA Syncer
branch: elpa/helm
commit f75e1d82bec733d077983e56c2bf412df9b4d402
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Add a Commentary header in helm.el
---
 helm.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/helm.el b/helm.el
index 7bacff79a0..91f1bd0e87 100644
--- a/helm.el
+++ b/helm.el
@@ -28,6 +28,10 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see .
 
+;;; Commentary:
+
+;; No commentary.
+
 ;;; Code:
 
 (require 'cl-lib)



[nongnu] elpa/helm-core updated (d1c8ad8e32 -> f75e1d82be)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  d1c8ad8e32 Reajust position in helm-occur-mode buffer as well after 
reverting
  adds  f75e1d82be Add a Commentary header in helm.el

No new revisions were added by this update.

Summary of changes:
 helm.el | 4 
 1 file changed, 4 insertions(+)



[nongnu] elpa/keycast updated (ebe6ea5e4c -> a94f9839ad)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/keycast.

  from  ebe6ea5e4c keycast-substitute-alist: Improve doc-string
   new  98c2dda1a2 Release version 1.2.0
   new  a94f9839ad Resume development


Summary of changes:
 keycast.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[nongnu] elpa/keycast a94f9839ad 2/2: Resume development

2022-02-11 Thread ELPA Syncer
branch: elpa/keycast
commit a94f9839addabc2d491ee5c8927453ae2c5ce0fb
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Resume development
---
 keycast.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/keycast.el b/keycast.el
index e4e83067b1..ca8f791769 100644
--- a/keycast.el
+++ b/keycast.el
@@ -6,7 +6,7 @@
 ;; Homepage: https://github.com/tarsius/keycast
 
 ;; Package-Requires: ((emacs "25.3"))
-;; Package-Version: 1.2.0
+;; Package-Version: 1.2.0-git
 
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 



[nongnu] elpa/keycast 98c2dda1a2 1/2: Release version 1.2.0

2022-02-11 Thread ELPA Syncer
branch: elpa/keycast
commit 98c2dda1a2ca0fc95f7425847a36abad5b31a4c7
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Release version 1.2.0
---
 keycast.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/keycast.el b/keycast.el
index 5e5f5e4579..e4e83067b1 100644
--- a/keycast.el
+++ b/keycast.el
@@ -6,7 +6,7 @@
 ;; Homepage: https://github.com/tarsius/keycast
 
 ;; Package-Requires: ((emacs "25.3"))
-;; Package-Version: 1.1.3
+;; Package-Version: 1.2.0
 
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 



[nongnu] elpa/magit updated (bab9257d7e -> 98bebafa1b)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  bab9257d7e manual: Enable use of itemx globally
  adds  98bebafa1b magit-tag-release: Abort if sisyphus-create-release 
should be used

No new revisions were added by this update.

Summary of changes:
 lisp/magit-tag.el | 5 +
 1 file changed, 5 insertions(+)



[nongnu] elpa/magit-section updated (bab9257d7e -> 98bebafa1b)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  bab9257d7e manual: Enable use of itemx globally
  adds  98bebafa1b magit-tag-release: Abort if sisyphus-create-release 
should be used

No new revisions were added by this update.

Summary of changes:
 lisp/magit-tag.el | 5 +
 1 file changed, 5 insertions(+)



[nongnu] elpa/with-editor updated (1521fe2f55 -> f514f23258)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/with-editor.

  from  1521fe2f55 Sync .orgconfig with that of other packages
   new  a762199d9b Release version 3.2.0
   new  f514f23258 Resume development


Summary of changes:
 docs/with-editor.org  | 4 ++--
 docs/with-editor.texi | 4 ++--
 lisp/with-editor.el   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)



[nongnu] elpa/with-editor a762199d9b 1/2: Release version 3.2.0

2022-02-11 Thread ELPA Syncer
branch: elpa/with-editor
commit a762199d9bb8ee60311eaabf791b3dd64140effd
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Release version 3.2.0
---
 docs/with-editor.org  | 4 ++--
 docs/with-editor.texi | 4 ++--
 lisp/with-editor.el   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/with-editor.org b/docs/with-editor.org
index 409472cdb4..518e003544 100644
--- a/docs/with-editor.org
+++ b/docs/with-editor.org
@@ -7,7 +7,7 @@
 #+texinfo_dir_category: Emacs
 #+texinfo_dir_title: With-Editor: (with-editor).
 #+texinfo_dir_desc: Using the Emacsclient as $EDITOR
-#+subtitle: for version 3.1.1-git
+#+subtitle: for version 3.2.0
 
 #+setupfile: .orgconfig
 
@@ -27,7 +27,7 @@ additional functionality which makes it useful even for 
end-users, who
 don't use Magit or another package which uses it internally.
 
 #+texinfo: @noindent
-This manual is for With-Editor version 3.1.1-git.
+This manual is for With-Editor version 3.2.0.
 
 #+begin_quote
 Copyright (C) 2015-{{{year}}} Jonas Bernoulli 
diff --git a/docs/with-editor.texi b/docs/with-editor.texi
index 96b605497b..b680fef7a3 100644
--- a/docs/with-editor.texi
+++ b/docs/with-editor.texi
@@ -31,7 +31,7 @@ General Public License for more details.
 @finalout
 @titlepage
 @title With-Editor User Manual
-@subtitle for version 3.1.1-git
+@subtitle for version 3.2.0
 @author Jonas Bernoulli
 @page
 @vskip 0pt plus 1filll
@@ -60,7 +60,7 @@ additional functionality which makes it useful even for 
end-users, who
 don't use Magit or another package which uses it internally.
 
 @noindent
-This manual is for With-Editor version 3.1.1-git.
+This manual is for With-Editor version 3.2.0.
 
 @quotation
 Copyright (C) 2015-2022 Jonas Bernoulli 
diff --git a/lisp/with-editor.el b/lisp/with-editor.el
index 83044d40d7..c24ee27c3b 100644
--- a/lisp/with-editor.el
+++ b/lisp/with-editor.el
@@ -11,7 +11,7 @@
 ;; Homepage: https://github.com/magit/with-editor
 
 ;; Package-Requires: ((emacs "24.4"))
-;; Package-Version: 3.1.1-git
+;; Package-Version: 3.2.0
 
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 



[nongnu] elpa/with-editor f514f23258 2/2: Resume development

2022-02-11 Thread ELPA Syncer
branch: elpa/with-editor
commit f514f23258af67a10fc8e1c431bfe94702b6e65b
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Resume development
---
 docs/with-editor.org  | 4 ++--
 docs/with-editor.texi | 4 ++--
 lisp/with-editor.el   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/with-editor.org b/docs/with-editor.org
index 518e003544..b84973371d 100644
--- a/docs/with-editor.org
+++ b/docs/with-editor.org
@@ -7,7 +7,7 @@
 #+texinfo_dir_category: Emacs
 #+texinfo_dir_title: With-Editor: (with-editor).
 #+texinfo_dir_desc: Using the Emacsclient as $EDITOR
-#+subtitle: for version 3.2.0
+#+subtitle: for version 3.2.0-git
 
 #+setupfile: .orgconfig
 
@@ -27,7 +27,7 @@ additional functionality which makes it useful even for 
end-users, who
 don't use Magit or another package which uses it internally.
 
 #+texinfo: @noindent
-This manual is for With-Editor version 3.2.0.
+This manual is for With-Editor version 3.2.0-git.
 
 #+begin_quote
 Copyright (C) 2015-{{{year}}} Jonas Bernoulli 
diff --git a/docs/with-editor.texi b/docs/with-editor.texi
index b680fef7a3..6fad37dcfa 100644
--- a/docs/with-editor.texi
+++ b/docs/with-editor.texi
@@ -31,7 +31,7 @@ General Public License for more details.
 @finalout
 @titlepage
 @title With-Editor User Manual
-@subtitle for version 3.2.0
+@subtitle for version 3.2.0-git
 @author Jonas Bernoulli
 @page
 @vskip 0pt plus 1filll
@@ -60,7 +60,7 @@ additional functionality which makes it useful even for 
end-users, who
 don't use Magit or another package which uses it internally.
 
 @noindent
-This manual is for With-Editor version 3.2.0.
+This manual is for With-Editor version 3.2.0-git.
 
 @quotation
 Copyright (C) 2015-2022 Jonas Bernoulli 
diff --git a/lisp/with-editor.el b/lisp/with-editor.el
index c24ee27c3b..d710e83ebe 100644
--- a/lisp/with-editor.el
+++ b/lisp/with-editor.el
@@ -11,7 +11,7 @@
 ;; Homepage: https://github.com/magit/with-editor
 
 ;; Package-Requires: ((emacs "24.4"))
-;; Package-Version: 3.2.0
+;; Package-Version: 3.2.0-git
 
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 



[nongnu] elpa/git-commit edc593c7c1: magit-log-insert-child-count: Use eq instead of =

2022-02-11 Thread ELPA Syncer
branch: elpa/git-commit
commit edc593c7c112dc6c26244acdd8755900175eaf67
Author: Cameron Chaparro 
Commit: Jonas Bernoulli 

magit-log-insert-child-count: Use eq instead of =

A call to `magit-log-get-commit-limit' can return nil, so make sure
we don't try to compare nil as a number.
---
 lisp/magit-log.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 95e5bdced3..f97c96f65a 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -1863,7 +1863,7 @@ Show the last `magit-log-section-commit-count' commits."
   (when magit-section-show-child-count
 (let ((count (length (oref magit-insert-section--current children
   (when (> count 0)
-(when (= count (magit-log-get-commit-limit))
+(when (eq count (magit-log-get-commit-limit))
   (setq count (format "%s+" count)))
 (save-excursion
   (goto-char (- (oref magit-insert-section--current content) 2))



[nongnu] elpa/magit updated (98bebafa1b -> edc593c7c1)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  98bebafa1b magit-tag-release: Abort if sisyphus-create-release 
should be used
  adds  edc593c7c1 magit-log-insert-child-count: Use eq instead of =

No new revisions were added by this update.

Summary of changes:
 lisp/magit-log.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[nongnu] elpa/magit-section updated (98bebafa1b -> edc593c7c1)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  98bebafa1b magit-tag-release: Abort if sisyphus-create-release 
should be used
  adds  edc593c7c1 magit-log-insert-child-count: Use eq instead of =

No new revisions were added by this update.

Summary of changes:
 lisp/magit-log.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[elpa] externals/orderless updated (ce462a63e3 -> 7ddf5dfe9e)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch externals/orderless.

  from  ce462a63e3 Merge pull request #103 from minad/badges
   new  2eed576588 Generate shorter docstrings
   new  d9bc71d234 Avoid warnings in the generated autoload file
   new  a8582c9560 Merge pull request #107 from minad/fix-28-warnings
   new  7ddf5dfe9e Fix indentation for orderless--separated-by


Summary of changes:
 orderless.el | 23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)



[elpa] externals/orderless 7ddf5dfe9e 4/4: Fix indentation for orderless--separated-by

2022-02-11 Thread ELPA Syncer
branch: externals/orderless
commit 7ddf5dfe9e982ee1510ceec36eeb4d8bb802ea73
Author: Omar Antolín 
Commit: Omar Antolín 

Fix indentation for orderless--separated-by

Thanks for the suggestion in #63, @conao3!

I didn't know (declare (indent 1)) also worked for functions, I
thought it only worked for macros ---I have no idea why I thought that.
---
 orderless.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/orderless.el b/orderless.el
index 67b2afd6b8..6352697247 100644
--- a/orderless.el
+++ b/orderless.el
@@ -186,6 +186,7 @@ This is simply `regexp-quote'.")
 If BEFORE is specified, add it to the beginning of the rx
 sequence.  If AFTER is specified, add it to the end of the rx
 sequence."
+  (declare (indent 1))
   (rx-to-string
`(seq
  ,(or before "")
@@ -199,14 +200,14 @@ sequence."
 This means the characters in COMPONENT must occur in the
 candidate in that order, but not necessarily consecutively."
   (orderless--separated-by '(zero-or-more nonl)
-   (cl-loop for char across component collect char)))
+(cl-loop for char across component collect char)))
 
 (defun orderless-initialism (component)
   "Match a component as an initialism.
 This means the characters in COMPONENT must occur in the
 candidate, in that order, at the beginning of words."
   (orderless--separated-by '(zero-or-more nonl)
-   (cl-loop for char across component collect `(seq word-start ,char
+(cl-loop for char across component collect `(seq word-start ,char
 
 (defun orderless-prefixes (component)
   "Match a component as multiple word prefixes.
@@ -214,8 +215,8 @@ The COMPONENT is split at word endings, and each piece must 
match
 at a word boundary in the candidate.  This is similar to the
 `partial-completion' completion style."
   (orderless--separated-by '(zero-or-more nonl)
-   (cl-loop for prefix in (split-string component "\\>")
-collect `(seq word-boundary ,prefix
+(cl-loop for prefix in (split-string component "\\>")
+ collect `(seq word-boundary ,prefix
 
 (defun orderless-without-literal (component)
   "Match strings that do *not* contain COMPONENT as a literal match."



[elpa] externals/orderless d9bc71d234 2/4: Avoid warnings in the generated autoload file

2022-02-11 Thread ELPA Syncer
branch: externals/orderless
commit d9bc71d23493573d9a17384e05da5a84d9974131
Author: Daniel Mendler 
Commit: Daniel Mendler 

Avoid warnings in the generated autoload file
---
 orderless.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/orderless.el b/orderless.el
index c6012e9f36..67b2afd6b8 100644
--- a/orderless.el
+++ b/orderless.el
@@ -488,9 +488,6 @@ specifically for the %s style.")
 
 ;;; Ivy integration
 
-(defvar ivy-regex)
-(defvar ivy-highlight-functions-alist)
-
 ;;;###autoload
 (defun orderless-ivy-re-builder (str)
   "Convert STR into regexps for use with ivy.
@@ -500,6 +497,7 @@ a value in `ivy-re-builders-alist'."
   (orderless-pattern-compiler str))
   ""))
 
+(defvar ivy-regex)
 (defun orderless-ivy-highlight (str)
   "Highlight a match in STR of each regexp in `ivy-regex'.
 This function is for integration of orderless with ivy."
@@ -507,6 +505,7 @@ This function is for integration of orderless with ivy."
 
 ;;;###autoload
 (with-eval-after-load 'ivy
+  (defvar ivy-highlight-functions-alist)
   (add-to-list 'ivy-highlight-functions-alist
'(orderless-ivy-re-builder . orderless-ivy-highlight)))
 



[elpa] externals/orderless 2eed576588 1/4: Generate shorter docstrings

2022-02-11 Thread ELPA Syncer
branch: externals/orderless
commit 2eed57658855172eb1797c28d78263e46c009692
Author: Daniel Mendler 
Commit: Daniel Mendler 

Generate shorter docstrings

I am using relatively long names for the modified orderless completion 
styles in
my configuration, e.g., orderless+literal+initialism. Try to generate 
shorter
docstrings to avoid warnings on Emacs 28.
---
 orderless.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/orderless.el b/orderless.el
index 9dc233c11f..c6012e9f36 100644
--- a/orderless.el
+++ b/orderless.el
@@ -469,10 +469,11 @@ string for the completion style."
   (let* ((fn-name (lambda (string) (intern (concat (symbol-name name) 
string
  (try-completion  (funcall fn-name "-try-completion"))
  (all-completions (funcall fn-name "-all-completions"))
- (doc-fmt "`%s' function for the %s completion style.
-This configures orderless according to the %s completion style and
-delegates to `orderless-%s'.")
- (fn-doc (lambda (fn) (format doc-fmt fn name name fn
+ (doc-fmt "`%s' function for the %s style.
+This function delegates to `orderless-%s'.
+The orderless configuration is locally modified
+specifically for the %s style.")
+ (fn-doc (lambda (fn) (format doc-fmt fn name fn name name
   `(progn
  (defun ,try-completion (string table pred point)
,(funcall fn-doc "try-completion")



[elpa] externals/orderless a8582c9560 3/4: Merge pull request #107 from minad/fix-28-warnings

2022-02-11 Thread ELPA Syncer
branch: externals/orderless
commit a8582c9560855da9e78eb035821a71fc7258f750
Merge: ce462a63e3 d9bc71d234
Author: Omar Antolín Camarena 
Commit: GitHub 

Merge pull request #107 from minad/fix-28-warnings

Fix Emacs 28 warnings
---
 orderless.el | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/orderless.el b/orderless.el
index 9dc233c11f..67b2afd6b8 100644
--- a/orderless.el
+++ b/orderless.el
@@ -469,10 +469,11 @@ string for the completion style."
   (let* ((fn-name (lambda (string) (intern (concat (symbol-name name) 
string
  (try-completion  (funcall fn-name "-try-completion"))
  (all-completions (funcall fn-name "-all-completions"))
- (doc-fmt "`%s' function for the %s completion style.
-This configures orderless according to the %s completion style and
-delegates to `orderless-%s'.")
- (fn-doc (lambda (fn) (format doc-fmt fn name name fn
+ (doc-fmt "`%s' function for the %s style.
+This function delegates to `orderless-%s'.
+The orderless configuration is locally modified
+specifically for the %s style.")
+ (fn-doc (lambda (fn) (format doc-fmt fn name fn name name
   `(progn
  (defun ,try-completion (string table pred point)
,(funcall fn-doc "try-completion")
@@ -487,9 +488,6 @@ delegates to `orderless-%s'.")
 
 ;;; Ivy integration
 
-(defvar ivy-regex)
-(defvar ivy-highlight-functions-alist)
-
 ;;;###autoload
 (defun orderless-ivy-re-builder (str)
   "Convert STR into regexps for use with ivy.
@@ -499,6 +497,7 @@ a value in `ivy-re-builders-alist'."
   (orderless-pattern-compiler str))
   ""))
 
+(defvar ivy-regex)
 (defun orderless-ivy-highlight (str)
   "Highlight a match in STR of each regexp in `ivy-regex'.
 This function is for integration of orderless with ivy."
@@ -506,6 +505,7 @@ This function is for integration of orderless with ivy."
 
 ;;;###autoload
 (with-eval-after-load 'ivy
+  (defvar ivy-highlight-functions-alist)
   (add-to-list 'ivy-highlight-functions-alist
'(orderless-ivy-re-builder . orderless-ivy-highlight)))
 



[elpa] externals/eev abadb863af: Better support for videos. Try this: (find-1stclassvideos)

2022-02-11 Thread ELPA Syncer
branch: externals/eev
commit abadb863afdd7876aeaa1662af014e6a5e212985
Author: Eduardo Ochs 
Commit: Eduardo Ochs 

Better support for videos. Try this: (find-1stclassvideos)
---
 ChangeLog |  19 +++
 VERSION   |   4 +-
 eev-intro.el  |  24 +++-
 eev-tlinks.el |  35 ++---
 eev-videolinks.el | 421 ++
 eev.el|   2 +-
 6 files changed, 232 insertions(+), 273 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5832eb09e0..83d15f3990 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2022-02-12  Eduardo Ochs  
+
+   * eev-tlinks.el (ee-find-1stclassvideo-links): changed the part of
+   the template that has a "(defun find-*video ...)".
+   (find-1stclassvideos): added an (interactive).
+
+   * eev-videolinks.el (find-eev2019video, find-eev2020video)
+   (find-eev2021video, find-eev2021bvideo, find-eevnavvideo)
+   (find-eevtemplvideo, find-eevfherelvideo, find-eevtestblsvideo)
+   (find-eevvlinksvideo, find-oficina2021avideo)
+   (find-oficina2021bvideo, find-2021workshop1video)
+   (find-2021workshop2video, find-2021workshop3video)
+   (find-2021workshop4video, find-2021workshop5video)
+   (find-2021workshop6video, find-2021orgfornonusersvideo)
+   (find-2021ffllvideo, find-2022eevmake0video)
+   (find-2022findeevanggvideo, find-2022findelispintrovideo):
+   redefined using the new template.
+   (find-2021ssrvideo): new function.
+
 2022-02-11  Eduardo Ochs  
 
* eev-tlinks.el (ee-find-1stclassvideo-links): new function.
diff --git a/VERSION b/VERSION
index 27203b15f7..9a8d8433e0 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Fri Feb 11 07:39:19 GMT 2022
-Fri Feb 11 04:39:19 -03 2022
+Sat Feb 12 04:24:38 GMT 2022
+Sat Feb 12 01:24:38 -03 2022
diff --git a/eev-intro.el b/eev-intro.el
index 27e3ba90e0..54868f3a24 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20220125
+;; Version:20220212
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el>
@@ -11106,6 +11106,12 @@ Prerequisites:
 
 1. Some videos
 ==
+NOTE: this list of first-class videos is obsolete!
+You can get the current list by running one of these sexps:
+
+  (find-1stclassvideos)
+  (find-eev \"eev-videolinks.el\" \"ee-1stclassvideos-info\")
+
 At this moment I have these eight videos about eev (I am
 deliberately ignoring the ones that I consider obsolete!):
 
@@ -11619,6 +11625,22 @@ The data about these first-class videos is kept in the 
variable
 
   (find-eev \"eev-videolinks.el\" \"ee-1stclassvideos-info\")
 
+The most user-friendly way to access this data for a particular
+video is with a sexp with `find-1stclassvideo-links', like this
+one:
+
+  (find-1stclassvideo-links \"2022findeevangg\")
+
+and the best and most user-friendly way to access the list of
+videos is by running `M-x find-1stclassvideos', or:
+
+  (find-1stclassvideos)
+
+That function displays a temporary buffer with a list of all
+first-class videos, with a `find-1stclassvideo-links' sexp for
+each one.
+
+
 
 
 
diff --git a/eev-tlinks.el b/eev-tlinks.el
index 2fb0e9a27c..a74dbf559e 100644
--- a/eev-tlinks.el
+++ b/eev-tlinks.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20220211
+;; Version:20220212
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-tlinks.el>
@@ -2744,14 +2744,14 @@ This function is used by `ee-0x0-upload-region'."
 ;; Skel: (find-find-links-links-new "1stclassvideo" "c" "body")
 ;;  See: (find-eev "eev-videolinks.el" "first-class-videos")
 ;;   (find-eev "eev-videolinks.el" "second-class-videos")
-;; Tests: (find-1stclassvideo-links)
-;;(find-1stclassvideo-links "eev2019")
+;; Tests: (find-1stclassvideo-links "eev2019")
 ;;(find-1stclassvideo-links "foo")
+;;(find-1stclassvideo-links)
 ;;(find-estring (ee-find-1stclassvideo-links "eev2019"))
 ;;(find-estring (ee-find-1stclassvideo-links "foo"))
 ;;
 (defun find-1stclassvideo-links (&optional c &rest pos-spec-list)
-"Visit a temporary buffer containing hyperlinks for 1stclassvideo."
+"Visit a temporary buffer containing stuff for a first-class video."
   (interactive (list (ee-1stclassvideo-around-point-ask)))
   (setq c (or c "{c}"))
   (let* ((body (if (member c (ee-1stclassvideos))
@@ -2798,37 +2798,28 @@ This function is used by `ee-0x0-upload-region'."
 ;; (find-angg-es-links)
 
 ;; See:
+;; (find-video-links-intro \"9. First-class videos\")
 ;; (find-eev \&quo

[elpa] externals/parser-generator f2c4ad9665 03/29: Added TODO item

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit f2c4ad966574b79f2a1d203a114662bef570cd4f
Author: Christian Johansson 
Commit: Christian Johansson 

Added TODO item
---
 parser-generator.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/parser-generator.el b/parser-generator.el
index 87f06e9765..9c42cb114e 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -45,7 +45,7 @@
 
 (defvar
   parser-generator--debug
-  nil
+  t
   "Whether to print debug messages or not.")
 
 (defvar
@@ -1920,6 +1920,7 @@
  hash-key
  parser-generator--table-firsts)))
 
+;; TODO Should add support for e-identifiers
 ;; Definition at p. 343
 (defun parser-generator--follow (β)
   "Calculate follow-set of Β.  FOLLOW(β) = w, w is the set {w | S =>* αβγ and 
w is in FIRST(γ)}."



[elpa] externals/parser-generator abf7fcf615 02/29: Improved debug message

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit abf7fcf615cb9f130c62fba7a5b14704283ea56b
Author: Christian Johansson 
Commit: Christian Johansson 

Improved debug message
---
 parser-generator-lr.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parser-generator-lr.el b/parser-generator-lr.el
index f27d29462e..1c79e0162e 100644
--- a/parser-generator-lr.el
+++ b/parser-generator-lr.el
@@ -1474,7 +1474,7 @@
   parser-generator--look-ahead-number
   parser-generator--eof-identifier)))
 (parser-generator--debug
- (message "x: %s" x))
+ (message "x: %S" x))
 
 ;; TODO Use caches to optimize this loop?
 (dolist (lr-item previous-lr-item)



[elpa] externals/parser-generator updated (4a3a51de0a -> 4c34af706f)

2022-02-11 Thread Christian Johansson
cjohansson pushed a change to branch externals/parser-generator.

  from  4a3a51de0a Added FSF copyright headers
   new  26b8a21276 Added failing test for LR(k=1) parse with left-recursive 
grammar
   new  abf7fcf615 Improved debug message
   new  f2c4ad9665 Added TODO item
   new  4297a9b43e Added another failing test for FIRST(x) were first 
symbol can be %empty
   new  3bf81567ac Added TODO notes and a failing test for e-free-first
   new  94fa7c3732 Cleaning up of e-free-first test
   new  0e1fbf9cef More debugging of edge case
   new  add9d0072f Added failing test for e-free-first
   new  a175c1317a Started on refactor of e-free-first function to properly 
handle a edge case
   new  4e4907da84 More wrestling with FIRST and E-FREE-FIRST
   new  0fa8261ed2 Passing some tests for FIRST
   new  bb396d5ce9 Made psuedo-code for algorithm of FIRST and E-FREE-FIRST
   new  d2227ad65e More wrestling with FIRST and E-FREE-FIRST calculation
   new  efe98cb71a More tweaks of FIRST and E-FREE-FIRST
   new  6ffa2a0290 More work on FIRST function
   new  d85a3ae246 Passing more tests
   new  653b8edece Added failing test for generate-f-sets
   new  e1f3fb4042 More work on FIRST
   new  69fc89898e Passing all tests for FIRST and E-FREE-FIRST with new 
algorithm
   new  432e3732f2 Fixed some byte-compilation warnings
   new  58548b8e10 Passing test for LR-parse with k=2 again
   new  dced2e199f Sorting LR-action tables before outputting them in 
messages
   new  98dc561880 FIRST() and E-FREE-FIRST() passing LR-test for k=0
   new  6726c5231e Fixed conflict
   new  ba2bda38da Added use of default conflict resolution flag in 
action-table generation
   new  e2e464bb17 Updated version, date and TODO
   new  536198eb0a Fixed typo in comment
   new  a7a321ca93 Added link to TODO document
   new  4c34af706f Improved documentation


Summary of changes:
 README.md|6 +-
 TODO.md  |   18 +
 docs/Syntax-Analysis.md  |7 +-
 parser-generator-lr.el   |   39 +-
 parser-generator.el  | 1412 +++---
 test/parser-generator-lr-test.el |  164 -
 test/parser-generator-test.el|   92 ++-
 7 files changed, 988 insertions(+), 750 deletions(-)
 create mode 100644 TODO.md



[elpa] externals/parser-generator 4297a9b43e 04/29: Added another failing test for FIRST(x) were first symbol can be %empty

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 4297a9b43e9f2ecf475360fb9e90c04f6eae21d8
Author: Christian Johansson 
Commit: Christian Johansson 

Added another failing test for FIRST(x) were first symbol can be %empty
---
 parser-generator-lr.el   | 2 +-
 parser-generator.el  | 2 +-
 test/parser-generator-lr-test.el | 7 +++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/parser-generator-lr.el b/parser-generator-lr.el
index 1c79e0162e..3718857c28 100644
--- a/parser-generator-lr.el
+++ b/parser-generator-lr.el
@@ -1558,7 +1558,7 @@
   lr-item-suffix-first
   lr-item-suffix)
  (message
-  "lr-item-suffix-rest: %s from %s + %s"
+  "lr-item-suffix-rest: %s from %s + %s\n"
   lr-item-suffix-rest
   (cdr lr-item-suffix)
   (nth 3 lr-item)))
diff --git a/parser-generator.el b/parser-generator.el
index 9c42cb114e..77e5ba28c8 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -45,7 +45,7 @@
 
 (defvar
   parser-generator--debug
-  t
+  nil
   "Whether to print debug messages or not.")
 
 (defvar
diff --git a/test/parser-generator-lr-test.el b/test/parser-generator-lr-test.el
index c5c06870b9..6a65c9ee8f 100644
--- a/test/parser-generator-lr-test.el
+++ b/test/parser-generator-lr-test.el
@@ -1215,6 +1215,13 @@
   (parser-generator-set-look-ahead-number 1)
   (parser-generator-process-grammar)
   (parser-generator-lr-generate-parser-tables)
+
+  ;; TODO Make this test pass
+  (should
+   (equal
+(parser-generator--first '(inner_statement_list T_CASE))
+'((T_CASE) (T_ECHO) (T_SWITCH
+
   (setq
parser-generator-lex-analyzer--function
(lambda (index)



[elpa] externals/parser-generator 3bf81567ac 05/29: Added TODO notes and a failing test for e-free-first

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 3bf81567ac4d2d48f0f1cea812691b22052f10e9
Author: Christian Johansson 
Commit: Christian Johansson 

Added TODO notes and a failing test for e-free-first
---
 TODO.md  |  16 ++
 parser-generator.el  | 117 +--
 test/parser-generator-lr-test.el |  39 +++--
 test/parser-generator-test.el|  55 ++
 4 files changed, 143 insertions(+), 84 deletions(-)

diff --git a/TODO.md b/TODO.md
new file mode 100644
index 00..b252f75e23
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,16 @@
+# TODO
+
+## Main
+
+Functions (with validations) to set
+
+* parser-generator--global-attributes
+* parser-generator--context-sensitive-attributes
+* parser-generator--global-declaration
+
+## LR-Parser
+
+Functions (with validations) to set
+
+* parser-generator-lr--global-precedence-attributes
+* parser-generator-lr--context-sensitive-precedence-attribute
diff --git a/parser-generator.el b/parser-generator.el
index 77e5ba28c8..75630bbfd5 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -670,6 +670,14 @@
t
parser-generator--table-look-aheads-p
 
+(defun parser-generator-set-e-identifier (e-identifier)
+  "Set E-IDENTIFIER."
+  (unless (or
+   (stringp e-identifier)
+   (symbolp e-identifier))
+(error "E-identifier must be a symbol or string!"))
+  (setq parser-generator--e-identifier e-identifier))
+
 (defun parser-generator-set-look-ahead-number (k)
   "Set look-ahead number K."
   (unless (parser-generator--valid-look-ahead-number-p k)
@@ -1805,68 +1813,69 @@
  (message
   "stopped looking since non-terminal starts 
with e-identifier: %s"
   symbol-f-set))
-(setq keep-looking nil))
-
+(setq
+ keep-looking
+ nil))
+
 ;; Handle this scenario here were a non-terminal 
can result in different FIRST sets
-(when (>
-   (length symbol-f-set)
-   1)
-  (let ((symbol-f-set-index
- 1)
-(symbol-f-set-length
- (length symbol-f-set)))
-(while
-(<
- symbol-f-set-index
- symbol-f-set-length)
-  (let ((symbol-f-set-element
- (nth
-  symbol-f-set-index
-  symbol-f-set)))
-(let ((alternative-first-length
-   (+ first-length (length 
symbol-f-set-element)))
-  (alternative-first
-   (append first symbol-f-set-element))
-  (alternative-tape-index
-   (1+ input-tape-index)))
+(let ((symbol-f-set-index 0)
+  (symbol-f-set-length
+   (length symbol-f-set))
+  (found-e-trail)
+  (e-trail-is-viable-p
+   (< input-tape-index (1- input-tape-length)))
+  (original-first first)
+  (original-first-length first-length))
+  (while (< symbol-f-set-index symbol-f-set-length)
+(let ((symbol-f-set-element (nth 
symbol-f-set-index symbol-f-set)))
+  (let ((alternative-first-length
+ (+ original-first-length (length 
symbol-f-set-element)))
+(alternative-first
+ (append original-first 
symbol-f-set-element))
+(alternative-tape-index
+ (1+ input-tape-index)))
+(parser-generator--debug
+ (message
+  "alternative-first: %s"
+  alternative-first))
+
+;; When the e-identifier is an alternative 
trail
+;; and there a symbols left on stack
+;; make alternative trail by skipping this 
sy

[elpa] externals/parser-generator a175c1317a 08/29: Started on refactor of e-free-first function to properly handle a edge case

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit a175c1317a0495a3832ce92fb3a7a63ff34fd678
Author: Christian Johansson 
Commit: Christian Johansson 

Started on refactor of e-free-first function to properly handle a edge case
---
 parser-generator.el   | 581 ++
 test/parser-generator-test.el |  10 +
 2 files changed, 253 insertions(+), 338 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 6a3befc48a..5c5b923fd1 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -78,11 +78,6 @@
   nil
   "Generated F-sets for grammar.")
 
-(defvar
-  parser-generator--f-free-sets
-  nil
-  "Generated e-free F-sets for grammar.")
-
 (defvar
   parser-generator--look-ahead-number
   nil
@@ -161,9 +156,6 @@
   (setq
parser-generator--f-sets
nil)
-  (setq
-   parser-generator--f-free-sets
-   nil)
   (setq
parser-generator--table-firsts
(make-hash-table :test 'equal)))
@@ -1051,9 +1043,7 @@
 (defun parser-generator--generate-f-sets ()
   "Generate F-sets for grammar."
   ;; Generate F-sets only once per grammar
-  (unless (and
-   parser-generator--f-sets
-   parser-generator--f-free-sets)
+  (unless parser-generator--f-sets
 (parser-generator--debug
  (message "(parser-generator--generate-f-sets)"))
 (let ((productions
@@ -1062,209 +1052,190 @@
(max
 1
 parser-generator--look-ahead-number)))
-  (let ((disallow-set '(nil t)))
-(parser-generator--debug
- (message "disallow-set: %s" disallow-set))
-(dolist (disallow-e-first disallow-set)
+  (let ((f-sets (make-hash-table :test 'equal))
+(i 0)
+(expanded-all nil)
+(expanded-all-second nil))
+
+(while (or
+(not expanded-all)
+(not expanded-all-second))
+  ;; Make one iteration after everything has been expanded
+  (when expanded-all
+(setq
+ expanded-all-second
+ t))
+  (when (> i 100)
+(error "Endless loop!"))
   (parser-generator--debug
-   (message "disallow-e-first: %s" disallow-e-first))
-  (let ((f-sets (make-hash-table :test 'equal))
-(i 0)
-(expanded-all nil)
-(expanded-all-second nil))
-
-(while (or
-(not expanded-all)
-(not expanded-all-second))
-  ;; Make one iteration after everything has been expanded
-  (when expanded-all
-(setq
- expanded-all-second
- t))
-  (when (> i 100)
-(error "Endless loop!"))
-  (parser-generator--debug
-   (message "i = %s" i))
-  (setq
-   expanded-all
-   t)
-  (let ((f-set (make-hash-table :test 'equal)))
-
-;; Iterate all productions, set F_i
-(dolist (p productions)
-  (let ((production-lhs (car p))
-(production-rhs (cdr p)))
-(parser-generator--debug
- (message
-  "Production: %s -> %s"
-  production-lhs
-  production-rhs))
-
-;; Iterate all blocks in RHS
-(let ((f-p-set)
-  (rhs-expanded-full t))
-  (dolist (rhs-p production-rhs)
-(let ((rhs-string rhs-p))
-  (let ((rhs-leading-terminals)
-(f-set-return
- (parser-generator--f-set
-  rhs-string
-  `(
-,k
-,i
-,f-sets
-,disallow-e-first
-,production-lhs)
-  '((nil t 0)
-
-(parser-generator--debug
- (message
-  "f-set-return: %s = %s"
-  rhs-string
-  f-set-return))
-
-(unless (nth 0 f-set-return)
-  (let ((unexpanded-non-terminal
- (nth 1 f-set-return)))
-(cond
- ((equal
-   unexpanded-non-terminal
-   production-lhs)
-  (parser-generator--debug
-   (message
-"Production '%S' unexpanded due to 
self-reference, ignore flag."
-production-lhs)))

[elpa] externals/parser-generator 26b8a21276 01/29: Added failing test for LR(k=1) parse with left-recursive grammar

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 26b8a21276ca848028a2773278c36b818b8b3481
Author: Christian Johansson 
Commit: Christian Johansson 

Added failing test for LR(k=1) parse with left-recursive grammar
---
 test/parser-generator-lr-test.el | 119 ++-
 1 file changed, 118 insertions(+), 1 deletion(-)

diff --git a/test/parser-generator-lr-test.el b/test/parser-generator-lr-test.el
index b7002a8390..c5c06870b9 100644
--- a/test/parser-generator-lr-test.el
+++ b/test/parser-generator-lr-test.el
@@ -1047,7 +1047,7 @@
   (message "Passed incremental-tests")
 
 
-  ;; TODO Test left-recursive grammar from PHP 8.0 here
+  ;; Test left-recursive grammar from PHP 8.0 here
   (parser-generator-set-look-ahead-number 1)
   (setq
parser-generator--e-identifier
@@ -1175,6 +1175,123 @@
   (message "Passed test PHP 8.0 match grammar 2")
   ))
 
+  ;; TODO Test another left-recursive grammar from PHP 8.0 here
+  (parser-generator-set-look-ahead-number 1)
+  (setq
+   parser-generator--e-identifier
+   '%empty)
+  (parser-generator-set-grammar
+   '(
+ (start inner_statement_list statement switch_case_list case_list 
case_separator)
+ (T_SWITCH T_ECHO T_CONSTANT_ENCAPSED_STRING ";" ":" "{" "}" T_CASE)
+ (
+  (start
+   inner_statement_list
+   )
+  (inner_statement_list
+   (inner_statement_list statement)
+   %empty
+   )
+  (statement
+   (T_SWITCH switch_case_list)
+   (T_ECHO T_CONSTANT_ENCAPSED_STRING ";")
+   )
+  (switch_case_list
+   ("{" case_list "}")
+   ("{" ";" case_list "}")
+   )
+  (case_list
+   %empty
+   (case_list T_CASE case_separator inner_statement_list)
+   )
+  (case_separator
+   ":"
+   ";"
+   )
+  )
+ start
+ )
+   )
+  (parser-generator-set-look-ahead-number 1)
+  (parser-generator-process-grammar)
+  (parser-generator-lr-generate-parser-tables)
+  (setq
+   parser-generator-lex-analyzer--function
+   (lambda (index)
+ (with-current-buffer "*PHP8.0*"
+   (let ((token))
+ (goto-char index)
+ (cond
+  ((looking-at "[ \n\t]+")
+   (setq
+parser-generator-lex-analyzer--move-to-index-flag
+(match-end 0)))
+  ((looking-at "\\(\".+\"\\)")
+   (setq
+token
+`(
+  T_CONSTANT_ENCAPSED_STRING
+  ,(match-beginning 0)
+  . ,(match-end 0)
+  )
+)
+   )
+  ((looking-at "case")
+   (setq
+token
+`(
+  T_CASE
+  ,(match-beginning 0)
+  . ,(match-end 0))
+)
+   )
+  ((looking-at "switch")
+   (setq
+token
+`(
+  T_SWITCH
+  ,(match-beginning 0)
+  . ,(match-end 0))
+)
+   )
+  ((looking-at "echo")
+   (setq
+token
+`(
+  T_ECHO
+  ,(match-beginning 0)
+  . ,(match-end 0))
+)
+   )
+  ((looking-at "[;{}:]")
+   (setq
+token
+`(
+  ,(match-string-no-properties 0)
+  ,(match-beginning 0)
+  . ,(match-end 0))
+)
+   )
+  )
+ token
+ 
+  (let ((buffer (generate-new-buffer "*PHP8.0*")))
+(with-current-buffer buffer
+  (kill-region (point-min) (point-max))
+  (insert "switch\n{\ncase:\necho \"hello\";\n}\n")
+  (parser-generator-lr--parse)
+  (kill-buffer)
+  (message "Passed test PHP 8.0 switch case grammar 1")
+  ))
+  (let ((buffer (generate-new-buffer "*PHP8.0*")))
+(with-current-buffer buffer
+  (kill-region (point-min) (point-max))
+  (insert "switch\n{\ncase:\ncase:\ncase;\ncase;\n
echo \"hello\";\n}\n")
+  (parser-generator-lr--parse)
+  (kill-buffer)
+  (message "Passed test PHP 8.0 switch case grammar 2")
+  ))
+
   (message "Passed tests for (parser-generator-lr--parse)"))
 
 (defun parser-generator-lr-test-parse-k-2 ()



[elpa] externals/parser-generator add9d0072f 09/29: Added failing test for e-free-first

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit add9d0072f1c4fd494135b4a1d0a79157a6186ef
Author: Christian Johansson 
Commit: Christian Johansson 

Added failing test for e-free-first
---
 test/parser-generator-test.el | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/test/parser-generator-test.el b/test/parser-generator-test.el
index d8b0a204c7..437a4aa76e 100644
--- a/test/parser-generator-test.el
+++ b/test/parser-generator-test.el
@@ -545,6 +545,16 @@
 (parser-generator--e-free-first '(a S b
   (message "Passed empty-free-first 2 with trailing e-identifier 1")
 
+  ;; TODO Make this pass
+  (parser-generator-set-grammar
+   '((Sp S R T) (a b c) ((Sp S) (S (R S) (R)) (R (a b T)) (T (a T) (c) (e))) 
Sp))
+  (parser-generator-set-look-ahead-number 2)
+  (parser-generator-process-grammar)
+  (should
+   (equal
+'((a a) (a c) (a e) (c e))
+(parser-generator--e-free-first 'T)))
+
   (message "Passed tests for (parser-generator--empty-free-first)"))
 
 (defun 
parser-generator-test--get-grammar-context-sensitive-attributes-by-production-number
 ()



[elpa] externals/parser-generator 0e1fbf9cef 07/29: More debugging of edge case

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 0e1fbf9cef7ee822390988d2504e375b3a42d9b7
Author: Christian Johansson 
Commit: Christian Johansson 

More debugging of edge case
---
 parser-generator.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 75630bbfd5..6a3befc48a 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -45,7 +45,7 @@
 
 (defvar
   parser-generator--debug
-  nil
+  t
   "Whether to print debug messages or not.")
 
 (defvar
@@ -1842,10 +1842,13 @@
 ;; When the e-identifier is an alternative 
trail
 ;; and there a symbols left on stack
 ;; make alternative trail by skipping this 
symbol
+;; but only if there are more symbols in 
the input tape
 (when (and
e-trail-is-viable-p
(not found-e-trail)
-   (not disallow-e-first)
+   (or
+(not disallow-e-first)
+(> original-first-length 0))
(parser-generator--valid-e-p
 (car alternative-first)))
   (push



[elpa] externals/parser-generator d2227ad65e 13/29: More wrestling with FIRST and E-FREE-FIRST calculation

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit d2227ad65e642224f154f237b396b64b5c97b19a
Author: Christian Johansson 
Commit: Christian Johansson 

More wrestling with FIRST and E-FREE-FIRST calculation
---
 parser-generator.el | 687 ++--
 1 file changed, 347 insertions(+), 340 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 4c465147a2..f217b8b549 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -692,6 +692,7 @@
   (parser-generator--valid-look-ahead-number-p
parser-generator--look-ahead-number)
 (error "Invalid look-ahead number k!"))
+  (message "k = %d" parser-generator--look-ahead-number)
   (unless parser-generator--grammar
 (error "No grammar defined!"))
   (unless
@@ -1587,15 +1588,25 @@
 (β &optional disallow-e-first ignore-validation skip-sorting)
   "For sentential-form Β, calculate first terminals, optionally 
DISALLOW-E-FIRST, IGNORE-VALIDATION and SKIP-SORTING."
 
+  ;; Make sure we are dealing with a list of symbols
+  (unless (listp β)
+(setq β (list β)))
+
+  (parser-generator--debug
+   (if disallow-e-first
+   (message
+"\nE-FREE-FIRST%S"
+β)
+ (message
+  "\nFIRST%S"
+  β)))
+
   ;; Cache first calculation
   (let ((hash-key (format "%S-%s" β disallow-e-first)))
-(unless (gethash
- hash-key
- parser-generator--table-firsts)
-
-  ;; Make sure we are dealing with a list of symbols
-  (unless (listp β)
-(setq β (list β)))
+(unless
+(gethash
+ hash-key
+ parser-generator--table-firsts)
 
   ;; Perform optional validation of inpuit
   (unless (or
@@ -1603,357 +1614,353 @@
(parser-generator--valid-sentential-form-p β))
 (error "Invalid sentential form β! %s" β))
 
-  ;; Make sure that the k value is at least 1
-  (let ((k (max 1 parser-generator--look-ahead-number)))
-
-;; Generate F-sets only once per grammar
-(parser-generator--generate-f-sets)
-
-(let ((first-list nil)
-  (first-items (make-hash-table :test 'equal)))
-
-  ;; Algorithm
-  ;; 1. Iterate each symbol of input and expand into list of lists of 
terminals and the e-identifier
-  ;; if input symbol is a terminal or the e-identifier push it to 
each expanded list
-  ;; if input symbol is a non-terminal, expand it and push each 
possible expansion onto each expanded list
-  ;; 2. Reverse each expanded list and place each list on a stack of 
unprocessed lists each with a input-index to zero
-  ;; 3. Process each unprocessed list and expand into a list of lists 
of terminals and the e-identifier
-  ;;pop a unprocessed list from the stack of unprocessed lists
-  ;;create a new empty list
-  ;;set skip-flag to false
-  ;;set loop-flag to true
-  ;;loop while index is below length and skip-flag is 
false and loop-flag is true
-  ;;if a list starts with the e-identifier and it is 
disallowed, set skip-flag to true to stop iterating
-  ;;if a symbol on a list is a terminal push it onto 
the new list
-  ;;if a symbol on a the list is the e-identifier
-  ;;push a copy of the new list on the unprocessed 
stack but increase it's input-index by one
-  ;;push the e-identifier onto the new list and 
set loop-flag to false to stop iterating
-  ;;increase index with one
-  ;;if skip-flag is false place new list onto the list of 
processed lists
-  ;; 4. Reverse each processed list
-  ;; 5. Return processed lists
-
-  ;; Iterate each symbol in β using a PDA algorithm
-  (let ((input-tape β)
-(input-tape-length (length β))
-(stack '((0 0 nil
-(while stack
-  (let ((stack-topmost (pop stack)))
-(parser-generator--debug
- (message
-  "\nstack-topmost: %s"
-  stack-topmost))
-(let ((input-tape-index (car stack-topmost))
-  (first-length (car (cdr stack-topmost)))
-  (first (car (cdr (cdr stack-topmost
-  (keep-looking t))
-  (while (and
-  keep-looking
-  (< input-tape-index input-tape-length))
-(let ((symbol (nth input-tape-index input-tape)))
-  (parser-generator--debug
-   (message
-"symbol index: %s from %s is: %s"
-input-tape-index
-input-tape symbol))
-  (cond
+  ;; Generate F-sets only once per

[elpa] externals/parser-generator bb396d5ce9 12/29: Made psuedo-code for algorithm of FIRST and E-FREE-FIRST

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit bb396d5ce944295ad93759d120a69b8602ca6cc5
Author: Christian Johansson 
Commit: Christian Johansson 

Made psuedo-code for algorithm of FIRST and E-FREE-FIRST
---
 parser-generator.el | 66 +++--
 1 file changed, 44 insertions(+), 22 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 98366290fa..4c465147a2 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1584,36 +1584,55 @@
 
 ;; Algorithm 5.5, p. 357
 (defun parser-generator--first
-(
- β
- &optional
- disallow-e-first
- ignore-validation
- skip-sorting)
+(β &optional disallow-e-first ignore-validation skip-sorting)
   "For sentential-form Β, calculate first terminals, optionally 
DISALLOW-E-FIRST, IGNORE-VALIDATION and SKIP-SORTING."
-  (let ((hash-key
- (format
-  "%S-%s"
-  β
-  disallow-e-first)))
+
+  ;; Cache first calculation
+  (let ((hash-key (format "%S-%s" β disallow-e-first)))
 (unless (gethash
  hash-key
  parser-generator--table-firsts)
+
+  ;; Make sure we are dealing with a list of symbols
   (unless (listp β)
 (setq β (list β)))
+
+  ;; Perform optional validation of inpuit
   (unless (or
ignore-validation
(parser-generator--valid-sentential-form-p β))
 (error "Invalid sentential form β! %s" β))
-  (let ((k (max
-1
-parser-generator--look-ahead-number)))
+
+  ;; Make sure that the k value is at least 1
+  (let ((k (max 1 parser-generator--look-ahead-number)))
 
 ;; Generate F-sets only once per grammar
 (parser-generator--generate-f-sets)
 
 (let ((first-list nil)
   (first-items (make-hash-table :test 'equal)))
+
+  ;; Algorithm
+  ;; 1. Iterate each symbol of input and expand into list of lists of 
terminals and the e-identifier
+  ;; if input symbol is a terminal or the e-identifier push it to 
each expanded list
+  ;; if input symbol is a non-terminal, expand it and push each 
possible expansion onto each expanded list
+  ;; 2. Reverse each expanded list and place each list on a stack of 
unprocessed lists each with a input-index to zero
+  ;; 3. Process each unprocessed list and expand into a list of lists 
of terminals and the e-identifier
+  ;;pop a unprocessed list from the stack of unprocessed lists
+  ;;create a new empty list
+  ;;set skip-flag to false
+  ;;set loop-flag to true
+  ;;loop while index is below length and skip-flag is 
false and loop-flag is true
+  ;;if a list starts with the e-identifier and it is 
disallowed, set skip-flag to true to stop iterating
+  ;;if a symbol on a list is a terminal push it onto 
the new list
+  ;;if a symbol on a the list is the e-identifier
+  ;;push a copy of the new list on the unprocessed 
stack but increase it's input-index by one
+  ;;push the e-identifier onto the new list and 
set loop-flag to false to stop iterating
+  ;;increase index with one
+  ;;if skip-flag is false place new list onto the list of 
processed lists
+  ;; 4. Reverse each processed list
+  ;; 5. Return processed lists
+
   ;; Iterate each symbol in β using a PDA algorithm
   (let ((input-tape β)
 (input-tape-length (length β))
@@ -1630,8 +1649,7 @@
   (keep-looking t))
   (while (and
   keep-looking
-  (< input-tape-index input-tape-length)
-  (< first-length k))
+  (< input-tape-index input-tape-length))
 (let ((symbol (nth input-tape-index input-tape)))
   (parser-generator--debug
(message
@@ -1822,14 +1840,14 @@
   "first-index: %S\n"
   first-index))
 
-(let ((keep-looking t)
+(let ((keep-looking2 t)
   (keep-match t)
   (first-symbol))
   (while (and
   (< first-index first-item-length)
   (< new-first-length k)
   keep-match
-  keep-looking)
+  keep-looking2)
 (setq
  first-symbol
  (nth first-index first-item))
@@ -1844,9 +1862,13 @@
  disallow-e-

[elpa] externals/parser-generator 0fa8261ed2 11/29: Passing some tests for FIRST

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 0fa8261ed28332e1d4ef7edea1f0bda29fe6e5e2
Author: Christian Johansson 
Commit: Christian Johansson 

Passing some tests for FIRST
---
 parser-generator.el   | 418 +++---
 test/parser-generator-test.el |   4 +-
 2 files changed, 277 insertions(+), 145 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 6236e85652..98366290fa 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1429,7 +1429,11 @@
 
   ;; Should branch off here, each unique 
permutation should be included in set
   ;; Follow the first alternative in this scope 
but follow the rest in separate scopes
-  (let ((sub-terminal-index 0))
+  (let ((sub-symbols-set-index 0)
+(original-leading-symbols
+ leading-symbols)
+(original-leading-terminals
+ leading-terminals))
 (dolist (sub-symbol-alternative-set 
sub-terminal-sets)
   (parser-generator--debug
(message
@@ -1443,9 +1447,9 @@
 (sub-symbol)
 (sub-terminal)
 (sub-symbols
- (reverse leading-symbols))
+ (reverse original-leading-symbols))
 (sub-terminals
- (reverse leading-terminals)))
+ (reverse original-leading-terminals)))
 (while (and
 (< sub-symbol-index 
sub-symbol-length)
 (< (length sub-terminals) k))
@@ -1454,12 +1458,16 @@
(nth
 sub-symbol-index
 sub-symbol-alternative-set))
+  (parser-generator--debug
+   (message
+"sub-symbol: %S"
+sub-symbol))
   (push
sub-symbol
sub-symbols)
-  (unless (parser-generator--valid-e-p 
sub-terminal)
+  (unless (parser-generator--valid-e-p 
sub-symbol)
 (push
- sub-terminal
+ sub-symbol
  sub-terminals))
   (setq
sub-symbol-index
@@ -1470,21 +1478,38 @@
 (setq
  sub-terminals
  (reverse sub-terminals))
-(let ((branch
-   `(
- ,sub-symbols
- ,sub-terminals
- ,(1+ input-tape-index
-  (parser-generator--debug
-   (message
-"branched off 3: %s"
-branch))
-  (push
-   branch
-   stack)))
+
+;; The first iteration does not branch off
+(if (= sub-symbols-set-index 0)
+(progn
+  (setq
+   leading-symbols
+   sub-symbols)
+  (setq
+   leading-symbols-count
+   (length leading-symbols))
+  (setq
+   leading-terminals
+   sub-terminals)
+  (setq
+   leading-terminals-count
+   (length leading-terminals)))
+  (let (
+(branch
+   

[elpa] externals/parser-generator 94fa7c3732 06/29: Cleaning up of e-free-first test

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 94fa7c3732c6b69c7b954dfa5ab31b0cf443231b
Author: Christian Johansson 
Commit: Christian Johansson 

Cleaning up of e-free-first test
---
 test/parser-generator-test.el | 5 -
 1 file changed, 5 deletions(-)

diff --git a/test/parser-generator-test.el b/test/parser-generator-test.el
index 4b5a6e1f98..d8b0a204c7 100644
--- a/test/parser-generator-test.el
+++ b/test/parser-generator-test.el
@@ -478,11 +478,6 @@
(equal
 (parser-generator--first '(inner_statement_list inner_statement_list 
inner_statement_list T_CASE))
 '((%empty) (T_CASE) (T_ECHO) (T_SWITCH
-  ;; TODO Make this pass
-  (should
-   (equal
-(parser-generator--e-free-first '(inner_statement_list 
inner_statement_list inner_statement_list T_CASE))
-'((T_ECHO) (T_SWITCH
 
   (message "Passed tests for (parser-generator--first)"))
 



[elpa] externals/parser-generator 6ffa2a0290 15/29: More work on FIRST function

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 6ffa2a029052daf03aae803c912d5a7f73d97761
Author: Christian Johansson 
Commit: Christian Johansson 

More work on FIRST function
---
 parser-generator.el | 59 +++--
 1 file changed, 35 insertions(+), 24 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 701d9e45ba..f0c30a7cc5 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1685,23 +1685,32 @@
 (length expanded-non-terminal-lists)))
 
   (if (= expanded-list-count 0)
+  (dolist (expanded-non-terminal-list 
expanded-non-terminal-lists)
+(push
+ (reverse expanded-non-terminal-list)
+ expanded-lists))
+
+(let ((new-expanded-lists))
+  (dolist (expanded-non-terminal-list 
expanded-non-terminal-lists)
+(setq expanded-list-index 0)
+(let ((reversed-expanded-non-terminal-list
+   (reverse expanded-non-terminal-list)))
+  (while (< expanded-list-index expanded-list-count)
+(push
+ (append
+  reversed-expanded-non-terminal-list
+  (nth expanded-list-index expanded-lists))
+ new-expanded-lists)
+(setq
+ expanded-list-index
+ (1+ expanded-list-index)
   (setq
expanded-lists
-   expanded-non-terminal-lists)
-
-(dolist (expanded-non-terminal-list 
expanded-non-terminal-lists)
-  (setq expanded-list-index 0)
-  (while (< expanded-list-index expanded-list-count)
-(setf
- (nth expanded-list-index expanded-lists)
- (reverse
-  (append
-   (reverse
-(nth expanded-list-index expanded-lists))
-   expanded-non-terminal-list)))
-(setq
- expanded-list-index
- (1+ expanded-list-index
+   new-expanded-lists)))
+  (parser-generator--debug
+   (message
+"expanded-lists after adding: %S"
+expanded-lists)
 
  ;; if input symbol is a terminal or the e-identifier push it to 
each expanded list
  ((or
@@ -1709,7 +1718,7 @@
(parser-generator--valid-terminal-p input-symbol))
   (parser-generator--debug
(message
-"symbol is terminal or the e-identifier"))
+"symbol is a terminal or the e-identifier"))
   (let ((expanded-list-index 0)
 (expanded-list-count
  (length expanded-lists)))
@@ -1720,14 +1729,16 @@
   (while (< expanded-list-index expanded-list-count)
 (setf
  (nth expanded-list-index expanded-lists)
- (reverse
-  (append
-   (reverse
-(nth expanded-list-index expanded-lists))
-   (list input-symbol
+ (append
+  (nth expanded-list-index expanded-lists)
+  (list input-symbol)))
 (setq
  expanded-list-index
- (1+ expanded-list-index)))
+ (1+ expanded-list-index
+(parser-generator--debug
+ (message
+  "expanded-lists after adding: %S"
+  expanded-lists)
 (setq
  input-tape-index
  (1+ input-tape-index
@@ -1738,7 +1749,7 @@
   (distinct-processed-lists (make-hash-table :test 'equal)))
   (parser-generator--debug
(message
-"\nExpanded symbols: %S"
+"\nExpanded symbols: %S (in reverse order)"
 expanded-lists))
 
   ;; 2. Place each expanded list on a stack of unprocessed lists
@@ -1749,7 +1760,7 @@
 (while (< expanded-list-index expanded-list-count)
   (push
(list
-(nth expanded-list-index expanded-lists)
+(reverse (nth expanded-list-index expanded-lists))
 0
 nil)
unprocessed-lists)



[elpa] externals/parser-generator efe98cb71a 14/29: More tweaks of FIRST and E-FREE-FIRST

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit efe98cb71a872d5e5f2d23e73f37506cee5e7400
Author: Christian Johansson 
Commit: Christian Johansson 

More tweaks of FIRST and E-FREE-FIRST
---
 parser-generator.el | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index f217b8b549..701d9e45ba 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1603,10 +1603,9 @@
 
   ;; Cache first calculation
   (let ((hash-key (format "%S-%s" β disallow-e-first)))
-(unless
-(gethash
- hash-key
- parser-generator--table-firsts)
+(unless (gethash
+ hash-key
+ parser-generator--table-firsts)
 
   ;; Perform optional validation of inpuit
   (unless (or
@@ -1695,7 +1694,7 @@
   (while (< expanded-list-index expanded-list-count)
 (setf
  (nth expanded-list-index expanded-lists)
- (nreverse
+ (reverse
   (append
(reverse
 (nth expanded-list-index expanded-lists))
@@ -1721,9 +1720,9 @@
   (while (< expanded-list-index expanded-list-count)
 (setf
  (nth expanded-list-index expanded-lists)
- (nreverse
+ (reverse
   (append
-   (nreverse
+   (reverse
 (nth expanded-list-index expanded-lists))
(list input-symbol
 (setq
@@ -1913,7 +1912,7 @@
   ;; Reverse list
   (setq
processed-list
-   (nreverse
+   (reverse
 processed-list))
 
   ;; Make sure only distinct sets are added to list
@@ -1956,6 +1955,11 @@
 processed-lists
 'parser-generator--sort-list)))
 
+(parser-generator--debug
+ (message
+  "processed-lists: %S"
+  processed-lists))
+
 ;; Store in memory cache
 (puthash
  hash-key



[elpa] externals/parser-generator 98dc561880 23/29: FIRST() and E-FREE-FIRST() passing LR-test for k=0

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 98dc561880e0fcd42c4842626f2401d0e5f442c3
Author: Christian Johansson 
Commit: Christian Johansson 

FIRST() and E-FREE-FIRST() passing LR-test for k=0
---
 parser-generator.el  |  9 ++---
 test/parser-generator-lr-test.el | 15 ---
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index f901b45077..0a2575efae 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1463,7 +1463,10 @@
(message
 "Found no subsets for %s %s"
 rhs-element
-(1- i)
+(1- i)))
+  (setq
+   keep-iterating
+   nil)))
 (setq
  keep-iterating
  nil)))
@@ -1550,7 +1553,7 @@
 
   ;; Algorithm
   ;; 1. Iterate each symbol of input and expand into list of lists of 
terminals and the e-identifier
-  ;; if input symbol is a terminal or the e-identifier push it to each 
expanded list
+  ;; if input symbol is a terminal, the e-identifier or the 
EOF-identifier push it to each expanded list
   ;; if input symbol is a non-terminal, expand it and push each 
possible expansion onto each expanded list
   ;; 2. Reverse each expanded list and place each list on a stack of 
unprocessed lists each with a input-index to zero
   ;; 3. Process each unprocessed list and expand into a list of lists of 
terminals and the e-identifier
@@ -1652,7 +1655,7 @@
(parser-generator--valid-terminal-p input-symbol))
   (parser-generator--debug
(message
-"symbol is a terminal or the e-identifier"))
+"symbol is a terminal, the e-identifier or the 
EOF-identifier"))
   (let ((expanded-list-index 0)
 (expanded-list-count
  (length expanded-lists)))
diff --git a/test/parser-generator-lr-test.el b/test/parser-generator-lr-test.el
index f8bc3d8f30..8fc8fbae76 100644
--- a/test/parser-generator-lr-test.el
+++ b/test/parser-generator-lr-test.el
@@ -1609,7 +1609,6 @@
 
   (message "Passed tests for (parser-generator-lr--parse-k-2)"))
 
-;; TODO Make this pass again
 (defun parser-generator-lr-test-parse-k-0 ()
   "Test `parser-generator-lr-parse' with k = 0."
   (message "Started tests for (parser-generator-lr-parse) k = 0")
@@ -1623,7 +1622,18 @@
   ;; (5) B → 1
 
   (parser-generator-set-grammar
-   '((S E B) ("*" "+" "0" "1") ((S (E $)) (E (E "*" B) (E "+" B) (B)) (B ("0") 
("1"))) S))
+   '(
+ (S E B)
+ ("*" "+" "0" "1")
+ (
+  (S (E $))
+  (E (E "*" B) (E "+" B) (B))
+  (B ("0") ("1"))
+  )
+ S
+ )
+   )
+  (parser-generator-set-e-identifier nil)
   (parser-generator-set-look-ahead-number 0)
   (parser-generator-process-grammar)
 
@@ -1755,7 +1765,6 @@
   "Action-tables k = 0: %s"
   (parser-generator-lr--get-expanded-action-tables)))
 
-;; TODO Make this work
 (should
  (equal
   '(



[elpa] externals/parser-generator d85a3ae246 16/29: Passing more tests

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit d85a3ae246b4fc45f254573cfd8f5bdc5346c69f
Author: Christian Johansson 
Commit: Christian Johansson 

Passing more tests
---
 parser-generator.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index f0c30a7cc5..63df0175b2 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1660,7 +1660,7 @@
  (nth input-tape-index input-tape))
 (parser-generator--debug
  (message
-  "input-symbol: %S"
+  "\ninput-symbol: %S"
   input-symbol))
 (cond
 
@@ -1730,8 +1730,8 @@
 (setf
  (nth expanded-list-index expanded-lists)
  (append
-  (nth expanded-list-index expanded-lists)
-  (list input-symbol)))
+  (list input-symbol)
+  (nth expanded-list-index expanded-lists)))
 (setq
  expanded-list-index
  (1+ expanded-list-index
@@ -1771,6 +1771,7 @@
   ;; 3. Process each unprocessed list and expand into a list of 
lists of terminals and the e-identifier
   (let ((unprocessed-data)
 (unprocessed-list)
+(unprocessed-list-length)
 (unprocessed-list-index)
 (processed-list))
 (while unprocessed-lists
@@ -1821,7 +1822,8 @@
skip-flag
t)
   (parser-generator--debug
-   (message "Unprocessed list: %S starts with 
e-identifier, skipping")))
+   (message
+"Unprocessed list starts with e-identifier, 
skipping")))
 
   (cond
 



[elpa] externals/parser-generator 4e4907da84 10/29: More wrestling with FIRST and E-FREE-FIRST

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 4e4907da844099cf171113dc660b217fa5b32f50
Author: Christian Johansson 
Commit: Christian Johansson 

More wrestling with FIRST and E-FREE-FIRST
---
 parser-generator.el   | 363 +++---
 test/parser-generator-test.el |   8 +
 2 files changed, 173 insertions(+), 198 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 5c5b923fd1..6236e85652 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1098,25 +1098,34 @@
 ,i
 ,f-sets
 ,production-lhs)
-  '((nil t 0)
+  '((nil nil 0)
 
 (parser-generator--debug
  (message
-  "f-set-return: %s = %s"
+  "\nf-set-return: %s = %s"
   rhs-string
   f-set-return))
 
-(unless (nth 0 f-set-return)
+;; Unless set was fully expanded..
+(if (nth 0 f-set-return)
+(parser-generator--debug
+ (message
+  "Production '%S' fully expanded,"
+  production-lhs))
+
+  ;; Get unexpanded non-terminal
   (let ((unexpanded-non-terminal
  (nth 1 f-set-return)))
 (cond
+
  ((equal
unexpanded-non-terminal
production-lhs)
   (parser-generator--debug
(message
-"Production '%S' unexpanded due to 
self-reference, ignore flag."
+"Production '%S' un-expanded due to 
self-reference, ignore flag."
 production-lhs)))
+
  ((gethash
unexpanded-non-terminal
f-set)
@@ -1124,14 +1133,15 @@
(message
 "Production '%S' is un-expanded due to 
reference to previously processed production '%S', ignore flag."
 production-lhs
-unexpanded-non-terminal
-)))
+unexpanded-non-terminal)))
+
  (t
   (parser-generator--debug
(message
-"Expanded-all negative set because 
f-set-return '%s' is not fully expanded because '%s' is unexpanded"
-f-set-return
-(nth 1 f-set-return)))
+"Production 'S' is un-expanded due to 
reference to un-expanded non-terminal '%S'"
+production-lhs
+unexpanded-non-terminal))
+
   (setq
rhs-expanded-full
nil)
@@ -1151,10 +1161,6 @@
   production-lhs
   rhs-string
   rhs-leading-terminals))
-(parser-generator--debug
- (message
-  "expanded-all: %s"
-  expanded-all))
 
 (when rhs-leading-terminals
   (when (and
@@ -1167,25 +1173,30 @@
rhs-leading-terminals-element
f-p-set)))
 
-  ;; If we have multiple equal LHS
-  ;; merge them
-  (when (
- gethash
+  ;; If we have multiple equal LHS merge them
+  (when (gethash
  production-lhs
  f-set)
 (let ((existing-f-set
(gethash
 production-lhs
 f-set)))
+  (parser-generator--debug
+   (message
+"existing-f-set: %S"
+existing-f-set))
 
   ;; If another RHS has not been fully expanded
   ;; mark LHS as not fully expanded
-  (unless (nth 0 existing-f-set)
+  (if (nth 0 existing-f-set)
+  (parser-generator--debug
+   (message
+"Previous RHS has been fully expanded as well."))
+
 (parse

[elpa] externals/parser-generator dced2e199f 22/29: Sorting LR-action tables before outputting them in messages

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit dced2e199ff1da3724538d1385b32b3d0c7e006e
Author: Christian Johansson 
Commit: Christian Johansson 

Sorting LR-action tables before outputting them in messages
---
 parser-generator-lr.el   | 11 +--
 test/parser-generator-lr-test.el |  5 +++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/parser-generator-lr.el b/parser-generator-lr.el
index 3718857c28..1f72ae7dd9 100644
--- a/parser-generator-lr.el
+++ b/parser-generator-lr.el
@@ -682,6 +682,11 @@
 (parser-generator--debug
  (message "%s actions %s" goto-index action-table))
 (when action-table
+  (setq
+   action-table
+   (sort
+action-table
+'parser-generator--sort-list))
   (message
"ACTION-TABLE (%d): %S\n"
goto-index
@@ -689,11 +694,13 @@
   (push
(list
 goto-index
-(sort action-table 'parser-generator--sort-list))
+action-table)
action-tables
 (unless found-accept
   (error "Failed to find an accept action in the generated 
action-tables!"))
-(setq action-tables (nreverse action-tables))
+(setq
+ action-tables
+ (nreverse action-tables))
 (setq
  parser-generator-lr--action-tables
  (make-hash-table :test 'equal))
diff --git a/test/parser-generator-lr-test.el b/test/parser-generator-lr-test.el
index 3ec3b50fa2..f8bc3d8f30 100644
--- a/test/parser-generator-lr-test.el
+++ b/test/parser-generator-lr-test.el
@@ -1165,7 +1165,7 @@
   (message "Passed test PHP 8.0 match grammar 2")
   ))
 
-  ;; TODO Test another left-recursive grammar from PHP 8.0 here
+  ;; Test another left-recursive grammar from PHP 8.0 here
   (parser-generator-set-look-ahead-number 1)
   (parser-generator-set-e-identifier '%empty)
   (parser-generator-set-grammar
@@ -1735,7 +1735,7 @@
 (7 nil)
 (8 nil))
   (parser-generator-lr--get-expanded-goto-tables)))
-(message "Passed GOTO-tables k = 2")
+(message "Passed GOTO-tables k = 0")
 
 ;; *   +   0   1   $
 ;; 0   s1  s2  
@@ -1755,6 +1755,7 @@
   "Action-tables k = 0: %s"
   (parser-generator-lr--get-expanded-action-tables)))
 
+;; TODO Make this work
 (should
  (equal
   '(



[elpa] externals/parser-generator e2e464bb17 26/29: Updated version, date and TODO

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit e2e464bb1771d60afb7ab44e21fb7477425563e2
Author: Christian Johansson 
Commit: Christian Johansson 

Updated version, date and TODO
---
 TODO.md | 4 ++--
 parser-generator.el | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/TODO.md b/TODO.md
index b252f75e23..c64b862463 100644
--- a/TODO.md
+++ b/TODO.md
@@ -2,7 +2,7 @@
 
 ## Main
 
-Functions (with validations) to set
+Functions (with validations) to set global variables
 
 * parser-generator--global-attributes
 * parser-generator--context-sensitive-attributes
@@ -10,7 +10,7 @@ Functions (with validations) to set
 
 ## LR-Parser
 
-Functions (with validations) to set
+Functions (with validations) to set global variables
 
 * parser-generator-lr--global-precedence-attributes
 * parser-generator-lr--context-sensitive-precedence-attribute
diff --git a/parser-generator.el b/parser-generator.el
index 0a2575efae..3390ff5132 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -5,8 +5,8 @@
 ;; Author: Christian Johansson 
 ;; Maintainer: Christian Johansson 
 ;; Created: 10 Oct 2020
-;; Modified: 20 Nov 2021
-;; Version: 0.1.3
+;; Modified: 12 Feb 2021
+;; Version: 0.1.4
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-parser-generator
 
@@ -1271,7 +1271,7 @@
 
 ;; p. 357
 (defun parser-generator--f-set (input-tape state stack)
-  "A deterministic push-down transducer (DPDT) for building F-sets from 
INPUT-TAPE, STATE and STACK."
+  "A deterministic push-down transducer (DPT) for building F-sets from 
INPUT-TAPE, STATE and STACK."
   (unless (listp input-tape)
 (setq input-tape (list input-tape)))
   (parser-generator--debug



[elpa] externals/parser-generator a7a321ca93 28/29: Added link to TODO document

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit a7a321ca93e67b9e67e0941fba18ef74bf4aff6d
Author: Christian Johansson 
Commit: Christian Johansson 

Added link to TODO document
---
 README.md | 4 
 TODO.md   | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 2f5205e920..5823925662 100644
--- a/README.md
+++ b/README.md
@@ -18,3 +18,7 @@ We use deterministic push down transducer (PDT) based 
algorithms. Read more [her
 ## Test
 
 Run in terminal `make clean && make tests && make compile`
+
+## TODO / Roadmap / Issues
+
+Look here [here](TODO.md).
diff --git a/TODO.md b/TODO.md
index c64b862463..54a3e26d94 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,4 +1,4 @@
-# TODO
+# TODO / Roadmap / Issues
 
 ## Main
 
@@ -14,3 +14,5 @@ Functions (with validations) to set global variables
 
 * parser-generator-lr--global-precedence-attributes
 * parser-generator-lr--context-sensitive-precedence-attribute
+
+[Back to start](../../)



[elpa] externals/parser-generator 432e3732f2 20/29: Fixed some byte-compilation warnings

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 432e3732f2db784e9960fdb2f6eda9f1bdf33e4f
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed some byte-compilation warnings
---
 parser-generator.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 65465b81fe..e709e6142b 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -45,7 +45,7 @@
 
 (defvar
   parser-generator--debug
-  t
+  nil
   "Whether to print debug messages or not.")
 
 (defvar
@@ -1284,8 +1284,7 @@
 (input-tape-length (length input-tape))
 (k (nth 0 state))
 (i (nth 1 state))
-(f-sets (nth 2 state))
-(lhs (nth 3 state)))
+(f-sets (nth 2 state)))
 (parser-generator--debug
  (message
   "input-tape-length: %s"
@@ -1774,7 +1773,7 @@
 
 (parser-generator--debug
  (message
-  "Added e-identifier to processed list"
+  "Added e-identifier to processed list: %S"
   processed-list))
 (push
  unprocessed-list-symbol
@@ -1789,7 +1788,7 @@
  processed-list)
 (parser-generator--debug
  (message
-  "Added terminal %S to processed list"
+  "Added terminal %S to processed list: %S"
   unprocessed-list-symbol
   processed-list)
 



[elpa] externals/parser-generator 6726c5231e 24/29: Fixed conflict

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 6726c5231e1c73ec7d7a49a9a2aeb6b0c6b59e5c
Merge: add9d0072f 98dc561880
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed conflict
---
 parser-generator-lr.el   |   11 +-
 parser-generator.el  | 1409 +++---
 test/parser-generator-lr-test.el |   27 +-
 test/parser-generator-test.el|   34 +-
 4 files changed, 755 insertions(+), 726 deletions(-)

diff --git a/parser-generator-lr.el b/parser-generator-lr.el
index 3718857c28..1f72ae7dd9 100644
--- a/parser-generator-lr.el
+++ b/parser-generator-lr.el
@@ -682,6 +682,11 @@
 (parser-generator--debug
  (message "%s actions %s" goto-index action-table))
 (when action-table
+  (setq
+   action-table
+   (sort
+action-table
+'parser-generator--sort-list))
   (message
"ACTION-TABLE (%d): %S\n"
goto-index
@@ -689,11 +694,13 @@
   (push
(list
 goto-index
-(sort action-table 'parser-generator--sort-list))
+action-table)
action-tables
 (unless found-accept
   (error "Failed to find an accept action in the generated 
action-tables!"))
-(setq action-tables (nreverse action-tables))
+(setq
+ action-tables
+ (nreverse action-tables))
 (setq
  parser-generator-lr--action-tables
  (make-hash-table :test 'equal))
diff --git a/parser-generator.el b/parser-generator.el
index 6a3befc48a..0a2575efae 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -45,7 +45,7 @@
 
 (defvar
   parser-generator--debug
-  t
+  nil
   "Whether to print debug messages or not.")
 
 (defvar
@@ -78,11 +78,6 @@
   nil
   "Generated F-sets for grammar.")
 
-(defvar
-  parser-generator--f-free-sets
-  nil
-  "Generated e-free F-sets for grammar.")
-
 (defvar
   parser-generator--look-ahead-number
   nil
@@ -161,9 +156,6 @@
   (setq
parser-generator--f-sets
nil)
-  (setq
-   parser-generator--f-free-sets
-   nil)
   (setq
parser-generator--table-firsts
(make-hash-table :test 'equal)))
@@ -700,6 +692,7 @@
   (parser-generator--valid-look-ahead-number-p
parser-generator--look-ahead-number)
 (error "Invalid look-ahead number k!"))
+  (message "k = %d" parser-generator--look-ahead-number)
   (unless parser-generator--grammar
 (error "No grammar defined!"))
   (unless
@@ -1051,220 +1044,183 @@
 (defun parser-generator--generate-f-sets ()
   "Generate F-sets for grammar."
   ;; Generate F-sets only once per grammar
-  (unless (and
-   parser-generator--f-sets
-   parser-generator--f-free-sets)
+  (unless parser-generator--f-sets
 (parser-generator--debug
  (message "(parser-generator--generate-f-sets)"))
 (let ((productions
(parser-generator--get-grammar-productions))
-  (k
-   (max
-1
-parser-generator--look-ahead-number)))
-  (let ((disallow-set '(nil t)))
-(parser-generator--debug
- (message "disallow-set: %s" disallow-set))
-(dolist (disallow-e-first disallow-set)
+  (k (max 1 parser-generator--look-ahead-number)))
+  (let ((f-sets (make-hash-table :test 'equal))
+(i 0)
+(max-i 100)
+(expanded-all))
+
+(while (not expanded-all)
+  (when (> i max-i)
+(error "Endless loop!"))
   (parser-generator--debug
-   (message "disallow-e-first: %s" disallow-e-first))
-  (let ((f-sets (make-hash-table :test 'equal))
-(i 0)
-(expanded-all nil)
-(expanded-all-second nil))
-
-(while (or
-(not expanded-all)
-(not expanded-all-second))
-  ;; Make one iteration after everything has been expanded
-  (when expanded-all
-(setq
- expanded-all-second
- t))
-  (when (> i 100)
-(error "Endless loop!"))
-  (parser-generator--debug
-   (message "i = %s" i))
+   (message "i = %s" i))
+  (let ((f-set
+ (make-hash-table :test 'equal))
+(distinct-lhs)
+(distinct-lhs-p
+ (make-hash-table :test 'equal))
+(previous-f-set))
+(when (> i 0)
   (setq
expanded-all
t)
-  (let ((f-set (make-hash-table :test 'equal)))
-
-;; Iterate all productions, set F_i
-(dolist (p productions)
-  (let ((production-lhs (car p))
-(production-rhs (cdr p)))
-(parser-generator--debug
- (message
-  "Production: %s -> %s"
-  production-lhs
-  production-

[elpa] externals/parser-generator e1f3fb4042 18/29: More work on FIRST

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit e1f3fb404272168b72ad67586d1b2ff633a55126
Author: Christian Johansson 
Commit: Christian Johansson 

More work on FIRST
---
 parser-generator.el   | 12 ++--
 test/parser-generator-test.el |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index a1ae0b8114..876cd44f5e 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1346,13 +1346,15 @@
   (let ((leading-terminals-count
  (length leading-terminals))
 (leading-symbols-count
- (length leading-symbols)))
+ (length leading-symbols))
+(keep-iterating t))
 (parser-generator--debug
  (message
   "leading-terminals-count: %s"
   leading-terminals-count))
 
 (while (and
+keep-iterating
 (< input-tape-index input-tape-length)
 (< leading-terminals-count k))
   (let ((rhs-element (nth input-tape-index input-tape))
@@ -1416,6 +1418,9 @@
(list rhs-element))
   (setq
expanded-all
+   nil)
+  (setq
+   keep-iterating
nil))
 
 (if sub-terminal-sets
@@ -1531,7 +1536,10 @@
  nil)
 (setq
  unexpanded-non-terminal
- (list rhs-element
+ (list rhs-element))
+(setq
+ keep-iterating
+ nil)))
 
  ((equal rhs-type 'E-IDENTIFIER)
   (setq
diff --git a/test/parser-generator-test.el b/test/parser-generator-test.el
index 5713e0b557..aded3527c5 100644
--- a/test/parser-generator-test.el
+++ b/test/parser-generator-test.el
@@ -202,7 +202,7 @@
   (parser-generator--generate-f-sets)
   (should
(equal
-'(t ((e a)))
+'(t ((e a) (e)))
 (gethash
  (list 'S)
  parser-generator--f-sets)))



[elpa] externals/parser-generator 653b8edece 17/29: Added failing test for generate-f-sets

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 653b8edece0b9d56235b2f9f73a1ddb07b103e60
Author: Christian Johansson 
Commit: Christian Johansson 

Added failing test for generate-f-sets
---
 parser-generator.el   |  2 +-
 test/parser-generator-test.el | 19 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/parser-generator.el b/parser-generator.el
index 63df0175b2..a1ae0b8114 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1370,7 +1370,7 @@
   (setq rhs-type 'E-IDENTIFIER))
  ((parser-generator--valid-terminal-p rhs-element)
   (setq rhs-type 'TERMINAL))
- (t (error (format "Invalid symbol %s" rhs-element
+ (t (error (format "Invalid symbol %s!" rhs-element
 (parser-generator--debug
  (message
   "rhs-type: %s"
diff --git a/test/parser-generator-test.el b/test/parser-generator-test.el
index da65f4cf02..5713e0b557 100644
--- a/test/parser-generator-test.el
+++ b/test/parser-generator-test.el
@@ -191,6 +191,24 @@
 
   (message "Passed tests for (parser-generator--follow)"))
 
+(defun parser-generator-test--generate-f-sets ()
+  "Test `parser-generator--first'."
+  (message "Starting tests for (parser-generator-test--generate-f-sets)")
+
+  (parser-generator-set-e-identifier 'e)
+  (parser-generator-set-grammar '((Sp S) (a b) ((Sp S) (S (S a S b)) (S e)) 
Sp))
+  (parser-generator-set-look-ahead-number 1)
+  (parser-generator-process-grammar)
+  (parser-generator--generate-f-sets)
+  (should
+   (equal
+'(t ((e a)))
+(gethash
+ (list 'S)
+ parser-generator--f-sets)))
+
+  (message "Passed tests for (parser-generator-test--generate-f-sets)"))
+
 (defun parser-generator-test--first ()
   "Test `parser-generator--first'."
   (message "Starting tests for (parser-generator--first)")
@@ -1056,6 +1074,7 @@
   (parser-generator-test--valid-production-p)
   (parser-generator-test--valid-sentential-form-p)
   (parser-generator-test--valid-terminal-p)
+  (parser-generator-test--generate-f-sets)
 
   ;; Algorithms
   (parser-generator-test--first)



[elpa] externals/parser-generator 69fc89898e 19/29: Passing all tests for FIRST and E-FREE-FIRST with new algorithm

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 69fc89898e741f4733c770936b37b0ad28348761
Author: Christian Johansson 
Commit: Christian Johansson 

Passing all tests for FIRST and E-FREE-FIRST with new algorithm
---
 parser-generator.el   | 351 --
 test/parser-generator-test.el |   7 +-
 2 files changed, 138 insertions(+), 220 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index 876cd44f5e..65465b81fe 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1049,31 +1049,32 @@
  (message "(parser-generator--generate-f-sets)"))
 (let ((productions
(parser-generator--get-grammar-productions))
-  (k
-   (max
-1
-parser-generator--look-ahead-number)))
+  (k (max 1 parser-generator--look-ahead-number)))
   (let ((f-sets (make-hash-table :test 'equal))
 (i 0)
-(expanded-all nil)
-(expanded-all-second nil))
-
-(while (or
-(not expanded-all)
-(not expanded-all-second))
-  ;; Make one iteration after everything has been expanded
-  (when expanded-all
-(setq
- expanded-all-second
- t))
-  (when (> i 100)
+(max-i 100)
+(expanded-all))
+
+(while (not expanded-all)
+  (when (> i max-i)
 (error "Endless loop!"))
   (parser-generator--debug
(message "i = %s" i))
-  (setq
-   expanded-all
-   t)
-  (let ((f-set (make-hash-table :test 'equal)))
+  (let ((f-set
+ (make-hash-table :test 'equal))
+(distinct-lhs)
+(distinct-lhs-p
+ (make-hash-table :test 'equal))
+(previous-f-set))
+(when (> i 0)
+  (setq
+   expanded-all
+   t)
+  (setq
+   previous-f-set
+   (gethash
+(1- i)
+f-sets)))
 
 ;; Iterate all productions, set F_i
 (dolist (p productions)
@@ -1086,158 +1087,129 @@
   production-rhs))
 
 ;; Iterate all blocks in RHS
-(let ((f-p-set)
-  (rhs-expanded-full t))
-  (dolist (rhs-p production-rhs)
-(let ((rhs-string rhs-p))
-  (let ((rhs-leading-terminals)
-(f-set-return
- (parser-generator--f-set
-  rhs-string
-  `(
-,k
-,i
-,f-sets
-,production-lhs)
-  '((nil nil 0)
-
-(parser-generator--debug
- (message
-  "\nf-set-return: %s = %s"
-  rhs-string
-  f-set-return))
-
-;; Unless set was fully expanded..
-(if (nth 0 f-set-return)
-(parser-generator--debug
- (message
-  "Production '%S' fully expanded,"
-  production-lhs))
-
-  ;; Get unexpanded non-terminal
-  (let ((unexpanded-non-terminal
- (nth 1 f-set-return)))
-(cond
-
- ((equal
-   unexpanded-non-terminal
-   production-lhs)
-  (parser-generator--debug
-   (message
-"Production '%S' un-expanded due to 
self-reference, ignore flag."
-production-lhs)))
-
- ((gethash
-   unexpanded-non-terminal
-   f-set)
-  (parser-generator--debug
-   (message
-"Production '%S' is un-expanded due to 
reference to previously processed production '%S', ignore flag."
-production-lhs
-unexpanded-non-terminal)))
-
- (t
-  (parser-generator--debug
-   (message
-"Production 'S' is un-expanded due to 
reference to un-expanded non-terminal '%S'"
-production-lhs
-unexpanded-non-terminal))
-
-  (setq
-   rhs-expanded-full
-   nil)
-  

[elpa] externals/parser-generator 4c34af706f 29/29: Improved documentation

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 4c34af706fbcd9b7a6d1c7a88595e169fa86daf6
Author: Christian Johansson 
Commit: Christian Johansson 

Improved documentation
---
 README.md   | 2 +-
 docs/Syntax-Analysis.md | 7 +++
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 5823925662..5432ef4407 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ We use a regular-language based lexical analyzer that can be 
implemented by a fi
 
 ## Syntax Analysis / Parser
 
-We use deterministic push down transducer (PDT) based algorithms. Read more 
[here](docs/Syntax-Analysis.md).
+We use deterministic push down transducer (DPDT) based algorithms. Read more 
[here](docs/Syntax-Analysis.md).
 
 ## Test
 
diff --git a/docs/Syntax-Analysis.md b/docs/Syntax-Analysis.md
index 836cde68d7..6f639d7b1f 100644
--- a/docs/Syntax-Analysis.md
+++ b/docs/Syntax-Analysis.md
@@ -12,7 +12,6 @@ We use push down transducer (PDT) based algorithms.
 ## Without Backtracking
 
 * LL(k) *WIP*
-* Deterministic Shift-Reduce Parsing *WIP*
 * [LR(k)](Syntax-Analysis/LRk.md)
 * [LR(0)](Syntax-Analysis/LR0.md)
 * Formal Shift-Reduce Parsing Algorithms *WIP*
@@ -67,11 +66,11 @@ Can be set in variable 
`parser-generator--global-declaration`. This may be used
 
 ### e-identifier
 
-The symbol defined in variable `parser-generator--e-identifier`, with 
default-value: 'e`, symbolizes the e symbol. The symbol is allowed in some 
grammars and not in others.
+The symbol defined in variable `parser-generator--e-identifier`, with 
default-value: `'e`, symbolizes the e symbol. The symbol is allowed in some 
grammars and not in others and can be used to make parts of grammar optional.
 
 ### End-of-file identifier
 
-The symbol defined in variable `parser-generator--eof-identifier`, with 
default-value: '$`, symbolizes the end-of-file symbol.
+The symbol defined in variable `parser-generator--eof-identifier`, with 
default-value: `'$`, symbolizes the end-of-file symbol.
 
 ### Non-terminals
 
@@ -107,7 +106,7 @@ The start symbol is the entry-point of the grammar and 
should be either a string
 
 ### Look-ahead number
 
-Is a simple integer above zero. You set it like this: 
`(parser-generator-set-look-ahead-number 1)` for `1` number look-ahead.
+Is a simple integer above zero. You set it like this: 
`(parser-generator-set-look-ahead-number 1)` for a `1` number look-ahead.
 
 ### Syntax-directed-translation (SDT)
 



[elpa] externals/parser-generator 536198eb0a 27/29: Fixed typo in comment

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 536198eb0a6351b63688a6921d5940eb47301806
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed typo in comment
---
 parser-generator.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parser-generator.el b/parser-generator.el
index 3390ff5132..956e31ad88 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1271,7 +1271,7 @@
 
 ;; p. 357
 (defun parser-generator--f-set (input-tape state stack)
-  "A deterministic push-down transducer (DPT) for building F-sets from 
INPUT-TAPE, STATE and STACK."
+  "A deterministic push-down transducer (DPDT) for building F-sets from 
INPUT-TAPE, STATE and STACK."
   (unless (listp input-tape)
 (setq input-tape (list input-tape)))
   (parser-generator--debug



[elpa] externals/parser-generator ba2bda38da 25/29: Added use of default conflict resolution flag in action-table generation

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit ba2bda38da728f39b0666455c5b3dc07b680a68e
Author: Christian Johansson 
Commit: Christian Johansson 

Added use of default conflict resolution flag in action-table generation
---
 parser-generator-lr.el | 24 ++--
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/parser-generator-lr.el b/parser-generator-lr.el
index 1f72ae7dd9..f9e210b207 100644
--- a/parser-generator-lr.el
+++ b/parser-generator-lr.el
@@ -602,12 +602,24 @@
(gethash
 index-hash-key
 index-symbols)))
-  (error
-   "Reduce/%S conflict for %S in state 
%S"
-   (car (cdr conflicted-item))
-   u
-   goto-index
-   
+  (if (and
+   
parser-generator-lr--allow-default-conflict-resolution
+   (equal
+'shift
+(car (cdr conflicted-item
+  (progn
+(parser-generator--debug
+ (message
+  "Shift takes precedence over 
reduce by default"))
+(setq
+ skip-symbol
+ t))
+(error
+ "Reduce/%S conflict for %S in 
state %S"
+ (car (cdr conflicted-item))
+ u
+ goto-index
+ )
 
 (unless
 (or



[elpa] externals/parser-generator 58548b8e10 21/29: Passing test for LR-parse with k=2 again

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 58548b8e10d06eded8cfcbe9be5c2204bbd197f6
Author: Christian Johansson 
Commit: Christian Johansson 

Passing test for LR-parse with k=2 again
---
 parser-generator.el  | 12 ++--
 test/parser-generator-lr-test.el | 11 +--
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/parser-generator.el b/parser-generator.el
index e709e6142b..f901b45077 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1342,6 +1342,8 @@
   (setq rhs-type 'E-IDENTIFIER))
  ((parser-generator--valid-terminal-p rhs-element)
   (setq rhs-type 'TERMINAL))
+ ((parser-generator--valid-eof-p rhs-element)
+  (setq rhs-type 'EOF))
  (t (error (format "Invalid symbol %s!" rhs-element
 (parser-generator--debug
  (message
@@ -1476,7 +1478,9 @@
leading-symbols-count
(1+ leading-symbols-count)))
 
- ((equal rhs-type 'TERMINAL)
+ ((or
+   (equal rhs-type 'TERMINAL)
+   (equal rhs-type 'EOF))
   (setq
leading-symbols
(append
@@ -1638,9 +1642,13 @@
 "expanded-lists after adding: %S"
 expanded-lists)
 
- ;; if input symbol is a terminal or the e-identifier push it to 
each expanded list
+ ;; if input symbol is a terminal
+ ;; or the e-identifier
+ ;; or the eof-identifier
+ ;; push it to each expanded list
  ((or
(parser-generator--valid-e-p input-symbol)
+   (parser-generator--valid-eof-p input-symbol)
(parser-generator--valid-terminal-p input-symbol))
   (parser-generator--debug
(message
diff --git a/test/parser-generator-lr-test.el b/test/parser-generator-lr-test.el
index 316b1b1f93..3ec3b50fa2 100644
--- a/test/parser-generator-lr-test.el
+++ b/test/parser-generator-lr-test.el
@@ -1281,7 +1281,6 @@
 
   (message "Passed tests for (parser-generator-lr--parse)"))
 
-;; TODO Make these pass again
 (defun parser-generator-lr-test-parse-k-2 ()
   "Test `parser-generator-lr-parse' with k = 2."
   (message "Started tests for (parser-generator-lr-parse) k = 2")
@@ -1486,19 +1485,18 @@
  lr-items)
 (parser-generator--debug
  (message
-  "Action-tables k = 2: %s"
+  "Action-tables k = 2: %S"
   (parser-generator-lr--get-expanded-action-tables)))
-
 (should
  (equal
   '(
 (0 (((a b) shift)))
 (1 ((($ $) reduce 2) ((a b) shift)))
 (2 ((($ $) accept)))
-(3 (((b $) shift) ((b c) shift) ((b a) shift)))
-(4 ((($ $) reduce 6) ((a b) reduce 6) ((a $) shift) ((a c) shift) ((a 
a) shift) ((c a) shift) ((c $) shift)))
+(3 (((b c) shift) ((b a) shift) ((b $) shift)))
+(4 ((($ $) reduce 6) ((a b) reduce 6) ((a c) shift) ((a a) shift) ((a 
$) shift) ((c a) shift) ((c $) shift)))
 (5 ((($ $) reduce 3) ((a b) reduce 3)))
-(6 ((($ $) reduce 6) ((a b) reduce 6) ((a $) shift) ((a c) shift) ((a 
a) shift) ((c a) shift) ((c $) shift)))
+(6 ((($ $) reduce 6) ((a b) reduce 6) ((a c) shift) ((a a) shift) ((a 
$) shift) ((c a) shift) ((c $) shift)))
 (7 ((($ $) reduce 5) ((a b) reduce 5)))
 (8 ((($ $) reduce 4) ((a b) reduce 4)))
 (9 ((($ $) reduce 1)))
@@ -1611,6 +1609,7 @@
 
   (message "Passed tests for (parser-generator-lr--parse-k-2)"))
 
+;; TODO Make this pass again
 (defun parser-generator-lr-test-parse-k-0 ()
   "Test `parser-generator-lr-parse' with k = 0."
   (message "Started tests for (parser-generator-lr-parse) k = 0")



[elpa] externals/parser-generator 14f21396e9: Updated copyright years

2022-02-11 Thread Christian Johansson
branch: externals/parser-generator
commit 14f21396e961607019af7f4c190a32a4f9b361fc
Author: Christian Johansson 
Commit: Christian Johansson 

Updated copyright years
---
 parser-generator-lex-analyzer.el   | 2 +-
 parser-generator-lr-export.el  | 2 +-
 parser-generator-lr.el | 2 +-
 parser-generator.el| 2 +-
 test/parser-generator-lex-analyzer-test.el | 2 +-
 test/parser-generator-lr-export-test.el| 2 +-
 test/parser-generator-lr-test.el   | 2 +-
 test/parser-generator-test.el  | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/parser-generator-lex-analyzer.el b/parser-generator-lex-analyzer.el
index ae27555861..5422cc7e36 100644
--- a/parser-generator-lex-analyzer.el
+++ b/parser-generator-lex-analyzer.el
@@ -1,6 +1,6 @@
 ;;; parser-generator-lex-analyzer.el --- Lex-analyzer library -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 
 ;;; Commentary:
diff --git a/parser-generator-lr-export.el b/parser-generator-lr-export.el
index f545cdd9f3..0a1a6c3c82 100644
--- a/parser-generator-lr-export.el
+++ b/parser-generator-lr-export.el
@@ -1,6 +1,6 @@
 ;;; parser-generator-lr-export.el --- Export LR(k) Parser -*- lexical-binding: 
t -*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 
 ;;; Commentary:
diff --git a/parser-generator-lr.el b/parser-generator-lr.el
index f9e210b207..71a25b176d 100644
--- a/parser-generator-lr.el
+++ b/parser-generator-lr.el
@@ -1,6 +1,6 @@
 ;;; parser-generator-lr.el --- LR(k) Parser Generator -*- lexical-binding: t 
-*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 
 ;;; Commentary:
diff --git a/parser-generator.el b/parser-generator.el
index 956e31ad88..2ac04f2d9e 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -1,6 +1,6 @@
 ;;; parser-generator.el --- Parser Generator library -*- lexical-binding: t -*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 ;; Author: Christian Johansson 
 ;; Maintainer: Christian Johansson 
diff --git a/test/parser-generator-lex-analyzer-test.el 
b/test/parser-generator-lex-analyzer-test.el
index 5e0367b514..2bbeb0dad1 100644
--- a/test/parser-generator-lex-analyzer-test.el
+++ b/test/parser-generator-lex-analyzer-test.el
@@ -1,6 +1,6 @@
 ;;; parser-generator-lex-analyzer-test.el --- Tests for lex-analyzer -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 
 ;;; Commentary:
diff --git a/test/parser-generator-lr-export-test.el 
b/test/parser-generator-lr-export-test.el
index 9df4e24f86..88bad1b8db 100644
--- a/test/parser-generator-lr-export-test.el
+++ b/test/parser-generator-lr-export-test.el
@@ -1,6 +1,6 @@
 ;;; parser-generator-lr-export-test.el --- Tests for LR(k) Parser Export -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 
 ;;; Commentary:
diff --git a/test/parser-generator-lr-test.el b/test/parser-generator-lr-test.el
index 8fc8fbae76..56578d0b28 100644
--- a/test/parser-generator-lr-test.el
+++ b/test/parser-generator-lr-test.el
@@ -1,6 +1,6 @@
 ;; parser-generator-lr-test.el --- Tests for LR(k) Parser Generator -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 
 ;;; Commentary:
diff --git a/test/parser-generator-test.el b/test/parser-generator-test.el
index 6a13070990..1fab673dc2 100644
--- a/test/parser-generator-test.el
+++ b/test/parser-generator-test.el
@@ -1,6 +1,6 @@
 ;;; parser-generator-test.el --- Tests for Parser Generator -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2020-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 
 ;;; Commentary:



[nongnu] elpa/markdown-mode 1d36f54d5e 2/3: update README.md to reflect PR functionality

2022-02-11 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 1d36f54d5e38e62d5f4e262cc5088509c919437b
Author: Carlos Scheidegger 
Commit: Carlos Scheidegger 

update README.md to reflect PR functionality
---
 README.md | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index bde33d9b30..e597765077 100644
--- a/README.md
+++ b/README.md
@@ -665,13 +665,16 @@ that can be customized.  The M-x 
customize-mode command
 provides an interface to all of the possible customizations:
 
   * `markdown-command` - the command used to run Markdown (default:
-`markdown`).  This variable may be customized to pass
-command-line options to your Markdown processor of choice. We recommend
-you to use list of strings if you want to set command line options like.
+`markdown`).  This variable may be customized to pass command-line
+options to your Markdown processor of choice. We recommend you to
+use list of strings if you want to set command line options like.
 `'("pandoc" "--from=markdown" "--to=html5")`.  It can also be a
 function; in this case `markdown` will call it with three
-arguments: the beginning and end of the region to process, and
-a buffer to write the output to.
+arguments or four arguments, depending on
+`markdown-command-needs-filename`.  The first three arguments are:
+the beginning and end of the region to process, and a buffer to
+write the output to. When `markdown-command-needs-filename` is `t`, the 
fourth
+argument is set to the name of the file.
 
   * `markdown-command-needs-filename` - set to `t` if
 `markdown-command` does not accept standard input (default:
@@ -680,9 +683,7 @@ provides an interface to all of the possible customizations:
 When set to `t`, `markdown-mode` will pass the name of the file
 as the final command-line argument to `markdown-command`.  Note
 that in the latter case, you will only be able to run
-`markdown-command` from buffers which are visiting a file.  If
-`markdown-command` is a function, `markdown-command-needs-filename`
-is ignored.
+`markdown-command` from buffers which are visiting a file. 
 
   * `markdown-open-command` - the command used for calling a standalone
 Markdown previewer which is capable of opening Markdown source files



[nongnu] elpa/markdown-mode 521658eb32 3/3: Merge pull request #687 from cscheid/feat/markdown-command-function-needs-name

2022-02-11 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 521658eb32e456681592443e04ae507c3a59ed07
Merge: 8c7b0c4ab4 1d36f54d5e
Author: Shohei YOSHIDA 
Commit: GitHub 

Merge pull request #687 from 
cscheid/feat/markdown-command-function-needs-name

make `markdown` pass `buffer-file-name`  to `markdown-command` if needed
---
 CHANGES.md   |  5 +
 README.md| 17 +
 markdown-mode.el |  6 +-
 3 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 0511ef0426..2a2a3b12bb 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,11 @@
 
 *Under development*
 
+*   Improvements:
+-   `markdown` passes `buffer-file-name` as a parameter to
+`markdown-command` when `markdown-command-needs-filename` is
+`t` and `markdown-command` is a function.
+
 # Markdown Mode 2.5
 
 *   **Breaking changes:**
diff --git a/README.md b/README.md
index bde33d9b30..e597765077 100644
--- a/README.md
+++ b/README.md
@@ -665,13 +665,16 @@ that can be customized.  The M-x 
customize-mode command
 provides an interface to all of the possible customizations:
 
   * `markdown-command` - the command used to run Markdown (default:
-`markdown`).  This variable may be customized to pass
-command-line options to your Markdown processor of choice. We recommend
-you to use list of strings if you want to set command line options like.
+`markdown`).  This variable may be customized to pass command-line
+options to your Markdown processor of choice. We recommend you to
+use list of strings if you want to set command line options like.
 `'("pandoc" "--from=markdown" "--to=html5")`.  It can also be a
 function; in this case `markdown` will call it with three
-arguments: the beginning and end of the region to process, and
-a buffer to write the output to.
+arguments or four arguments, depending on
+`markdown-command-needs-filename`.  The first three arguments are:
+the beginning and end of the region to process, and a buffer to
+write the output to. When `markdown-command-needs-filename` is `t`, the 
fourth
+argument is set to the name of the file.
 
   * `markdown-command-needs-filename` - set to `t` if
 `markdown-command` does not accept standard input (default:
@@ -680,9 +683,7 @@ provides an interface to all of the possible customizations:
 When set to `t`, `markdown-mode` will pass the name of the file
 as the final command-line argument to `markdown-command`.  Note
 that in the latter case, you will only be able to run
-`markdown-command` from buffers which are visiting a file.  If
-`markdown-command` is a function, `markdown-command-needs-filename`
-is ignored.
+`markdown-command` from buffers which are visiting a file. 
 
   * `markdown-open-command` - the command used for calling a standalone
 Markdown previewer which is capable of opening Markdown source files
diff --git a/markdown-mode.el b/markdown-mode.el
index 10342fb809..7c60b58951 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -7351,7 +7351,11 @@ Return the name of the output buffer used."
  (if (not (null command-args))
  (apply #'call-process-region begin-region end-region 
command nil buf nil command-args)
(call-process-region begin-region end-region command 
nil buf))
-   (funcall markdown-command begin-region end-region buf)
+   (if markdown-command-needs-filename
+   (if (not buffer-file-name)
+   (user-error "Must be visiting a file")
+ (funcall markdown-command begin-region end-region buf 
buffer-file-name))
+ (funcall markdown-command begin-region end-region buf))
;; If the ‘markdown-command’ function didn’t signal an
;; error, assume it succeeded by binding ‘exit-code’ to 0.
0))



[nongnu] elpa/markdown-mode updated (8c7b0c4ab4 -> 521658eb32)

2022-02-11 Thread ELPA Syncer
elpasync pushed a change to branch elpa/markdown-mode.

  from  8c7b0c4ab4 Start 2.6 development
   new  5f970814f4 make `markdown` pass `buffer-file-name` as a parameter 
to `markdown-command`
   new  1d36f54d5e update README.md to reflect PR functionality
   new  521658eb32 Merge pull request #687 from 
cscheid/feat/markdown-command-function-needs-name


Summary of changes:
 CHANGES.md   |  5 +
 README.md| 17 +
 markdown-mode.el |  6 +-
 3 files changed, 19 insertions(+), 9 deletions(-)



[nongnu] elpa/markdown-mode 5f970814f4 1/3: make `markdown` pass `buffer-file-name` as a parameter to `markdown-command`

2022-02-11 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 5f970814f4121474ec4f4b1bd43f759bb4b7108f
Author: Carlos Scheidegger 
Commit: Carlos Scheidegger 

make `markdown` pass `buffer-file-name` as a parameter to `markdown-command`
---
 CHANGES.md   | 5 +
 markdown-mode.el | 6 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 0511ef0426..2a2a3b12bb 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,11 @@
 
 *Under development*
 
+*   Improvements:
+-   `markdown` passes `buffer-file-name` as a parameter to
+`markdown-command` when `markdown-command-needs-filename` is
+`t` and `markdown-command` is a function.
+
 # Markdown Mode 2.5
 
 *   **Breaking changes:**
diff --git a/markdown-mode.el b/markdown-mode.el
index 10342fb809..7c60b58951 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -7351,7 +7351,11 @@ Return the name of the output buffer used."
  (if (not (null command-args))
  (apply #'call-process-region begin-region end-region 
command nil buf nil command-args)
(call-process-region begin-region end-region command 
nil buf))
-   (funcall markdown-command begin-region end-region buf)
+   (if markdown-command-needs-filename
+   (if (not buffer-file-name)
+   (user-error "Must be visiting a file")
+ (funcall markdown-command begin-region end-region buf 
buffer-file-name))
+ (funcall markdown-command begin-region end-region buf))
;; If the ‘markdown-command’ function didn’t signal an
;; error, assume it succeeded by binding ‘exit-code’ to 0.
0))