[elpa] externals/phps-mode 0e66bd2 2/2: Updated version and date

2021-08-03 Thread Christian Johansson
branch: externals/phps-mode
commit 0e66bd2a26ada194691835b4e6feea805e8ffcde
Author: Christian Johansson 
Commit: Christian Johansson 

Updated version and date
---
 phps-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/phps-mode.el b/phps-mode.el
index 9f4f3d5..fdd21e9 100644
--- a/phps-mode.el
+++ b/phps-mode.el
@@ -5,8 +5,8 @@
 ;; Author: Christian Johansson 
 ;; Maintainer: Christian Johansson 
 ;; Created: 3 Mar 2018
-;; Modified: 20 Apr 2021
-;; Version: 0.4.3
+;; Modified: 3 Aug 2021
+;; Version: 0.4.4
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-phps-mode
 



[elpa] externals/phps-mode 579a1ff 1/2: Moved automation-grammar file to fix error in byte-compilation

2021-08-03 Thread Christian Johansson
branch: externals/phps-mode
commit 579a1ff89fcb78053ff2e427fa4fa63eafd8c136
Author: Christian Johansson 
Commit: Christian Johansson 

Moved automation-grammar file to fix error in byte-compilation
---
 Makefile| 2 +-
 .../phps-mode-automation-grammar.el => phps-mode-automation-grammar.el  | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 18c670d..1359ab8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ EMACS = emacs
 ifdef emacs
EMACS = $(emacs)
 endif
-EMACS_CMD := $(EMACS) -Q -batch -L . -L test/ -L admin/
+EMACS_CMD := $(EMACS) -Q -batch -L .
 
 .PHONY: clean
 clean:
diff --git a/admin/phps-mode-automation-grammar.el 
b/phps-mode-automation-grammar.el
similarity index 100%
rename from admin/phps-mode-automation-grammar.el
rename to phps-mode-automation-grammar.el



[elpa] externals/phps-mode updated (209055b -> 0e66bd2)

2021-08-03 Thread Christian Johansson
cjohansson pushed a change to branch externals/phps-mode.

  from  209055b   Updated date and version
   new  579a1ff   Moved automation-grammar file to fix error in 
byte-compilation
   new  0e66bd2   Updated version and date


Summary of changes:
 Makefile  | 2 +-
 ...phps-mode-automation-grammar.el => phps-mode-automation-grammar.el | 0
 phps-mode.el  | 4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)
 rename admin/phps-mode-automation-grammar.el => 
phps-mode-automation-grammar.el (100%)



[elpa] externals/marginalia df4a6c9: Fix docstring

2021-08-03 Thread ELPA Syncer
branch: externals/marginalia
commit df4a6c9ee597fe3f95969a97818959add7945c73
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix docstring
---
 marginalia.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/marginalia.el b/marginalia.el
