[elpa] externals/javaimp 6af25f1: * javaimp-parse.el: Add 'array' scope

2021-06-11 Thread Filipp Gunbin
branch: externals/javaimp
commit 6af25f120e5dbc8146718d947f51675c500cab97
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

* javaimp-parse.el: Add 'array' scope
---
 javaimp-parse.el | 15 +--
 javaimp-tests.el |  8 
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index df5df2a..8cf8e35 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -33,7 +33,7 @@ present."
 
 (cl-defstruct javaimp-scope
   type ; one of anonymous-class, class, interface, enum, local-class,
-   ; method, statement, simple-statement, unknown
+   ; method, statement, simple-statement, array, unknown
   name
   start
   open-brace)
@@ -123,7 +123,8 @@ non-nil or t.  Otherwise the return value is nil.
 If STOP-P wants to look forward, it should be prepared to see
 whitespace / comments, this is because backward movement skips
 them before invoking STOP-P.  It should not move point.  If
-omitted, it defaults to `always'."
+omitted, it defaults to `always', in this case the effect of the
+function is to just skip whitespace / comments."
   (or stop-p (setq stop-p #'always))
   (catch 'done
 (let (last-what last-pos)
@@ -320,6 +321,16 @@ not be continued."
 (goto-char pos)
 nil
 
+(defun javaimp--parse-scope-array (state)
+  "Attempts to parse 'array' scope."
+  (save-excursion
+(and (javaimp--parse-skip-back-until)
+ (member (char-before) '(?, ?{ ?\]))
+ (make-javaimp-scope :type 'array
+ :name ""
+ :start nil
+ :open-brace (nth 1 state)
+
 (defun javaimp--parse-scope-unknown (state)
   "Catch-all parser which produces `unknown' scope."
   (make-javaimp-scope :type 'unknown
diff --git a/javaimp-tests.el b/javaimp-tests.el
index 80d72c4..a54d8ff 100644
--- a/javaimp-tests.el
+++ b/javaimp-tests.el
@@ -94,6 +94,14 @@ throws E1 {"
 '("static {"
   simple-statement "static")))
 
+(ert-deftest javaimp-test--parse-scope-array ()
+  (javaimp-test--check-scope #'javaimp--parse-scope-array
+'("new String[] {"
+  array "")
+'("new Object[][] { {"
+  array "")
+'("new int[] {{1, 2}, {"
+  array "")))
 
 (ert-deftest javaimp-test--parse-arglist ()
   (dolist (data '(("")



[elpa] externals/javaimp 25d1632: * javaimp-parse.el: Fix array scope, add lambda scope into simple-stmt

2021-06-11 Thread Filipp Gunbin
branch: externals/javaimp
commit 25d163257eb1dd65b3380bda4156d0171e4924e6
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

* javaimp-parse.el: Fix array scope, add lambda scope into simple-stmt
---
 javaimp-parse.el | 30 +-
 javaimp-tests.el | 10 --
 2 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index 8cf8e35..d681464 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -183,8 +183,9 @@ function is to just skip whitespace / comments."
 ;;; Scopes
 
 (defvar javaimp--parse-scope-hook
-  '(;; should be before method/stmt because looks similar, but with
-;; "new" in front
+  '(javaimp--parse-scope-array
+;; anonymous-class should be before method/stmt because it looks
+;; similar, but with "new" in front
 javaimp--parse-scope-anonymous-class
 javaimp--parse-scope-class
 javaimp--parse-scope-simple-stmt
@@ -194,6 +195,12 @@ function is to just skip whitespace / comments."
 
 
 (defun javaimp--parse-preceding (regexp scope-start &optional skip-count)
+  "Returns non-nil if a match for REGEXP is found before point.
+Matches inside comments / strings are skipped.  Potential match
+is checked to be SKIP-COUNT lists away from the SCOPE-START (1 is
+for scope start itself, so if you want to skip one additional
+list, use 2 etc.).  If a match is found, then match-data is set,
+as for `re-search-backward'."
   (and (javaimp--rsb-outside-context regexp nil t)
(ignore-errors
  ;; Does our match belong to the right block?
@@ -230,13 +237,18 @@ those may later become 'local-class' (see 
`javaimp--parse-scopes')."
 (defun javaimp--parse-scope-simple-stmt (state)
   "Attempts to parse `simple-statement' scope."
   (save-excursion
-(if (javaimp--parse-preceding (regexp-opt javaimp--parse-stmt-keywords 
'words)
-  (nth 1 state))
-(make-javaimp-scope
- :type 'simple-statement
- :name (match-string 1)
- :start (point)
- :open-brace (nth 1 state)
+(and (javaimp--parse-skip-back-until)
+ (looking-back (concat
+(regexp-opt javaimp--parse-stmt-keywords 'words)
+"\\|->")
+   nil t)
+ (make-javaimp-scope
+  :type 'simple-statement
+  :name (or (match-string 1)
+"lambda")
+  :start (or (match-beginning 1)
+ (- (point) 2))
+  :open-brace (nth 1 state)
 
 (defun javaimp--parse-scope-anonymous-class (state)
   "Attempts to parse `anonymous-class' scope."
diff --git a/javaimp-tests.el b/javaimp-tests.el
index a54d8ff..26c6a54 100644
--- a/javaimp-tests.el
+++ b/javaimp-tests.el
@@ -90,9 +90,15 @@ throws E1 {"
   simple-statement "try")
 '("\ntry\n{"
   simple-statement "try")
-;; static initializer also falls in this category
+;; static initializer
 '("static {"
-  simple-statement "static")))
+  simple-statement "static")
+;; lambda
+'("it -> {"
+  simple-statement "lambda")
+'("(x, y) -> {"
+  simple-statement "lambda")
+))
 
 (ert-deftest javaimp-test--parse-scope-array ()
   (javaimp-test--check-scope #'javaimp--parse-scope-array



[elpa] externals/company updated (e0f8c9a -> b712017)

2021-06-11 Thread ELPA Syncer
elpasync pushed a change to branch externals/company.

  from  e0f8c9a   Use the -or-abort versions of commands
   new  c17e5c1   
company-pseudo-tooltip-unless-just-one-frontend-with-delay: Add 'unhide' support
   new  b712017   company-preview-frontend: Fix an "args out of range" error


Summary of changes:
 company.el | 17 -
 1 file changed, 12 insertions(+), 5 deletions(-)



[elpa] externals/company c17e5c1 1/2: company-pseudo-tooltip-unless-just-one-frontend-with-delay: Add 'unhide' support

2021-06-11 Thread ELPA Syncer
branch: externals/company
commit c17e5c14b375c978179eaac8ec06427199391357
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-pseudo-tooltip-unless-just-one-frontend-with-delay: Add 'unhide' 
support

Fixes #1116
---
 company.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/company.el b/company.el
index 5358fe3..3b5a7ba 100644
--- a/company.el
+++ b/company.el
@@ -3419,6 +3419,9 @@ Delay is determined by `company-tooltip-idle-delay'."
  (run-with-timer company-tooltip-idle-delay nil
  
'company-pseudo-tooltip-unless-just-one-frontend-with-delay
  'post-command
+(unhide
+ (when (overlayp company-pseudo-tooltip-overlay)
+   (company-pseudo-tooltip-unless-just-one-frontend command)))
 (t
  (company-pseudo-tooltip-unless-just-one-frontend command
 



[elpa] externals/company b712017 2/2: company-preview-frontend: Fix an "args out of range" error

2021-06-11 Thread ELPA Syncer
branch: externals/company
commit b7120176b8107048a32e9083e48acd8abec2c20c
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

company-preview-frontend: Fix an "args out of range" error

#1116

Which happens when company-preview-frontend is used directly, and the new 
prefix
can be longer than the previous selected completion.
---
 company.el | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/company.el b/company.el
index 3b5a7ba..af61696 100644
--- a/company.el
+++ b/company.el
@@ -3482,11 +3482,15 @@ Delay is determined by `company-tooltip-idle-delay'."
 (`pre-command (company-preview-hide))
 (`unhide
  (when company-selection
-   (let ((company-prefix (buffer-substring
-  (- company-point (length company-prefix))
-  (point
- (company-preview-show-at-point (point)
-(nth company-selection 
company-candidates)
+   (let* ((current (nth company-selection company-candidates))
+  (company-prefix (if (equal current company-prefix)
+  ;; Would be more accurate to compare lengths,
+  ;; but this is shorter.
+  current
+(buffer-substring
+ (- company-point (length company-prefix))
+ (point)
+ (company-preview-show-at-point (point) current
 (`post-command
  (when company-selection
(company-preview-show-at-point (point)



[elpa] externals/vertico 89fe0e2: Fix vertico--default-missing-p

2021-06-11 Thread ELPA Syncer
branch: externals/vertico
commit 89fe0e2c900e632a68d8338dc4aaf1a1d3187621
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix vertico--default-missing-p
---
 vertico.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vertico.el b/vertico.el
index d3a5238..60101ac 100644
--- a/vertico.el
+++ b/vertico.el
@@ -501,7 +501,7 @@
 (defun vertico--default-missing-p ()
   "Return t if default is missing from the candidate list."
   (when-let (def (or (car-safe minibuffer-default) minibuffer-default))
-(and (= (minibuffer-prompt-end) (point)) (not (member def 
vertico--candidates)
+(and (= (point-max) (minibuffer-prompt-end)) (not (member def 
vertico--candidates)
 
 (defun vertico--goto (index)
   "Go to candidate with INDEX."



[elpa] externals/emms d4d9171: * emms.el: bump to version 7.3

2021-06-11 Thread ELPA Syncer
branch: externals/emms
commit d4d9171ce1076ba2ca9d022cf8228aeb3d31fb64
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms.el: bump to version 7.3
---
 Makefile | 2 +-
 NEWS | 6 ++
 emms.el  | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 9b43629..b64f34d 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ INSTALLINFO = /usr/bin/install-info --info-dir=$(INFODIR)
 CHANGELOG_CMD = git log --pretty=medium --no-merges
 
 # The currently released version of EMMS (no longer in use)
-VERSION=10.00
+VERSION=100.00
 
 .PHONY: all install docs clean
 .PRECIOUS: %.elc
diff --git a/NEWS b/NEWS
index 375f0e5..67498b5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+News since version 7.2
+
+  - Add support for the audiotools tracktag executable.
+  - Errors reading track metadata no longer stalls building the playlist.
+
+
 News since version 7.1
 
   - Make it possible to force-update Emms cache.
diff --git a/emms.el b/emms.el
index d918a43..90c0c2b 100644
--- a/emms.el
+++ b/emms.el
@@ -4,7 +4,7 @@
 
 ;; Author: Jorgen Schäfer , the Emms developers (see AUTHORS 
file)
 ;; Maintainer: Yoni Rabkin 
-;; Version: 7.2
+;; Version: 7.3
 ;; Keywords: emms, mp3, ogg, flac, music, mpeg, video, multimedia
 ;; Package-Type: multi
 ;; Package-Requires: ((cl-lib "0.5") (nadvice "0.3") (seq))
@@ -44,7 +44,7 @@
 
 ;;; Code:
 
-(defvar emms-version "6.03"
+(defvar emms-version "7.3"
   "EMMS version string.")