[elpa] externals/shell-command+ 2ffdcb284c: Remove shell-command+-use-eshell

2022-07-26 Thread ELPA Syncer
branch: externals/shell-command+
commit 2ffdcb284c2a251075d495fb967b4f6a1eca74a1
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Remove shell-command+-use-eshell

The variable was deprecated over a year ago, and wasn't that old to
begin with.
---
 shell-command+.el | 63 ---
 1 file changed, 13 insertions(+), 50 deletions(-)

diff --git a/shell-command+.el b/shell-command+.el
index 453e5d6d26..2ce0ae00cb 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -86,17 +86,6 @@
   :group 'external
   :prefix "shell-command+-")
 
-(defcustom shell-command+-use-eshell nil
-  "Check for eshell handlers.
-If t, always invoke eshell handlers.  If a list, only invoke
-handlers if the symbol (e.g. `man') is contained in the list."
-  :type '(choice (boolean :tag "Always active?")
- (repeat :tag "Selected commands" symbol)))
-
-(make-obsolete-variable 'shell-command+-use-eshell
-'shell-command+-substitute-alist
-"2.2.0")
-
 (defcustom shell-command+-prompt "Shell command: "
   "Prompt to use when invoking `shell-command+'."
   :type 'string)
@@ -110,45 +99,19 @@ handlers if the symbol (e.g. `man') is contained in the 
list."
   :type 'boolean)
 
 (defcustom shell-command+-substitute-alist
-  (cond ((eq shell-command+-use-eshell t)
- (require 'eshell)
- (require 'em-unix)
- (let (alist)
-   (mapatoms
-(lambda (sym)
-  (when (string-match (rx bos "eshell/" (group (+ alnum)) eos)
-  (symbol-name sym))
-(push (cons (match-string 1 (symbol-name sym))
-#'eshell-command)
-  alist
-   alist))
-((consp shell-command+-use-eshell) ;non-empty list
- (require 'eshell)
- (require 'em-unix)
- (let (alist)
-   (mapatoms
-(lambda (sym)
-  (when (and (string-match (rx bos "eshell/" (group (+ alnum)) eos)
-   (symbol-name sym))
- (member (intern (match-string 1 (symbol-name sym)))
- shell-command+-use-eshell))
-(push (cons (match-string 1 (symbol-name sym))
-#'eshell-command)
-  alist
-   alist))
-(t '(("grep" . shell-command+-cmd-grep)
- ("fgrep" . shell-command+-cmd-grep)
- ("agrep" . shell-command+-cmd-grep)
- ("egrep" . shell-command+-cmd-grep)
- ("rgrep" . shell-command+-cmd-grep)
- ("find" . shell-command+-cmd-find)
- ("locate" . shell-command+-cmd-locate)
- ("man" . shell-command+-cmd-man)
- ("info" . shell-command+-cmd-info)
- ("diff" . shell-command+-cmd-diff)
- ("make" . compile)
- ("sudo" . shell-command+-cmd-sudo)
- ("cd" . shell-command+-cmd-cd
+  '(("grep" . shell-command+-cmd-grep)
+("fgrep" . shell-command+-cmd-grep)
+("agrep" . shell-command+-cmd-grep)
+("egrep" . shell-command+-cmd-grep)
+("rgrep" . shell-command+-cmd-grep)
+("find" . shell-command+-cmd-find)
+("locate" . shell-command+-cmd-locate)
+("man" . shell-command+-cmd-man)
+("info" . shell-command+-cmd-info)
+("diff" . shell-command+-cmd-diff)
+("make" . compile)
+("sudo" . shell-command+-cmd-sudo)
+("cd" . shell-command+-cmd-cd))
   "Association of command substitutes in Elisp.
 Each entry has the form (COMMAND . FUNC), where FUNC is passed
 the command string.  To disable all command substitutions, set



[elpa] externals/vc-got 489c6310a6: add support for the Author header in vc-log

2022-07-26 Thread ELPA Syncer
branch: externals/vc-got
commit 489c6310a6f64bc73ea3eeda5dc9a96ad8bf5043
Author: Omar Polo 
Commit: Omar Polo 

add support for the Author header in vc-log

it gets mapped to the new `got commit -A' flag and overrides the
author.
---
 vc-got.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vc-got.el b/vc-got.el
index 21b2eb836a..1c5aef4099 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -600,7 +600,9 @@ Got uses an implicit checkout model for every file."
   "Commit FILES with COMMENT as commit message."
   (with-temp-buffer
 (unless (zerop (vc-got--call "commit" "-m"
- (log-edit-extract-headers nil comment)
+ (log-edit-extract-headers
+  '(("Author" . "-A"))
+  comment)
  "--"
  files))
   (error "[vc-got] can't commit: %s" (buffer-string)



[elpa] externals/shell-command+ 578a617628: Check if the automatic cd directory is actually a directory

2022-07-26 Thread ELPA Syncer
branch: externals/shell-command+
commit 578a6176284f25d5dccd17d049f1e0ac5922856d
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Check if the automatic cd directory is actually a directory

As discussed here:
https://lists.sr.ht/~pkal/public-inbox/<878roixwds.fsf%40gmail.com>
---
 shell-command+.el | 65 +++
 1 file changed, 37 insertions(+), 28 deletions(-)

diff --git a/shell-command+.el b/shell-command+.el
index 2ce0ae00cb..ce3b8fc3d9 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -271,37 +271,46 @@ proper upwards directory pointers.  This means that 
'' becomes
 path)))
 
 (defun shell-command+-parse (command)
-  "Return parsed representation of COMMAND."
+  "Return parsed representation of COMMAND.
+The resulting list has the form (DIRECTORY INDIRECTION EXECUTABLE
+COMMAND), where DIRECTORY is the directory the command should be
+executed in, if non-nil, indirection is one of `input', `output',
+`pipe', `literal' or nil depending on the indirection-prefix,
+executable is the name of the executable, and command is the
+entire command."
   (save-match-data
 (unless (string-match shell-command+--command-regexp command)
   (error "Invalid command"))
-(list (match-string-no-properties 1 command)
-  (cond ((string= (match-string-no-properties 2 command) "<")
- (if shell-command+-flip-redirection
- 'output 'input))
-((string= (match-string-no-properties 2 command) ">")
- (if shell-command+-flip-redirection
- 'input 'output))
-((string= (match-string-no-properties 2 command) "|")
- 'pipe)
-((or (string= (match-string-no-properties 2 command) "!")
- ;; Check if the output of the command is being
- ;; piped into some other command. In that case,
- ;; interpret the command literally.
- (let ((args (match-string-no-properties 5 command)))
-   (save-match-data
- (member "|" (shell-command+-tokenize args)
- 'literal))
-  (match-string-no-properties 4 command)
-  (condition-case nil
-  (if shell-command+-enable-file-substitution
-  (replace-regexp-in-string
-   (rx (* ?\\ ?\\) (or ?\\ (group "%")))
-   buffer-file-name
-   (match-string-no-properties 3 command)
-   nil nil 1)
-(match-string-no-properties 3 command))
-(error (match-string-no-properties 3 command))
+(let ((dir (match-string-no-properties 1 command))
+  (ind (cond ((string= (match-string-no-properties 2 command) "<")
+  (if shell-command+-flip-redirection
+  'output 'input))
+ ((string= (match-string-no-properties 2 command) ">")
+  (if shell-command+-flip-redirection
+  'input 'output))
+ ((string= (match-string-no-properties 2 command) "|")
+  'pipe)
+ ((or (string= (match-string-no-properties 2 command) "!")
+  ;; Check if the output of the command is being
+  ;; piped into some other command. In that case,
+  ;; interpret the command literally.
+  (let ((args (match-string-no-properties 5 command)))
+(save-match-data
+  (member "|" (shell-command+-tokenize args)
+  'literal)))
+  (cmd (match-string-no-properties 4 command))
+  (all (condition-case nil
+   (if shell-command+-enable-file-substitution
+   (replace-regexp-in-string
+(rx (* ?\\ ?\\) (or ?\\ (group "%")))
+buffer-file-name
+(match-string-no-properties 3 command)
+nil nil 1)
+ (match-string-no-properties 3 command))
+ (error (match-string-no-properties 3 command)
+  (if (or (null dir) (file-directory-p dir))
+  (list dir ind cmd all)
+(list nil ind dir (format "%s %s" dir all))
 
 ;;;###autoload
 (defun shell-command+ (command &optional beg end)



[elpa] externals/shell-command+ fb8bdbb3ff: Attribute bang

2022-07-26 Thread ELPA Syncer
branch: externals/shell-command+
commit fb8bdbb3ff6a68dd8af6c22eaceb916a8b442aae
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Attribute bang
---
 shell-command+.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/shell-command+.el b/shell-command+.el
index ce3b8fc3d9..c520759cd3 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -58,7 +58,10 @@
 ;; as specified in `shell-command+-substitute-alist'.
 ;;
 ;; See `shell-command+'s docstring for more details on how it's input
-;; is interpreted..
+;; is interpreted.
+;;
+;; `shell-command+' was originally based on the command `bang' by Leah
+;; Neukirchen (https://leahneukirchen.org/dotfiles/.emacs).
 
 ;;; News:
 



[elpa] externals/phps-mode b9f74656ad 02/17: Added ONUM regex

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit b9f74656adc28e01e734afa9aa7307b47829f901
Author: Christian Johansson 
Commit: Christian Johansson 

Added ONUM regex
---
 phps-mode-lexer.el | 35 +++
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 679ef90256..a53596ed83 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -52,14 +52,6 @@
   2147483648
   "Limit for 32-bit integer.")
 
-(defconst phps-mode-lexer--bnum
-  "0b[01]+"
-  "Boolean number.")
-
-(defconst phps-mode-lexer--hnum
-  "0x[0-9a-fA-F]+"
-  "Hexadecimal number.")
-
 (defconst phps-mode-lexer--lnum
   "[0-9]+"
   "Long number.")
@@ -75,6 +67,20 @@
   phps-mode-lexer--lnum)
   "Exponent double number.")
 
+;; TODO Fix this
+(defconst phps-mode-lexer--hnum
+  "0x[0-9a-fA-F]+"
+  "Hexadecimal number.")
+
+;; TODO Fix this
+(defconst phps-mode-lexer--bnum
+  "0b[01]+"
+  "Boolean number.")
+
+(defconst phps-mode-lexer--onum
+  "0o[0-7]+\\(_[0-7]+\\)*"
+  "Octal number.")
+
 (defconst phps-mode-lexer--label
   "[A-Za-z_[:nonascii:]][0-9A-Za-z_[:nonascii:]]*"
   "Labels are used for names.")
@@ -1250,6 +1256,19 @@
  (phps-mode-lexer--return-token 'T_DNUMBER)
(phps-mode-lexer--return-token 'T_LNUMBER
 
+  ;; TODO ONUM here
+  (phps-mode-lexer--match-macro
+   ST_IN_SCRIPTING
+   (looking-at phps-mode-lexer--onum)
+   (let* ((start (match-beginning 0))
+  (end (match-end 0))
+  (data (string-to-number
+ (buffer-substring-no-properties start end)
+ 8)))
+ (if (> data phps-mode-lexer--long-limit)
+ (phps-mode-lexer--return-token 'T_DNUMBER)
+   (phps-mode-lexer--return-token 'T_LNUMBER
+
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
(looking-at phps-mode-lexer--lnum)



[elpa] externals/phps-mode 534c766344 03/17: Fixed number constants

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit 534c766344b772e65b7137f3366401006ce82d9b
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed number constants
---
 phps-mode-lexer.el | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index a53596ed83..b923c6f96f 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -53,11 +53,16 @@
   "Limit for 32-bit integer.")
 
 (defconst phps-mode-lexer--lnum
-  "[0-9]+"
+  "[0-9]+\\(_[0-9]+\\)*"
   "Long number.")
 
 (defconst phps-mode-lexer--dnum
-  "\\([0-9]*\\.[0-9]+\\)\\|\\([0-9]+\\.[0-9]*\\)"
+  (format
+   "\\(%s?\\.%s\\|%s\\.%s?\\)"
+   phps-mode-lexer--lnum
+   phps-mode-lexer--lnum
+   phps-mode-lexer--lnum
+   phps-mode-lexer--lnum)
   "Double number.")
 
 (defconst phps-mode-lexer--exponent-dnum
@@ -67,14 +72,12 @@
   phps-mode-lexer--lnum)
   "Exponent double number.")
 
-;; TODO Fix this
 (defconst phps-mode-lexer--hnum
-  "0x[0-9a-fA-F]+"
+  "0x[0-9a-fA-F]+\\(_[0-9a-fA-F]+\\)*"
   "Hexadecimal number.")
 
-;; TODO Fix this
 (defconst phps-mode-lexer--bnum
-  "0b[01]+"
+  "0b[01]+\\(_[01]+\\)*"
   "Boolean number.")
 
 (defconst phps-mode-lexer--onum
@@ -994,7 +997,6 @@
(looking-at (concat "readonly" "[ \n\r\t]*("))
(phps-mode-lexer--yyless (length "readonly"))
(phps-mode-lexer--return-token-with-indent 'T_READONLY))
-  ;; TODO Was here
 
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
@@ -1083,13 +1085,13 @@
 
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
-   (looking-at "\\*\\*=")
-   (phps-mode-lexer--return-token 'T_POW_EQUAL))
+   (looking-at "\\*\\*")
+   (phps-mode-lexer--return-token 'T_POW))
 
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
-   (looking-at "\\*\\*")
-   (phps-mode-lexer--return-token 'T_POW))
+   (looking-at "\\*\\*=")
+   (phps-mode-lexer--return-token 'T_POW_EQUAL))
 
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING



[elpa] externals/phps-mode dd4e6c134f 07/17: Added another unit-test for T_READONLY

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit dd4e6c134f0bec5e160c284a0023ac700089c004
Author: Christian Johansson 
Commit: Christian Johansson 

Added another unit-test for T_READONLY
---
 test/phps-mode-test-lexer.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/test/phps-mode-test-lexer.el b/test/phps-mode-test-lexer.el
index 4d6176e034..4ffdf1e11b 100644
--- a/test/phps-mode-test-lexer.el
+++ b/test/phps-mode-test-lexer.el
@@ -292,6 +292,15 @@
  phps-mode-lex-analyzer--tokens
  '((T_OPEN_TAG 1 . 7) (T_ENUM 7 . 13) (T_STRING 13 . 16) ("{" 17 . 18) 
(T_CASE 23 . 27) (T_STRING 28 . 34) (";" 34 . 35) (T_CASE 40 . 44) (T_STRING 45 
. 53) (";" 53 . 54) (T_CASE 59 . 63) (T_STRING 64 . 69) (";" 69 . 70) (T_CASE 
75 . 79) (T_STRING 80 . 86) (";" 86 . 87) ("}" 88 . 89)
 
+
+  (phps-mode-test--with-buffer
+   "uid = $uid;\n}\n}"
"Read-only Properties"



[elpa] externals/phps-mode 3a59ef2141 05/17: Added tests for new lexer tokens

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit 3a59ef2141f2ffb80d5af549771546db47880a63
Author: Christian Johansson 
Commit: Christian Johansson 

Added tests for new lexer tokens
---
 phps-mode-lexer.el   | 2952 +-
 phps-mode-syntax-color.el|2 +-
 test/phps-mode-test-lexer.el |   24 +
 3 files changed, 1491 insertions(+), 1487 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 4a5dbbc286..66bd2f8c7d 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -116,18 +116,8 @@
 ;; VARIABLES
 
 
-(defconst
-  phps-mode-lexer--lambdas-by-state
-  #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8125 
data (ST_IN_SCRIPTING ((lambda nil (when (looking-at "exit") (let ((match-end 
(match-end 0)) (match-beginning (match-beginning 0))) (let ((matching-length (- 
match-end match-beginning))) (when (> matching-length 0) (when (or (not 
phps-mode-lexer--match-length) (> matching-length 
phps-mode-lexer--match-length)) (setq phps-mode-lexer--match-length 
matching-length) (setq phps-mode-lexer--match-body (lambda nil (phps- [...]
-]*" "\\(\\$\\|\\.\\.\\.\\)")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless 1) 
(phps-mode-lexer--return-token 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 
(match-beginni [...]
-" phps-mode-lexer--heredoc-label ";?
-\\|\\$" phps-mode-lexer--label "\\|{\\$" phps-mode-lexer--label "\\|\\${" 
phps-mode-lexer--label "\\)") nil t))) (if string-start (let* ((start 
(match-beginning 0)) (end (match-end 0)) (data (buffer-substring-no-properties 
start end))) (cond ((string-match (concat "
-" phps-mode-lexer--heredoc-label ";?
-") data) (phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE 
old-end start) (phps-mode-lexer--begin 'ST_END_HEREDOC)) (t 
(phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE old-end 
start (progn (signal 'phps-lexer-error (list (format "Found no ending of 
heredoc starting at %d" old-start) old-start (setq 
phps-mode-lexer--match-data (match-data) ST_LOOKING_FOR_VARNAME 
((lambda nil (when (looking-at (concat phps-mode-lexer--label "[\\[}]"))  [...]
-
'#]")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless 0) 
(phps-mode-lexer--yy-pop-state) (phps-mode-lexer--return-token-with-val 
'T_ENCAPSED_AND_WHITESPACE))) (setq [...]
-" phps-mode-lexer--heredoc-label ";?\\
-") nil t))) (if string-start (let* ((start (match-beginning 0)) (end 
(match-end 0)) (_data (buffer-substring-no-properties start end))) 
(phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE 
phps-mode-lexer--generated-new-tokens-index start) (phps-mode-lexer--begin 
'ST_END_HEREDOC)) (progn (signal 'phps-lexer-error (list (format "Found no 
ending of nowdoc starting at %d" start) start (setq 
phps-mode-lexer--match-data (match-data)))
-  "Hash-map of lambdas by state.")
+(defvar phps-mode-lexer--lambdas-by-state (make-hash-table :test 'equal)
+  "Hash-table of lex-analyzer rules organized by state.")
 
 (defvar-local phps-mode-lexer--generated-tokens nil
   "List of current generated tokens.")
@@ -494,1512 +484,1502 @@
 
 ;; Setup lexer rules
 
-
-(defun phps-mode-lxer--generate-lexer-rules ()
-  "Generate lexer match rules."
-
-  (eval-when-compile
-(setq
- phps-mode-lexer--lambdas-by-state
- (make-hash-table :test 'equal)))
-
-  (phps-mode-lexer--match-macro
-   ST_IN_SCRIPTING
-   (looking-at "exit")
-   (phps-mode-lexer--return-token-with-indent 'T_EXIT))
-
-  (phps-mode-lexer--match-macro
-   ST_IN_SCRIPTING
-   (looking-at "die")
-   (phps-mode-lexer--return-token-with-indent 'T_EXIT))
-
-  (phps-mode-lexer--match-macro
-   ST_IN_SCRIPTING
-   (looking-at "fn")
-   (phps-mode-lexer--return-token-with-indent 'T_FN))
-
-  (phps-mode-lexer--match-macro
-   ST_IN_SCRIPTING
-   (looking-at "function")
-   (phps-mode-lexer--return-token-with-indent 'T_FUNCTION))
-
-  (phps-mode-lexer--match-macro
-   ST_IN_SCRIPTING
-   (looking-at "const")
-   (phps-mode-lexer--return-token-with-indent 'T_CONST))
-
-  (phps-mode-lexer--match-macro
-   ST_IN_SCRIPTING
-   (looking-at "return")
-   (phps-mode-lexer--return-token-with-indent 'T_RETURN))
-
-  (phps-mode-lexer--match-macro
-   ST_IN_SCRIPTING
-   (looking-at "#\\[")
-   (phps-mode-lexer--enter-nesting "[")
-   (phps-mode-lexer--return-t

[elpa] externals/phps-mode 4f936cd5cd 06/17: Fixed byte-compilation issue with new lexer rules

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit 4f936cd5cdf33478cce0fe391150466e39c7564d
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed byte-compilation issue with new lexer rules
---
 phps-mode-lexer.el | 2946 ++--
 1 file changed, 1484 insertions(+), 1462 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 66bd2f8c7d..e9416398e4 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -116,7 +116,24 @@
 ;; VARIABLES
 
 
-(defvar phps-mode-lexer--lambdas-by-state (make-hash-table :test 'equal)
+(defvar phps-mode-lexer--lambdas-by-state #s(hash-table size 65 test equal 
rehash-size 1.5 rehash-threshold 0.8125 data (ST_IN_SCRIPTING ((lambda nil 
(when (looking-at "exit") (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq phps-m [...]
+]*" "\\(\\$\\|\\.\\.\\.\\)")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless 1) 
(phps-mode-lexer--return-token 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 
(match-beginni [...]
+
]*(")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless (length 
"readonly")) (phps-mode-lexer--return-token-with-indent 'T_READONLY))) (setq 
phps-mode-lexer--match-da [...]
+]*" "\\(\\$\\|\\.\\.\\.\\)")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless 1) 
(phps-mode-lexer--return-token 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 
(match-beginni [...]
+" phps-mode-lexer--heredoc-label ";?
+\\|\\$" phps-mode-lexer--label "\\|{\\$" phps-mode-lexer--label "\\|\\${" 
phps-mode-lexer--label "\\)") nil t))) (if string-start (let* ((start 
(match-beginning 0)) (end (match-end 0)) (data (buffer-substring-no-properties 
start end))) (cond ((string-match (concat "
+" phps-mode-lexer--heredoc-label ";?
+") data) (phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE 
old-end start) (phps-mode-lexer--begin 'ST_END_HEREDOC)) (t 
(phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE old-end 
start (progn (signal 'phps-lexer-error (list (format "Found no ending of 
heredoc starting at %d" old-start) old-start (setq 
phps-mode-lexer--match-data (match-data (lambda nil (when (looking-at 
"\\${") (let ((match-end (match-end 0)) (match-beginning (match-beg [...]
+" phps-mode-lexer--heredoc-label ";?
+\\|\\$" phps-mode-lexer--label "\\|{\\$" phps-mode-lexer--label "\\|\\${" 
phps-mode-lexer--label "\\)") nil t))) (if string-start (let* ((start 
(match-beginning 0)) (end (match-end 0)) (data (buffer-substring-no-properties 
start end))) (cond ((string-match (concat "
+" phps-mode-lexer--heredoc-label ";?
+") data) (phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE 
old-end start) (phps-mode-lexer--begin 'ST_END_HEREDOC)) (t 
(phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE old-end 
start (progn (signal 'phps-lexer-error (list (format "Found no ending of 
heredoc starting at %d" old-start) old-start (setq 
phps-mode-lexer--match-data (match-data) ST_LOOKING_FOR_VARNAME 
((lambda nil (when (looking-at (concat phps-mode-lexer--label "[\\[}]"))  [...]
+
'#]")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless 0) 
(phps-mode-lexer--yy-pop-state) (phps-mode-lexer--return-token-with-val 
'T_ENCAPSED_AND_WHITESPACE))) (setq [...]
+
'#]")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matchi

[elpa] externals/phps-mode 777c88da24 12/17: Fixed byte-compilation warning

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit 777c88da24ccbbced7cd56263e8aac30453765f2
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed byte-compilation warning
---
 phps-mode-lexer.el | 53 ++---
 1 file changed, 26 insertions(+), 27 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 5d79de85fc..3abaa189f7 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -2043,33 +2043,32 @@
 
 (while (< lambda-i lambda-length)
   (let ((lambd (nth lambda-i lambdas)))
-(let ((old-match-length phps-mode-lexer--match-length))
-
-  (let ((lambda-result
- (funcall (nth 0 lambd
-(when lambda-result
-  (let ((match-end (match-end 0))
-(match-beginning (match-beginning 0)))
-(let ((matching-length (- match-end match-beginning)))
-  (when (> matching-length 0)
-(when (or
-   (not phps-mode-lexer--match-length)
-   (> matching-length 
phps-mode-lexer--match-length))
-  (setq
-   phps-mode-lexer--match-length matching-length)
-  (setq
-   phps-mode-lexer--match-body (nth 1 lambd))
-  (setq
-   phps-mode-lexer--match-data (match-data))
-  ;; Debug new matches
-  (phps-mode-debug-message
-   (message
-"Found new match (%d) %s"
-phps-mode-lexer--match-length
-phps-mode-lexer--match-body
-
-  (when (fboundp 'thread-yield)
-(thread-yield
+
+(let ((lambda-result
+   (funcall (nth 0 lambd
+  (when lambda-result
+(let ((match-end (match-end 0))
+  (match-beginning (match-beginning 0)))
+  (let ((matching-length (- match-end match-beginning)))
+(when (> matching-length 0)
+  (when (or
+ (not phps-mode-lexer--match-length)
+ (> matching-length phps-mode-lexer--match-length))
+(setq
+ phps-mode-lexer--match-length matching-length)
+(setq
+ phps-mode-lexer--match-body (nth 1 lambd))
+(setq
+ phps-mode-lexer--match-data (match-data))
+;; Debug new matches
+(phps-mode-debug-message
+ (message
+  "Found new match (%d) %s"
+  phps-mode-lexer--match-length
+  phps-mode-lexer--match-body
+
+(when (fboundp 'thread-yield)
+  (thread-yield)))
   (setq lambda-i (1+ lambda-i)
 
 ;; Did we find a match?



[elpa] externals/phps-mode updated (69d4de374b -> a56b01bd3f)

2022-07-26 Thread Christian Johansson
cjohansson pushed a change to branch externals/phps-mode.

  from  69d4de374b Updated version and date
   new  585bc28fa5 Added T_ENUM and T_READONLY
   new  b9f74656ad Added ONUM regex
   new  534c766344 Fixed number constants
   new  d766293a8d Added support for underscores
   new  3a59ef2141 Added tests for new lexer tokens
   new  4f936cd5cd Fixed byte-compilation issue with new lexer rules
   new  dd4e6c134f Added another unit-test for T_READONLY
   new  3d4576eac6 Another fix for readonly
   new  e50ecb53be More debugging byte-compilation issue
   new  e5fda9efb3 New lexer tokens working after byte-compilation
   new  3f9898cd2a Added instructions of how to update lexer rules
   new  777c88da24 Fixed byte-compilation warning
   new  f070d688a4 Added TODO items
   new  dbd63046ef Fixed T_ENUM token length
   new  e84ba21c7d Updated TODO
   new  a682f890c1 Fixed indentation for enumerations
   new  a56b01bd3f Updated version and date


Summary of changes:
 phps-mode-indent.el   |   6 +-
 phps-mode-lexer.el| 191 --
 phps-mode-syntax-color.el |   2 +-
 phps-mode.el  |   4 +-
 test/phps-mode-test-indent.el |   4 +
 test/phps-mode-test-lexer.el  |  33 
 6 files changed, 175 insertions(+), 65 deletions(-)



[elpa] externals/phps-mode 3d4576eac6 08/17: Another fix for readonly

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit 3d4576eac68159ed8df3924d88d9b189fd70dde0
Author: Christian Johansson 
Commit: Christian Johansson 

Another fix for readonly
---
 phps-mode-lexer.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index e9416398e4..918fcd30d9 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -1000,7 +1000,7 @@
ST_IN_SCRIPTING
(looking-at (concat "readonly" "[ \n\r\t]*("))
(phps-mode-lexer--yyless (length "readonly"))
-   (phps-mode-lexer--return-token-with-indent 'T_READONLY))
+   (phps-mode-lexer--return-token-with-str 'T_STRING 0))
 
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING



[elpa] externals/phps-mode e50ecb53be 09/17: More debugging byte-compilation issue

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit e50ecb53bed4dc3f6a419b1e930130f8a1d41d65
Author: Christian Johansson 
Commit: Christian Johansson 

More debugging byte-compilation issue
---
 phps-mode-lexer.el  | 29 +++--
 phps-mode-macros.el |  2 +-
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 918fcd30d9..a5d2184729 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -2056,18 +2056,35 @@
 (gethash
  phps-mode-lexer--state
  phps-mode-lexer--lambdas-by-state)))
-  (dolist (lambd lambdas)
-(funcall lambd)))
-
-(when (fboundp 'thread-yield)
-  (thread-yield))
+  (let ((lambda-i 0)
+(lambda-length (length lambdas)))
+(phps-mode-debug-message
+ (message "Found %d lexer rules in state" lambda-length))
+(while (< lambda-i lambda-length)
+  (let ((lambd (nth lambda-i lambdas)))
+(let ((old-match-length phps-mode-lexer--match-length))
+  (funcall lambd)
+
+  ;; Debug new matches
+  (phps-mode-debug-message
+   (when (and
+  old-match-length
+  (> phps-mode-lexer--match-length old-match-length))
+ (message
+  "Found new match (%d) %s"
+  phps-mode-lexer--match-length
+  phps-mode-lexer--match-body)))
+
+  (when (fboundp 'thread-yield)
+(thread-yield
+  (setq lambda-i (1+ lambda-i)
 
 ;; Did we find a match?
 (if phps-mode-lexer--match-length
 (progn
   (phps-mode-debug-message
(message
-"Found match %s"
+"Found final match %s"
 phps-mode-lexer--match-body))
   (phps-mode-lexer--re2c-execute)
 
diff --git a/phps-mode-macros.el b/phps-mode-macros.el
index bad8a8a2ca..721401aeda 100644
--- a/phps-mode-macros.el
+++ b/phps-mode-macros.el
@@ -9,7 +9,7 @@
 
 (defconst
   phps-mode-macrotime-debug
-  nil
+  t
   "Debug messages during macro expansion time, default nil.")
 
 (defmacro phps-mode-debug-message (&rest code)



[elpa] externals/phps-mode 3f9898cd2a 11/17: Added instructions of how to update lexer rules

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit 3f9898cd2ab82793fdebd01358f9bd135b446c1a
Author: Christian Johansson 
Commit: Christian Johansson 

Added instructions of how to update lexer rules
---
 phps-mode-lexer.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index cf97c57235..5d79de85fc 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -12,6 +12,11 @@
 ;; * Defines the lexer for this grammar based on the Zend PHP 8.1 Lexer at
 ;; 
https://raw.githubusercontent.com/php/php-src/PHP-8.1/Zend/zend_language_scanner.l
 ;; which is using re2c.
+;;
+;; Instructions on how to generate new lexer rules
+;; 1. Make edits in lexer rules in function 
`phps-mode-lexer--generate-lexer-rules'
+;; 2. Run `eval-buffer' and then `phps-mode-lexer--generate-lexer-rules'
+;; 3. Update inline value of `phps-mode-lexer--lambdas-by-state' by running 
code "(insert (format "%S" phps-mode-lexer--lambdas-by-state))"
 
 ;;; Code:
 



[elpa] externals/phps-mode dbd63046ef 14/17: Fixed T_ENUM token length

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit dbd63046efd7837378c703c7199d8a1c81f568c2
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed T_ENUM token length
---
 phps-mode-lexer.el   | 6 +++---
 test/phps-mode-test-lexer.el | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 3abaa189f7..ecbf76cc94 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -121,7 +121,7 @@
 ;; VARIABLES
 
 
-(defvar phps-mode-lexer--lambdas-by-state #s(hash-table size 65 test equal 
rehash-size 1.5 rehash-threshold 0.8125 data (ST_IN_SCRIPTING (((lambda nil 
(looking-at "exit")) (lambda nil (phps-mode-lexer--return-token-with-indent 
'T_EXIT))) ((lambda nil (looking-at "die")) (lambda nil 
(phps-mode-lexer--return-token-with-indent 'T_EXIT))) ((lambda nil (looking-at 
"fn")) (lambda nil (phps-mode-lexer--return-token-with-indent 'T_FN))) ((lambda 
nil (looking-at "function")) (lambda nil (phps-mod [...]
+(defvar phps-mode-lexer--lambdas-by-state #s(hash-table size 65 test equal 
rehash-size 1.5 rehash-threshold 0.8125 data (ST_IN_SCRIPTING (((lambda nil 
(looking-at "exit")) (lambda nil (phps-mode-lexer--return-token-with-indent 
'T_EXIT))) ((lambda nil (looking-at "die")) (lambda nil 
(phps-mode-lexer--return-token-with-indent 'T_EXIT))) ((lambda nil (looking-at 
"fn")) (lambda nil (phps-mode-lexer--return-token-with-indent 'T_FN))) ((lambda 
nil (looking-at "function")) (lambda nil (phps-mod [...]
 
]*("))) (lambda nil (phps-mode-lexer--yyless (length "readonly")) 
(phps-mode-lexer--return-token-with-str 'T_STRING 0))) ((lambda nil (looking-at 
"unset")) (lambda nil (phps-mode-lexer--return-token-with-indent 'T_UNSET))) 
((lambda nil (looking-at "=>")) (lambda nil (phps-mode-lexer--return-token 
'T_DOUBLE_ARROW))) ((lambda nil (looking-at "list")) (lambda nil 
(phps-mode-lexer--return-token-with-indent 'T_LIST))) ((lambda nil (looking-at 
"array")) (lambda nil (phps-mode-lexer--return-tok [...]
 ]*" "\\(\\$\\|\\.\\.\\.\\)"))) (lambda nil (phps-mode-lexer--yyless 1) 
(phps-mode-lexer--return-token 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 
(match-beginning 0) (- (match-end 0) 1 ((lambda nil (looking-at "&")) 
(lambda nil (phps-mode-lexer--return-token 
'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG))) ((lambda nil (looking-at (concat 
"\\(" "]" "\\|" ")" "\\)"))) (lambda nil 
(phps-mode-lexer--return-exit-nesting-token))) ((lambda nil (looking-at (concat 
"\\(" "\\[" "\\|" "(" "\\)"))) (la [...]
 " phps-mode-lexer--heredoc-label ";?
@@ -700,9 +700,9 @@
 
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
-   (looking-at (concat "enum" phps-mode-lexer--whitespace 
"[a-zA-Z_\x80-\xff]"))
+   (looking-at (concat "\\(enum\\)" phps-mode-lexer--whitespace 
"[a-zA-Z_\x80-\xff]"))
(phps-mode-lexer--yyless 4)
-   (phps-mode-lexer--return-token-with-indent 'T_ENUM))
+   (phps-mode-lexer--return-token-with-indent 'T_ENUM (match-beginning 1) 
(match-end 1)))
 
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
diff --git a/test/phps-mode-test-lexer.el b/test/phps-mode-test-lexer.el
index 4ffdf1e11b..db9655da0f 100644
--- a/test/phps-mode-test-lexer.el
+++ b/test/phps-mode-test-lexer.el
@@ -290,7 +290,7 @@
(should
 (equal
  phps-mode-lex-analyzer--tokens
- '((T_OPEN_TAG 1 . 7) (T_ENUM 7 . 13) (T_STRING 13 . 16) ("{" 17 . 18) 
(T_CASE 23 . 27) (T_STRING 28 . 34) (";" 34 . 35) (T_CASE 40 . 44) (T_STRING 45 
. 53) (";" 53 . 54) (T_CASE 59 . 63) (T_STRING 64 . 69) (";" 69 . 70) (T_CASE 
75 . 79) (T_STRING 80 . 86) (";" 86 . 87) ("}" 88 . 89)
+ '((T_OPEN_TAG 1 . 7) (T_ENUM 7 . 11) (T_STRING 12 . 16) ("{" 17 . 18) 
(T_CASE 23 . 27) (T_STRING 28 . 34) (";" 34 . 35) (T_CASE 40 . 44) (T_STRING 45 
. 53) (";" 53 . 54) (T_CASE 59 . 63) (T_STRING 64 . 69) (";" 69 . 70) (T_CASE 
75 . 79) (T_STRING 80 . 86) (";" 86 . 87) ("}" 88 . 89)
 
 
   (phps-mode-test--with-buffer



[elpa] externals/phps-mode 585bc28fa5 01/17: Added T_ENUM and T_READONLY

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit 585bc28fa5df30f6402fd3017eedb2edcd1266b2
Author: Christian Johansson 
Commit: Christian Johansson 

Added T_ENUM and T_READONLY
---
 phps-mode-lexer.el | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 8daae5d1b8..679ef90256 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -705,6 +705,12 @@
(looking-at "trait")
(phps-mode-lexer--return-token-with-indent 'T_TRAIT))
 
+  (phps-mode-lexer--match-macro
+   ST_IN_SCRIPTING
+   (looking-at (concat "enum" phps-mode-lexer--whitespace 
"[a-zA-Z_\x80-\xff]"))
+   (phps-mode-lexer--yyless 4)
+   (phps-mode-lexer--return-token-with-indent 'T_ENUM))
+
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
(looking-at "extends")
@@ -971,6 +977,19 @@
(looking-at "public")
(phps-mode-lexer--return-token-with-indent 'T_PUBLIC))
 
+  (phps-mode-lexer--match-macro
+   ST_IN_SCRIPTING
+   (looking-at "readonly")
+   (phps-mode-lexer--return-token-with-indent 'T_READONLY))
+
+  ;; Don't treat "readonly(" as a keyword, to allow using it as a function 
name.
+  (phps-mode-lexer--match-macro
+   ST_IN_SCRIPTING
+   (looking-at (concat "readonly" "[ \n\r\t]*("))
+   (phps-mode-lexer--yyless (length "readonly"))
+   (phps-mode-lexer--return-token-with-indent 'T_READONLY))
+  ;; TODO Was here
+
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
(looking-at "unset")



[elpa] externals/phps-mode d766293a8d 04/17: Added support for underscores

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit d766293a8dd98a39be47c7a17c8fda18cc5cf2e8
Author: Christian Johansson 
Commit: Christian Johansson 

Added support for underscores
---
 phps-mode-lexer.el | 32 +---
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index b923c6f96f..4a5dbbc286 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -1251,21 +1251,27 @@
(looking-at phps-mode-lexer--bnum)
(let* ((start (match-beginning 0))
   (end (match-end 0))
-  (data (buffer-substring-no-properties (+ start 2) end))
+  (data
+   (replace-regexp-in-string
+"_"
+""
+(buffer-substring-no-properties (+ start 2) end)))
   (long-number (string-to-number data 2)))
  ;; (message "Binary number %s from %s" long-number data)
  (if (> long-number phps-mode-lexer--long-limit)
  (phps-mode-lexer--return-token 'T_DNUMBER)
(phps-mode-lexer--return-token 'T_LNUMBER
 
-  ;; TODO ONUM here
   (phps-mode-lexer--match-macro
ST_IN_SCRIPTING
(looking-at phps-mode-lexer--onum)
(let* ((start (match-beginning 0))
   (end (match-end 0))
   (data (string-to-number
- (buffer-substring-no-properties start end)
+ (replace-regexp-in-string
+  "_"
+  ""
+  (buffer-substring-no-properties start end))
  8)))
  (if (> data phps-mode-lexer--long-limit)
  (phps-mode-lexer--return-token 'T_DNUMBER)
@@ -1276,7 +1282,11 @@
(looking-at phps-mode-lexer--lnum)
(let* ((start (match-beginning 0))
   (end (match-end 0))
-  (data (string-to-number (buffer-substring-no-properties start end
+  (data (string-to-number
+ (replace-regexp-in-string
+  "_"
+  ""
+  (buffer-substring-no-properties start end)
  ;; (message "Long number: %d" data)
  (if (> data phps-mode-lexer--long-limit)
  (phps-mode-lexer--return-token 'T_DNUMBER)
@@ -1287,7 +1297,11 @@
(looking-at phps-mode-lexer--hnum)
(let* ((start (match-beginning 0))
   (end (match-end 0))
-  (data (buffer-substring-no-properties (+ start 2) end))
+  (data
+   (replace-regexp-in-string
+"_"
+""
+(buffer-substring-no-properties (+ start 2) end)))
   (long-number (string-to-number data 16)))
  ;; (message "Hexadecimal number %s from %s" long-number data)
  (if (> long-number phps-mode-lexer--long-limit)
@@ -1305,7 +1319,8 @@
 (concat "\\("
 phps-mode-lexer--lnum "\\|"
 phps-mode-lexer--hnum "\\|"
-phps-mode-lexer--bnum "\\)"))
+phps-mode-lexer--bnum "\\|"
+phps-mode-lexer--onum "\\)"))
(phps-mode-lexer--return-token 'T_NUM_STRING))
 
   (phps-mode-lexer--match-macro
@@ -1396,13 +1411,14 @@
(let ((start (match-beginning 0))
  (end (match-end 0)))
 
- ;; Allow 

[elpa] externals/phps-mode e84ba21c7d 15/17: Updated TODO

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit e84ba21c7dd109dce583da7c319e74f8782e3f58
Author: Christian Johansson 
Commit: Christian Johansson 

Updated TODO
---
 TODO.md | 1 -
 1 file changed, 1 deletion(-)

diff --git a/TODO.md b/TODO.md
index 2e852dbfe7..da48646877 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,6 +1,5 @@
 # TODO
 
-* Fix token length of T_ENUM
 * Fix indentation of enum cases
 
 ## Code intelligence



[elpa] externals/phps-mode e5fda9efb3 10/17: New lexer tokens working after byte-compilation

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit e5fda9efb3824719e09da0ad1f94c3c8bef46ebe
Author: Christian Johansson 
Commit: Christian Johansson 

New lexer tokens working after byte-compilation
---
 phps-mode-lexer.el  | 76 ++---
 phps-mode-macros.el |  2 +-
 2 files changed, 33 insertions(+), 45 deletions(-)

diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index a5d2184729..cf97c57235 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -116,24 +116,16 @@
 ;; VARIABLES
 
 
-(defvar phps-mode-lexer--lambdas-by-state #s(hash-table size 65 test equal 
rehash-size 1.5 rehash-threshold 0.8125 data (ST_IN_SCRIPTING ((lambda nil 
(when (looking-at "exit") (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq phps-m [...]
-]*" "\\(\\$\\|\\.\\.\\.\\)")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless 1) 
(phps-mode-lexer--return-token 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 
(match-beginni [...]
-
]*(")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless (length 
"readonly")) (phps-mode-lexer--return-token-with-indent 'T_READONLY))) (setq 
phps-mode-lexer--match-da [...]
-]*" "\\(\\$\\|\\.\\.\\.\\)")) (let ((match-end (match-end 0)) (match-beginning 
(match-beginning 0))) (let ((matching-length (- match-end match-beginning))) 
(when (> matching-length 0) (when (or (not phps-mode-lexer--match-length) (> 
matching-length phps-mode-lexer--match-length)) (setq 
phps-mode-lexer--match-length matching-length) (setq 
phps-mode-lexer--match-body (lambda nil (phps-mode-lexer--yyless 1) 
(phps-mode-lexer--return-token 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 
(match-beginni [...]
+(defvar phps-mode-lexer--lambdas-by-state #s(hash-table size 65 test equal 
rehash-size 1.5 rehash-threshold 0.8125 data (ST_IN_SCRIPTING (((lambda nil 
(looking-at "exit")) (lambda nil (phps-mode-lexer--return-token-with-indent 
'T_EXIT))) ((lambda nil (looking-at "die")) (lambda nil 
(phps-mode-lexer--return-token-with-indent 'T_EXIT))) ((lambda nil (looking-at 
"fn")) (lambda nil (phps-mode-lexer--return-token-with-indent 'T_FN))) ((lambda 
nil (looking-at "function")) (lambda nil (phps-mod [...]
+
]*("))) (lambda nil (phps-mode-lexer--yyless (length "readonly")) 
(phps-mode-lexer--return-token-with-str 'T_STRING 0))) ((lambda nil (looking-at 
"unset")) (lambda nil (phps-mode-lexer--return-token-with-indent 'T_UNSET))) 
((lambda nil (looking-at "=>")) (lambda nil (phps-mode-lexer--return-token 
'T_DOUBLE_ARROW))) ((lambda nil (looking-at "list")) (lambda nil 
(phps-mode-lexer--return-token-with-indent 'T_LIST))) ((lambda nil (looking-at 
"array")) (lambda nil (phps-mode-lexer--return-tok [...]
+]*" "\\(\\$\\|\\.\\.\\.\\)"))) (lambda nil (phps-mode-lexer--yyless 1) 
(phps-mode-lexer--return-token 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 
(match-beginning 0) (- (match-end 0) 1 ((lambda nil (looking-at "&")) 
(lambda nil (phps-mode-lexer--return-token 
'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG))) ((lambda nil (looking-at (concat 
"\\(" "]" "\\|" ")" "\\)"))) (lambda nil 
(phps-mode-lexer--return-exit-nesting-token))) ((lambda nil (looking-at (concat 
"\\(" "\\[" "\\|" "(" "\\)"))) (la [...]
 " phps-mode-lexer--heredoc-label ";?
 \\|\\$" phps-mode-lexer--label "\\|{\\$" phps-mode-lexer--label "\\|\\${" 
phps-mode-lexer--label "\\)") nil t))) (if string-start (let* ((start 
(match-beginning 0)) (end (match-end 0)) (data (buffer-substring-no-properties 
start end))) (cond ((string-match (concat "
 " phps-mode-lexer--heredoc-label ";?
-") data) (phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE 
old-end start) (phps-mode-lexer--begin 'ST_END_HEREDOC)) (t 
(phps-mode-lexer--return-token-with-val 'T_ENCAPSED_AND_WHITESPACE old-end 
start (progn (signal 'phps-lexer-error (list (format "Found no ending of 
heredoc starting at %d" old-start) old-start (setq 
phps-mode-lexer--match-data (match-data (lambda nil (when (looking-at 
"\\${") (let ((match-end (match-end 0)) (match-beginning (match-beg [...]
-" phps-mode-lexer--heredoc-label ";?
-\\|\\$" php

[elpa] externals/phps-mode f070d688a4 13/17: Added TODO items

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit f070d688a4a79f6a2dc4feeccf7d5c82adb7a6ae
Author: Christian Johansson 
Commit: Christian Johansson 

Added TODO items
---
 TODO.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/TODO.md b/TODO.md
index 805f5f8299..2e852dbfe7 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,5 +1,8 @@
 # TODO
 
+* Fix token length of T_ENUM
+* Fix indentation of enum cases
+
 ## Code intelligence
 
 * Bookkeeping of chained object operators like WC()->cart->subtotal



[elpa] externals/phps-mode a682f890c1 16/17: Fixed indentation for enumerations

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit a682f890c1666177786e1b142e45f3f3a38cff4f
Author: Christian Johansson 
Commit: Christian Johansson 

Fixed indentation for enumerations
---
 TODO.md   | 2 --
 phps-mode-indent.el   | 6 +-
 test/phps-mode-test-indent.el | 4 
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/TODO.md b/TODO.md
index da48646877..805f5f8299 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,7 +1,5 @@
 # TODO
 
-* Fix indentation of enum cases
-
 ## Code intelligence
 
 * Bookkeeping of chained object operators like WC()->cart->subtotal
diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index 220cd95ade..f0ea149d44 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -1126,7 +1126,8 @@
;; default:
((and
  (not previous-line-ends-with-opening-bracket)
- (not (string-match-p ":[\t ]*$" previous-line-string))
+ (not (string-match-p ")[\t ]*:[\t ]*$" previous-line-string))
+ (not (string-match-p "^[\t ]*case[\t ]*" 
previous-line-string))
  (or
   (string-match-p
"^[\t ]*case[\t ]+.*\\(;\\|:\\)[\t ]*$"
@@ -1312,6 +1313,9 @@
;; LINE AFTER ALTERNATIVE CASE DEFINITION
;; switch ($array):
;; case 'Something';
+   ;; or
+   ;; switch ($array):
+   ;; case 'Something':
((and
  (string-match-p
   "^[\t ]*\\(case.+\\|default\\)\\(;\\|:\\)[\t ]*$"
diff --git a/test/phps-mode-test-indent.el b/test/phps-mode-test-indent.el
index 7fc32fb5d0..dbee99a611 100644
--- a/test/phps-mode-test-indent.el
+++ b/test/phps-mode-test-indent.el
@@ -792,6 +792,10 @@
"

[elpa] externals/phps-mode a56b01bd3f 17/17: Updated version and date

2022-07-26 Thread Christian Johansson
branch: externals/phps-mode
commit a56b01bd3f081f5d6d1c2effcd25051aa04c4ece
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 e4599d226e..7085f8e654 100644
--- a/phps-mode.el
+++ b/phps-mode.el
@@ -5,8 +5,8 @@
 ;; Author: Christian Johansson 
 ;; Maintainer: Christian Johansson 
 ;; Created: 3 Mar 2018
-;; Modified: 23 May 2022
-;; Version: 0.4.22
+;; Modified: 26 Jul 2022
+;; Version: 0.4.23
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-phps-mode
 



[elpa] externals/javaimp ae115d66ed: Use scope open-brace as argument to javaimp--beg-of-defun-decl

2022-07-26 Thread Filipp Gunbin
branch: externals/javaimp
commit ae115d66ed90b4a6768e3bf90c5b851f9532aa69
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Use scope open-brace as argument to javaimp--beg-of-defun-decl
---
 javaimp.el | 23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/javaimp.el b/javaimp.el
index 8c2a4460e5..a1daeeafed 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -789,8 +789,8 @@ form as CLASS-ALIST in return value of
 (defsubst javaimp-imenu--make-entry (scope)
   (list (javaimp-scope-name scope)
 (if imenu-use-markers
-(copy-marker (javaimp-scope-start scope))
-  (javaimp-scope-start scope))
+(copy-marker (javaimp-scope-open-brace scope))
+  (javaimp-scope-open-brace scope))
 #'javaimp-imenu--function
 scope))
 
@@ -876,10 +876,10 @@ nested in methods are not included, see
(not (javaimp-scope-parent s)))
  scopes
 
-(defun javaimp-imenu--function (_index-name index-position _scope)
+(defun javaimp-imenu--function (_index-name index-position scope)
   (if-let ((decl-beg (javaimp--beg-of-defun-decl index-position)))
   (goto-char decl-beg)
-(goto-char index-position)
+(goto-char (javaimp-scope-start scope))
 (back-to-indentation)))
 
 
@@ -1085,14 +1085,15 @@ buffer."
  ;; Move to target sibling
  (let ((scope (nth target-idx siblings)))
(goto-char (or (javaimp--beg-of-defun-decl
-   (javaimp-scope-start scope) parent-start)
+   (javaimp-scope-open-brace scope) parent-start)
   (javaimp-scope-open-brace scope)
 (siblings
  ;; Move to start of first/last sibling
- (goto-char (javaimp-scope-open-brace
- (car (if (< target-idx 0)
-  siblings
-(last siblings))
+ (let* ((scope (car (if (< target-idx 0)
+siblings
+  (last siblings
+(pos (javaimp-scope-open-brace scope)))
+   (goto-char (or (javaimp--beg-of-defun-decl pos) pos
 (parent-start
  (goto-char parent-start)
  ;; Move forward one line unless closing brace is on the
@@ -1192,7 +1193,7 @@ PREV-INDEX gives the index of the method itself."
  siblings))
   (next-beg-decl
(javaimp--beg-of-defun-decl
-(javaimp-scope-start next) parent-beg))
+(javaimp-scope-open-brace next) parent-beg))
   (beg-decl
(let ((tmp pos))
  ;; pos may be inside arg list or some other nested
@@ -1226,7 +1227,7 @@ PREV-INDEX gives the index of the method itself."
 (not (memq (javaimp-scope-type scope)
'(array-init simple-statement 
statement)))
 (javaimp--beg-of-defun-decl
- (javaimp-scope-start scope)))
+ (javaimp-scope-open-brace scope)))
(javaimp-scope-start scope)))
 (message "%s %s at position %d"
  (javaimp-scope-type scope) (javaimp-scope-name scope)



[elpa] externals/org 5be0c709b3: * lisp/org.el (org-reload): Do not quote t symbol

2022-07-26 Thread ELPA Syncer
branch: externals/org
commit 5be0c709b3784c43a1042978989a78d54cdd0e7d
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

* lisp/org.el (org-reload): Do not quote t symbol
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index c80b4a9c23..ca0b12550c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18029,14 +18029,14 @@ With prefix arg UNCOMPILED, load the uncompiled 
versions."
 (load-suffixes (if uncompiled (reverse load-suffixes) load-suffixes))
 load-uncore load-misses)
 (setq load-misses
- (delq 't
+ (delq t
(mapcar (lambda (f)
  (or (org-load-noerror-mustsuffix (concat org-dir f))
  (and (string= org-dir contrib-dir)
   (org-load-noerror-mustsuffix (concat 
contrib-dir f)))
  (and (org-load-noerror-mustsuffix (concat 
(org-find-library-dir f) f))
   (push f load-uncore)
-  't)
+  t)
  f))
lfeat)))
 (when load-uncore



[elpa] externals/eglot 000b7fdce9: Close #952: Add out-of-box support for Perl LSP server

2022-07-26 Thread ELPA Syncer
branch: externals/eglot
commit 000b7fdce93ed29c505a7fa75baaf87094fd690a
Author: Christian Garbs 
Commit: GitHub 

Close #952: Add out-of-box support for Perl LSP server

* eglot.el (eglot-server-programs): Support Perl lsp.
* README.md: Update.
* NEWS.md: Update.

Co-authored-by: João Távora 
---
 NEWS.md   | 8 +---
 README.md | 2 ++
 eglot.el  | 3 ++-
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 47450927ba..40b9edb172 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -52,8 +52,9 @@ available.  The special support code for RLS has been removed.
 # New servers have been added to `eglot-server-programs`
 - clojure-lsp ([#813][github#813])
 - racket-langserver ([#694][github#694])
-- futhark lsp ([#922](github#922))
-- purescript-language-server ([#905](github#905))
+- futhark lsp ([#922][github#922])
+- purescript-language-server ([#905][github#905])
+- Perl::LanguageServer ([#952][github#952])
 
 # 1.8 (12/1/2022)
 
@@ -386,4 +387,5 @@ and now said bunch of references-->
 [github#901]: https://github.com/joaotavora/eglot/issues/901
 [github#905]: https://github.com/joaotavora/eglot/issues/905
 [github#922]: https://github.com/joaotavora/eglot/issues/922
-[github#967]: https://github.com/joaotavora/eglot/issues/967
+[github#952]: https://github.com/joaotavora/eglot/issues/952
+[github#967]: https://github.com/joaotavora/eglot/issues/967
\ No newline at end of file
diff --git a/README.md b/README.md
index 3627640321..9d340f19bc 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,7 @@ find-library` can help you tell if that happened.
 * Mint's [mint-ls][mint-ls]
 * Nix's [rnix-lsp][rnix-lsp]
 * Ocaml's [ocaml-lsp][ocaml-lsp]
+* Perl's [Perl::LanguageServer][perl-language-server]
 * PHP's [php-language-server][php-language-server]
 * PureScript's [purescript-language-server][purescript-language-server]
 * Python's [pylsp][pylsp], [pyls][pyls] or [pyright][pyright]
@@ -584,6 +585,7 @@ for the request form, and we'll send it to you.
 [mint-ls]: https://www.mint-lang.com/
 [rnix-lsp]: https://github.com/nix-community/rnix-lsp
 [ocaml-lsp]: https://github.com/ocaml/ocaml-lsp/
+[perl-language-server]: https://github.com/richterger/Perl-LanguageServer
 [php-language-server]: https://github.com/felixfbecker/php-language-server
 [purescript-language-server]: 
https://github.com/nwolverson/purescript-language-server
 [pyls]: https://github.com/palantir/python-language-server
diff --git a/eglot.el b/eglot.el
index 2e332c470f..14e7980d38 100644
--- a/eglot.el
+++ b/eglot.el
@@ -196,7 +196,8 @@ language-server/bin/php-language-server.php"))
 (dockerfile-mode . ("docker-langserver" 
"--stdio"))
 (clojure-mode . ("clojure-lsp"))
 (csharp-mode . ("omnisharp" "-lsp"))
-(purescript-mode . 
("purescript-language-server" "--stdio")))
+(purescript-mode . 
("purescript-language-server" "--stdio"))
+(perl-mode . ("perl" "-MPerl::LanguageServer" 
"-e" "Perl::LanguageServer::run")))
   "How the command `eglot' guesses the server to start.
 An association list of (MAJOR-MODE . CONTACT) pairs.  MAJOR-MODE
 identifies the buffers that are to be managed by a specific



[nongnu] elpa/helm 5da20ad1f7 1/2: Ensure init hooks are defined as symbol functions

2022-07-26 Thread ELPA Syncer
branch: elpa/helm
commit 5da20ad1f78a4e7f5d89abb245ce55122f40772d
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Ensure init hooks are defined as symbol functions
---
 helm-core.el | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index 67be4243a8..816da6a01d 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -3697,16 +3697,13 @@ For RESUME INPUT DEFAULT and SOURCES see `helm'."
 (defun helm--run-init-hooks (hook sources)
   "Run after and before init hooks local to source.
 See :after-init-hook and :before-init-hook in `helm-source'."
-  (cl-loop with sname = (cl-ecase hook
-  (before-init-hook "h-before-init-hook")
-  (after-init-hook "h-after-init-hook"))
-   with h = (cl-gensym sname)
-   for s in sources
+  (cl-loop for s in sources
for hv = (assoc-default hook s)
-   if (and hv (not (symbolp hv)))
-   do (set h hv)
-   and do (helm-log-run-hook h)
-   else do (helm-log-run-hook hv)))
+   if (symbolp hv)
+   do (helm-log-run-hook hv)
+   else return
+   (error "`%s' hook in source `%s' not specified as symbol function"
+  hook (helm-attr 'name s
 
 (defun helm-restore-position-on-quit ()
   "Restore position in `helm-current-buffer' when quitting."



[nongnu] elpa/helm 7c2f080639 2/2: Disable `minibuffer-complete' only for handlers using helm (bug #2533)

2022-07-26 Thread ELPA Syncer
branch: elpa/helm
commit 7c2f08063910ef15a63cd58e6db0ffa2e4ddc12d
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Disable `minibuffer-complete' only for handlers using helm (bug #2533)
---
 helm-mode.el | 115 ---
 1 file changed, 62 insertions(+), 53 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index 701aee8de4..9d2e674d63 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1184,6 +1184,18 @@ Affects `switch-to-buffer' `kill-buffer' and related."
   (t it))
   val)))
 
+(defun helm-mode--apply-helm-handler (handler arg-list)
+  "Ensure `minibuffer-complete' is disabled when running HANDLER.
+ARG-LIST is a list of arguments to pass to HANDLER."
+  ;; Some functions are calling `minibuffer-complete'
+  ;; within `minibuffer-setup-hook' when calling their
+  ;; `completing-read', like `woman-file-name' (bug #2527).
+  ;; This defeat Helm which is already
+  ;; completing minibuffer, so deactivate
+  ;; minibuffer-complete one time for all [1].
+  (cl-letf (((symbol-function 'minibuffer-complete) #'ignore))
+(apply handler arg-list)))
+  
 (cl-defun helm--completing-read-default
 (prompt collection &optional
  predicate require-match
@@ -1238,59 +1250,56 @@ See documentation of `completing-read' and 
`all-completions' for details."
   ;; helm-completing-read-handlers-alist use default
   ;; handler.
   #'helm-completing-read-default-handler))
-;; Some functions are calling `minibuffer-complete' within
-;; `minibuffer-setup-hook' when calling their `completing-read',
-;; like `woman-file-name' (bug #2527). This defeat Helm which is
-;; already completing minibuffer, so deactivate
-;; minibuffer-complete one time for all.
-(cl-letf (((symbol-function 'minibuffer-complete) #'ignore))
-  (when (eq def-com 'ido) (setq def-com 'ido-completing-read))
-  (unless (or (not entry) def-com)
-;; An entry in *read-handlers-alist exists but have
-;; a nil value, so we exit from here, disable `helm-mode'
-;; and run the command again with it original behavior.
-;; `helm-mode' will be restored on exit.
-(cl-return-from helm--completing-read-default
-  (unwind-protect
-   (progn
- (helm-mode -1)
- (apply completing-read-function def-args))
-(helm-mode 1
-  ;; If we use now `completing-read' we MUST turn off `helm-mode'
-  ;; to avoid infinite recursion and CRASH. It will be reenabled on exit.
-  (when (or (eq def-com 'completing-read)
-;; All specialized functions are prefixed by "helm"
-(and (stringp str-defcom)
- (not (string-match "^helm" str-defcom
-(helm-mode -1))
-  (unwind-protect
-   (cond (;; An helm specialized function exists, run it.
-  (and def-com helm-mode)
-  (apply def-com others-args))
- (;; Try to handle `ido-completing-read' everywhere.
-  (and def-com (eq def-com 'ido-completing-read))
-  (setcar (memq collection def-args)
-  (all-completions "" collection predicate))
-  (apply def-com def-args))
- (;; User set explicitely `completing-read' or something 
similar
-  ;; in *read-handlers-alist, use this with exactly the same
-  ;; args as in `completing-read'.
-  ;; If we are here `helm-mode' is now disabled.
-  def-com
-  (apply def-com def-args))
- (;; Use by default a in-buffer handler unless
-  ;; COLLECTION is a function.
-  t
-  (funcall default-handler
-   prompt collection predicate require-match
-   initial-input hist def inherit-input-method
-   str-command buf-name)))
-(helm-mode 1)
-;; When exiting minibuffer, `this-command' is set to
-;; `helm-exit-minibuffer', which is unwanted when starting
-;; on another `completing-read', so restore `this-command' to
-;; initial value when exiting.
-(setq this-command current-command)
+(when (eq def-com 'ido) (setq def-com 'ido-completing-read))
+(unless (or (not entry) def-com)
+  ;; An entry in *read-handlers-alist exists but have
+  ;; a nil value, so we exit from here, disable `helm-mode'
+  ;; and run the command again with it original behavior.
+  ;; `helm-mode' will be restored on exit.
+  (cl-return-from helm--completing-read-default
+(unwind-protect
+ (progn
+   (helm-mode -1)
+   (apply completing-read-function def-args))
+  (helm-mode 1
+;; If we use now `completing-read' we MUST turn off `helm-mode'
+ 

[nongnu] elpa/helm-core updated (18e2b3821a -> 7c2f080639)

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

  from  18e2b3821a Move helm-configuration in right section
  adds  5da20ad1f7 Ensure init hooks are defined as symbol functions
  adds  7c2f080639 Disable `minibuffer-complete' only for handlers using 
helm (bug #2533)

No new revisions were added by this update.

Summary of changes:
 helm-core.el |  15 
 helm-mode.el | 115 ---
 2 files changed, 68 insertions(+), 62 deletions(-)



[nongnu] elpa/helm updated (18e2b3821a -> 7c2f080639)

2022-07-26 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  18e2b3821a Move helm-configuration in right section
   new  5da20ad1f7 Ensure init hooks are defined as symbol functions
   new  7c2f080639 Disable `minibuffer-complete' only for handlers using 
helm (bug #2533)


Summary of changes:
 helm-core.el |  15 
 helm-mode.el | 115 ---
 2 files changed, 68 insertions(+), 62 deletions(-)



[nongnu] elpa/popon e7ef75f816 2/2: Bump version to 0.8

2022-07-26 Thread ELPA Syncer
branch: elpa/popon
commit e7ef75f81687bb01d413ba073aa35683a810e0f3
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Bump version to 0.8
---
 popon.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/popon.el b/popon.el
index c883082f0b..5e74c6c10f 100644
--- a/popon.el
+++ b/popon.el
@@ -4,7 +4,7 @@
 
 ;; Author: Akib Azmain Turja 
 ;; Created: 2022-04-11
-;; Version: 0.7
+;; Version: 0.8
 ;; Package-Requires: ((emacs "25.1"))
 ;; Keywords: lisp extensions frames
 ;; Homepage: https://codeberg.org/akib/emacs-popon



[nongnu] elpa/popon c7784e18a5 1/2: Fix wrong x value returned by popon-x-y-at-pos

2022-07-26 Thread ELPA Syncer
branch: elpa/popon
commit c7784e18a5154d5a7cf29e62e7b01726a9cfa5c8
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Fix wrong x value returned by popon-x-y-at-pos
---
 popon.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/popon.el b/popon.el
index 9181d1baf5..c883082f0b 100644
--- a/popon.el
+++ b/popon.el
@@ -546,7 +546,8 @@ NOTE: This uses `posn-at-point', which is slow.  So try to 
minimize calls
 to this function."
   (let ((window-start-x-y (posn-col-row (posn-at-point (window-start
 (point-x-y (posn-col-row (posn-at-point point
-(cons (- (car point-x-y) (car window-start-x-y))
+(cons (- (save-excursion (goto-char point) (current-column))
+ (window-hscroll))
   (- (cdr point-x-y) (cdr window-start-x-y)
 
 ;;;###autoload



[nongnu] elpa/popon updated (92ba521f83 -> e7ef75f816)

2022-07-26 Thread ELPA Syncer
elpasync pushed a change to branch elpa/popon.

  from  92ba521f83 Fix #6: Don't use cXXXr functions
   new  c7784e18a5 Fix wrong x value returned by popon-x-y-at-pos
   new  e7ef75f816 Bump version to 0.8


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



[elpa] externals/javaimp 48fe748fc2: Fix javaimp-end-of-defun to stay inside parent

2022-07-26 Thread Filipp Gunbin
branch: externals/javaimp
commit 48fe748fc287ce01bbb522e43cf3d520e3eccd52
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Fix javaimp-end-of-defun to stay inside parent
---
 javaimp.el | 32 
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/javaimp.el b/javaimp.el
index a1daeeafed..fb02dcfdfe 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -1083,10 +1083,10 @@ buffer."
   (cond ((and (>= target-idx 0)
   (< target-idx (length siblings)))
  ;; Move to target sibling
- (let ((scope (nth target-idx siblings)))
-   (goto-char (or (javaimp--beg-of-defun-decl
-   (javaimp-scope-open-brace scope) parent-start)
-  (javaimp-scope-open-brace scope)
+ (let* ((scope (nth target-idx siblings))
+(pos (javaimp-scope-open-brace scope)))
+   (goto-char (or (javaimp--beg-of-defun-decl pos parent-start)
+  pos
 (siblings
  ;; Move to start of first/last sibling
  (let* ((scope (car (if (< target-idx 0)
@@ -1096,15 +1096,16 @@ buffer."
(goto-char (or (javaimp--beg-of-defun-decl pos) pos
 (parent-start
  (goto-char parent-start)
- ;; Move forward one line unless closing brace is on the
- ;; same line
  (let ((parent-end (ignore-errors
  (scan-lists parent-start 1 0
-   (unless (and parent-end
-(= (line-number-at-pos parent-start)
-   (line-number-at-pos parent-end)))
+   (if (and parent-end
+(= (line-number-at-pos parent-start)
+   (line-number-at-pos parent-end)))
+   ;; open / close braces are on the same line
+   (forward-char)
  (forward-line
 (t
+ ;; There're no siblings and no parent
  (goto-char (if (< target-idx 0)
 (point-min) (point-max
 
@@ -1119,11 +1120,18 @@ than BOUND.  POS should not be in arglist or similar 
list."
 
 (defun javaimp-end-of-defun ()
   "Function to be used as `end-of-defun-function'."
-  ;; Called after beginning-of-defun-raw, so we can safely inspect
-  ;; properties
+  ;; This function is called after javaimp-beginning-of-defun, which
+  ;; in the normal course will position the point before the
+  ;; open-brace, so we can inspect property.
   (when-let* ((brace-pos
(next-single-property-change (point) 'javaimp-parse-scope))
-  ((get-text-property brace-pos 'javaimp-parse-scope)))
+  ((get-text-property brace-pos 'javaimp-parse-scope))
+  ;; When there're no siblings, javaimp-beginning-of-defun
+  ;; moves to the parent start.  In this case we should
+  ;; stay inside the parent.
+  ((eql (nth 1 (syntax-ppss))
+(save-excursion
+  (nth 1 (syntax-ppss brace-pos))
 (ignore-errors
   (goto-char
(scan-lists brace-pos 1 0)



[elpa] externals/javaimp 65599a7954: Version 0.9

2022-07-26 Thread Filipp Gunbin
branch: externals/javaimp
commit 65599a7954821c38e38949b5ec42891b41e75e13
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Version 0.9
---
 javaimp.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/javaimp.el b/javaimp.el
index fb02dcfdfe..500bf6f108 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -4,7 +4,7 @@
 
 ;; Author: Filipp Gunbin 
 ;; Maintainer: Filipp Gunbin 
-;; Version: 0.8
+;; Version: 0.9
 ;; Keywords: java, maven, gradle, programming
 
 ;; This program is free software; you can redistribute it and/or modify



[elpa] externals/hyperbole 991e1670a1: Doc strings within 80 char limit for kotl-orgtbl.el (#231)

2022-07-26 Thread ELPA Syncer
branch: externals/hyperbole
commit 991e1670a17375c99d70471b05d8dee92f182054
Author: Mats Lidell 
Commit: GitHub 

Doc strings within 80 char limit for kotl-orgtbl.el (#231)
---
 ChangeLog   | 4 
 kotl/kotl-orgtbl.el | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1a5ea25aa0..6f425bc51b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-07-26  Mats Lidell  
+
+* kotl/kotl-orgtbl.el: Shorten docs strings to be within 80 char limit.
+
 2022-07-25  Mats Lidell  
 
 * kotl/kimport.el:
diff --git a/kotl/kotl-orgtbl.el b/kotl/kotl-orgtbl.el
index ea6379b50b..aee4d70fed 100644
--- a/kotl/kotl-orgtbl.el
+++ b/kotl/kotl-orgtbl.el
@@ -57,7 +57,7 @@
 
 ;; Redefine this Org Table function to handle Koutlines as well.
 (defun orgtbl-tab (arg)
-  "Justification and field motion for `orgtbl-mode' with Hyperbole Koutline 
support."
+  "Justification and field motion for `orgtbl-mode' with Koutline support."
   (interactive "P")
   (cond ((and (derived-mode-p #'kotl-mode) arg)
 (kotl-mode:tab-command (if (= (prefix-numeric-value arg) 1) nil arg)))
@@ -83,7 +83,7 @@ If no previous line, exchange current with next line."
   )
 
 (defun orgtbl-meta-return (arg)
-  "Let Action Key handle tables in kotl-mode, otherwise, use standard Org 
table command."
+  "Let Action Key handle tables in kotl-mode, otherwise, use Org table 
command."
   (interactive "P")
   (if (derived-mode-p #'kotl-mode)
   (hkey-either arg)



[nongnu] elpa/go-mode updated (fa26932786 -> 08aa90d52f)

2022-07-26 Thread ELPA Syncer
elpasync pushed a change to branch elpa/go-mode.

  from  fa26932786 README: 'go install' instead of 'go get' for tools
   new  4b02fb811c Add go-dot-work-mode for editing go.work files
   new  7dc64c7d9f Fix false positive type alias fontification.
   new  08aa90d52f Remove go--fill-prefix


Summary of changes:
 go-mode.el| 54 ---
 test/go-font-lock-test.el |  4 +++-
 2 files changed, 31 insertions(+), 27 deletions(-)



[nongnu] elpa/go-mode 7dc64c7d9f 2/3: Fix false positive type alias fontification.

2022-07-26 Thread ELPA Syncer
branch: elpa/go-mode
commit 7dc64c7d9f7f3620632bbcf2fe24c1085fa7eabb
Author: Muir Manders 
Commit: Dominik Honnef 

Fix false positive type alias fontification.

We were interpreting "typeFoo = 123" as a type alias due to a bug in
the regex.

Closes: gh-404 [via git-merge-pr]
---
 go-mode.el| 2 +-
 test/go-font-lock-test.el | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index b40203039f..85acc2cb73 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1614,7 +1614,7 @@ func foo(i int) string"
 found-match))
 
 (defconst go--type-alias-re
-  (concat "^[[:space:]]*\\(type\\)?[[:space:]]*" go-identifier-regexp 
"[[:space:]]*=[[:space:]]*" go-type-name-regexp))
+  (concat "^[[:space:]]*\\(type[[:space:]]+\\)?" go-identifier-regexp 
"[[:space:]]*=[[:space:]]*" go-type-name-regexp))
 
 (defun go--match-type-alias (end)
   "Search for type aliases.
diff --git a/test/go-font-lock-test.el b/test/go-font-lock-test.el
index c943fe4911..3bca76d737 100644
--- a/test/go-font-lock-test.el
+++ b/test/go-font-lock-test.el
@@ -158,7 +158,9 @@ KtypeK (
   TfooT TbarT
   TfooT KstructK {}
   TfooT = *Tbar.ZarT
-)"))
+)")
+
+  (go--should-fontify "typeName = abc"))
 
 (ert-deftest go--fontify-var-decl ()
   (go--should-fontify "KvarK VfooV = bar")



[nongnu] elpa/go-mode 08aa90d52f 3/3: Remove go--fill-prefix

2022-07-26 Thread ELPA Syncer
branch: elpa/go-mode
commit 08aa90d52f0e7d2ad02f961b554e13329672d7cb
Author: Javier Olaechea 
Commit: Dominik Honnef 

Remove go--fill-prefix

The function is not called from anywhere and does not work as it calls
function that were previously deleted. Both go--empty-line-p and
go--boring-comment-p were removed in
b212a73c21a8b806f9764004397c1d03eb0b2e10.

Closes: gh-403 [via git-merge-pr]
---
 go-mode.el | 25 -
 1 file changed, 25 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 85acc2cb73..f31e4bffdd 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -733,31 +733,6 @@ case keyword. It returns nil for the case line itself."
   "Return non-nil if point is inside a type switch statement."
   (go--in-paren-with-prefix-p ?{ ".(type)"))
 
-(defun go--fill-prefix ()
-  "Return fill prefix for following comment paragraph."
-  (save-excursion
-(beginning-of-line)
-
-;; Skip over empty lines and empty comment openers/closers.
-(while (and
-(or (go--empty-line-p) (go--boring-comment-p))
-(zerop (forward-line 1
-
-;; If we are in a block comment, set prefix based on first line
-;; with content.
-(if (go-in-comment-p)
-(progn
-  (looking-at "[[:space:]]*")
-  (match-string-no-properties 0))
-
-  ;; Else if we are looking at the start of an interesting comment, our
-  ;; prefix is the comment opener and any space following.
-  (if (looking-at (concat go--comment-start-regexp "[[:space:]]*"))
-  ;; Replace "/*" opener with spaces so following lines don't
-  ;; get "/*" prefix.
-  (replace-regexp-in-string "/\\*" "  "
-(match-string-no-properties 0))
-
 (defun go--open-paren-position ()
   "Return non-nil if point is between '(' and ')'.
 



[nongnu] elpa/go-mode 4b02fb811c 1/3: Add go-dot-work-mode for editing go.work files

2022-07-26 Thread ELPA Syncer
branch: elpa/go-mode
commit 4b02fb811c359cf946ea35324e2b29214f8d5810
Author: Jimmy Yuen Ho Wong 
Commit: Dominik Honnef 

Add go-dot-work-mode for editing go.work files

Closes: gh-408 [via git-merge-pr]
---
 go-mode.el | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/go-mode.el b/go-mode.el
index cdebdc3cae..b40203039f 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -2908,6 +2908,33 @@ If BUFFER, return the number of characters in that 
buffer instead."
 ;;;###autoload
 (add-to-list 'auto-mode-alist '("go\\.mod\\'" . go-dot-mod-mode))
 
+(defconst go-dot-work-mode-keywords
+  '("go" "replace" "use")
+  "All keywords for go.work files.  Used for font locking.")
+
+;;;###autoload
+(define-derived-mode go-dot-work-mode fundamental-mode "Go Work"
+  "A major mode for editor go.work files."
+  :syntax-table go-dot-mod-mode-syntax-table
+  (set (make-local-variable 'comment-start) "// ")
+  (set (make-local-variable 'comment-end)   "")
+  (set (make-local-variable 'comment-use-syntax) t)
+  (set (make-local-variable 'comment-start-skip) "\\(//+\\)\\s *")
+
+  (set (make-local-variable 'font-lock-defaults)
+   '(go-dot-work-mode-keywords))
+  (set (make-local-variable 'indent-line-function) 'go-mode-indent-line)
+
+  ;; Go style
+  (setq indent-tabs-mode t)
+
+  ;; we borrow the go-mode-indent function so we need this buffer cache
+  (set (make-local-variable 'go-dangling-cache) (make-hash-table :test 'eql))
+  (add-hook 'before-change-functions #'go--reset-dangling-cache-before-change 
t t))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("go\\.work\\'" . go-dot-work-mode))
+
 ;; The following functions were copied (and modified) from rust-mode.el.
 ;;
 ;; Copyright (c) 2015 The Rust Project Developers



[nongnu] elpa/helm f5159e17b8: Revert "Ensure init hooks are defined as symbol functions" (Fix #2534)

2022-07-26 Thread ELPA Syncer
branch: elpa/helm
commit f5159e17b8f40f262310504767651e1b953ea779
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Revert "Ensure init hooks are defined as symbol functions" (Fix #2534)

This reverts commit 5da20ad1f78a4e7f5d89abb245ce55122f40772d.
---
 helm-core.el | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index 816da6a01d..67be4243a8 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -3697,13 +3697,16 @@ For RESUME INPUT DEFAULT and SOURCES see `helm'."
 (defun helm--run-init-hooks (hook sources)
   "Run after and before init hooks local to source.
 See :after-init-hook and :before-init-hook in `helm-source'."
-  (cl-loop for s in sources
+  (cl-loop with sname = (cl-ecase hook
+  (before-init-hook "h-before-init-hook")
+  (after-init-hook "h-after-init-hook"))
+   with h = (cl-gensym sname)
+   for s in sources
for hv = (assoc-default hook s)
-   if (symbolp hv)
-   do (helm-log-run-hook hv)
-   else return
-   (error "`%s' hook in source `%s' not specified as symbol function"
-  hook (helm-attr 'name s
+   if (and hv (not (symbolp hv)))
+   do (set h hv)
+   and do (helm-log-run-hook h)
+   else do (helm-log-run-hook hv)))
 
 (defun helm-restore-position-on-quit ()
   "Restore position in `helm-current-buffer' when quitting."



[nongnu] elpa/helm-core updated (7c2f080639 -> f5159e17b8)

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

  from  7c2f080639 Disable `minibuffer-complete' only for handlers using 
helm (bug #2533)
  adds  f5159e17b8 Revert "Ensure init hooks are defined as symbol 
functions" (Fix #2534)

No new revisions were added by this update.

Summary of changes:
 helm-core.el | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)