index 798c63b..f6cde1c 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -1042,7 +1042,7 @@ Remember `this-command' for 
`marginalia-classify-by-command-name'."
 
 ;;;###autoload
 (defun marginalia-cycle ()
-  "Cycle between annotators in `marginalia-annotators'."
+  "Cycle between annotators in `marginalia-annotator-registry'."
   (interactive)
   (if-let* ((win (active-minibuffer-window))
 (buf (window-buffer win)))



[elpa] externals/marginalia db5812c: Split marginalia-annotate-file

2021-08-03 Thread ELPA Syncer
branch: externals/marginalia
commit db5812c8750f729627a927aa1d0dd9178ffc2b58
Author: Daniel Mendler 
Commit: Daniel Mendler 

Split marginalia-annotate-file
---
 marginalia.el | 45 ++---
 1 file changed, 26 insertions(+), 19 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index f6cde1c..223cdb2 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -790,29 +790,36 @@ component of a full file path."
   ;; necessary information (there's not much else we can do)
   cand))
 
-(defun marginalia--remote-p (path)
-  "Return t if PATH is a remote path."
-  (string-match-p "\\`/[^/|:]+:" (substitute-in-file-name path)))
+(defun marginalia--remote-protocol (path)
+  "Return the remote protocol of PATH."
+  (save-match-data
+(setq path (substitute-in-file-name path))
+(and (string-match "\\`/\\([^/|:]+\\):" path)
+ (match-string 1 path
+
+(defun marginalia--annotate-local-file (cand)
+  "Annotate local file CAND."
+  (when-let (attrs (file-attributes (substitute-in-file-name
+ (marginalia--full-candidate cand))
+'integer))
+(marginalia--fields
+ ((marginalia--file-owner attrs)
+  :width 12 :face 'marginalia-file-owner)
+ ((marginalia--file-modes attrs))
+ ((file-size-human-readable (file-attribute-size attrs))
+  :face 'marginalia-size :width -7)
+ ((marginalia--time (file-attribute-modification-time attrs))
+  :face 'marginalia-date :width -12
 
 (defun marginalia-annotate-file (cand)
   "Annotate file CAND with its size, modification time and other attributes.
 These annotations are skipped for remote paths."
-  (if (or (marginalia--remote-p cand)
-  (when-let (win (active-minibuffer-window))
-(with-current-buffer (window-buffer win)
-  (marginalia--remote-p (minibuffer-contents-no-properties)
-  (marginalia--fields ("*Remote*" :face 'marginalia-documentation))
-(when-let (attrs (file-attributes (substitute-in-file-name
-   (marginalia--full-candidate cand))
-  'integer))
-  (marginalia--fields
-   ((marginalia--file-owner attrs)
-:width 12 :face 'marginalia-file-owner)
-   ((marginalia--file-modes attrs))
-   ((file-size-human-readable (file-attribute-size attrs))
-:face 'marginalia-size :width -7)
-   ((marginalia--time (file-attribute-modification-time attrs))
-:face 'marginalia-date :width -12)
+  (if-let (remote (or (marginalia--remote-protocol cand)
+  (when-let (win (active-minibuffer-window))
+(with-current-buffer (window-buffer win)
+  (marginalia--remote-protocol 
(minibuffer-contents-no-properties))
+  (marginalia--fields (remote :format "*%s*" :face 
'marginalia-documentation))
+(marginalia--annotate-local-file cand)))
 
 (defun marginalia--file-owner (attrs)
   "Return file owner given ATTRS."



[nongnu] branch elpa/geiser deleted (was 4099dce)

2021-08-03 Thread Philip Kaludercic
zge pushed a change to branch elpa/geiser.

   was  4099dce   Documentation nit

This change permanently discards the following revisions:

  discards  4099dce   Documentation nit
  discards  70c3d6d   There is no session (fixes #22)
  discards  2b45bd3   Use defvar-local
  discards  803dfeb   Version bump
  discards  24613fe   Fix for the fix (avoid popping up on empty output strings)
  discards  9cff9b2   Fix for output display in schemes not defining their own 
handler
  discards  49bdbfa   Version bump (0.15)
  discards  30efb27   New public api for registering file extensions
  discards  c5a9aae   fix for doom emacs
  discards  aa26163   Fix for ANSI color treatments
  discards  1bf725d   autoload cookie for geiser-eval-load-path
  discards  003c9ae   Readme tweaks
  discards  901c0f0   Simpler error reporting for symbol lookup failures
  discards  4218392   cl-case with an eval-when-compile
  discards  d7ba81b   Optionally treat ANSI colors in dbg buffer
  discards  8dfa758   Version bump (0.14)
  discards  9fd3174   autoload geiser activate implementation
  discards  0d90066   stale geiser-install references removed
  discards  58ea5f9   duplicated commetary section gone
  discards  f470f6b   we need macros.texi
  discards  ce0a0c4   macros.texi removed
  discards  330a3ff   texi master index regenerated
  discards  b0813de   makefiles (and lack thereof)
  discards  5707380   proper ELPA header for geiser.el
  discards  f16b01f   more documentation nits
  discards  08b851a   trying again
  discards  a2f754c   trying to format readme tables more pleasantly
  discards  8acf2b4   readme.org tweaks
  discards  68c7957   user manual and web pages updates
  discards  f0e834d   empty geiser-active-implementations
  discards  eaf2b37   readme.org updates
  discards  9727082   geiser.el: autoloads removed
  discards  e366291   geiser-messages-mode: Don't quote lambda expressions
  discards  ec46056   Determine the display string of command key dynamically.
  discards  248d67f   Add doc-string to geiser-custom--defcustom
  discards  5d8a721   Improve doc-strings of some options
  discards  887cefb   Declare keymaps using defvar explicitly
  discards  701aab2   Placate byte compiler (Brian Leung)
  discards  5f0fa55   Support buffer-local binary and arglist configuration
  discards  13f1fbb   the long road to doc updates starts with one commit
  discards  847d2ad   scheme and autotools removals
  discards  02e228f   Version 0.12
  discards  1e3cb03   Always display error in minibuffer after eval
  discards  161f4cc   Add docs for per-project repl instances
  discards  fc81121   Tag project functions instead of overriding docs
  discards  01f1d47   Fix byte-compiler warning
  discards  8cba6b5   Improve project function selection, make ignore default
  discards  210068c   Refactor to make repl/impl proj argument optional
  discards  daa8236   Use a separate REPL instance per project
  discards  2b73504   Returning C-c k back to users, that key's theirs!
  discards  3d20627   Links to olde blog posts
  discards  4835112   Fix typos
  discards  ff17a43   Better handcrafted reader, now with numbers!
  discards  c25a056   Completion for vanilla users
  discards  19f7f24   Fix typos
  discards  00107cb   Fix recently added .dir-locals.el
  discards  bc481f4   Chop off trailing whitespace before printing REPL result
  discards  8b07def   Use cl-lib instead of cl
  discards  6496bc5   Declare geiser-restart-repl in geiser-compile.el
  discards  a11b96f   Fix indentation
  discards  2a7b84b   Enforce use of spaces for indentation
  discards  3ceb31b   Mark the beginning of code part of elisp libraries with 
Code: heading
  discards  715f4c0   Begin the summary lines of all elisp libraries with three 
semicolons
  discards  28d004c   define-geiser-implementation - un-unquote load-file-name
  discards  81bbcc8   Cleaner Chicken and Gambit sections in install docs
  discards  e7c76d3   Documentation fixes
  discards  2a6b602   Version bump
  discards  0ff5aa4   Fix for misspelled geiser-completion-module-list-func 
(#271)
  discards  c939b5f   Not referring to savannah downloads in the docs
  discards  afcc35c   Version bump
  discards  b5bb998   Whitespace
  discards  0fbeb19   Add Gambit source files to makefiles
  discards  13dd398   doc: Improve macros to add docbook support
  discards  a00d9eb   Refix #271, and consider gardening instead of programming
  discards  f3099b4   Guile: use load paths defined in dir-local variables 
(fixes #268)
  discards  ec22d9c   Proper wrapping of final comment lines (fixes #292)
  discards  659d586   Compatibility with Helm completions in emacs-25 (fixes 
#271)
  discards  8357c84   Version 0.11
  discards  866c744   Leftover (fixes #291)
  discards  01e539a   Merge branch 'support-mit-scmutils' [279]
  discards  63ff73d   C-c \ and C-c [ in geiser-repl too
  discards  1ad752e   Rename multiline expression option
  discards  06b8e04   elisp/geiser-completion.el: Expose `--symbol-

[elpa] scratch/javaimp-wip fe080eb: wip

2021-08-03 Thread Filipp Gunbin
branch: scratch/javaimp-wip
commit fe080eba615ed90586a03f5e5c0b2515ddaab729
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

wip
---
 javaimp-parse.el  | 120 ---
 javaimp-tests.el  | 272 ++
 javaimp.el|   3 +-
 testdata/test-get-file-classes-1.java |  60 
 testdata/test1-misc-classes.java  | 117 +++
 5 files changed, 331 insertions(+), 241 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index 55c89f2..1a46b65 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -33,13 +33,20 @@ present."
   :type 'function)
 
 (cl-defstruct javaimp-scope
-  type ; one of anonymous-class, class, interface, enum, local-class,
-   ; method, statement, simple-statement, array, unknown
+  type; see javaimp--parse-all-scope-types
   name
   start
   open-brace
   parent)
 
+(defconst javaimp--parse-named-scope-types
+  '(class interface enum local-class method))
+
+(defconst javaimp--parse-all-scope-types
+  (append
+   '(anonymous-class statement simple-statement array unknown)
+   javaimp--parse-named-scope-types))
+
 (defconst javaimp--parse-classlike-keywords
   '("class" "interface" "enum"))
 (defconst javaimp--parse-stmt-keywords
@@ -48,8 +55,9 @@ present."
 ))
 
 (defsubst javaimp--parse-is-classlike (scope)
-  (member (symbol-name (javaimp-scope-type scope))
-  javaimp--parse-classlike-keywords))
+  (when scope
+(member (symbol-name (javaimp-scope-type scope))
+javaimp--parse-classlike-keywords)))
 
 (defvar javaimp--arglist-syntax-table
   (let ((st (make-syntax-table java-mode-syntax-table))) ;TODO don't depend
@@ -61,7 +69,8 @@ present."
 
 (defvar-local javaimp--parse-dirty-pos nil
   "Buffer position after which all parsed information should be
-considered as stale.  Usually set by modification change hooks.")
+considered as stale.  Usually set by modification change hooks.
+Should be set to (point-min) in major mode hook.")
 
 (defmacro javaimp--parse-with-arglist-syntax (beg &rest body)
   (declare (debug t))
@@ -425,20 +434,21 @@ nil then goes all the way up.  Examines and sets property
 res))
 
 (defun javaimp--parse-all-scopes ()
-  "Parses all scopes in this buffer, but only after
-`javaimp--parse-dirty-pos' if it is non-nil."
+  "Parses scopes in this buffer which are after
+`javaimp--parse-dirty-pos', if it is non-nil.  Resets this
+variable after parsing is done."
   (when javaimp--parse-dirty-pos
 (remove-text-properties javaimp--parse-dirty-pos (point-max)
-  '(javaimp-parse-scope nil)))
-  (goto-char (point-max))
-  (let ((parse-sexp-ignore-comments t)  ; FIXME remove with major mode
-(parse-sexp-lookup-properties nil))
-(while (javaimp--parse-rsb-keyword "{" javaimp--parse-dirty-pos t)
-  (save-excursion
-(forward-char)
-;; Set props at this brace and all the way up
-(javaimp--parse-scopes nil
-  (setq javaimp--parse-dirty-pos nil))
+'(javaimp-parse-scope nil))
+(goto-char (point-max))
+(let ((parse-sexp-ignore-comments t)  ; FIXME remove with major mode
+  (parse-sexp-lookup-properties nil))
+  (while (javaimp--parse-rsb-keyword "{" javaimp--parse-dirty-pos t)
+(save-excursion
+  (forward-char)
+  ;; Set props at this brace and all the way up
+  (javaimp--parse-scopes nil
+(setq javaimp--parse-dirty-pos nil)))
 
 
 
@@ -450,19 +460,41 @@ nil then goes all the way up.  Examines and sets property
  "^\\s-*package\\s-+\\([^;\n]+\\)\\s-*;" nil t 1)
 (match-string 1)))
 
-(defun javaimp--parse-get-file-classes ()
-  (javaimp--parse-all-scopes)
-  (goto-char (point-max))
-  (let (match res)
-(while (setq match (text-property-search-backward
-'javaimp-parse-scope nil nil))
-  (when (javaimp--parse-is-classlike (prop-match-value match))
-(push (mapconcat #'javaimp-scope-name
- (javaimp--parse-scopes nil)
- ".")
-  res)
+(defun javaimp--parse-get-all-classlikes (&optional reparse)
+  (mapcar (lambda (scope)
+(let ((name (javaimp-scope-name scope))
+  (tmp scope))
+  (while (setq tmp (javaimp-scope-parent tmp))
+(setq name (concat (javaimp-scope-name tmp) "." name)))
+  name))
+  (javaimp--parse-get-all-scopes reparse 
#'javaimp--parse-is-classlike)))
+
+(defun javaimp--parse-get-forest-for-imenu (&optional reparse)
+  (let* ((methods
+  (javaimp--parse-get-all-scopes
+   reparse
+   (lambda (s)
+ (and (eq (javaimp-scope-type s) 'method)
+  (javaimp--parse-is-classlike (javaimp-scope-parent s))
+ (classes (javaimp--parse-get-all-scopes
+   nil  ;no need to

[elpa] externals/consult bdffe37 6/6: Update README

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit bdffe379f8272194ada7236d6d2d565a01c07e92
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update README
---
 README.org | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/README.org b/README.org
index a2ffc5b..7c67802 100644
--- a/README.org
+++ b/README.org
@@ -250,13 +250,14 @@ their descriptions.
search gets started. Consult splits the input string into two parts, if the
first character is a punctuation character, like =#=. For example
=#grep-regexp#filter-string=, is split at the second =#=. The string 
=grep-regexp=
-   is passed to Grep, the =filter-string= is passed to the /fast/ Emacs 
filtering to
-   further narrow down the list of matches. This is particularly useful if you
-   are using an advanced completion style like orderless. =consult-grep= 
supports
-   preview. If the =consult-project-root-function= is 
[[#use-package-example][configured]] and returns
-   non-nil, =consult-grep= searches the current project directory. Otherwise 
the
-   =default-directory= is searched. If =consult-grep= is invoked with prefix
-   argument =C-u M-s g=, you can specify the directory manually.
+   is passed to Grep. By default, spaces are replaced by ~.*~. The 
=filter-string=
+   is passed to the /fast/ Emacs filtering to further narrow down the list of
+   matches. This is particularly useful if you are using an advanced completion
+   style like orderless. =consult-grep= supports preview. If the
+   =consult-project-root-function= is [[#use-package-example][configured]] and 
returns non-nil, =consult-grep=
+   searches the current project directory. Otherwise the =default-directory= is
+   searched. If =consult-grep= is invoked with prefix argument =C-u M-s g=, 
you can
+   specify the directory manually.
  - =consult-find=, =consult-locate=: Find file by
matching the path against a regexp. Like for =consult-grep,= either the 
project
root or the current directory is the root directory for the search. The 
input
@@ -534,6 +535,7 @@ their descriptions.
  Examples:
 
  - =#defun=: Search for "defun" using grep.
+ - =#defun embark=: Search for "defun.*embark" using grep.
  - =#defun#consult=: Search for "defun" using grep, filter with the word
"consult".
  - =/defun/consult=: It is also possible to use other punctuation



[elpa] externals/consult 46f6c7a 2/6: Generalize command line arguments

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit 46f6c7a950d05cddc29057c82a951ab81012bbf7
Author: Daniel Mendler 
Commit: Daniel Mendler 

Generalize command line arguments

Previously command line configurations were plain strings which should 
include
the substrings ARG and OPTS. The substrings were replaced by the input 
argument
and auxillary command line arguments respectively.

The new command line argument configurations must be lists of strings and
expressions, which are evaluated in a lexical context with the variables 
`arg`
and `opts`.

Updated configurations:

* consult-find-command
* consult-locate-command
* consult-man-command
* consult-git-grep-command
* consult-grep-command
* consult-ripgrep-command
---
 consult.el | 101 +++--
 1 file changed, 51 insertions(+), 50 deletions(-)

diff --git a/consult.el b/consult.el
index a794c6f..e1d7aed 100644
--- a/consult.el
+++ b/consult.el
@@ -218,65 +218,56 @@ See `consult--multi' for a description of the source 
values."
   :type '(repeat (choice symbol regexp)))
 
 (defcustom consult-git-grep-command
-  "git --no-pager grep --null --color=always --extended-regexp\
-   --line-number -I -e ARG OPTS"
-  "Command line string for git-grep, see `consult-git-grep'.
-
-The command string must have a specific format, including ARG and OPTS
-substrings. ARG is replaced by the filter string and OPTS by the auxillary
-command options."
-  :type 'string)
+  '("git --no-pager grep --null --color=always --extended-regexp"
+"--line-number -I -e"
+(string-join (split-string arg nil t) ".*") opts)
+  "Command line arguments for git-grep, see `consult-git-grep'.
+See `consult-ripgrep-command' for details on the configuration."
+  :type 'sexp)
 
 (defcustom consult-grep-command
-  "grep --null --line-buffered --color=always --extended-regexp\
-   --exclude-dir=.git --line-number -I -r . -e ARG OPTS"
-  "Command line string for grep, see `consult-grep'.
-
-The command string must have a specific format, including ARG and OPTS
-substrings. ARG is replaced by the filter string and OPTS by the auxillary
-command options."
-  :type 'string)
+  '("grep --null --line-buffered --color=always --extended-regexp"
+"--exclude-dir=.git --line-number -I -r . -e"
+(string-join (split-string arg nil t) ".*") opts)
+  "Command line arguments for grep, see `consult-grep'.
+See `consult-ripgrep-command' for details on the configuration."
+  :type 'sexp)
 
 (defcustom consult-grep-max-columns 300
   "Maximal number of columns of grep output."
   :type 'integer)
 
 (defcustom consult-ripgrep-command
-  "rg --null --line-buffered --color=ansi --max-columns=1000\
-   --smart-case --no-heading --line-number . -e ARG OPTS"
-  "Command line string for ripgrep, see `consult-ripgrep'.
+  '("rg --null --line-buffered --color=ansi --max-columns=1000"
+"--smart-case --no-heading --line-number . -e"
+(string-join (split-string arg nil t) ".*") opts)
+  "Command line arguments for ripgrep, see `consult-ripgrep'.
 
-The command string must have a specific format, including ARG and OPTS
-substrings. ARG is replaced by the filter string and OPTS by the auxillary
-command options."
-  :type 'string)
+The command line arguments must be specified as a list of strings and
+expressions. The expressions which must evaluate to a string or a list of
+strings. Expressions are evaluated in a lexical context, where `arg' is the
+input argument and `opts' is a list of auxillary command line options."
+  :type 'sexp)
 
 (defcustom consult-find-command
-  "find . -not ( -wholename */.* -prune ) -ipath *ARG* OPTS"
-  "Command line string for find, see `consult-find'.
-
-The command string must have a specific format, including ARG and OPTS
-substrings. ARG is replaced by the filter string and OPTS by the auxillary
-command options. By default the ARG is wrapped in wildcards."
-  :type 'string)
+  '("find . -not ( -wholename */.* -prune ) -ipath"
+(string-join `("" ,@(split-string arg nil t) "") "*") opts)
+  "Command line arguments for find, see `consult-find'.
+See `consult-ripgrep-command' for details on the configuration."
+  :type 'sexp)
 
 (defcustom consult-locate-command
-  "locate --ignore-case --existing --regexp ARG OPTS"
-  "Command line string for locate, see `consult-locate'.
-
-The command string must have a specific format, including ARG and OPTS
-substrings. ARG is replaced by the filter string and OPTS by the auxillary
-command options."
-  :type 'string)
+  '("locate --ignore-case --existing --regexp"
+(string-join (split-string arg nil t) ".*") opts)
+  "Command line arguments for locate, see `consult-locate'.
+See `consult-ripgrep-command' for details on the configuration."
+  :type 'sexp)
 
 (defcustom consult-man-command
-  "man -k ARG OPTS"
-  "Command line string for man, see `consult-man'.
-
-The command string must have a specific format, including ARG 

[elpa] externals/consult e0bd3c0 1/6: Add consult--to-list

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit e0bd3c0293b1792da34e0d288a958748f67fc1a1
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add consult--to-list
---
 consult.el | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/consult.el b/consult.el
index b06ff08..a794c6f 100644
--- a/consult.el
+++ b/consult.el
@@ -1066,8 +1066,7 @@ FACE is the cursor face."
   "Normalize PREVIEW-KEY, return alist of keys and debounce times."
   (let ((keys)
 (debounce 0))
-(unless (listp preview-key)
-  (setq preview-key (list preview-key)))
+(setq preview-key (consult--to-list preview-key))
 (while preview-key
   (if (eq (car preview-key) :debounce)
   (setq debounce (cadr preview-key)
@@ -1595,6 +1594,10 @@ The refresh happens after a DELAY, defaulting to 
`consult-async-refresh-delay'."
   "Filter candidates of ASYNC by FUN."
   (consult--async-transform async seq-filter fun))
 
+(defun consult--to-list (list)
+  "Ensure that LIST is a list."
+  (if (listp list) list (list list)))
+
 (defun consult--command-args (cmd)
   "Split command arguments and append to CMD."
   (setq cmd (split-string-and-unquote cmd))
@@ -1660,13 +1663,9 @@ ASYNC must be non-nil for async completion functions."
   (delete-dups
(append
 ;; the defaults are at the beginning of the future history
-(if (listp minibuffer-default)
-minibuffer-default
-  (list minibuffer-default))
+(consult--to-list minibuffer-default)
 ;; then our custom items
-(remove "" (remq nil (if (listp items)
- items
-   (list items
+(remove "" (remq nil (consult--to-list items)))
 ;; Add all the completions for non-async commands. For async commands this 
feature
 ;; is not useful, since if one selects a completion candidate, the async 
search is
 ;; restarted using that candidate string. This usually does not yield a 
desired
@@ -1915,7 +1914,7 @@ INHERIT-INPUT-METHOD, if non-nil the minibuffer inherits 
the input method."
(let ((key (if (plist-member src :preview-key)
   (plist-get src :preview-key)
 consult-preview-key)))
- (if (listp key) key (list key
+ (consult--to-list key)))
  sources
 
 (defun consult--multi-lookup (sources _ candidates cand)
@@ -3638,7 +3637,7 @@ AS is a conversion function."
   (when sort
 (setq buffers (funcall (intern (format "consult--buffer-sort-%s" 
sort)) buffers)))
   (when (or filter mode as (stringp root))
-(let ((mode (if (listp mode) mode (list mode)))
+(let ((mode (consult--to-list mode))
   (exclude-re (consult--regexp-filter exclude))
   (include-re (consult--regexp-filter include)))
   (consult--keep! buffers



[elpa] externals/consult cfbe798 5/6: Update docstring

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit cfbe798e42a8d45b500ee10e6c857afa189b5570
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update docstring
---
 consult.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/consult.el b/consult.el
index 34b18bd..d70439f 100644
--- a/consult.el
+++ b/consult.el
@@ -272,7 +272,8 @@ See `consult-ripgrep-command' for details on the 
configuration."
 (defcustom consult-regexp-function
   #'consult-spaced-regexp
   "Function which transforms a string to a regular expression.
-The default value "
+By default, spaces in the input string are replaced by `.*'. In order to
+disable the regexp transformation, use the `identity' function."
   :type '(choice (const :tag "Space separated" consult-spaced-regexp)
  (const :tag "No transformation" identity)
  (function :tag "Custom function")))



[elpa] externals/consult 652938f 3/6: Introduce consult-regexp-function

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit 652938f39edca6585cb33effe2d0725c7c382f73
Author: Daniel Mendler 
Commit: Daniel Mendler 

Introduce consult-regexp-function
---
 README.org |  1 +
 consult.el | 24 
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 078b8ad..a2ffc5b 100644
--- a/README.org
+++ b/README.org
@@ -935,6 +935,7 @@ configuration examples.
  | consult-preview-max-size | 10485760 | Files larger than 
this size are not previewed |
  | consult-preview-raw-size | 102400   | Files larger than 
this size are previewed in raw form |
  | consult-project-root-function| nil  | Function which 
returns current project root   |
+ | consult-regexp-function  | ...  | Convert string to 
regular expression  |
  | consult-register-narrow  | ...  | Narrowing 
configuration for =consult-register=  |
  | consult-ripgrep-command  | "rg ..." | Command line 
arguments for ripgrep|
  | consult-themes   | nil  | List of themes to be 
presented for selection  |
diff --git a/consult.el b/consult.el
index e1d7aed..34b18bd 100644
--- a/consult.el
+++ b/consult.el
@@ -220,7 +220,7 @@ See `consult--multi' for a description of the source 
values."
 (defcustom consult-git-grep-command
   '("git --no-pager grep --null --color=always --extended-regexp"
 "--line-number -I -e"
-(string-join (split-string arg nil t) ".*") opts)
+(consult-regexp arg) opts)
   "Command line arguments for git-grep, see `consult-git-grep'.
 See `consult-ripgrep-command' for details on the configuration."
   :type 'sexp)
@@ -228,7 +228,7 @@ See `consult-ripgrep-command' for details on the 
configuration."
 (defcustom consult-grep-command
   '("grep --null --line-buffered --color=always --extended-regexp"
 "--exclude-dir=.git --line-number -I -r . -e"
-(string-join (split-string arg nil t) ".*") opts)
+(consult-regexp arg) opts)
   "Command line arguments for grep, see `consult-grep'.
 See `consult-ripgrep-command' for details on the configuration."
   :type 'sexp)
@@ -240,7 +240,7 @@ See `consult-ripgrep-command' for details on the 
configuration."
 (defcustom consult-ripgrep-command
   '("rg --null --line-buffered --color=ansi --max-columns=1000"
 "--smart-case --no-heading --line-number . -e"
-(string-join (split-string arg nil t) ".*") opts)
+(consult-regexp arg) opts)
   "Command line arguments for ripgrep, see `consult-ripgrep'.
 
 The command line arguments must be specified as a list of strings and
@@ -258,7 +258,7 @@ See `consult-ripgrep-command' for details on the 
configuration."
 
 (defcustom consult-locate-command
   '("locate --ignore-case --existing --regexp"
-(string-join (split-string arg nil t) ".*") opts)
+(consult-regexp arg) opts)
   "Command line arguments for locate, see `consult-locate'.
 See `consult-ripgrep-command' for details on the configuration."
   :type 'sexp)
@@ -269,6 +269,14 @@ See `consult-ripgrep-command' for details on the 
configuration."
 See `consult-ripgrep-command' for details on the configuration."
   :type 'sexp)
 
+(defcustom consult-regexp-function
+  #'consult-spaced-regexp
+  "Function which transforms a string to a regular expression.
+The default value "
+  :type '(choice (const :tag "Space separated" consult-spaced-regexp)
+ (const :tag "No transformation" identity)
+ (function :tag "Custom function")))
+
 (defcustom consult-preview-key 'any
   "Preview trigger keys, can be nil, 'any, a single key or a list of keys."
   :type '(choice (const :tag "Any key" any)
@@ -526,6 +534,14 @@ ARGS is a list of commands or sources followed by the list 
of keyword-value pair
 
  Helper functions and macros
 
+(defun consult-spaced-regexp (str)
+  "Convert string STR to a regular expression, replace spaces by `.*'."
+  (string-join (split-string str nil t) ".*"))
+
+(defun consult-regexp (str)
+  "Convert string STR to a regular expression, call `consult-regexp-function'."
+  (funcall consult-regexp-function str))
+
 (defmacro consult--keep! (list form)
   "Evaluate FORM for every element of LIST and keep the non-nil results."
   (declare (indent 1))



[elpa] externals/consult e76b088 4/6: Update changelog

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit e76b0884db5beae3889e9a0ce8269de18bce9d3d
Author: Daniel Mendler 
Commit: Daniel Mendler 

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

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 7483d89..ad9d557 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -10,6 +10,8 @@
 - Add =consult-line-multi= to search multiple buffers
 - Removed obsolete =consult-yank=, =consult-async-default-split=, 
=consult-config=
 - =consult-ripgrep=: Use =--smart-case=
+- =consult-*-command=: Generalized command line configuration, which supports
+  transformations of the input string.
 
 * Version 0.9 (2021-06-22)
 



[elpa] externals/consult updated (e3418a9 -> bdffe37)

2021-08-03 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  e3418a9   Update changelog
   new  e0bd3c0   Add consult--to-list
   new  46f6c7a   Generalize command line arguments
   new  652938f   Introduce consult-regexp-function
   new  e76b088   Update changelog
   new  cfbe798   Update docstring
   new  bdffe37   Update README


Summary of changes:
 CHANGELOG.org |   2 +
 README.org|  17 +---
 consult.el| 137 +-
 3 files changed, 89 insertions(+), 67 deletions(-)



[elpa] externals/consult 964528d 2/2: Add consult--to-list

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit 964528d7fa4e6c9de8fe37da15672167761bf620
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add consult--to-list
---
 consult.el | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/consult.el b/consult.el
index b06ff08..a794c6f 100644
--- a/consult.el
+++ b/consult.el
@@ -1066,8 +1066,7 @@ FACE is the cursor face."
   "Normalize PREVIEW-KEY, return alist of keys and debounce times."
   (let ((keys)
 (debounce 0))
-(unless (listp preview-key)
-  (setq preview-key (list preview-key)))
+(setq preview-key (consult--to-list preview-key))
 (while preview-key
   (if (eq (car preview-key) :debounce)
   (setq debounce (cadr preview-key)
@@ -1595,6 +1594,10 @@ The refresh happens after a DELAY, defaulting to 
`consult-async-refresh-delay'."
   "Filter candidates of ASYNC by FUN."
   (consult--async-transform async seq-filter fun))
 
+(defun consult--to-list (list)
+  "Ensure that LIST is a list."
+  (if (listp list) list (list list)))
+
 (defun consult--command-args (cmd)
   "Split command arguments and append to CMD."
   (setq cmd (split-string-and-unquote cmd))
@@ -1660,13 +1663,9 @@ ASYNC must be non-nil for async completion functions."
   (delete-dups
(append
 ;; the defaults are at the beginning of the future history
-(if (listp minibuffer-default)
-minibuffer-default
-  (list minibuffer-default))
+(consult--to-list minibuffer-default)
 ;; then our custom items
-(remove "" (remq nil (if (listp items)
- items
-   (list items
+(remove "" (remq nil (consult--to-list items)))
 ;; Add all the completions for non-async commands. For async commands this 
feature
 ;; is not useful, since if one selects a completion candidate, the async 
search is
 ;; restarted using that candidate string. This usually does not yield a 
desired
@@ -1915,7 +1914,7 @@ INHERIT-INPUT-METHOD, if non-nil the minibuffer inherits 
the input method."
(let ((key (if (plist-member src :preview-key)
   (plist-get src :preview-key)
 consult-preview-key)))
- (if (listp key) key (list key
+ (consult--to-list key)))
  sources
 
 (defun consult--multi-lookup (sources _ candidates cand)
@@ -3638,7 +3637,7 @@ AS is a conversion function."
   (when sort
 (setq buffers (funcall (intern (format "consult--buffer-sort-%s" 
sort)) buffers)))
   (when (or filter mode as (stringp root))
-(let ((mode (if (listp mode) mode (list mode)))
+(let ((mode (consult--to-list mode))
   (exclude-re (consult--regexp-filter exclude))
   (include-re (consult--regexp-filter include)))
   (consult--keep! buffers



[elpa] externals/consult a1dd9f9 1/2: Revert more flexible regexp argument filtering for now

2021-08-03 Thread ELPA Syncer
branch: externals/consult
commit a1dd9f9414106826c2e6bf63cc8f73ae3edf6afe
Author: Daniel Mendler 
Commit: Daniel Mendler 

Revert more flexible regexp argument filtering for now
---
 CHANGELOG.org |   2 -
 README.org|  17 +++-
 consult.el| 137 +-
 3 files changed, 67 insertions(+), 89 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index ad9d557..7483d89 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -10,8 +10,6 @@
 - Add =consult-line-multi= to search multiple buffers
 - Removed obsolete =consult-yank=, =consult-async-default-split=, 
=consult-config=
 - =consult-ripgrep=: Use =--smart-case=
-- =consult-*-command=: Generalized command line configuration, which supports
-  transformations of the input string.
 
 * Version 0.9 (2021-06-22)
 
diff --git a/README.org b/README.org
index 7c67802..078b8ad 100644
--- a/README.org
+++ b/README.org
@@ -250,14 +250,13 @@ their descriptions.
search gets started. Consult splits the input string into two parts, if the
first character is a punctuation character, like =#=. For example
=#grep-regexp#filter-string=, is split at the second =#=. The string 
=grep-regexp=
-   is passed to Grep. By default, spaces are replaced by ~.*~. The 
=filter-string=
-   is passed to the /fast/ Emacs filtering to further narrow down the list of
-   matches. This is particularly useful if you are using an advanced completion
-   style like orderless. =consult-grep= supports preview. If the
-   =consult-project-root-function= is [[#use-package-example][configured]] and 
returns non-nil, =consult-grep=
-   searches the current project directory. Otherwise the =default-directory= is
-   searched. If =consult-grep= is invoked with prefix argument =C-u M-s g=, 
you can
-   specify the directory manually.
+   is passed to Grep, the =filter-string= is passed to the /fast/ Emacs 
filtering to
+   further narrow down the list of matches. This is particularly useful if you
+   are using an advanced completion style like orderless. =consult-grep= 
supports
+   preview. If the =consult-project-root-function= is 
[[#use-package-example][configured]] and returns
+   non-nil, =consult-grep= searches the current project directory. Otherwise 
the
+   =default-directory= is searched. If =consult-grep= is invoked with prefix
+   argument =C-u M-s g=, you can specify the directory manually.
  - =consult-find=, =consult-locate=: Find file by
matching the path against a regexp. Like for =consult-grep,= either the 
project
root or the current directory is the root directory for the search. The 
input
@@ -535,7 +534,6 @@ their descriptions.
  Examples:
 
  - =#defun=: Search for "defun" using grep.
- - =#defun embark=: Search for "defun.*embark" using grep.
  - =#defun#consult=: Search for "defun" using grep, filter with the word
"consult".
  - =/defun/consult=: It is also possible to use other punctuation
@@ -937,7 +935,6 @@ configuration examples.
  | consult-preview-max-size | 10485760 | Files larger than 
this size are not previewed |
  | consult-preview-raw-size | 102400   | Files larger than 
this size are previewed in raw form |
  | consult-project-root-function| nil  | Function which 
returns current project root   |
- | consult-regexp-function  | ...  | Convert string to 
regular expression  |
  | consult-register-narrow  | ...  | Narrowing 
configuration for =consult-register=  |
  | consult-ripgrep-command  | "rg ..." | Command line 
arguments for ripgrep|
  | consult-themes   | nil  | List of themes to be 
presented for selection  |
diff --git a/consult.el b/consult.el
index d70439f..b06ff08 100644
--- a/consult.el
+++ b/consult.el
@@ -218,65 +218,65 @@ See `consult--multi' for a description of the source 
values."
   :type '(repeat (choice symbol regexp)))
 
 (defcustom consult-git-grep-command
-  '("git --no-pager grep --null --color=always --extended-regexp"
-"--line-number -I -e"
-(consult-regexp arg) opts)
-  "Command line arguments for git-grep, see `consult-git-grep'.
-See `consult-ripgrep-command' for details on the configuration."
-  :type 'sexp)
+  "git --no-pager grep --null --color=always --extended-regexp\
+   --line-number -I -e ARG OPTS"
+  "Command line string for git-grep, see `consult-git-grep'.
+
+The command string must have a specific format, including ARG and OPTS
+substrings. ARG is replaced by the filter string and OPTS by the auxillary
+command options."
+  :type 'string)
 
 (defcustom consult-grep-command
-  '("grep --null --line-buffered --color=always --extended-regexp"
-"--exclude-dir=.git --line-number -I -r . -e"
-(consult-regexp arg) opts)
-  "Command line arguments for grep, see `consult-grep'.
-See `consult-ripgrep-command' for details on the config

[elpa] externals/consult updated (bdffe37 -> 964528d)

2021-08-03 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  bdffe37   Update README
   new  a1dd9f9   Revert more flexible regexp argument filtering for now
   new  964528d   Add consult--to-list


Summary of changes:
 CHANGELOG.org |   2 -
 README.org|  17 -
 consult.el| 118 +-
 3 files changed, 57 insertions(+), 80 deletions(-)



[elpa] scratch/javaimp-wip 4ac5cb4: wip

2021-08-03 Thread Filipp Gunbin
branch: scratch/javaimp-wip
commit 4ac5cb48db9fa6d57b937d33a336dcda8cc8c3a1
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

wip
---
 javaimp-parse.el |  13 ++-
 javaimp-tests.el | 177 +++
 javaimp-util.el  |  60 ++---
 javaimp.el   |  65 --
 testdata/test1-misc-classes.java |   5 ++
 5 files changed, 246 insertions(+), 74 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index 1a46b65..061b18d 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -55,9 +55,14 @@ present."
 ))
 
 (defsubst javaimp--parse-is-classlike (scope)
-  (when scope
-(member (symbol-name (javaimp-scope-type scope))
-javaimp--parse-classlike-keywords)))
+  (and scope
+   (member (symbol-name (javaimp-scope-type scope))
+   javaimp--parse-classlike-keywords)))
+
+(defsubst javaimp--parse-is-named (scope)
+  (and scope
+   (memq (javaimp-scope-type scope)
+ javaimp--parse-named-scope-types)))
 
 (defvar javaimp--arglist-syntax-table
   (let ((st (make-syntax-table java-mode-syntax-table))) ;TODO don't depend
@@ -477,7 +482,7 @@ variable after parsing is done."
  (and (eq (javaimp-scope-type s) 'method)
   (javaimp--parse-is-classlike (javaimp-scope-parent s))
  (classes (javaimp--parse-get-all-scopes
-   nil  ;no need to reparse
+   nil  ; no need to reparse
#'javaimp--parse-is-classlike))
  (top-classes (mapcar (lambda (s)
 (null (javaimp-scope-parent s)))
diff --git a/javaimp-tests.el b/javaimp-tests.el
index 7bb63b5..b4788e2 100644
--- a/javaimp-tests.el
+++ b/javaimp-tests.el
@@ -189,34 +189,179 @@ throws E1 {"
  "Top.IInner1.IInner1_CInner1"
  "Top.IInner1.IInner1_IInner1"
  "Top.EInner1"
- "Top.EInner1.EInner1_EInner1")
-
-(ert-deftest javaimp-test--parse-get-forest-for-imenu ()
-  ;; TODO
-  )
-
+ "Top.EInner1.EInner1_EInner1"
+ "ColocatedTop")
 
 (ert-deftest javaimp-test--parse-get-all-scopes ()
   (with-temp-buffer
 (insert-file-contents
  (concat javaimp--basedir "testdata/test1-misc-classes.java"))
+;;
 ;; parse full buffer
-(javaimp-test--check-scopes (javaimp--parse-get-all-scopes t))
-;; reparse half buffer
+(javaimp-test--check-named-scopes
+ (javaimp--parse-get-all-scopes t #'javaimp--parse-is-named))
+;;
+;; reparse half of buffer
 (setq javaimp--parse-dirty-pos (/ (- (point-max) (point-min)) 2))
-(javaimp-test--check-scopes (javaimp--parse-get-all-scopes))
+(javaimp-test--check-named-scopes
+ (javaimp--parse-get-all-scopes nil #'javaimp--parse-is-named))
+;;
 ;; use cache
-(javaimp-test--check-scopes (javaimp--parse-get-all-scopes
+(javaimp-test--check-named-scopes
+ (javaimp--parse-get-all-scopes nil #'javaimp--parse-is-named
+
+(defun javaimp-test--check-named-scopes (scopes)
+  (let ((actual
+ (mapcar (lambda (s)
+   (let (res)
+ (while s
+   (push (list (javaimp-scope-type s)
+   (javaimp-scope-name s))
+ res)
+   (setq s (javaimp-scope-parent s)))
+ (nreverse res)))
+ scopes))
+(expected
+ '(((class "Top"))
+   ((class "CInner1") (class "Top"))
+   ((method "foo") (class "CInner1") (class "Top"))
+   ((local-class "CInner1_CLocal1")
+(method "foo") (class "CInner1") (class "Top"))
+   ((method "foo")
+(local-class "CInner1_CLocal1")
+(method "foo") (class "CInner1") (class "Top"))
+   ((local-class "CInner1_CLocal1_CLocal1")
+(method "foo")
+(local-class "CInner1_CLocal1")
+(method "foo") (class "CInner1") (class "Top"))
+   ((method "foo")
+(local-class "CInner1_CLocal1_CLocal1")
+(method "foo")
+(local-class "CInner1_CLocal1")
+(method "foo") (class "CInner1") (class "Top"))
+
+   ((local-class "CInner1_CLocal2")
+(method "foo") (class "CInner1") (class "Top"))
+   ((method "foo")
+(local-class "CInner1_CLocal2")
+(method "foo") (class "CInner1") (class "Top"))
+
+   ((class "CInner1_CInner") (class "CInner1") (class "Top"))
+   ((method "foo")
+(class "CInner1_CInner") (class "CInner1") (class "Top"))
+   ((method "bar")
+(class "CInner1_CInner") (class "CInner1") (class "Top"))
+
+   ((interface "IInner1") (class "Top"))
+   ((method "foo") (interface "IInner1") (class "Top"))
+ 

[elpa] externals/phps-mode updated (0e66bd2 -> 9d2a9d3)

2021-08-03 Thread Christian Johansson
cjohansson pushed a change to branch externals/phps-mode.

  from  0e66bd2   Updated version and date
   new  7650ab2   Added failing tests for bookkeeping of static variables
   new  bfa60ea   Passed tests for bookkeeping of static variables
   new  9d2a9d3   Updated version


Summary of changes:
 phps-mode-lex-analyzer.el   | 23 ++-
 phps-mode.el|  2 +-
 test/phps-mode-test-lex-analyzer.el | 17 +++--
 3 files changed, 26 insertions(+), 16 deletions(-)



[elpa] externals/phps-mode 9d2a9d3 3/3: Updated version

2021-08-03 Thread Christian Johansson
branch: externals/phps-mode
commit 9d2a9d3dd65b857b10b9bbf4ecbad8077995e8b2
Author: Christian Johansson 
Commit: Christian Johansson 

Updated version
---
 phps-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phps-mode.el b/phps-mode.el
index fdd21e9..986aa25 100644
--- a/phps-mode.el
+++ b/phps-mode.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Christian Johansson 
 ;; Created: 3 Mar 2018
 ;; Modified: 3 Aug 2021
-;; Version: 0.4.4
+;; Version: 0.4.5
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-phps-mode
 



[elpa] externals/phps-mode 7650ab2 1/3: Added failing tests for bookkeeping of static variables

2021-08-03 Thread Christian Johansson
branch: externals/phps-mode
commit 7650ab224b0b7bf1f1a343f4dfbd8a01fbea6bec
Author: Christian Johansson 
Commit: Christian Johansson 

Added failing tests for bookkeeping of static variables
---
 test/phps-mode-test-lex-analyzer.el | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/test/phps-mode-test-lex-analyzer.el 
b/test/phps-mode-test-lex-analyzer.el
index dde416b..2236e4a 100644
--- a/test/phps-mode-test-lex-analyzer.el
+++ b/test/phps-mode-test-lex-analyzer.el
@@ -1580,6 +1580,20 @@
 (phps-mode-test--hash-to-list 
(phps-mode-lex-analyzer--get-bookkeeping) t)
 '((" id $a" 1) ((15 17) 1) (" id $b" 1) ((19 21) 1) ((28 30) 1) (" 
function myFunction id $c" 1) ((73 75) 1) (" function myFunction id $a" 1) ((90 
92) 1) ((102 104) 1) ((142 144) 0)
 
+  (phps-mode-test--with-buffer
+   "

[elpa] externals/phps-mode bfa60ea 2/3: Passed tests for bookkeeping of static variables

2021-08-03 Thread Christian Johansson
branch: externals/phps-mode
commit bfa60ea807d4743d7d2c84ce4c822ea808e16a12
Author: Christian Johansson 
Commit: Christian Johansson 

Passed tests for bookkeeping of static variables
---
 phps-mode-lex-analyzer.el   | 23 ++-
 test/phps-mode-test-lex-analyzer.el |  7 +++
 2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 3e4384c..490afc5 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -1161,7 +1161,6 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
   (in-anonymous-function-number 0)
   (in-anonymous-function-nesting-level)
   (in-global-declaration nil)
-  (in-static-declaration nil)
   (in-arrow-fn nil)
   (in-arrow-fn-declaration nil)
   (in-arrow-fn-number 0)
@@ -1358,10 +1357,14 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
 (when (and
imenu-in-class-name
(equal previous-token 'T_STATIC)
-   (not imenu-in-function-declaration))
-  (setq bookkeeping-namespace (concat 
bookkeeping-namespace " static"))
+   (not imenu-in-function-declaration)
+   (not imenu-in-function-name))
+  (setq
+   bookkeeping-namespace
+   (concat bookkeeping-namespace " static"))
   (when bookkeeping-alternative-namespace
-(setq bookkeeping-alternative-namespace (concat 
bookkeeping-alternative-namespace " static"
+(setq bookkeeping-alternative-namespace
+  (concat bookkeeping-alternative-namespace " 
static"
 
 (setq bookkeeping-namespace (concat 
bookkeeping-namespace " id " bookkeeping-variable-name))
 (when bookkeeping-alternative-namespace
@@ -1445,9 +1448,8 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
 (setq bookkeeping-in-assignment t))
 
   ;; In static variable declaration
-  (when (and in-static-declaration
- (equal token 'T_VARIABLE)
- imenu-in-function-name)
+  (when (and (equal previous-token 'T_STATIC)
+ (equal token 'T_VARIABLE))
 (setq bookkeeping-in-assignment t))
 
   ;; In [$abc, $def] = .. or array($abc, $def) = ...
@@ -1554,12 +1556,7 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
   ;; Keep track of global declaration for bookkeeping
   (if (equal token 'T_GLOBAL)
   (setq in-global-declaration t)
-(setq in-global-declaration nil))
-
-  ;; Keep track of static declaration for bookkeeping
-  (if (equal token 'T_STATIC)
-  (setq in-static-declaration t)
-(setq in-static-declaration nil)))
+(setq in-global-declaration nil)))
 
 ;; Keep track of open catch blocks for bookkeeping
 (when (equal token 'T_CATCH)
diff --git a/test/phps-mode-test-lex-analyzer.el 
b/test/phps-mode-test-lex-analyzer.el
index 2236e4a..370dc08 100644
--- a/test/phps-mode-test-lex-analyzer.el
+++ b/test/phps-mode-test-lex-analyzer.el
@@ -1469,8 +1469,7 @@
 
   (phps-mode-test--with-buffer
"random();\n$this->random['abc'] = 
123;\n}\n}"
-   "Method calls should be avoied in bookkeeping"
-   ;; (message "Bookkeeping: %s" (phps-mode-test--hash-to-list 
(phps-mode-lex-analyzer--get-bookkeeping) t))
+   "Method calls should be avoided in bookkeeping"
(should (equal
 (phps-mode-test--hash-to-list 
(phps-mode-lex-analyzer--get-bookkeeping) t)
 (list (list " class myClass function __construct id $this" 1) 
(list (list 89 94) 1) (list (list 114 119) 1)
@@ -1585,14 +1584,14 @@
"Bookkeeping of static variables in different scopes without namespaces"
(should (equal
 (phps-mode-test--hash-to-list 
(phps-mode-lex-analyzer--get-bookkeeping) t)
-'((" $id $a" 1) ((15 17) 1) ((24 26) 1) (" function test id $a" 1) 
((61 63) 1) ((73 75) 1) (" class There function here id $this" 1) (" class 
There function here static id $a" 1) ((138 140) 1) ((154 156) 1)
+'((" id $a" 1) ((15 17) 1) ((24 26) 1) (" function test id $a" 1) 
((61 63) 1) ((73 75) 1) (" class There function here id $this" 1) (" class 
There function here id $a" 1) ((138 140) 1) ((154 156) 1)
 
   (phps-mode-test--with-buffer
"

[elpa] main dcbd1d7: * html/layout.css (dd): Reduce `margin-bottom`.

2021-08-03 Thread monnier--- via
branch: main
commit dcbd1d73ea5fd318b79bcf2b6626c7b6a61929c7
Author: Yuan Fu 
Commit: Stefan Monnier 

* html/layout.css (dd): Reduce `margin-bottom`.
---
 html/layout.css | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/html/layout.css b/html/layout.css
index 4330ed7..0211e80 100644
--- a/html/layout.css
+++ b/html/layout.css
@@ -148,7 +148,10 @@ dt {
 }
 
 dd {
-  margin-bottom: 10px;
+  /* We should reduce vertical space use in the "header".
+ Yuan Fu  suggested to do that simply by
+ commenting this out:
+ margin-bottom: 10px; */
   width: 460px;
   display: inline-block;
 }



[elpa] scratch/javaimp-wip 71be533: wip

2021-08-03 Thread Filipp Gunbin
branch: scratch/javaimp-wip
commit 71be533317e07b0fa42729225d3eab41f6576fe4
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

wip
---
 javaimp-tests.el | 135 ---
 javaimp-util.el  |  22 ---
 javaimp.el   |  39 ++-
 testdata/test1-misc-classes.java |   9 ++-
 4 files changed, 107 insertions(+), 98 deletions(-)

diff --git a/javaimp-tests.el b/javaimp-tests.el
index b4788e2..d84a131 100644
--- a/javaimp-tests.el
+++ b/javaimp-tests.el
@@ -224,61 +224,63 @@ throws E1 {"
 (expected
  '(((class "Top"))
((class "CInner1") (class "Top"))
-   ((method "foo") (class "CInner1") (class "Top"))
+   ((method "foo()") (class "CInner1") (class "Top"))
((local-class "CInner1_CLocal1")
-(method "foo") (class "CInner1") (class "Top"))
-   ((method "foo")
+(method "foo()") (class "CInner1") (class "Top"))
+   ((method "foo()")
 (local-class "CInner1_CLocal1")
-(method "foo") (class "CInner1") (class "Top"))
+(method "foo()") (class "CInner1") (class "Top"))
((local-class "CInner1_CLocal1_CLocal1")
-(method "foo")
+(method "foo()")
 (local-class "CInner1_CLocal1")
-(method "foo") (class "CInner1") (class "Top"))
-   ((method "foo")
+(method "foo()") (class "CInner1") (class "Top"))
+   ((method "foo()")
 (local-class "CInner1_CLocal1_CLocal1")
-(method "foo")
+(method "foo()")
 (local-class "CInner1_CLocal1")
-(method "foo") (class "CInner1") (class "Top"))
+(method "foo()") (class "CInner1") (class "Top"))
 
((local-class "CInner1_CLocal2")
-(method "foo") (class "CInner1") (class "Top"))
-   ((method "foo")
+(method "foo()") (class "CInner1") (class "Top"))
+   ((method "foo()")
 (local-class "CInner1_CLocal2")
-(method "foo") (class "CInner1") (class "Top"))
+(method "foo()") (class "CInner1") (class "Top"))
 
((class "CInner1_CInner") (class "CInner1") (class "Top"))
-   ((method "foo")
+   ((method "foo()")
 (class "CInner1_CInner") (class "CInner1") (class "Top"))
-   ((method "bar")
+   ((method "bar()")
 (class "CInner1_CInner") (class "CInner1") (class "Top"))
 
((interface "IInner1") (class "Top"))
-   ((method "foo") (interface "IInner1") (class "Top"))
+   ((method "foo()") (interface "IInner1") (class "Top"))
((class "IInner1_CInner1") (interface "IInner1") (class "Top"))
-   ((method "foo")
+   ((method "foo()")
 (class "IInner1_CInner1") (interface "IInner1") (class "Top"))
-   ((method "defaultMethod") (interface "IInner1") (class "Top"))
+   ((method "defaultMethod(String, String)")
+(interface "IInner1") (class "Top"))
 
((interface "IInner1_IInner1") (interface "IInner1") (class "Top"))
-   ((method "defaultMethod")
+   ((method "defaultMethod(String, String)")
 (interface "IInner1_IInner1") (interface "IInner1") (class "Top"))
 
((enum "EnumInner1") (class "Top"))
((method "EnumInner1") (enum "EnumInner1") (class "Top"))
-   ((method "foo") (enum "EnumInner1") (class "Top"))
+   ((method "foo()") (enum "EnumInner1") (class "Top"))
((enum "EnumInner1_EInner1") (enum "EnumInner1") (class "Top"))
 
((class "ColocatedTop"))
-   ((method "foo") (class "ColocatedTop")
+   ((method "foo()") (class "ColocatedTop"))
+   ((method "bar(String, String)") (class "ColocatedTop")
 (should (= (length expected) (length actual)))
 (dotimes (i (length expected))
   (should (equal (nth i expected) (nth i actual)
   ;;
   (let ((data
  `((,(nth 0 scopes) "Top" 26 36)
-   (,(nth 15 scopes) "Top.IInner1.IInner1_CInner1.foo" 1810 1816)
-   (,(nth 22 scopes) "Top.EnumInner1_EInner1" 2452 2476)
-   (,(nth 24 scopes) "ColocatedTop.foo" 2544 2550
+   (,(nth 15 scopes) "Top.IInner1.IInner1_CInner1.foo" 1798 1804)
+   (,(nth 22 scopes) "Top.EnumInner1_EInner1" 24574 2498)
+   (,(nth 24 scopes) "ColocatedTop.foo" 2566 2572
 (dolist (elt data)
   (let ((scope (nth 0 elt)))
 (should (equal (nth 1 elt) (javaimp-scope-name scope)))
@@ -297,24 +299,25 @@ throws E1 {"
   actual
   '(("Top"
  ("CInner1"
-  ("foo" . 98)
+  ("foo()" . 98)
   ("CInner1_CInner1"
-   ("foo" . 1099)
-   ("bar" . 1192)))
+   ("foo()" . 1099)
+   ("bar()" . 1192)))
  ("IInner1"
-  ("foo" . 1603)
+  ("foo()" . 1603