[elpa] externals/debbugs ad4f724: Adjust debbugs-gnu-stale-1 slightly

2021-05-31 Thread Lars Ingebrigtsen
branch: externals/debbugs
commit ad4f72452b706d444d75603ec5bdb5c4ebb6add0
Author: Lars Ingebrigtsen 
Commit: Lars Ingebrigtsen 

Adjust debbugs-gnu-stale-1 slightly

* debbugs-gnu.el (debbugs-gnu-stale-1): Adjust color a bit to be
able to distinguish with next level.
---
 debbugs-gnu.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index b35ccdc..cf9e17b 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -346,7 +346,7 @@ If this is `rmail', use Rmail instead."
 (defface debbugs-gnu-handled '((t (:foreground "ForestGreen")))
   "Face for reports that have been modified recently.")
 
-(defface debbugs-gnu-stale-1 '((t (:foreground "#b0b000")))
+(defface debbugs-gnu-stale-1 '((t (:foreground "#a0a000")))
   "Face for reports that have been touched two to four weeks ago.")
 
 (defface debbugs-gnu-stale-2 '((t (:foreground "#c0c000")))



[elpa] main 10d0854: * elpa-packages ("consult", "marginalia"): Generate Info docs from README.org

2021-05-31 Thread Daniel Mendler
branch: main
commit 10d0854b4450ea621e5dd7875bed7279ad7c0e51
Author: Daniel Mendler 
Commit: Daniel Mendler 

* elpa-packages ("consult", "marginalia"): Generate Info docs from 
README.org
---
 elpa-packages | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elpa-packages b/elpa-packages
index 203bc07..39e8f72 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -96,7 +96,7 @@
  ("company-math"   :url "https://github.com/vspinu/company-math.git";)
  ("company-statistics" :url 
"https://github.com/company-mode/company-statistics";)
  ("consult":url "https://github.com/minad/consult";
-  :auto-sync t)
+  :doc "README.org" :auto-sync t)
  ("context-coloring"   :url 
"https://github.com/jacksonrayhamilton/context-coloring.git";)
  ("corfu"  :url "https://github.com/minad/corfu";
   :doc "README.org" :auto-sync t)
@@ -219,7 +219,7 @@
  ("loccur" :url "https://github.com/fourier/loccur";)
  ("map" :core "lisp/emacs-lisp/map.el")
  ("marginalia" :url "https://github.com/minad/marginalia";
-  :auto-sync t)
+  :doc "README.org" :auto-sync t)
  ("markchars"  :url nil)
  ("math-symbol-lists"  :url "https://github.com/vspinu/math-symbol-lists.git";)
  ("memory-usage"   :url nil)



[elpa] externals/javaimp 9057392: Minor fixes

2021-05-31 Thread Filipp Gunbin
branch: externals/javaimp
commit 905739268dd4765847e9c083074c2796c8c6f400
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Minor fixes
---
 javaimp.el | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/javaimp.el b/javaimp.el
index 1ea804d..8b368ea 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -403,8 +403,9 @@ prefix arg is given, don't do this filtering."
   (completion-regexp-list
(and (not current-prefix-arg)
 (symbol-at-point)
-(let ((prefix (regexp-quote (symbol-name (symbol-at-point)
-  (list (concat "\\." prefix "[^.]*$\\|^" prefix "[^.]*$"))
+(list (rx (and symbol-start
+   (literal (symbol-name (symbol-at-point)))
+   eol))
  (list (completing-read "Import: " classes nil t nil nil
 (symbol-name (symbol-at-point))
   (javaimp-organize-imports (cons classname 'ordinary)))
@@ -453,7 +454,9 @@ prefix arg is given, don't do this filtering."
 (defun javaimp--get-directory-classes (dir)
   (if (file-accessible-directory-p dir)
   (seq-mapcat #'javaimp--get-file-classes
-  (directory-files-recursively dir "\\.java\\'"
+  (seq-filter (lambda (file)
+(not (file-symlink-p file)))
+  (directory-files-recursively dir 
"\\.java\\'")
 
 
 ;; Organizing imports



[elpa] elpa-admin c29da22: * elpa-admin.el: Generate SVG badges

2021-05-31 Thread monnier--- via
branch: elpa-admin
commit c29da22342f9fdf1bba419c71c1800d57a57373c
Author: Daniel Mendler 
Commit: Stefan Monnier 

* elpa-admin.el: Generate SVG badges

(elpaa--string-width, elpaa--make-badge): New functions.
(elpaa--make-one-package): Use `elpaa--make-badge`.
(elpaa--html-make-pkg): Add link to badge.
---
 elpa-admin.el | 106 +-
 1 file changed, 105 insertions(+), 1 deletion(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 31d9c92..38ace62 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -647,6 +647,94 @@ Return non-nil if a new tarball was created."
   (delete-file tarball)
   (elpaa--make-one-package pkg-spec tarball
 
+(defun elpaa--string-width (str)
+  "Determine string width in pixels of STR."
+  (let ((output (shell-command-to-string
+ (format "convert -debug annotate xc: -font DejaVu-Sans\
+ -pointsize 110 -annotate 0 %s null: 2>&1"
+ (shell-quote-argument str)
+(save-match-data
+  (if (string-match
+   "Metrics:.*?width: \\([0-9]+\\)"
+   output)
+  (string-to-number (match-string 1 output))
+(error "Could not determine string width")
+
+(defun elpaa--make-badge (file left right)
+  "Make badge svg FILE with LEFT and RIGHT string."
+  (let* ((lw (elpaa--string-width left))
+ (rw (elpaa--string-width right))
+ (pad (elpaa--string-width "x"))
+ (color "#bb3955")
+ (width (/ (+ lw rw (* 4 pad)) 10))
+ (offset -10) ;; Small alignment correction
+ (ctx `((offset . ,offset)
+(left . ,left)
+(right . ,right)
+(lw . ,lw)
+(rw . ,rw)
+(width . ,width)
+(color . ,color)
+(pad . ,pad
+(with-temp-buffer
+  (insert
+   (replace-regexp-in-string
+"[ \t\n]+" " "
+(replace-regexp-in-string
+ "{\\([^}]+\\)}"
+ (lambda (str)
+   (format "%s" (eval (read (match-string 1 str)) ctx)))
+ (replace-regexp-in-string
+  "'" "\""
+  "
+
+  {left}: {right}
+  
+
+
+  
+  
+
+  
+  
+
+
+
+  
+  
+{left}
+{left}
+{right}
+{right}
+  
+"
+  (write-region (point-min) (point-max) file
+
 (defun elpaa--make-one-package (pkg-spec &optional one-tarball)
   "Build the new tarballs (if needed) for PKG-SPEC.
 If ONE-TARBALL is non-nil, don't try and select some other revision and
@@ -679,6 +767,8 @@ place the resulting tarball into the file named 
ONE-TARBALL."
  (devel-vers
   (concat vers (if (string-match "[0-9]\\'" vers) ".")
   "0." date-version))
+ (release-badge (format "%s/%s.svg" elpaa--release-subdir pkgname))
+ (devel-badge (format "%s/%s.svg" elpaa--devel-subdir pkgname))
  (tarball (or one-tarball
   (concat elpaa--devel-subdir
   (format "%s-%s.tar" pkgname devel-vers
@@ -725,7 +815,20 @@ place the resulting tarball into the file named 
ONE-TARBALL."
  (elpaa--get-release-revision
   dir pkg-spec vers
   (plist-get (cdr pkg-spec) :version-map
-  (elpaa--release-email pkg-spec metadata dir)
+  (elpaa--make-badge release-badge
+ (format "%s ELPA" elpaa--name)
+ (format "%s %s" pkgname vers))
+  (elpaa--release-email pkg-spec metadata dir)
+
+;; Generate missing badges
+(unless (and (not new) (file-exists-p devel-badge))
+  (elpaa--make-badge devel-badge
+ (format "%s-devel ELPA" elpaa--name)
+ (format "%s %s" pkgname devel-vers)))
+(unless (file-exists-p release-badge)
+  (elpaa--make-badge release-badge
+ (format "%s ELPA" elpaa--name)
+ (format "%s %s" pkgname vers)))
 
 (defun elpaa--call (destination program &rest args)
   "Like ‘call-process’ for PROGRAM, DESTINATION, ARGS.
@@ -1143,6 +1246,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
pkg-spec
(or (cdr (assoc :url (aref (cdr pkg) 4)))
(elpaa--get-prop "URL" name srcdir mainsrcfile)))
+  (insert (format "Badge\n" 
(elpaa--html-quote name)))
   (insert "")
   (insert (format "To install this package, run in Emacs:
M-x package-install RET 
%s RET"



[elpa] elpa-admin 8e351cc: * elpa-admin.el (elpaa--string-width): Use `elpaa--call`

2021-05-31 Thread monnier--- via
branch: elpa-admin
commit 8e351cc4781cd232b5c2f723ef8f64b2663a75e1
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-admin.el (elpaa--string-width): Use `elpaa--call`
---
 elpa-admin.el | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 38ace62..64e37dc 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -649,15 +649,14 @@ Return non-nil if a new tarball was created."
 
 (defun elpaa--string-width (str)
   "Determine string width in pixels of STR."
-  (let ((output (shell-command-to-string
- (format "convert -debug annotate xc: -font DejaVu-Sans\
- -pointsize 110 -annotate 0 %s null: 2>&1"
- (shell-quote-argument str)
-(save-match-data
-  (if (string-match
-   "Metrics:.*?width: \\([0-9]+\\)"
-   output)
-  (string-to-number (match-string 1 output))
+  (with-temp-buffer
+(elpaa--call (current-buffer)
+ "convert" "-debug" "annotate" "xc:" "-font" "DejaVu-Sans"
+ "-pointsize" "110" "-annotate" "0" str "null:")
+(save-match-data ;;FIXME: Why?
+  (goto-char (point-min))
+  (if (re-search-forward "Metrics:.*?width: \\([0-9]+\\)")
+  (string-to-number (match-string 1))
 (error "Could not determine string width")
 
 (defun elpaa--make-badge (file left right)
@@ -676,6 +675,7 @@ Return non-nil if a new tarball was created."
 (width . ,width)
 (color . ,color)
 (pad . ,pad
+;; FIXME: Use `svg.el'?
 (with-temp-buffer
   (insert
(replace-regexp-in-string
@@ -821,10 +821,12 @@ place the resulting tarball into the file named 
ONE-TARBALL."
   (elpaa--release-email pkg-spec metadata dir)
 
 ;; Generate missing badges
+;; FIXME: Why here?
 (unless (and (not new) (file-exists-p devel-badge))
   (elpaa--make-badge devel-badge
  (format "%s-devel ELPA" elpaa--name)
  (format "%s %s" pkgname devel-vers)))
+;; FIXME: Shouldn't it be made already above?
 (unless (file-exists-p release-badge)
   (elpaa--make-badge release-badge
  (format "%s ELPA" elpaa--name)



[elpa] elpa-admin e3683d9: elpa-admin.el: Improve the badge generation code

2021-05-31 Thread Daniel Mendler
branch: elpa-admin
commit e3683d997a5887c70bd2e2a79796a21d7afd02b6
Author: Daniel Mendler 
Commit: Daniel Mendler 

elpa-admin.el: Improve the badge generation code

(elpaa--add-badge-link): New function.
(elpaa--string-width): Remove superfluous `save-match-data`.
(elpaa--html-make-pkg): Call `elpaa--make-badge`.
(elpaa--make-one-package): Call `elpaa--make-badge` and 
`elpaa--add-badge-link`
to generate missing badges and add missing badge links.
---
 elpa-admin.el | 57 -
 1 file changed, 36 insertions(+), 21 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 64e37dc..ac25541 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -653,11 +653,10 @@ Return non-nil if a new tarball was created."
 (elpaa--call (current-buffer)
  "convert" "-debug" "annotate" "xc:" "-font" "DejaVu-Sans"
  "-pointsize" "110" "-annotate" "0" str "null:")
-(save-match-data ;;FIXME: Why?
-  (goto-char (point-min))
-  (if (re-search-forward "Metrics:.*?width: \\([0-9]+\\)")
-  (string-to-number (match-string 1))
-(error "Could not determine string width")
+(goto-char (point-min))
+(if (re-search-forward "Metrics:.*?width: \\([0-9]+\\)")
+(string-to-number (match-string 1))
+  (error "Could not determine string width"
 
 (defun elpaa--make-badge (file left right)
   "Make badge svg FILE with LEFT and RIGHT string."
@@ -735,6 +734,20 @@ Return non-nil if a new tarball was created."
 "
   (write-region (point-min) (point-max) file
 
+(defun elpaa--add-badge-link (file name)
+  "Add badge link to FILE for package NAME."
+  (with-temp-buffer
+(insert-file-contents file)
+(let ((contents (buffer-string)))
+  (unless (string-match-p "Badge" contents)
+(erase-buffer)
+(insert
+ (replace-regexp-in-string ""
+   (format "Badge\n"
+   (elpaa--html-quote name))
+   contents))
+(write-region (point-min) (point-max) file)
+
 (defun elpaa--make-one-package (pkg-spec &optional one-tarball)
   "Build the new tarballs (if needed) for PKG-SPEC.
 If ONE-TARBALL is non-nil, don't try and select some other revision and
@@ -767,8 +780,6 @@ place the resulting tarball into the file named 
ONE-TARBALL."
  (devel-vers
   (concat vers (if (string-match "[0-9]\\'" vers) ".")
   "0." date-version))
- (release-badge (format "%s/%s.svg" elpaa--release-subdir pkgname))
- (devel-badge (format "%s/%s.svg" elpaa--devel-subdir pkgname))
  (tarball (or one-tarball
   (concat elpaa--devel-subdir
   (format "%s-%s.tar" pkgname devel-vers
@@ -815,22 +826,23 @@ place the resulting tarball into the file named 
ONE-TARBALL."
  (elpaa--get-release-revision
   dir pkg-spec vers
   (plist-get (cdr pkg-spec) :version-map
-  (elpaa--make-badge release-badge
- (format "%s ELPA" elpaa--name)
- (format "%s %s" pkgname vers))
   (elpaa--release-email pkg-spec metadata dir)
 
-;; Generate missing badges
-;; FIXME: Why here?
-(unless (and (not new) (file-exists-p devel-badge))
-  (elpaa--make-badge devel-badge
- (format "%s-devel ELPA" elpaa--name)
- (format "%s %s" pkgname devel-vers)))
-;; FIXME: Shouldn't it be made already above?
-(unless (file-exists-p release-badge)
-  (elpaa--make-badge release-badge
- (format "%s ELPA" elpaa--name)
- (format "%s %s" pkgname vers)))
+;; Generate missing badges (temporary code)
+(let ((release-badge (format "%s/%s.svg" elpaa--release-subdir 
pkgname))
+  (devel-badge (format "%s/%s.svg" elpaa--devel-subdir pkgname))
+  (release-html (format "%s/%s.html" elpaa--release-subdir 
pkgname))
+  (devel-html (format "%s/%s.html" elpaa--devel-subdir pkgname)))
+  (unless (file-exists-p devel-badge)
+(elpaa--make-badge devel-badge
+   (format "%s-devel ELPA" elpaa--name)
+   (format "%s %s" pkgname devel-vers))
+(elpaa--add-badge-link devel-html pkgname))
+  (unless (file-exists-p release-badge)
+(elpaa--make-badge release-badge
+   (format "%s ELPA" elpaa--name)
+   (format "%s %s" pkgname vers))
+(elpaa--add-badge-link release-html pkgname)))
 
 (defun elpaa--call (destination program &rest args)
   "Like ‘call-process’ for 

[elpa] branch scratch/javaimp-parse created (now fbe2426)

2021-05-31 Thread Filipp Gunbin
fgunbin pushed a change to branch scratch/javaimp-parse.

at  fbe2426   wip

This branch includes the following new commits:

   new  fbe2426   wip




[elpa] scratch/javaimp-parse fbe2426: wip

2021-05-31 Thread Filipp Gunbin
branch: scratch/javaimp-parse
commit fbe24265529a8c898a49b4f64bbf896a98a7d24e
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

wip
---
 javaimp-util.el | 127 ++--
 1 file changed, 96 insertions(+), 31 deletions(-)

diff --git a/javaimp-util.el b/javaimp-util.el
index f2f4c00..70ccb0d 100644
--- a/javaimp-util.el
+++ b/javaimp-util.el
@@ -171,42 +171,107 @@ buffer and returns its result"
 (unless (syntax-ppss-context state)
   (throw 'found (match-string 1)
 
+;; for imenu: named classes, then their members (skip over `{' then just jump 
by braces)
+;; indentation: from the point up
+
+(defconst javaimp--class-re
+  (concat
+   (regexp-opt '("class" "interface" "enum") 'words)
+   (rx (and (+ (syntax whitespace))
+(group (+ (any alnum ?_)))
+
+(defstruct javaimp-scope
+  ;; one of anonymous, class, interface, enum, local-class, lambda,
+  ;; unknown
+  type
+  name
+  start
+  open-brace)
+
+(defun javaimp--parse-scope-class (state)
+  (if (and (re-search-backward javaimp--class-re nil t)
+   ;; if there's no paren in between - assume we're looking at
+   ;; class declaration
+   (not (save-match-data
+  (search-forward "(" (nth 1 state) t
+  (make-javaimp-scope :type (intern (match-string 1))
+  :name (match-string 2)
+  :start (point)
+  :open-brace (nth 1 state
+
+(defun javaimp--parse-scope-anonymous (state)
+  ;; TODO
+  ;; anonymous: find "new"; scan-lists -1; no parens between
+  ;; generate name based on superclass
+  )
+
+(defun javaimp--parse-scope-lambda (state)
+  ;; TODO
+  ;; "->" right before bracket; (scan-lists -1) if previous is `)', else 
(scan-sexps -1)
+  )
+
+
+(defmacro javaimp--parse-scope (state &rest parsers)
+  `(or ,@(mapcar (lambda (p)
+   `(save-excursion
+  (funcall ,p ,state)))
+ parsers)))
+
+(defun javaimp--collect-scopes (count)
+  (interactive "p")
+  (let ((state (syntax-ppss))
+curr res)
+(unless (syntax-ppss-context state)
+  (save-excursion
+(while (and (nth 1 state)
+(or (not count)
+(>= (setq count (1- count) 0
+  ;; find innermost enclosing open-bracket
+  (goto-char (nth 1 state))
+  (when (= (char-after) ?{)
+(if (setq curr (javaimp--parse-scope
+state
+#'javaimp--parse-scope-anonymous
+#'javaimp--parse-scope-class
+#'javaimp--parse-scope-lambda))
+(progn
+  (push curr res)
+  (goto-char (javaimp-scope-start curr)))
+  (push (make-javaimp-scope :type 'unknown
+:name "unknown"
+:start nil
+:open-brace (nth 1 state)
+  (setq state (syntax-ppss)
+;; if a class is enclosed in anyting other than a class, then it
+;; should be local
+(let ((tmp res)
+  in-local)
+  (while tmp
+(if (eq (javaimp-scope-type (car tmp)) 'class)
+(if in-local (setf (javiamp-scope-type (car tmp)) 'local-class))
+  (setq in-local t))
+(setq tmp (cdr tmp
+res))
+
+
 (defun javaimp--get-file-classes (file)
   (with-temp-buffer
 (insert-file-contents file)
 (let ((parse-sexp-ignore-comments t)
-  (class-re (concat
- (regexp-opt '("class" "interface" "enum") 'words)
- (rx (and (+ (syntax whitespace))
-  (group (+ (any alnum ?_)))
   res)
-  (while (re-search-forward class-re nil t)
-(let ((state (syntax-ppss))
-  curr)
-  (unless (syntax-ppss-context state)
-(setq curr (list (match-string 2)))
-;; collect enclosing classes, if any
-(save-excursion
-  (catch 'stop
-(while (nth 1 state)
-  ;; find innermost enclosing open-bracket
-  (goto-char (nth 1 state))
-  (if (and (= (char-after) ?{)
-   (re-search-backward class-re nil t)
-   ;; if there's no paren in between - assume
-   ;; it's a valid class (not a method - this
-   ;; way we exclude local classes)
-   (not (save-match-data
-  (search-forward "(" (nth 1 state) t
-  (progn
-(push (match-string 2) curr)
-(setq state (syntax-ppss)))
-(setq curr nil)
-(throw 'stop nil)
-(when curr
- 

[elpa] externals/hyperbole e684614: Add tests with ebut program (#97)

2021-05-31 Thread ELPA Syncer
branch: externals/hyperbole
commit e68461492360c27327cf6c639a2b6fd750f05ca5
Author: Mats Lidell 
Commit: GitHub 

Add tests with ebut program (#97)
---
 ChangeLog   |  10 +
 test/hbut-tests.el  | 523 ++--
 test/{hbut-tests.el => hmouse-drv-tests.el} |   7 +-
 test/hui-tests.el   |   2 +
 4 files changed, 41 insertions(+), 501 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0d3c441..0393576 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2021-05-30  Mats Lidell  
+
+* test/hbut-tests.el (ebut-program-link-to-directory)
+(ebut-program-link-to-directory-2): Add test for ebut:program
+
+* test/hmouse-drv-tests.el: Renamed from hbut-tests.el
+
+* test/hui-tests.el (hui-ebut-create-link-to-directory)
+(hui-ebut-use-region-as-label): Add check on button args
+
 2021-05-29  Bob Weiner  
 
 * hpath.el (hpath:is-p, hpath:call): Return nil if path
diff --git a/test/hbut-tests.el b/test/hbut-tests.el
index bfc6319..f1cd995 100644
--- a/test/hbut-tests.el
+++ b/test/hbut-tests.el
@@ -2,7 +2,7 @@
 
 ;; Author: Mats Lidell 
 ;;
-;; Orig-Date: 28-Feb-21 at 22:52:00
+;; Orig-Date: 30-may-21 at 09:33:00
 ;;
 ;; Copyright (C) 2021  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -11,509 +11,36 @@
 
 ;;; Commentary:
 
-;; Runs tests that are based on using the action-key.
+;; "../hbut.el"
 
 ;;; Code:
 
 (require 'ert)
 (require 'hbut)
-(require 'el-mock)
 
-(load (expand-file-name "hy-test-helpers"
-(file-name-directory (or load-file-name
- default-directory
-(declare-function hy-test-helpers:consume-input-events "hy-test-helpers")
-
-(ert-deftest hbut-defal ()
-  (defal defal-path "${hyperb:dir}/\\1")
-  (unwind-protect
-  (with-temp-buffer
-(insert "")
-(goto-char 4)
-(action-key)
-(should (string= (expand-file-name "DEMO" hyperb:dir) 
buffer-file-name
-(progn
-  (kill-buffer "DEMO")
-  (ibtype:delete 'ibtypes::defal-path)))
-
-(defun hbut-defal-url (url &optional new-window)
-  "Verify call with proper URL and optional NEW-WINDOW."
-  (should (equal url "https://github.com/rswgnu/hyperbole/pull/34";))
-  (should (equal new-window nil)))
-
-(ert-deftest hbut-defal-url ()
-  (defal defal-url "https://github.com/rswgnu/hyperbole/pull/\\1";)
-  (unwind-protect
-  (with-temp-buffer
-(insert "")
-(goto-char 4)
-(let ((browse-url-browser-function 'hbut-defal-url))
-  (action-key)))
-(ibtype:delete 'ibtypes::defal-url)))
-
-(ert-deftest hbut-defal-url-%s ()
-  "Use defal with %s in LINK-EXPR."
-  (defal defal-url "https://github.com/rswgnu/hyperbole/pull/%s";)
-  (unwind-protect
-  (with-temp-buffer
-(insert "")
-(goto-char 4)
-(let ((browse-url-browser-function 'hbut-defal-url))
-  (action-key)))
-(ibtype:delete 'ibtypes::defal-url)))
-
-(ert-deftest hbut-defal-key-sequence ()
-  (skip-unless (not noninteractive))
-  (defal defal-key "{C-h v \\1 RET}")
-  (unwind-protect
-  (with-temp-buffer
-(insert "")
-(goto-char 4)
-(action-key)
-(hy-test-helpers:consume-input-events)
-(set-buffer "*Help*")
-(should (looking-at "emacs-version")))
-(ibtype:delete 'ibtypes::defal-key)))
-
-(defun hbut-verify-defal (x)
-  "Verify function i called with X set to the string `test'."
-  (should (string= x "test")))
-
-(ert-deftest hbut-defal-function ()
-  "Use only the argument portion of the button text."
-  (defal defal-func 'hbut-verify-defal)
-  (unwind-protect
-  (with-temp-buffer
-(insert "")
-(goto-char 4)
-(action-key)))
-(progn
-  (ibtype:delete 'ibtypes::defal-func)))
-  
-(ert-deftest hbut-defal-fails-on-file-missing ()
-  (defal defal-path-missing "${hyperb:dir}/\\1")
-  (unwind-protect
-  (with-temp-buffer
-(insert "")
-(goto-char 4)
-(condition-case err
-(action-key)
-  (error
-   (progn
- (should (equal (car err) 'error))
- (should (string-match "hpath:find" (cadr err)))
-(ibtype:delete 'ibtypes::defal-path-missing)))
-
-(ert-deftest hbut-defil-it ()
-  (defil defil-path-it "<<<" ">>>" ".*" "${hyperb:dir}/\\&")
-  (unwind-protect
-  (with-temp-buffer
-(insert "<<>>")
-(goto-char 4)
-(action-key)
-(should (string= (expand-file-name "DEMO" hyperb:dir) 
buffer-file-name)))
-(progn
-  (kill-buffer "DEMO")
-  (ibtype:delete 'ibtypes::defil-path-it
-
-(ert-deftest hbut-defil ()
-  (defil defil-path "<<<" ">>>" ".*" "${hyperb:dir}/\\&")
-  (unwind-protect
-  (with-temp-buffer
-(insert "<<>>")
-(goto-char 4)
-(hy-test-helpers:action-key-should-call-hpath:find 
"${hyperb:dir}/DEMO"))
-(progn
-  (ibtype:dele

[elpa] main 7f42b6d 1/2: * copyright_exceptions (hyperbole/kotl/kotl-orgtbl.el): Undo last change

2021-05-31 Thread monnier--- via
branch: main
commit 7f42b6dffb42dd186779e053396555383dc1cdfc
Author: Stefan Monnier 
Commit: Stefan Monnier 

* copyright_exceptions (hyperbole/kotl/kotl-orgtbl.el): Undo last change
---
 copyright_exceptions | 1 -
 1 file changed, 1 deletion(-)

diff --git a/copyright_exceptions b/copyright_exceptions
index ea9cb60..d3ac4bb 100644
--- a/copyright_exceptions
+++ b/copyright_exceptions
@@ -37,7 +37,6 @@ auctex/style/virtex.el
 excorporate/excorporate-calfw.el:;; copyright assignment papers on file with 
the FSF.
 hyperbole/hib-doc-id.el:;;  Copyright:
 hyperbole/kotl/kotl-autoloads.el
-hyperbole/kotl/kotl-orgtbl.el
 mmm-mode/mmm-noweb.el:;; Copyright 1995 by Thorsten.Ohl @ 
Physik.TH-Darmstadt.de
 mmm-mode/mmm-noweb.el:;; Copyright 2003, 2004  Joe Kelsey 

 mmm-mode/mmm-rpm.el:;; Copyright (C) 2000 by Marcus Harnisch 




[elpa] main 195f8f3 2/2: Merge branch 'main' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa

2021-05-31 Thread monnier--- via
branch: main
commit 195f8f3b5e59ce0c8e514784466e194cbbadf29b
Merge: 7f42b6d 10d0854
Author: Stefan Monnier 
Commit: Stefan Monnier 

Merge branch 'main' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa
---
 elpa-packages | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elpa-packages b/elpa-packages
index 203bc07..39e8f72 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -96,7 +96,7 @@
  ("company-math"   :url "https://github.com/vspinu/company-math.git";)
  ("company-statistics" :url 
"https://github.com/company-mode/company-statistics";)
  ("consult":url "https://github.com/minad/consult";
-  :auto-sync t)
+  :doc "README.org" :auto-sync t)
  ("context-coloring"   :url 
"https://github.com/jacksonrayhamilton/context-coloring.git";)
  ("corfu"  :url "https://github.com/minad/corfu";
   :doc "README.org" :auto-sync t)
@@ -219,7 +219,7 @@
  ("loccur" :url "https://github.com/fourier/loccur";)
  ("map" :core "lisp/emacs-lisp/map.el")
  ("marginalia" :url "https://github.com/minad/marginalia";
-  :auto-sync t)
+  :doc "README.org" :auto-sync t)
  ("markchars"  :url nil)
  ("math-symbol-lists"  :url "https://github.com/vspinu/math-symbol-lists.git";)
  ("memory-usage"   :url nil)



[elpa] elpa-admin 28b66f7 1/2: * elpa-admin.el (elpaa--get-last-release): Don't return snapshot versions

2021-05-31 Thread monnier--- via
branch: elpa-admin
commit 28b66f78c1a0cf8a4ea903c203b7a35f20b51853
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-admin.el (elpaa--get-last-release): Don't return snapshot versions
---
 elpa-admin.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 64e37dc..a466312 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -242,7 +242,8 @@ Assumes that the current worktree holds a snapshot version."
   (cond
((null vl)
 (elpaa--message "Invalid previous release version"))
-   ((member -4 vl)
+   ((or (equal vers "0") (< (apply #'min vl) 0))
+;; FIXME: Maybe we could look further into the past?
 (elpaa--message "Previous version was also snapshot"))
(t
 (cons (package-version-join vl) rev))



[elpa] elpa-admin e850286 2/2: Merge branch 'elpa-admin' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa into elpa-admin

2021-05-31 Thread monnier--- via
branch: elpa-admin
commit e850286fd40d85620b9bee5b4625b6a9b8d7a0cc
Merge: 28b66f7 e3683d9
Author: Stefan Monnier 
Commit: Stefan Monnier 

Merge branch 'elpa-admin' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa 
into elpa-admin
---
 elpa-admin.el | 57 -
 1 file changed, 36 insertions(+), 21 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index a466312..50ee89f 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -654,11 +654,10 @@ Return non-nil if a new tarball was created."
 (elpaa--call (current-buffer)
  "convert" "-debug" "annotate" "xc:" "-font" "DejaVu-Sans"
  "-pointsize" "110" "-annotate" "0" str "null:")
-(save-match-data ;;FIXME: Why?
-  (goto-char (point-min))
-  (if (re-search-forward "Metrics:.*?width: \\([0-9]+\\)")
-  (string-to-number (match-string 1))
-(error "Could not determine string width")
+(goto-char (point-min))
+(if (re-search-forward "Metrics:.*?width: \\([0-9]+\\)")
+(string-to-number (match-string 1))
+  (error "Could not determine string width"
 
 (defun elpaa--make-badge (file left right)
   "Make badge svg FILE with LEFT and RIGHT string."
@@ -736,6 +735,20 @@ Return non-nil if a new tarball was created."
 "
   (write-region (point-min) (point-max) file
 
+(defun elpaa--add-badge-link (file name)
+  "Add badge link to FILE for package NAME."
+  (with-temp-buffer
+(insert-file-contents file)
+(let ((contents (buffer-string)))
+  (unless (string-match-p "Badge" contents)
+(erase-buffer)
+(insert
+ (replace-regexp-in-string ""
+   (format "Badge\n"
+   (elpaa--html-quote name))
+   contents))
+(write-region (point-min) (point-max) file)
+
 (defun elpaa--make-one-package (pkg-spec &optional one-tarball)
   "Build the new tarballs (if needed) for PKG-SPEC.
 If ONE-TARBALL is non-nil, don't try and select some other revision and
@@ -768,8 +781,6 @@ place the resulting tarball into the file named 
ONE-TARBALL."
  (devel-vers
   (concat vers (if (string-match "[0-9]\\'" vers) ".")
   "0." date-version))
- (release-badge (format "%s/%s.svg" elpaa--release-subdir pkgname))
- (devel-badge (format "%s/%s.svg" elpaa--devel-subdir pkgname))
  (tarball (or one-tarball
   (concat elpaa--devel-subdir
   (format "%s-%s.tar" pkgname devel-vers
@@ -816,22 +827,23 @@ place the resulting tarball into the file named 
ONE-TARBALL."
  (elpaa--get-release-revision
   dir pkg-spec vers
   (plist-get (cdr pkg-spec) :version-map
-  (elpaa--make-badge release-badge
- (format "%s ELPA" elpaa--name)
- (format "%s %s" pkgname vers))
   (elpaa--release-email pkg-spec metadata dir)
 
-;; Generate missing badges
-;; FIXME: Why here?
-(unless (and (not new) (file-exists-p devel-badge))
-  (elpaa--make-badge devel-badge
- (format "%s-devel ELPA" elpaa--name)
- (format "%s %s" pkgname devel-vers)))
-;; FIXME: Shouldn't it be made already above?
-(unless (file-exists-p release-badge)
-  (elpaa--make-badge release-badge
- (format "%s ELPA" elpaa--name)
- (format "%s %s" pkgname vers)))
+;; Generate missing badges (temporary code)
+(let ((release-badge (format "%s/%s.svg" elpaa--release-subdir 
pkgname))
+  (devel-badge (format "%s/%s.svg" elpaa--devel-subdir pkgname))
+  (release-html (format "%s/%s.html" elpaa--release-subdir 
pkgname))
+  (devel-html (format "%s/%s.html" elpaa--devel-subdir pkgname)))
+  (unless (file-exists-p devel-badge)
+(elpaa--make-badge devel-badge
+   (format "%s-devel ELPA" elpaa--name)
+   (format "%s %s" pkgname devel-vers))
+(elpaa--add-badge-link devel-html pkgname))
+  (unless (file-exists-p release-badge)
+(elpaa--make-badge release-badge
+   (format "%s ELPA" elpaa--name)
+   (format "%s %s" pkgname vers))
+(elpaa--add-badge-link release-html pkgname)))
 
 (defun elpaa--call (destination program &rest args)
   "Like ‘call-process’ for PROGRAM, DESTINATION, ARGS.
@@ -1219,6 +1231,9 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
  (mainsrcfile (expand-file-name (elpaa--main-file pkg-spec) srcdir))
  (desc (aref (cdr pkg) 2)))
 (cl-assert (equal name (

[elpa] externals/consult c4d8d48 2/3: README: Reorder badges

2021-05-31 Thread ELPA Syncer
branch: externals/consult
commit c4d8d489daeb7b2664766bb6c12a9438beba04cf
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Reorder badges
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 51aa201..0941807 100644
--- a/README.org
+++ b/README.org
@@ -8,8 +8,8 @@
 
 #+html: http://elpa.gnu.org/packages/consult.html";>https://elpa.gnu.org/packages/consult.svg"/>
 #+html: http://elpa.gnu.org/devel/consult.html";>https://elpa.gnu.org/devel/consult.svg"/>
-#+html: https://stable.melpa.org/#/consult";>https://stable.melpa.org/packages/consult-badge.svg"/>
 #+html: https://melpa.org/#/consult";>https://melpa.org/packages/consult-badge.svg"/>
+#+html: https://stable.melpa.org/#/consult";>https://stable.melpa.org/packages/consult-badge.svg"/>
 
 * Introduction
   :properties:



[elpa] externals/consult updated (ca8e82e -> 879a14c)

2021-05-31 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  ca8e82e   Ensure that consult-line works at the end of the buffer 
(Fix #321)
   new  fb9a829   README: Use new ELPA badges
   new  c4d8d48   README: Reorder badges
   new  879a14c   README: Update MELPA link


Summary of changes:
 README.org | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)



[elpa] externals/consult fb9a829 1/3: README: Use new ELPA badges

2021-05-31 Thread ELPA Syncer
branch: externals/consult
commit fb9a829718f652460fb6c6a40325019105cd9fe8
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Use new ELPA badges
---
 README.org | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index d3d0528..51aa201 100644
--- a/README.org
+++ b/README.org
@@ -6,9 +6,10 @@
 #+texinfo_dir_title: Consult: (consult).
 #+texinfo_dir_desc: Useful commands built on completing-read.
 
-#+html: http://elpa.gnu.org/packages/consult.html";>https://img.shields.io/badge/GNU%20ELPA-consult-bb3955"/>
-#+html: https://melpa.org/#/consult";>https://melpa.org/packages/consult-badge.svg"/>
+#+html: http://elpa.gnu.org/packages/consult.html";>https://elpa.gnu.org/packages/consult.svg"/>
+#+html: http://elpa.gnu.org/devel/consult.html";>https://elpa.gnu.org/devel/consult.svg"/>
 #+html: https://stable.melpa.org/#/consult";>https://stable.melpa.org/packages/consult-badge.svg"/>
+#+html: https://melpa.org/#/consult";>https://melpa.org/packages/consult-badge.svg"/>
 
 * Introduction
   :properties:



[elpa] externals/consult 879a14c 3/3: README: Update MELPA link

2021-05-31 Thread ELPA Syncer
branch: externals/consult
commit 879a14cc2ec4d2b0dbf0843cba5d3287feb31f7f
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Update MELPA link
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 0941807..f5d246e 100644
--- a/README.org
+++ b/README.org
@@ -685,7 +685,7 @@ their descriptions.
   :description: Example configuration and customization variables
   :end:
 
-Consult can be installed from 
[[http://elpa.gnu.org/packages/consult.html][ELPA]] or 
[[https://melpa.org/][MELPA]] via the Emacs built-in package
+Consult can be installed from 
[[http://elpa.gnu.org/packages/consult.html][ELPA]] or 
[[https://melpa.org/#/consult][MELPA]] via the Emacs built-in package
 manager. Alternatively it can be directly installed from the development
 repository via other non-standard package managers.
 



[elpa] externals/corfu 241eeee: README: Use new ELPA badges

2021-05-31 Thread ELPA Syncer
branch: externals/corfu
commit 2418c4ead4f37aace3c7c6f79ef25c67009b
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Use new ELPA badges
---
 README.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 432cddb..191f0ff 100644
--- a/README.org
+++ b/README.org
@@ -6,7 +6,8 @@
 #+texinfo_dir_title: Corfu: (corfu).
 #+texinfo_dir_desc: Completion Overlay Region FUnction
 
-#+html: http://elpa.gnu.org/packages/corfu.html";>https://img.shields.io/badge/GNU%20ELPA-corfu-bb3955"/>
+#+html: http://elpa.gnu.org/packages/corfu.html";>https://elpa.gnu.org/packages/corfu.svg"/>
+#+html: http://elpa.gnu.org/devel/corfu.html";>https://elpa.gnu.org/devel/corfu.svg"/>
 
 * Introduction
 



[elpa] externals/marginalia 592a1e9: README: Use new ELPA badges

2021-05-31 Thread ELPA Syncer
branch: externals/marginalia
commit 592a1e91298599391662b8f1af0e9aabc0fcb2c6
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Use new ELPA badges
---
 README.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 981db1d..d4a5b1e 100644
--- a/README.org
+++ b/README.org
@@ -8,7 +8,8 @@
 
 #+html: https://upload.wikimedia.org/wikipedia/commons/4/4f/Marginalia_%285095211566%29.jpg";
 align="right" width="30%">
 
-#+html: http://elpa.gnu.org/packages/marginalia.html";>https://img.shields.io/badge/GNU%20ELPA-marginalia-bb3955"/>
+#+html: http://elpa.gnu.org/packages/marginalia.html";>https://elpa.gnu.org/packages/marginalia.svg"/>
+#+html: http://elpa.gnu.org/devel/marginalia.html";>https://elpa.gnu.org/devel/marginalia.svg"/>
 #+html: https://melpa.org/#/marginalia";>https://melpa.org/packages/marginalia-badge.svg"/>
 #+html: https://stable.melpa.org/#/marginalia";>https://stable.melpa.org/packages/marginalia-badge.svg"/>
 



[elpa] externals/vertico fb0a34f: README: Use new ELPA badges

2021-05-31 Thread ELPA Syncer
branch: externals/vertico
commit fb0a34ff41fc6e422a4ee8e181e97654648374e5
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Use new ELPA badges
---
 README.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index a78774a..8cd7223 100644
--- a/README.org
+++ b/README.org
@@ -6,7 +6,8 @@
 #+texinfo_dir_title: Vertico: (vertico).
 #+texinfo_dir_desc: VERTical Interactive COmpletion.
 
-#+html: http://elpa.gnu.org/packages/vertico.html";>https://img.shields.io/badge/GNU%20ELPA-vertico-bb3955"/>
+#+html: http://elpa.gnu.org/packages/vertico.html";>https://elpa.gnu.org/packages/vertico.svg"/>
+#+html: http://elpa.gnu.org/devel/vertico.html";>https://elpa.gnu.org/devel/vertico.svg"/>
 #+html: https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Vertigomovie_restoration.jpg/800px-Vertigomovie_restoration.jpg";
 align="right" width="30%">
 
 * Introduction



[elpa] externals/javaimp 62d9fca: Add javaimp-parse.el

2021-05-31 Thread Filipp Gunbin
branch: externals/javaimp
commit 62d9fcaae4c667ecb6644ad8befbd94081b086a0
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Add javaimp-parse.el
---
 javaimp-parse.el | 145 +++
 javaimp-tests.el |   8 +--
 javaimp-util.el  |  52 
 javaimp.el   |   5 +-
 4 files changed, 152 insertions(+), 58 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
new file mode 100644
index 000..7c29794
--- /dev/null
+++ b/javaimp-parse.el
@@ -0,0 +1,145 @@
+;;; javaimp-parse.el --- javaimp parsing  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2021  Free Software Foundation, Inc.
+
+;; Author: Filipp Gunbin 
+;; Maintainer: Filipp Gunbin 
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+(require 'cl-lib)
+(require 'seq)
+
+(cl-defstruct javaimp-scope
+  type ; one of anonymous-class, class, interface, enum, local-class, unknown
+  name
+  start
+  open-brace)
+
+(defsubst javaimp--parse-is-class (scope)
+  (memq (javaimp-scope-type scope) '(class interface enum)))
+
+(defconst javaimp--parse-class-re
+  (concat
+   (regexp-opt '("class" "interface" "enum") 'words)
+   (rx (and (+ (syntax whitespace))
+(group (+ (any alnum ?_)))
+
+
+(defun javaimp--parse-get-package ()
+  (save-excursion
+(save-restriction
+  (widen)
+  (goto-char (point-min))
+  (catch 'found
+(while (re-search-forward "^\\s *package\\s +\\([^;]+\\)\\s *;" nil t)
+  (let ((state (syntax-ppss)))
+(unless (syntax-ppss-context state)
+  (throw 'found (match-string 1)
+
+
+(defvar javaimp--parse-scope-hook
+  '(javaimp--parse-scope-class
+javaimp--parse-scope-anonymous-class
+javaimp--parse-scope-unknown  ;fallback
+))
+
+(defun javaimp--parse-scope-class (state)
+  (save-excursion
+(if (and (re-search-backward javaimp--parse-class-re nil t)
+ ;; if there's no paren in between - assume we're looking at
+ ;; class declaration
+ (not (save-match-data
+(search-forward "(" (nth 1 state) t
+(make-javaimp-scope :type (intern (match-string 1))
+:name (match-string 2)
+:start (match-beginning 1)
+:open-brace (nth 1 state)
+
+(defun javaimp--parse-scope-anonymous-class (state)
+  (save-excursion
+(let (end)
+  (if (and (re-search-backward "\\= (setq count (1- count)) 0)))
+  ;; find innermost enclosing open-bracket
+  (goto-char (nth 1 state))
+  (when (= (char-after) ?{)
+(let ((scope (run-hook-with-args-until-success
+  'javaimp--parse-scope-hook state)))
+  (push scope res)
+  (if (javaimp-scope-start scope)
+  (goto-char (javaimp-scope-start scope)
+  (setq state (syntax-ppss)
+;; if a class is enclosed in anything other than a class, then it
+;; should be local
+(let ((tmp res)
+  in-local)
+  (while tmp
+(if (javaimp--parse-is-class (car tmp))
+(if in-local
+(setf (javaimp-scope-type (car tmp)) 'local-class))
+  (setq in-local t))
+(setq tmp (cdr tmp
+res))
+
+(defun javaimp--parse-get-file-classes (file)
+  (with-temp-buffer
+(insert-file-contents file)
+(let ((parse-sexp-ignore-comments t)
+  (package (javaimp--parse-get-package))
+  res)
+  (while (re-search-forward javaimp--parse-class-re nil t)
+(when (and (ignore-errors
+ (goto-char (scan-lists (point) 1 -1)))
+   (= (char-before) ?{))
+  (let ((scopes (javaimp--parse-scopes nil))
+curr)
+(when (seq-every-p #'javaimp--parse-is-class scopes)
+  (setq curr (mapconcat #'javaimp-scope-name scopes "."))
+  (if package
+  (setq curr (concat package "." curr)))
+  (push curr res)
+  (nreverse res
+
+(provide 'javaimp-parse)
diff --git a/javaimp-tests.el b/javaimp-tests.el
index 36b4686..9951a81 100644
--- a/javaimp-tests.el
+++ b/javaimp-tests.el
@@ -23,15 +23,15 @@
   (should (eql (length projects) 2)
 
 
-(ert-deftest javaimp-test--get-package ()
+(ert-deftest javaimp-test--parse-get-package (

[elpa] branch scratch/javaimp-parse deleted (was fbe2426)

2021-05-31 Thread Filipp Gunbin
fgunbin pushed a change to branch scratch/javaimp-parse.

   was  fbe2426   wip

This change permanently discards the following revisions:

  discards  fbe2426   wip



[elpa] externals/posframe updated (2e0854b -> 1fb847e)

2021-05-31 Thread ELPA Syncer
elpasync pushed a change to branch externals/posframe.

  from  2e0854b   v1.0.3
   new  b25d11b   * README.md: Add ELPA badges
   new  de8386a   Add README.org
   new  1fb847e   Update README.org


Summary of changes:
 README.md   | 151 
 README.org  | 112 
 posframe.el | 103 +
 3 files changed, 114 insertions(+), 252 deletions(-)
 delete mode 100644 README.md
 create mode 100644 README.org



[elpa] externals/posframe de8386a 2/3: Add README.org

2021-05-31 Thread ELPA Syncer
branch: externals/posframe
commit de8386a05d90c97921d1c2122b7b390313f4ab84
Author: Feng Shu 
Commit: Feng Shu 

Add README.org
---
 README.md   | 153 
 README.org  | 114 
 posframe.el | 104 +
 3 files changed, 115 insertions(+), 256 deletions(-)

diff --git a/README.md b/README.md
deleted file mode 100644
index 2db2601..000
--- a/README.md
+++ /dev/null
@@ -1,153 +0,0 @@
-Note: this file is auto converted from posframe.el by 
[el2org](https://github.com/tumashu/el2org), please do not edit it by hand!!!
-
-
-# 目录
-
-1.  [Posframe README](#orgb128484)
-1.  [What is posframe?](#org974e900)
-2.  [Installation](#org038dda3)
-3.  [Usage](#org9c07621)
-1.  [Create a posframe](#orgb22c0ed)
-2.  [Hide a posframe](#org92261d1)
-3.  [Hide all posframes](#org98e9cb3)
-4.  [Delete a posframe](#orgcb1cbf5)
-5.  [Delete all posframes](#org707403c)
-6.  [Customizing mouse pointer control](#orgfbacc1c)
-7.  [Set fallback arguments of posframe-show](#org8ab97cf)
-
-
-
-
-# Posframe README
-
-http://elpa.gnu.org/packages/posframe.html";>https://elpa.gnu.org/packages/posframe.svg"/>
-
-
-
-
-## What is posframe?
-
-Posframe can pop up a frame at point, this **posframe** is a
-child-frame connected to its root window's buffer.
-
-The main advantages are:
-
-1.  It is fast enough for daily usage :-)
-2.  It works well with CJK languages.
-
-NOTE:
-
-1.  For MacOS users, posframe needs Emacs version >= 26.0.91
-2.  GNOME users with GTK3 builds need Emacs 27 or later.
-See variable \`posframe-gtk-resize-child-frames'
-which auto-detects this configuration.
-
-More details:
-
-1.  [Fix some problems with moving and resizing child 
frames](https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-27&id=c49d379f17bcb0ce82604def2eaa04bda00bd5ec)
-2.  [Emacs's set-frame-size can not work well with 
gnome-shell?](https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00343.html)
-
-![img](./snapshots/posframe-1.png)
-
-
-
-
-## Installation
-
-(require 'posframe)
-
-
-
-
-## Usage
-
-
-
-
-### Create a posframe
-
-1.  Simple way
-
-(when (posframe-workable-p)
-  (posframe-show " *my-posframe-buffer*"
- :string "This is a test"
- :position (point)))
-
-2.  Advanced way
-
-(defvar my-posframe-buffer " *my-posframe-buffer*")
-
-(with-current-buffer (get-buffer-create my-posframe-buffer)
-  (erase-buffer)
-  (insert "Hello world"))
-
-(when (posframe-workable-p)
-  (posframe-show my-posframe-buffer
- :position (point)))
-
-3.  Arguments
-
-C-h f posframe-show
-
-
-
-
-### Hide a posframe
-
-(posframe-hide " *my-posframe-buffer*")
-
-
-
-
-### Hide all posframes
-
-M-x posframe-hide-all
-
-
-
-
-### Delete a posframe
-
-1.  Delete posframe and its buffer
-
-(posframe-delete " *my-posframe-buffer*")
-2.  Only delete the frame
-
-(posframe-delete-frame " *my-posframe-buffer*")
-
-
-
-
-### Delete all posframes
-
-M-x posframe-delete-all
-
-Note: this command will delete all posframe buffers.
-You probably shouldn't use it if you are sharing a buffer
-between posframe and other packages.
-
-
-
-
-### Customizing mouse pointer control
-
-By default, posframe moves the pointer to point (0,0) in
-the frame, as a way to address an issue with mouse focus.
-To disable this feature, add this to your init.el:
-
-(setq posframe-mouse-banish nil)
-
-
-
-
-### Set fallback arguments of posframe-show
-
-Users can set fallback values of posframe-show's arguments with the
-help of \`posframe-arghandler'.  The example below sets fallback
-border-width to 10 and fallback background color to green.
-
-(setq posframe-arghandler #'my-posframe-arghandler)
-(defun my-posframe-arghandler (buffer-or-name arg-name value)
-  (let ((info '(:internal-border-width 10 :background-color "green")))
-(or (plist-get info arg-name) value)))
-
diff --git a/README.org b/README.org
new file mode 100644
index 000..ac15938
--- /dev/null
+++ b/README.org
@@ -0,0 +1,114 @@
+# Created 2021-06-01 Tue 10:41
+#+TITLE: Pop a posframe (just a frame) at point
+#+AUTHOR: Feng Shu
+
+#+html: http://elpa.gnu.org/packages/posframe.html";>https://elpa.gnu.org/packages/posframe.svg"/>
+
+* Posframe README
+
+** What is posframe?
+Posframe can pop up a frame at point, this *posframe* is a
+child-frame connected to its root window's buffer.
+
+The main advantages are:
+1. It is fast enough for daily usage :-)
+2. It works well with CJK languages.
+
+NOTE:
+1. For MacOS users, posframe needs Emacs version >= 26.0.91
+2. GNOME users with GTK3 builds need Emacs 27 or later.
+   See variable `posframe-gtk-resize-child-frames'
+   

[elpa] externals/posframe 1fb847e 3/3: Update README.org

2021-05-31 Thread ELPA Syncer
branch: externals/posframe
commit 1fb847ee06621c7329128524082e5743d360651d
Author: Feng Shu 
Commit: Feng Shu 

Update README.org
---
 README.org | 28 +---
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/README.org b/README.org
index ac15938..045d5a4 100644
--- a/README.org
+++ b/README.org
@@ -4,9 +4,7 @@
 
 #+html: http://elpa.gnu.org/packages/posframe.html";>https://elpa.gnu.org/packages/posframe.svg"/>
 
-* Posframe README
-
-** What is posframe?
+* What is posframe?
 Posframe can pop up a frame at point, this *posframe* is a
 child-frame connected to its root window's buffer.
 
@@ -26,17 +24,17 @@ NOTE:
 
 [[file:./snapshots/posframe-1.png]]
 
-** Installation
+* Installation
 
 #+begin_example
 (require 'posframe)
 #+end_example
 
-** Usage
+* Usage
 
-*** Create a posframe
+** Create a posframe
 
- Simple way
+*** Simple way
 #+begin_example
 (when (posframe-workable-p)
   (posframe-show " *my-posframe-buffer*"
@@ -44,7 +42,7 @@ NOTE:
  :position (point)))
 #+end_example
 
- Advanced way
+*** Advanced way
 #+begin_example
 (defvar my-posframe-buffer " *my-posframe-buffer*")
 
@@ -57,23 +55,23 @@ NOTE:
  :position (point)))
 #+end_example
 
- Arguments
+*** Arguments
 
 #+begin_example
 C-h f posframe-show
 #+end_example
 
-*** Hide a posframe
+** Hide a posframe
 #+begin_example
 (posframe-hide " *my-posframe-buffer*")
 #+end_example
 
-*** Hide all posframes
+** Hide all posframes
 #+begin_example
 M-x posframe-hide-all
 #+end_example
 
-*** Delete a posframe
+** Delete a posframe
 1. Delete posframe and its buffer
#+begin_example
(posframe-delete " *my-posframe-buffer*")
@@ -82,7 +80,7 @@ M-x posframe-hide-all
#+begin_example
(posframe-delete-frame " *my-posframe-buffer*")
#+end_example
-*** Delete all posframes
+** Delete all posframes
 #+begin_example
 M-x posframe-delete-all
 #+end_example
@@ -91,7 +89,7 @@ Note: this command will delete all posframe buffers.
 You probably shouldn't use it if you are sharing a buffer
 between posframe and other packages.
 
-*** Customizing mouse pointer control
+** Customizing mouse pointer control
 
 By default, posframe moves the pointer to point (0,0) in
 the frame, as a way to address an issue with mouse focus.
@@ -100,7 +98,7 @@ To disable this feature, add this to your init.el:
 (setq posframe-mouse-banish nil)
 #+end_example
 
-*** Set fallback arguments of posframe-show
+** Set fallback arguments of posframe-show
 
 Users can set fallback values of posframe-show's arguments with the
 help of `posframe-arghandler'.  The example below sets fallback



[elpa] externals/posframe b25d11b 1/3: * README.md: Add ELPA badges

2021-05-31 Thread ELPA Syncer
branch: externals/posframe
commit b25d11bddf3fc49a1ef4ded761697514c94b7c45
Author: Feng Shu 
Commit: Feng Shu 

* README.md: Add ELPA badges
---
 README.md   | 46 --
 posframe.el |  3 +++
 2 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/README.md b/README.md
index 692ab05..2db2601 100644
--- a/README.md
+++ b/README.md
@@ -3,25 +3,27 @@ Note: this file is auto converted from posframe.el by 
[el2org](https://github.co
 
 # 目录
 
-1.  [Posframe README](#org65b5096)
-1.  [What is posframe?](#orgd81e50a)
-2.  [Installation](#org25d0086)
-3.  [Usage](#orgc43df1d)
-1.  [Create a posframe](#org9920c17)
-2.  [Hide a posframe](#org8f7797e)
-3.  [Hide all posframes](#orgfd2c6ea)
-4.  [Delete a posframe](#orgd119456)
-5.  [Delete all posframes](#org0c7a761)
-6.  [Customizing mouse pointer control](#org9b3f377)
-7.  [Set fallback arguments of posframe-show](#orgc8e9887)
+1.  [Posframe README](#orgb128484)
+1.  [What is posframe?](#org974e900)
+2.  [Installation](#org038dda3)
+3.  [Usage](#org9c07621)
+1.  [Create a posframe](#orgb22c0ed)
+2.  [Hide a posframe](#org92261d1)
+3.  [Hide all posframes](#org98e9cb3)
+4.  [Delete a posframe](#orgcb1cbf5)
+5.  [Delete all posframes](#org707403c)
+6.  [Customizing mouse pointer control](#orgfbacc1c)
+7.  [Set fallback arguments of posframe-show](#org8ab97cf)
 
 
-
+
 
 # Posframe README
 
+http://elpa.gnu.org/packages/posframe.html";>https://elpa.gnu.org/packages/posframe.svg"/>
 
-
+
+
 
 ## What is posframe?
 
@@ -48,19 +50,19 @@ NOTE:
 ![img](./snapshots/posframe-1.png)
 
 
-
+
 
 ## Installation
 
 (require 'posframe)
 
 
-
+
 
 ## Usage
 
 
-
+
 
 ### Create a posframe
 
@@ -88,21 +90,21 @@ NOTE:
 C-h f posframe-show
 
 
-
+
 
 ### Hide a posframe
 
 (posframe-hide " *my-posframe-buffer*")
 
 
-
+
 
 ### Hide all posframes
 
 M-x posframe-hide-all
 
 
-
+
 
 ### Delete a posframe
 
@@ -114,7 +116,7 @@ NOTE:
 (posframe-delete-frame " *my-posframe-buffer*")
 
 
-
+
 
 ### Delete all posframes
 
@@ -125,7 +127,7 @@ You probably shouldn't use it if you are sharing a buffer
 between posframe and other packages.
 
 
-
+
 
 ### Customizing mouse pointer control
 
@@ -136,7 +138,7 @@ To disable this feature, add this to your init.el:
 (setq posframe-mouse-banish nil)
 
 
-
+
 
 ### Set fallback arguments of posframe-show
 
diff --git a/posframe.el b/posframe.el
index 41ef55d..22bb953 100644
--- a/posframe.el
+++ b/posframe.el
@@ -28,6 +28,9 @@
 ;;; Commentary:
 
 ;; * Posframe README:README:
+
+;; #+html: http://elpa.gnu.org/packages/posframe.html";>https://elpa.gnu.org/packages/posframe.svg"/>
+
 ;; ** What is posframe?
 ;; Posframe can pop up a frame at point, this *posframe* is a
 ;; child-frame connected to its root window's buffer.



[elpa] externals/pyim 8d08ed7: * README.org: Add ELPA badges

2021-05-31 Thread ELPA Syncer
branch: externals/pyim
commit 8d08ed7174e1b46ee2413c515e96a955fc3f88d3
Author: Feng Shu 
Commit: Feng Shu 

* README.org: Add ELPA badges
---
 README.org | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.org b/README.org
index d1c41b5..8659a58 100644
--- a/README.org
+++ b/README.org
@@ -2,6 +2,8 @@
 #+TITLE: PYIM 是一个 Emacs 中文输入法,支持全拼,双拼,五笔,仓颉 和 Rime 等
 #+AUTHOR: Feng Shu
 
+#+html: http://elpa.gnu.org/packages/pyim.html";>https://elpa.gnu.org/packages/pyim.svg"/>
+
 * Changlog
 
 ** <2021-04-28 Wed> 五笔输入法和仓颉输入法的不兼容更新



[elpa] externals/pyim 148da8e 2/2: * pyim-common.el (pyim-add-unread-command-events): Copy code from quail-add-unread-command-events.

2021-05-31 Thread ELPA Syncer
branch: externals/pyim
commit 148da8e4e44abe797977c657ecf9d8ee7e29ae97
Author: Feng Shu 
Commit: Feng Shu 

* pyim-common.el (pyim-add-unread-command-events): Copy code from 
quail-add-unread-command-events.
---
 pyim-common.el | 47 +--
 1 file changed, 25 insertions(+), 22 deletions(-)

diff --git a/pyim-common.el b/pyim-common.el
index 0308b3c..c431e8b 100644
--- a/pyim-common.el
+++ b/pyim-common.el
@@ -163,28 +163,31 @@ for example: https://github.com/ch11ng/exwm/pull/831";
(funcall in (1- i) (1- j)))
   (funcall in l1 l2
 
-(if (fboundp 'quail-add-unread-command-events)
-(defalias 'pyim-add-unread-command-events 'quail-add-unread-command-events)
-  (defun pyim-add-unread-command-events (key &optional reset)
-"Add KEY to `unread-command-events', ensuring that it is not recorded.
-If KEY is a character, it is prepended to `unread-command-events' as
-a cons cell of the form (no-record . KEY).
-If KEY is a vector of events, the events in the vector are prepended
-to `unread-command-events', after converting each event to a cons cell
-of the form (no-record . EVENT).
-Quail puts keys back in `unread-command-events' to be handled again,
-and when it does this these keys have already been recorded in the
-recent keys and in the keyboard macro being defined, which means that
-recording them again creates duplicates.
-When RESET is non-nil, the events in `unread-command-events' are first
-discarded."
-(if reset (setq unread-command-events nil))
-(setq unread-command-events
-  (if (characterp key)
-  (cons (cons 'no-record key) unread-command-events)
-(append (mapcan (lambda (e) (list (cons 'no-record e)))
-(append key nil))
-unread-command-events)
+(defun pyim-add-unread-command-events (key &optional reset)
+  "Add KEY to `unread-command-events', ensuring that it is not recorded.
+
+If KEY is a character, it is prepended to `unread-command-events'
+as a cons cell of the form (no-record . KEY).
+
+If KEY is a vector of events, the events in the vector are
+prepended to `unread-command-events', after converting each event
+to a cons cell of the form (no-record . EVENT).
+
+Pyim puts keys back in `unread-command-events' to be handled
+again, and when it does this these keys have already been
+recorded in the recent keys and in the keyboard macro being
+defined, which means that recording them again creates
+duplicates.  When RESET is non-nil, the events in
+`unread-command-events' are first discarded.
+
+This function is a fork of `quail-add-unread-command-events'."
+  (if reset (setq unread-command-events nil))
+  (setq unread-command-events
+(if (characterp key)
+(cons (cons 'no-record key) unread-command-events)
+  (append (mapcan (lambda (e) (list (cons 'no-record e)))
+  (append key nil))
+  unread-command-events
 
 ;; * Footer
 (provide 'pyim-common)



[elpa] externals/pyim updated (8d08ed7 -> 148da8e)

2021-05-31 Thread ELPA Syncer
elpasync pushed a change to branch externals/pyim.

  from  8d08ed7   * README.org: Add ELPA badges
   new  792b6a9   Add pyim-add-unread-command-events and use it.
   new  148da8e   * pyim-common.el (pyim-add-unread-command-events): Copy 
code from quail-add-unread-command-events.


Summary of changes:
 pyim-common.el  | 26 ++
 pyim-entered.el | 13 ++---
 pyim-page.el|  5 ++---
 pyim.el | 21 ++---
 4 files changed, 40 insertions(+), 25 deletions(-)



[elpa] externals/pyim 792b6a9 1/2: Add pyim-add-unread-command-events and use it.

2021-05-31 Thread ELPA Syncer
branch: externals/pyim
commit 792b6a9ee9c703653a14c3b4abada097b4b25ae6
Author: Feng Shu 
Commit: Feng Shu 

Add pyim-add-unread-command-events and use it.

* pyim-common.el (pyim-add-unread-command-events): New function.

* pyim.el (pyim-start-translation, pyim-convert-string-at-point): Use 
pyim-add-unread-command-events.

* pyim-page.el (pyim-page-minibuffer-message): Use 
pyim-add-unread-command-events.

* pyim-entered.el (pyim-entered-refresh-1): Use 
pyim-add-unread-command-events.
(pyim-common): required.

Port 
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bd5c7404195e45f11946b4e0933a1f8b697d8b87
---
 pyim-common.el  | 23 +++
 pyim-entered.el | 13 ++---
 pyim-page.el|  5 ++---
 pyim.el | 21 ++---
 4 files changed, 37 insertions(+), 25 deletions(-)

diff --git a/pyim-common.el b/pyim-common.el
index 0ef39ba..0308b3c 100644
--- a/pyim-common.el
+++ b/pyim-common.el
@@ -163,6 +163,29 @@ for example: https://github.com/ch11ng/exwm/pull/831";
(funcall in (1- i) (1- j)))
   (funcall in l1 l2
 
+(if (fboundp 'quail-add-unread-command-events)
+(defalias 'pyim-add-unread-command-events 'quail-add-unread-command-events)
+  (defun pyim-add-unread-command-events (key &optional reset)
+"Add KEY to `unread-command-events', ensuring that it is not recorded.
+If KEY is a character, it is prepended to `unread-command-events' as
+a cons cell of the form (no-record . KEY).
+If KEY is a vector of events, the events in the vector are prepended
+to `unread-command-events', after converting each event to a cons cell
+of the form (no-record . EVENT).
+Quail puts keys back in `unread-command-events' to be handled again,
+and when it does this these keys have already been recorded in the
+recent keys and in the keyboard macro being defined, which means that
+recording them again creates duplicates.
+When RESET is non-nil, the events in `unread-command-events' are first
+discarded."
+(if reset (setq unread-command-events nil))
+(setq unread-command-events
+  (if (characterp key)
+  (cons (cons 'no-record key) unread-command-events)
+(append (mapcan (lambda (e) (list (cons 'no-record e)))
+(append key nil))
+unread-command-events)
+
 ;; * Footer
 (provide 'pyim-common)
 
diff --git a/pyim-entered.el b/pyim-entered.el
index 4332152..03fc09d 100644
--- a/pyim-entered.el
+++ b/pyim-entered.el
@@ -28,6 +28,7 @@
 ;;; Code:
 ;; * 代码   :code:
 (require 'cl-lib)
+(require 'pyim-common)
 
 (defgroup pyim-entered nil
   "Entered tools for pyim."
@@ -246,10 +247,9 @@ TYPE 取值为 point-after, 返回 entered buffer 中 point 之后的字符
 ;; autoselector 机制已经触发的时候,如果发现 entered buffer 中
 ;; point 后面还有未处理的输入,就将其转到下一轮处理,这种情况
 ;; 很少出现,一般是型码输入法,entered 编辑的时候有可能触发。
-(setq unread-command-events
-  (append (listify-key-sequence (pyim-entered-get 'point-after))
-  unread-command-events))
-(push last-command-event unread-command-events)
+(pyim-add-unread-command-events
+ (listify-key-sequence (pyim-entered-get 'point-after)))
+(pyim-add-unread-command-events last-command-event)
 (pyim-terminate-translation))
;; 假设用户已经输入 "niha", 然后按了 "o" 键,那么,当前
;; entered 就是 "nihao". 如果 autoselector 函数返回一个 list:
@@ -266,9 +266,8 @@ TYPE 取值为 point-after, 返回 entered buffer 中 point 之后的字符
 (list str)
   pyim-candidates)))
   (pyim-outcome-handle 'candidate))
-(setq unread-command-events
-  (append (listify-key-sequence (pyim-entered-get 'point-after))
-  unread-command-events))
+(pyim-add-unread-command-events
+ (listify-key-sequence (pyim-entered-get 'point-after)))
 (pyim-terminate-translation))
(t (setq pyim-candidate-position 1)
   (pyim-preview-refresh)
diff --git a/pyim-page.el b/pyim-page.el
index 0fc3648..8d3793e 100644
--- a/pyim-page.el
+++ b/pyim-page.el
@@ -506,9 +506,8 @@ minibuffer 原来显示的信息和 pyim 选词框整合在一起显示
   (setq point-1 (point)))
 (sit-for 100)
 (delete-region (point) point-1)
-(when quit-flag
-  (setq quit-flag nil
-unread-command-events '(7)
+(setq quit-flag nil)
+(pyim-add-unread-command-events 7 t)))
 
 (defun pyim-page-hide ()
   "Hide pyim page."
diff --git a/pyim.el b/pyim.el
index ac1459a..b7dee79 100644
--- a/pyim.el
+++ b/pyim.el
@@ -236,26 +236,19 @@ Return the input string.
  ;; 插入 preview string, pyim *强制* 将其设置为 nil
  (input-method-use-echo-area nil)
  (modified-p (buffer-modified-p))
- last-command-event last-command this-command inhibit-record)
+ last-command-event last-command this-comm

[elpa] externals/pyim 99278a0: * pyim-common.el (pyim-add-unread-command-events): use when instead if.

2021-05-31 Thread ELPA Syncer
branch: externals/pyim
commit 99278a0ea0e861089942d68cb4615194dd0a95fe
Author: Feng Shu 
Commit: Feng Shu 

* pyim-common.el (pyim-add-unread-command-events): use when instead if.
---
 pyim-common.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyim-common.el b/pyim-common.el
index c431e8b..8003582 100644
--- a/pyim-common.el
+++ b/pyim-common.el
@@ -181,7 +181,8 @@ duplicates.  When RESET is non-nil, the events in
 `unread-command-events' are first discarded.
 
 This function is a fork of `quail-add-unread-command-events'."
-  (if reset (setq unread-command-events nil))
+  (when reset
+(setq unread-command-events nil))
   (setq unread-command-events
 (if (characterp key)
 (cons (cons 'no-record key) unread-command-events)