[elpa] externals/auctex d02011deed 3/3: Simplify GNUmakefile and tex-site.el.in

2024-08-16 Thread ELPA Syncer
branch: externals/auctex
commit d02011deede6c8a4aa43e9cb008477cf8d04d6c8
Author: Ikumi Keita 
Commit: Ikumi Keita 

Simplify GNUmakefile and tex-site.el.in

* GNUmakefile:
* tex-site.el.in
Do constant replacement in advance.
---
 GNUmakefile| 5 +
 tex-site.el.in | 8 +---
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index d73c77b1e8..016081885b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -124,10 +124,7 @@ LASTVERSION:=$(shell grep "^;; Version:" auctex.el \
 AUCTEXVERSION:=$(if $(THISVERSION),$(THISVERSION),$(LASTVERSION).$(AUCTEXDATE))
 
 tex-site.el: tex-site.el.in
-   sed -e 's|@lisppackagelispdir@|(directory-file-name 
(file-name-directory load-file-name))|'\
-   -e 's|@lisppackagedatadir@|(directory-file-name 
(file-name-directory load-file-name))|'\
-   -e 's|@lispautodir@|(if (file-writable-p "/usr/local/var/auctex") 
"/usr/local/var/auctex" "~/.emacs.d/auctex")|'\
-   -e 's|@AUCTEXVERSION@|$(AUCTEXVERSION)|'\
+   sed -e 's|@AUCTEXVERSION@|$(AUCTEXVERSION)|'\
-e 's|@AUCTEXDATE@|$(AUCTEXDATE)|'\
$< >$@
 
diff --git a/tex-site.el.in b/tex-site.el.in
index 1d2da038aa..886d291823 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -63,7 +63,7 @@
   :load "tex" :load "latex" :load "tex-style")
 
 (defvar TeX-lisp-directory
-  @lisppackagelispdir@
+  (directory-file-name (file-name-directory load-file-name))
   "The directory where most of the AUCTeX lisp files are located.
 For the location of lisp files associated with
 styles, see the variables TeX-style-* (hand-generated lisp) and
@@ -72,11 +72,13 @@ TeX-auto-* (automatically generated lisp).")
 (add-to-list 'load-path TeX-lisp-directory)
 
 (defvar TeX-data-directory
-  @lisppackagedatadir@
+  (directory-file-name (file-name-directory load-file-name))
   "The directory where the AUCTeX non-Lisp data is located.")
 
 (defcustom TeX-auto-global
-  @lispautodir@
+  (if (file-writable-p "/usr/local/var/auctex/")
+  "/usr/local/var/auctex/"
+(concat user-emacs-directory "auctex/"))
   "Directory containing automatically generated information.
 
 For storing automatic extracted information about the TeX macros



[elpa] externals/auctex updated (52911e6211 -> d02011deed)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/auctex.

  from  52911e6211 Arrange the documentations about update history
   new  b06e18b4ad ; * NEWS.org (Added): Add missing comma.
   new  3cb63537d4 ; * doc/install.texi (Installation): Add instruction.
   new  d02011deed Simplify GNUmakefile and tex-site.el.in


Summary of changes:
 GNUmakefile  | 5 +
 NEWS.org | 2 +-
 doc/install.texi | 8 +++-
 tex-site.el.in   | 8 +---
 4 files changed, 14 insertions(+), 9 deletions(-)



[elpa] externals/auctex 3cb63537d4 2/3: ; * doc/install.texi (Installation): Add instruction.

2024-08-16 Thread ELPA Syncer
branch: externals/auctex
commit 3cb63537d4fcbcef92d239c0717609b358bbc261
Author: Ikumi Keita 
Commit: Ikumi Keita 

; * doc/install.texi (Installation): Add instruction.
---
 doc/install.texi | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/install.texi b/doc/install.texi
index 92a5dd36b7..709b803a7a 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -11,7 +11,13 @@ Archive.  To install @AUCTeX{}, simply do @kbd{M-x 
list-packages
 hit @kbd{x} to execute the installation procedure.  That's all.
 
 Caution.  If you have installed former @AUCTeX{} as regular tarball
-release, uninstall it to avoid possible troubles.
+release, uninstall it and delete the initialization codes
+@lisp
+(load "auctex.el" nil t t)
+(load "preview-latex.el" nil t t)
+@end lisp
+@noindent
+in your init file.  Otherwise you'll get into troubles.
 
 @code{use-package} users can use this simple recipe in their
 @code{user-init-file} which essentially does the same as the manual



[elpa] externals/auctex b06e18b4ad 1/3: ; * NEWS.org (Added): Add missing comma.

2024-08-16 Thread ELPA Syncer
branch: externals/auctex
commit b06e18b4ad3dc3e59443c4e7fa8320cd6103cfa7
Author: Arash Esbati 
Commit: Arash Esbati 

; * NEWS.org (Added): Add missing comma.
---
 NEWS.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index fff9105c41..3226810f45 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -10,7 +10,7 @@
 
 ** Added
 
-- Add new support files =style/authblk.el=, =style/langscibook.cls=
+- Add new support files =style/authblk.el=, =style/langscibook.cls=,
   =style/ninecolors.el=, =style/supertabular.el=, =style/tabularray.el=
   and =style/xtab.el=.
 



[nongnu] elpa/mastodon 3443b49c55 4/4: bump version

2024-08-16 Thread ELPA Syncer
branch: elpa/mastodon
commit 3443b49c55f65ae8e0b07e93e1e0299ce1bf8ed6
Author: marty hiatt 
Commit: marty hiatt 

bump version
---
 lisp/mastodon.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 82a2491424..017b5da0a0 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -6,7 +6,7 @@
 ;; Author: Johnson Denen 
 ;; Marty Hiatt 
 ;; Maintainer: Marty Hiatt 
-;; Version: 1.0.24
+;; Version: 1.0.26
 ;; Package-Requires: ((emacs "27.1") (request "0.3.0") (persist "0.4"))
 ;; Homepage: https://codeberg.org/martianh/mastodon.el
 



[nongnu] elpa/mastodon a4cc633346 3/4: remove duplicated tl funs (from develop audit)

2024-08-16 Thread ELPA Syncer
branch: elpa/mastodon
commit a4cc633346eb3dd538b0169b00ea1cbc16ece139
Author: marty hiatt 
Commit: marty hiatt 

remove duplicated tl funs (from develop audit)
---
 lisp/mastodon-tl.el | 40 
 1 file changed, 40 deletions(-)

diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 0e5cd5bbed..49f5beb342 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1806,46 +1806,6 @@ To disable showing the stats, customize
  status)))
   status)))
 
-(defun mastodon-tl--is-reply (toot)
-  "Check if the TOOT is a reply to another one (and not boosted)."
-  (and (null (mastodon-tl--field 'in_reply_to_id toot))
-   (not (mastodon-tl--field 'rebloged toot
-
-(defun mastodon-tl--toot (toot &optional detailed-p thread domain
-   unfolded no-byline)
-  "Format TOOT and insert it into the buffer.
-DETAILED-P means display more detailed info. For now
-this just means displaying toot client.
-THREAD means the status will be displayed in a thread view.
-When DOMAIN, force inclusion of user's domain in their handle.
-UNFOLDED is a boolean meaning whether to unfold or fold item if foldable.
-NO-BYLINE means just insert toot body, used for folding."
-  (mastodon-tl--insert-status
-   toot
-   (mastodon-tl--clean-tabs-and-nl (if (mastodon-tl--has-spoiler toot)
-   (mastodon-tl--spoiler toot)
- (mastodon-tl--content toot)))
-   'mastodon-tl--byline-author 'mastodon-tl--byline-boosted
-   nil nil detailed-p thread domain unfolded no-byline))
-
-(defun mastodon-tl--timeline (toots &optional thread domain)
-  "Display each toot in TOOTS.
-This function removes replies if user required.
-THREAD means the status will be displayed in a thread view.
-When DOMAIN, force inclusion of user's domain in their handle."
-  (mapc (lambda (toot)
-  (mastodon-tl--toot toot nil thread domain))
-;; hack to *not* filter replies on profiles:
-(if (eq (mastodon-tl--get-buffer-type) 'profile-statuses)
-toots
-  (if (or ; we were called via --more*:
-   (mastodon-tl--buffer-property 'hide-replies nil :no-error)
-   ;; loading a tl with a prefix arg:
-   (mastodon-tl--hide-replies-p current-prefix-arg))
- (cl-remove-if-not #'mastodon-tl--is-reply toots)
-   toots)))
-  (goto-char (point-min)))
-
 
 ;;; BUFFER SPEC
 



[nongnu] elpa/mastodon updated (45903de823 -> 3443b49c55)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch elpa/mastodon.

  from  45903de823 info update
   new  4c7fc8b475 basic apply filters. #575.
   new  9778bf0226 apply filters to notifications. #575.
   new  a4cc633346 remove duplicated tl funs (from develop audit)
   new  3443b49c55 bump version


Summary of changes:
 lisp/mastodon-notifications.el | 150 ++--
 lisp/mastodon-tl.el| 169 +++--
 lisp/mastodon-views.el |   9 ++-
 lisp/mastodon.el   |   2 +-
 4 files changed, 197 insertions(+), 133 deletions(-)



[nongnu] elpa/mastodon 9778bf0226 2/4: apply filters to notifications. #575.

2024-08-16 Thread ELPA Syncer
branch: elpa/mastodon
commit 9778bf022660ddb5a445e8538cd49b8e94fa7003
Author: marty hiatt 
Commit: marty hiatt 

apply filters to notifications. #575.
---
 lisp/mastodon-notifications.el | 149 +
 1 file changed, 77 insertions(+), 72 deletions(-)

diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 22c702bd4b..9f9217224f 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -214,80 +214,85 @@ Status notifications are given when
   (string-limit str 
mastodon-notifications--profile-note-in-foll-reqs-max-length)
 str
  (status (mastodon-tl--field 'status note))
- (follower (alist-get 'username (alist-get 'account note
-(mastodon-notifications--insert-status
- ;; toot
- (cond ((or (equal type 'follow)
-(equal type 'follow-request))
-;; Using reblog with an empty id will mark this as something
-;; non-boostable/non-favable.
-(cons '(reblog (id . nil)) note))
-   ;; reblogs/faves use 'note' to process their own json
-   ;; not the toot's. this ensures following etc. work on such notifs
-   ((or (equal type 'favourite)
-(equal type 'boost))
-note)
-   (t
-status))
- ;; body
- (let ((body (mastodon-tl--clean-tabs-and-nl
-  (if (mastodon-tl--has-spoiler status)
-  (mastodon-tl--spoiler status)
-(if (equal 'follow-request type)
-(mastodon-tl--render-text profile-note)
-  (mastodon-tl--content status))
-   (cond ((or (eq type 'follow)
-  (eq type 'follow-request))
-  (propertize
-   (if (equal type 'follow)
+ (follower (alist-get 'username (alist-get 'account note)))
+ (toot (alist-get 'status note))
+ (filtered (mastodon-tl--field 'filtered toot))
+ (filters (when filtered
+(mastodon-tl--current-filters filtered
+(if (and filtered (assoc "hide" filters))
+nil
+  (mastodon-tl--insert-status
+   ;; toot
+   (cond ((or (equal type 'follow)
+  (equal type 'follow-request))
+  ;; Using reblog with an empty id will mark this as something
+  ;; non-boostable/non-favable.
+  (cons '(reblog (id . nil)) note))
+ ;; reblogs/faves use 'note' to process their own json
+ ;; not the toot's. this ensures following etc. work on such notifs
+ ((or (equal type 'favourite)
+  (equal type 'boost))
+  note)
+ (t
+  status))
+   ;; body
+   (let ((body (if-let ((match (assoc "warn" filters)))
+   (mastodon-tl--spoiler toot (cadr match))
+ (mastodon-tl--clean-tabs-and-nl
+  (if (mastodon-tl--has-spoiler status)
+  (mastodon-tl--spoiler status)
+(if (equal 'follow-request type)
+(mastodon-tl--render-text profile-note)
+  (mastodon-tl--content status)))
+ (cond ((or (eq type 'follow)
+(eq type 'follow-request))
+(if (equal type 'follow)
+(propertize "Congratulations, you have a new follower!"
+'face 'default)
+  (concat
(propertize
-"Congratulations, you have a new follower!"
+(format "You have a follow request from... %s"
+follower)
 'face 'default)
- (concat
-  (propertize
-   (format "You have a follow request from... %s"
-   follower)
-   'face 'default)
-  (when mastodon-notifications--profile-note-in-foll-reqs
-(concat
- ":\n"
- (mastodon-notifications--comment-note-text body)))
- ((or (eq type 'favourite)
-  (eq type 'boost))
-  (mastodon-notifications--comment-note-text
-   body))
- (t body)))
- ;; author-byline
- (if (or (equal type 'follow)
- (equal type 'follow-request)
- (equal type 'mention))
- 'mastodon-tl--byline-author
-   (lambda (_status &rest _args) ; unbreak stuff
- (mastodon-tl--byline-author note)))
- ;; action-byline
- (lambda (_status)
-   (mastodon-notifications--byline-concat
-(cond ((equal type 'boost)
-   "Boosted")
-  ((equal type 'favourite)
-   "Favourited")
-  ((equal type 'follow-request)
-   "Requested to f

[nongnu] elpa/mastodon 4c7fc8b475 1/4: basic apply filters. #575.

2024-08-16 Thread ELPA Syncer
branch: elpa/mastodon
commit 4c7fc8b47517249a271d64e104f68cf59048e872
Author: marty hiatt 
Commit: marty hiatt 

basic apply filters. #575.
---
 lisp/mastodon-notifications.el |   1 +
 lisp/mastodon-tl.el| 129 +++--
 lisp/mastodon-views.el |   9 ++-
 3 files changed, 119 insertions(+), 20 deletions(-)

diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 58068932a9..22c702bd4b 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -203,6 +203,7 @@ Status notifications are given when
 
 (defun mastodon-notifications--format-note (note type)
   "Format for a NOTE of TYPE."
+  ;; FIXME: apply/refactor filtering as per/with `mastodon-tl--toot'
   (let* ((id (alist-get 'id note))
  (profile-note
   (when (equal 'follow-request type)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 8c004183b2..0e5cd5bbed 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1103,12 +1103,13 @@ content should be hidden."
   "Remove tabs and newlines from STRING."
   (replace-regexp-in-string "[\t\n ]*\\'" "" string))
 
-(defun mastodon-tl--spoiler (toot)
+(defun mastodon-tl--spoiler (toot &optional filter)
   "Render TOOT with spoiler message.
 This assumes TOOT is a toot with a spoiler message.
 The main body gets hidden and only the spoiler text and the
 content warning message are displayed. The content warning
-message is a link which unhides/hides the main body."
+message is a link which unhides/hides the main body.
+FILTER is a string to use as a filter warning spoiler instead."
   (let* ((spoiler (mastodon-tl--field 'spoiler_text toot))
  (string (mastodon-tl--set-face
   (mastodon-tl--clean-tabs-and-nl
@@ -1116,7 +1117,9 @@ message is a link which unhides/hides the main body."
   'default))
  (message (concat " " mastodon-tl--horiz-bar "\n "
   (mastodon-tl--make-link
-   (concat "CW: " string)
+   (if filter
+   (concat "Filtered: " filter)
+ (concat "CW: " string))
'content-warning)
   "\n "
   mastodon-tl--horiz-bar "\n"))
@@ -1125,20 +1128,22 @@ message is a link which unhides/hides the main body."
  cw
  (propertize (mastodon-tl--content toot)
  'invisible
- (let ((cust mastodon-tl--expand-content-warnings))
-   (cond ((eq t cust)
-  nil)
- ((eq nil cust)
-  t)
- ((eq 'server cust)
-  (unless (eq t
-  ;; If something goes wrong reading prefs,
-  ;; just return nil so CWs show by 
default.
-  (condition-case nil
-  
(mastodon-profile--get-preferences-pref
-   'reading:expand:spoilers)
-(error nil)))
-t
+ (if filter
+ t
+   (let ((cust mastodon-tl--expand-content-warnings))
+ (cond ((eq t cust)
+nil)
+   ((eq nil cust)
+t)
+   ((eq 'server cust)
+(unless (eq t
+;; If something goes wrong reading 
prefs,
+;; just return nil so CWs show by 
default.
+(condition-case nil
+
(mastodon-profile--get-preferences-pref
+ 'reading:expand:spoilers)
+  (error nil)))
+  t)
  'mastodon-content-warning-body t
 
 
@@ -1582,6 +1587,96 @@ NO-BYLINE means just insert toot body, used for folding."
 (when mastodon-tl--display-media-p
   (mastodon-media--inline-images start-pos (point)
 
+(defun mastodon-tl--is-reply (toot)
+  "Check if the TOOT is a reply to another one (and not boosted).
+Used as a predicate in `mastodon-tl--timeline'."
+  (and (mastodon-tl--field 'in_reply_to_id toot)
+   (eq :json-false (mastodon-tl--field 'reblogged toot
+
+(defun mastodon-tl--filters-alist (filters)
+  "Parse filter data for FILTERS.
+For each filter, return a list of action (warn or hide), filter
+title, and context."
+  (cl-loop for x in filters ;; includes non filter elts!
+   for f = (alist-get 'filter x)
+   collect (list (alist-get 'filter_action f)
+ (alist-get 't

[elpa] externals/phpinspect f2f1ac9b84 05/18: Add property types and anonymous function argument types to used-types index

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit f2f1ac9b849cc1bde26f395cae6e4ab06735626c
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Add property types and anonymous function argument types to used-types index
---
 phpinspect-index.el | 47 ++-
 test/test-index.el  |  8 ++--
 2 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/phpinspect-index.el b/phpinspect-index.el
index 474e9123ca..417b7f38c9 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -173,7 +173,7 @@ function (think \"new\" statements, return types etc.)."
 ;; return nil.
 (when (stringp type) type)))
 
-(defun phpinspect--index-variable-from-scope (type-resolver scope 
comment-before &optional static)
+(defun phpinspect--index-variable-from-scope (type-resolver scope 
comment-before &optional static add-used-types)
   "Index the variable inside SCOPE, use doc in COMMENT-BEFORE if missing 
typehint.
 
 Provide STATIC if the variable was defined as static.
@@ -212,7 +212,9 @@ SCOPE should be a scope token (`phpinspect-scope-p')."
:name (if static (concat "$" variable-name) variable-name)
:scope `(,(car scope))
:lifetime (when static '(:static))
-   :type (if type (funcall type-resolver (phpinspect--make-type :name 
type)))
+   :type (when type
+   (when add-used-types (funcall add-used-types (list type)))
+   (funcall type-resolver (phpinspect--make-type :name type)))
 
 (defun phpinspect-doc-block-p (token)
   (phpinspect-token-type-p token :doc-block))
@@ -292,9 +294,8 @@ SCOPE should be a scope token (`phpinspect-scope-p')."
 (push (phpinspect--index-const-from-scope token) 
constants))
 
((seq-find #'phpinspect-variable-p token)
-(push (phpinspect--index-variable-from-scope type-resolver
- token
- 
comment-before)
+(push (phpinspect--index-variable-from-scope
+   type-resolver token comment-before nil 
add-used-types)
   variables))
 
((phpinspect-static-p (cadr token))
@@ -307,10 +308,9 @@ SCOPE should be a scope token (`phpinspect-scope-p')."
  static-methods))
 
   ((seq-find #'phpinspect-variable-p (cdadr token))
-   (push (phpinspect--index-variable-from-scope 
type-resolver
-
`(,(car token) ,@(cdadr token))
-
comment-before
-
'static)
+   (push (phpinspect--index-variable-from-scope
+  type-resolver `(,(car token) ,@(cdadr token))
+  comment-before 'static add-used-types)
  static-variables
(t
 (phpinspect--log "comment-before is: %s" comment-before)
@@ -329,10 +329,9 @@ SCOPE should be a scope token (`phpinspect-scope-p')."
   static-methods))
 
((seq-find #'phpinspect-variable-p (cdr token))
-(push (phpinspect--index-variable-from-scope type-resolver
- `(:public 
,@(cdr token))
- comment-before
- 'static)
+(push (phpinspect--index-variable-from-scope
+   type-resolver `(:public ,@(cdr token)) 
comment-before
+   'static add-used-types)
   static-variables
 ((phpinspect-const-p token)
  ;; Bare constants are always public
@@ -481,6 +480,21 @@ NAMESPACE will be assumed the root namespace if not 
provided"
functions
 functions))
 
+(defun phpinspect-function-declaration (function-token)
+  (seq-find #'phpinspect-declaration-p function-token))
+
+(defun phpinspect--find-used-types-in-function-token (token)
+  (let* (types
+ (add-types (lambda (add-types)
+  (setq types (nconc types add-types
+ (resolver (phpinspect--make-type-resolver nil)))
+
+(phpinspect--index-function-declaration
+ (phpinspect-function-declaration token) resolver add-types)
+
+(nconc types (phpinspect--find-used-types-in-tokens 
(phpinspect-function-block token)
+
+
 (defun phpinspect--find-used-types-in-tokens (tokens)
   "Find usage of the \"new\" keyword in TOKENS.
 
@@ -509,6 +523,13 @@ Return value is a list of the types that are \"newed\"."
   

[elpa] externals/phpinspect d3f100388e 04/18: Resolve property types using other methods when resolving from constructor fails

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit d3f100388eeefde2f218faa6f5056fe59352889c
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Resolve property types using other methods when resolving from constructor 
fails

Property types of classes in live buffers are now resolved from assignments 
in
other methods when resolving from the __construct method fails.
---
 phpinspect-buffer.el | 14 +++---
 phpinspect-class.el  |  1 +
 phpinspect-resolve.el| 38 ++
 phpinspect-resolvecontext.el |  3 ++-
 4 files changed, 44 insertions(+), 12 deletions(-)

diff --git a/phpinspect-buffer.el b/phpinspect-buffer.el
index 4872aed20d..bfd603c470 100644
--- a/phpinspect-buffer.el
+++ b/phpinspect-buffer.el
@@ -404,17 +404,9 @@ linked with."
static)))
 
   (when (and (phpinspect-variable-p (phpinspect-meta-token var)) (not 
(phpinspect--variable-type indexed)))
-(when-let* ((constructor (phpinspect--class-get-method class-obj 
(phpinspect-intern-name "__construct")))
-(rctx (phpinspect--make-resolvecontext 
:enclosing-tokens (list (phpinspect-meta-token class))
-   
:enclosing-metadata (list class
-  (setf (phpinspect--variable-type indexed)
-(phpinspect-get-pattern-type-in-block
- rctx (phpinspect--make-pattern :m `(:variable "this")
-:m `(:object-attrib (:word 
,(cadr (phpinspect-meta-token var)
- (phpinspect-function-block (phpinspect--function-token 
constructor))
- type-resolver
- (phpinspect-function-argument-list 
(phpinspect--function-token constructor))
-
+(setf (phpinspect--variable-type indexed)
+  (phpinspect--class-resolve-property-type
+   class-obj (cadr (phpinspect-meta-token var)) type-resolver 
class)))
 
   (phpinspect--class-set-variable class-obj indexed)
 
diff --git a/phpinspect-class.el b/phpinspect-class.el
index 2ee761e508..2a71acc1ff 100644
--- a/phpinspect-class.el
+++ b/phpinspect-class.el
@@ -259,5 +259,6 @@ Conditionally executes BODY depending on
 (puthash subscription-class update-function
  (phpinspect--class-subscriptions subscription-class))
 
+
 (provide 'phpinspect-class)
 ;;; phpinspect-class.el ends here
diff --git a/phpinspect-resolve.el b/phpinspect-resolve.el
index bf473c4a4d..2dfc2b5452 100644
--- a/phpinspect-resolve.el
+++ b/phpinspect-resolve.el
@@ -25,6 +25,7 @@
 
 (require 'phpinspect-resolvecontext)
 (require 'phpinspect-cache)
+(require 'phpinspect-class)
 (require 'phpinspect-type)
 (require 'phpinspect-token-predicates)
 
@@ -497,4 +498,41 @@ EXPRESSION."
 (phpinspect-function-argument-list enclosing-token))
 type))
 
+(defun phpinspect--function-get-pattern-type (fn rctx pattern type-resolver)
+  (phpinspect-get-pattern-type-in-block
+   rctx pattern
+   (phpinspect-function-block (phpinspect--function-token fn))
+   type-resolver
+   (phpinspect-function-argument-list (phpinspect--function-token fn
+
+
+(cl-defmethod phpinspect--class-resolve-property-type
+  ((class phpinspect--class) (property-name string) type-resolver 
class-token-meta)
+  "Resolve type of POPERTY-NAME in the context of CLASS using
+CLASS-TOKEN-META as parse result."
+  (let ((pattern (phpinspect--make-pattern
+  :m `(:variable "this")
+  :m `(:object-attrib (:word ,property-name
+(rctx (phpinspect--make-resolvecontext :enclosing-tokens (list 
(phpinspect-meta-token class-token-meta))
+   :enclosing-metadata (list 
class-token-meta)))
+(constructor-name (phpinspect-intern-name "__construct")))
+
+(or
+ (when-let ((constructor (phpinspect--class-get-method class 
constructor-name)))
+   (phpinspect--function-get-pattern-type constructor rctx pattern 
type-resolver))
+ (catch 'found
+   (dolist (method (phpinspect--class-get-method-list class))
+ (unless (eq constructor-name (phpinspect--function-name-symbol 
method))
+   (when-let ((result (phpinspect--function-get-pattern-type method 
rctx pattern type-resolver)))
+ (throw 'found result
+   nil
+
+(cl-defmethod phpinspect--class-resolve-property-type
+  ((_class phpinspect--class) property-name &rest _ignored)
+  ;; Catch-all for cases where one attempts to resolve a nil property
+  ;; name. Saves an if-statement for the caller.
+  ;; Can't resolve property type when property name is nil, so we do nothing.
+  (cl-assert (not property-name))
+  nil)
+
 (provide 'phpinspect-resolve)
diff --git a/phpinspect-resolvecontext.el b/phpinspect-resolvecontext.el
index 4290aba693..42d087fff3 100644
--- a/phpinspect-resolvecontex

[elpa] externals/phpinspect 3fff772d8a 03/18: Fix phpinspect-buffer-index-functions test

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 3fff772d8a1f52ef16c6dfb8a6984e6bc0a5f5ba
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Fix phpinspect-buffer-index-functions test
---
 test/test-buffer.el | 67 +++--
 1 file changed, 24 insertions(+), 43 deletions(-)

diff --git a/test/test-buffer.el b/test/test-buffer.el
index 689e7cb2d4..b846adcdac 100644
--- a/test/test-buffer.el
+++ b/test/test-buffer.el
@@ -356,56 +356,37 @@ class YYY {
   (should (= 1 (hash-table-count (phpinspect-project-class-index 
(phpinspect-buffer-project buffer
 
 (ert-deftest phpinspect-buffer-index-functions ()
-  (let ((buffer (phpinspect-make-buffer :-project (phpinspect--make-project 
:autoload (phpinspect-make-autoloader
-(namespaces (phpinspect-make-splayt))
-(declarations  (phpinspect-make-splayt))
-(classes (phpinspect-make-splayt))
-(functions (phpinspect-make-splayt)))
-
-(phpinspect-splayt-insert
- namespaces 10
- (phpinspect-make-meta nil 10 200 "" '(:namespace (:word "NS") 
(:terminator ";"
-
-
-(phpinspect-splayt-insert
- declarations 20
- (phpinspect-make-meta nil 20 30 "" '(:declaration (:word "class") (:word 
"TestClass"
-(phpinspect-splayt-insert
- classes 20
- (phpinspect-make-meta nil 20 70 "" '(:class (:declaration (:word "class") 
(:word "TestClass")
-
-
-(phpinspect-splayt-insert
- declarations 40
- (phpinspect-make-meta nil 40 45 "" '(:declaration (:word "testMethod") 
(:list) (:word "RelativeType"
-
-(phpinspect-splayt-insert
- functions 40
- (phpinspect-make-meta nil 40 50 "" '(:function (:declaration (:word 
"testMethod") (:list) (:word "RelativeType")
+  (with-temp-buffer
+(let ((buffer (phpinspect-make-buffer
+   :buffer (current-buffer)
+   :-project (phpinspect--make-project :autoload 
(phpinspect-make-autoloader)
+  (insert "

[elpa] externals/phpinspect 31c6e06934 09/18: Reparse buffer when fixing import (+ add comment explaining why)

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 31c6e069343eb63ed519b8de67089c841c86113a
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Reparse buffer when fixing import (+ add comment explaining why)
---
 phpinspect-buffer.el  |  2 +-
 phpinspect-imports.el | 11 ++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/phpinspect-buffer.el b/phpinspect-buffer.el
index bfd603c470..058d31cecb 100644
--- a/phpinspect-buffer.el
+++ b/phpinspect-buffer.el
@@ -518,7 +518,7 @@ use."
   (interactive)
   (when phpinspect-current-buffer
 (let ((buffer phpinspect-current-buffer))
-  (pop-to-buffer (generate-new-buffer "phpinspect-buffer-tree"))
+  (pop-to-buffer (generate-new-buffer "phpinspect-buffer-index"))
   (insert (pp-to-string (phpinspect--index-tokens (phpinspect-buffer-parse 
buffer 'no-interrupt
   (read-only-mode
 
diff --git a/phpinspect-imports.el b/phpinspect-imports.el
index f2329abd61..6a5f2516fd 100644
--- a/phpinspect-imports.el
+++ b/phpinspect-imports.el
@@ -185,7 +185,16 @@ that there are import (\"use\") statements for them."
   (interactive)
   (if phpinspect-current-buffer
   (let* ((buffer phpinspect-current-buffer)
- (tree (phpinspect-buffer-parse buffer))
+ ;; use buffer-reparse to ensure fully structurally correct
+ ;; tree. (at the time of writing, incremental parsing has some
+ ;; limitations causing reused tokens to lose their special meaning
+ ;; when they are reused. For example the "class" keyword being
+ ;; reused as just a word instead of a special keyword marking the
+ ;; start of a class)
+ ;;
+ ;; FIXME: Change to buffer-parse when this particular problem in
+ ;; incremental parsing has been solved
+ (tree (phpinspect-buffer-reparse buffer))
  (index (phpinspect--index-tokens
  tree nil (phpinspect-buffer-location-resolver buffer)))
  (classes (alist-get 'classes index))



[elpa] externals/phpinspect 2e064d52e1 17/18: Implement containing type inference for collection-like class properties

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 2e064d52e120d4cd5dab714d8ae2883ffa8de23c
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Implement containing type inference for collection-like class properties
---
 phpinspect-index.el | 65 -
 test/test-buffer.el | 16 ++---
 2 files changed, 52 insertions(+), 29 deletions(-)

diff --git a/phpinspect-index.el b/phpinspect-index.el
index a806829b82..a026080522 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -81,6 +81,39 @@ of TYPE, if available."
 
 (list name function-args return-type)))
 
+(defun phpinspect--apply-annotation-type (annotation-type-string type 
type-resolver)
+  "Add/modify information of a resolved TYPE based on ANNOTATION-TYPE-STRING.
+
+Annotation type is resolved using TYPE-RESOLVER.
+"
+  (if (stringp annotation-type-string)
+  (let ((is-collection (phpinspect--type-is-collection type)))
+(phpinspect--log "found annotation type string %s when type is %s"
+ annotation-type-string type)
+
+(when (string-suffix-p "[]" annotation-type-string)
+  (setq is-collection t)
+  (setq annotation-type-string (string-trim-right 
annotation-type-string "\\[\\]")))
+
+
+(cond ((phpinspect--should-prefer-return-annotation type)
+   ;; Sometimes it's better to override the typehint with a more 
narrow annotation
+   (setq type (funcall type-resolver
+   (phpinspect--make-type :name 
annotation-type-string
+
+  (is-collection
+   ;; Collections need to have their "contains" slot set
+   (phpinspect--log "Detected collection type, setting contains 
from annotation type '%s'"
+annotation-type-string)
+   (setf (phpinspect--type-contains type)
+ (funcall type-resolver
+  (phpinspect--make-type :name 
annotation-type-string)))
+   (setf (phpinspect--type-collection type) t
+;; else
+(phpinspect--log "Discarding invalid annotation type %s" 
annotation-type-string))
+  type)
+
+
 (defun phpinspect--index-function-from-scope (type-resolver scope 
comment-before &optional add-used-types namespace)
   "Index a function inside SCOPE token using phpdoc metadata in COMMENT-BEFORE.
 
@@ -106,31 +139,8 @@ function (think \"new\" statements, return types etc.)."
 ;; @return annotation. When dealing with a collection, we want to store the
 ;; type of its members.
 (let* ((return-annotation-type
-(cadadr (seq-find #'phpinspect-return-annotation-p 
comment-before)))
-   (is-collection
-(and type
- (phpinspect--type-is-collection type
-  (phpinspect--log "found return annotation %s in %s when type is %s"
-   return-annotation-type comment-before type)
-
-  (unless (stringp return-annotation-type)
-(phpinspect--log "Discarding invalid return annotation type %s" 
return-annotation-type)
-(setq return-annotation-type nil))
-
-  (when return-annotation-type
-(when (string-suffix-p "[]" return-annotation-type)
-  (setq is-collection t)
-  (setq return-annotation-type (string-trim-right 
return-annotation-type "\\[\\]")))
-
-(cond ((phpinspect--should-prefer-return-annotation type)
-   (setq type (funcall type-resolver
-   (phpinspect--make-type :name 
return-annotation-type
-  (is-collection
-   (phpinspect--log "Detected collection type in: %s" scope)
-   (setf (phpinspect--type-contains type)
- (funcall type-resolver
-  (phpinspect--make-type :name 
return-annotation-type)))
-   (setf (phpinspect--type-collection type) t)
+(cadadr (seq-find #'phpinspect-return-annotation-p 
comment-before
+  (phpinspect--apply-annotation-type return-annotation-type type 
type-resolver))
 
 (when add-used-types
   (let ((used-types (phpinspect--find-used-types-in-tokens
@@ -214,7 +224,10 @@ SCOPE should be a scope token (`phpinspect-scope-p')."
:lifetime (when static '(:static))
:type (when type
(when add-used-types (funcall add-used-types (list type)))
-   (funcall type-resolver (phpinspect--make-type :name type)))
+   (phpinspect--apply-annotation-type
+(phpinspect--variable-type-string-from-comment comment-before 
variable-name)
+(funcall type-resolver (phpinspect--make-type :name type))
+type-resolver))
 
 (defun phpinspect-doc-block-p (token)
   (phpinspect-token-type-p token :doc-block))
diff --git a/test/test-buffer.el b/test/test-buffer.el
index b846adcdac..087406e8ad 100644
--- a/test/test-buffer.el
+++ b/test/test-b

[elpa] externals/phpinspect 130e2c06c5 13/18: Index types used in arrays

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 130e2c06c59f1fe31b3ed3ab90ea61e3d27814f1
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Index types used in arrays
---
 phpinspect-index.el | 2 +-
 test/test-index.el  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/phpinspect-index.el b/phpinspect-index.el
index 861e355716..502b786861 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -537,7 +537,7 @@ Returns a list of type name strings."
  (nconc used-types-rear
 (phpinspect--find-used-types-in-tokens (cdr 
(phpinspect-function-block token
  used-types-rear (last used-types-rear)))
-  ((or (phpinspect-list-p token) (phpinspect-block-p token))
+  ((or (phpinspect-list-p token) (phpinspect-block-p token) 
(phpinspect-array-p token))
(setq used-types-rear
  (nconc used-types-rear 
(phpinspect--find-used-types-in-tokens (cdr token)))
  used-types-rear (last used-types-rear
diff --git a/test/test-index.el b/test/test-index.el
index faf243eab2..81abf763b6 100644
--- a/test/test-index.el
+++ b/test/test-index.el
@@ -98,6 +98,7 @@ if ((new Monkey())->tree() === true) {
 }
 return StaticThing::create(new ThingFactory())->makeThingnew 
Potato())->antiPotato(new OtherThing(function (InnerFunctionParam $param) {
 if ($param instanceof InstanceOffed) {
+  $bing = [ 'bong' => [ 'nested' => NestedArray::call(), ], ];
 // nothing
 }
 });
@@ -109,7 +110,7 @@ if ($param instanceof InstanceOffed) {
   (copy-sequence
'("Cheese" "Bacon" "Ham" "Bagel" "Monkey" 
"ExtendedThing"
  "StaticThing" "Thing" "ThingFactory" "Potato" 
"OtherThing"
- "InnerFunctionParam" "PropertyType" "InstanceOffed"))
+ "InnerFunctionParam" "PropertyType" "InstanceOffed" 
"NestedArray"))
   #'string<))
  (sort used-types (lambda (s1 s2) (string< (phpinspect-name-string 
s1) (phpinspect-name-string s2
 



[elpa] externals/phpinspect 93b815d71a 14/18: Index used traits (juste use of type, no actual functionality outside of that)

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 93b815d71a9b24cb309385c14274ec6c5a46b123
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Index used traits (juste use of type, no actual functionality outside of 
that)
---
 phpinspect-index.el | 4 
 test/test-index.el  | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/phpinspect-index.el b/phpinspect-index.el
index 502b786861..a806829b82 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -349,6 +349,10 @@ SCOPE should be a scope token (`phpinspect-scope-p')."
  (setq comment-before token))
 
 ;; Prevent comments from sticking around too long
+((and (phpinspect-use-p token) (phpinspect-word-p (cadr token)))
+ ;; FIXME: Actually implement indexation of trait usage. This just
+ ;; marks the type as used for now.
+ (push (cadadr token) used-types))
 (t
  (phpinspect--log "Unsetting comment-before")
  (setq comment-before nil
diff --git a/test/test-index.el b/test/test-index.el
index 81abf763b6..4e9c0b5676 100644
--- a/test/test-index.el
+++ b/test/test-index.el
@@ -89,6 +89,8 @@
   (phpinspect-parse-string
"

[elpa] externals/phpinspect 8296641ba9 07/18: Implement removal of unused imports in `phpinspect-fix-imports'

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 8296641ba965f0d418a999e7cd7f7d41f9712a7a
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Implement removal of unused imports in `phpinspect-fix-imports'
---
 phpinspect-imports.el | 62 +--
 phpinspect-meta.el|  6 +
 phpinspect-type.el| 15 -
 3 files changed, 70 insertions(+), 13 deletions(-)

diff --git a/phpinspect-imports.el b/phpinspect-imports.el
index fbb0cf44a7..ec5fd7658f 100644
--- a/phpinspect-imports.el
+++ b/phpinspect-imports.el
@@ -111,14 +111,56 @@ buffer position to insert the use statement at."
 (defalias 'phpinspect-fix-uses-interactive #'phpinspect-fix-imports
   "Alias for backwards compatibility")
 
+(defsubst phpinspect-namespace-meta-body (namespace-meta)
+  "Return the token metadata of NAMESPACE-META's body.
+More specifically, returns the token itself if it is a namespace
+without block.  If the namespace is defined with a block ('{}'),
+NAMESPACE-META itself is returned without alterations."
+  (if (phpinspect-block-p (caddr (phpinspect-meta-token namespace-meta)))
+  (phpinspect-meta-find-first-child-matching-token namespace-meta 
#'phpinspect-block-p)
+namespace-meta))
+
+(defun phpinspect-find-use-statement-for-import (parent-token import-type)
+  (phpinspect-meta-find-first-child-matching-token
+   (if (phpinspect-namespace-p (phpinspect-meta-token parent-token))
+   (phpinspect-namespace-meta-body parent-token)
+ parent-token)
+   (lambda (token)
+ (and (phpinspect-use-p token)
+  (phpinspect-word-p (cadr token))
+  (phpinspect--type= import-type (phpinspect-use-name-to-type (cadadr 
token)))
+
+(defun phpinspect-remove-unneeded-use-statements (types buffer imports 
parent-token)
+  (let ((namespace (phpinspect-meta-find-parent-matching-token parent-token 
#'phpinspect-namespace-p)))
+(dolist (import imports)
+  (unless (member (car import) types)
+(when-let ((use-meta (phpinspect-find-use-statement-for-import 
namespace (cdr import
+  (let ((start-point (phpinspect-meta-start use-meta))
+(use-before (phpinspect-meta-find-left-sibling use-meta)))
+(if (phpinspect-use-p (phpinspect-meta-token use-before))
+;; left-sibling is another use statement, remove all preceding 
whitespace
+(setq start-point (- start-point (length 
(phpinspect-meta-whitespace-before use-meta
+  ;; left-sibling isn't a use statement, just remove a newline if
+  ;; any whitespace is present
+  (when (length> (phpinspect-meta-whitespace-before use-meta) 0)
+(setq start-point (- start-point 1
+
+(delete-region start-point (phpinspect-meta-end use-meta))
+(phpinspect-buffer-parse buffer 'no-interrupt)))
+
 (defun phpinspect-add-use-statements-for-missing-types (types buffer imports 
project parent-token)
-  (let (namespace namespace-name)
-(dolist (type types)
-  (setq namespace (phpinspect-meta-find-parent-matching-token
-   parent-token #'phpinspect-namespace-p)
-namespace-name (if namespace
+  "Add use statements to BUFFER for TYPES if not already included in IMPORTS.
+
+Uses PROJECT's autoloader to determine available types for import.
+
+PARENT-TOKEN must be a `token-meta' object and is used to
+determine the scope of the imports (global or local namespace)."
+  (let* ((namespace (phpinspect-meta-find-parent-matching-token
+   parent-token #'phpinspect-namespace-p))
+ (namespace-name (if namespace
(phpinspect-namespace-name 
(phpinspect-meta-token namespace))
- ""))
+ "")))
+(dolist (type types)
   ;; Add use statements for types that aren't imported or already 
referenced
   ;; with a fully qualified name.
   (unless (or (or (alist-get type imports))
@@ -149,6 +191,9 @@ that there are import (\"use\") statements for them."
 (phpinspect-add-use-statements-for-missing-types
  used-types buffer imports project (phpinspect-buffer-root-meta 
buffer))
 
+(phpinspect-remove-unneeded-use-statements
+ used-types buffer imports (phpinspect-buffer-root-meta buffer))
+
 (dolist (class classes)
   (let* ((class-imports (alist-get 'imports class))
  (used-types (alist-get 'used-types class))
@@ -164,6 +209,9 @@ that there are import (\"use\") statements for them."
   (error "Unable to find token for class %s" class-name))
 
 (phpinspect-add-use-statements-for-missing-types
- used-types buffer (append imports class-imports) project 
token-meta))
+ used-types buffer (append imports class-imports) project 
token-meta)
+
+(phpinspect-remove-unneeded-use-statements
+ used-types buffer class

[elpa] externals/phpinspect 3a0ce3ac2d 16/18: Fix another infinite recursion bug

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 3a0ce3ac2dad7fbee01010fa8a4464dfef39dbfa
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Fix another infinite recursion bug

Bug occured in scenario's where array-members were self-referentially 
assigned
in a foreach loop.

like so:

foreach($things as $thing) {
  $thing = $this->something;
}
---
 phpinspect-resolve.el   | 158 +---
 test/phpinspect-test.el |  50 +++
 test/test-resolve.el|  64 
 3 files changed, 167 insertions(+), 105 deletions(-)

diff --git a/phpinspect-resolve.el b/phpinspect-resolve.el
index 5a2d0a..04a9cb558f 100644
--- a/phpinspect-resolve.el
+++ b/phpinspect-resolve.el
@@ -33,6 +33,9 @@
 
 (cl-defstruct (phpinspect--assignment
(:constructor phpinspect--make-assignment))
+  (ctx nil
+   :type phpinspect--assignment-context
+   :documentation "The context that the assignment was found in")
   (to nil
   :type phpinspect-variable
   :documentation "The variable that is assigned to")
@@ -54,8 +57,15 @@
   (inline-quote
(not (phpinspect-maybe-assignment-p ,token
 
-(cl-defgeneric phpinspect--find-assignments-in-token (token)
-  "Find any assignments that are in TOKEN, at top level or nested in blocks"
+(cl-defstruct (phpinspect--assignment-context
+   (:constructor phpinspect--make-assignment-context)
+   (:conc-name phpinspect--actx-))
+  (tokens nil
+  :type list)
+  (preceding-assignments nil
+ :type list))
+
+(defun phpinspect--find-assignment-ctxs-in-token (token &optional 
assignments-before)
   (when (keywordp (car token))
 (setq token (cdr token)))
 
@@ -65,58 +75,63 @@
 (dolist (statement statements)
   (when (seq-find #'phpinspect-maybe-assignment-p statement)
 (phpinspect--log "Found assignment statement")
-(push statement assignments))
+(push (phpinspect--make-assignment-context
+   :tokens statement
+   :preceding-assignments assignments-before)
+  assignments)
+(setq assignments-before assignments))
 
   (when (setq blocks-or-lists (seq-filter #'phpinspect-block-or-list-p 
statement))
 (dolist (block-or-list blocks-or-lists)
   (phpinspect--log "Found block or list %s" block-or-list)
-  (let ((local-assignments (phpinspect--find-assignments-in-token 
block-or-list)))
+  (let ((local-assignments
+ (phpinspect--find-assignment-ctxs-in-token block-or-list 
assignments-before)))
 (dolist (local-assignment (nreverse local-assignments))
-  (push local-assignment assignments))
+  (push local-assignment assignments))
+(setq assignments-before assignments)
 
 ;; return
 (phpinspect--log "Found assignments in token: %s" assignments)
 (phpinspect--log "Found statements in token: %s" statements)
 assignments))
 
-(defun phpinspect--find-assignment-by-predicate (assignment-tokens predicate)
+(defun phpinspect--find-assignment-by-predicate (assignment-ctxs predicate)
   "Find first assignment in ASSIGNMENT-TOKENS matching PREDICATE.
 
 Destructively removes tokens from the end of ASSIGNMENT-TOKENS."
   (catch 'return
-(while-let ((assignment (car (last assignment-tokens
-  (if (cdr assignment-tokens)
-  (setcdr assignment-tokens (butlast (cdr assignment-tokens)))
-(setcar assignment-tokens nil))
-
-  (let* ((is-loop-assignment nil)
- (left-of-assignment
-  (seq-filter #'phpinspect-not-comment-p
-  (seq-take-while #'phpinspect-not-assignment-p 
assignment)))
- (right-of-assignment
-  (seq-filter
-   #'phpinspect-not-comment-p
-   (cdr (seq-drop-while
- (lambda (elt)
-   (if (phpinspect-maybe-assignment-p elt)
-   (progn
- (when (equal '(:word "as") elt)
-   (phpinspect--log "It's a loop assignment %s" 
elt)
-   (setq is-loop-assignment t))
- nil)
- t))
- assignment)
-
-(if is-loop-assignment
-(when (funcall predicate right-of-assignment)
-  ;; Masquerade as an array access assignment
-  (setq left-of-assignment (append left-of-assignment '((:array
-  (throw 'return (phpinspect--make-assignment :to 
right-of-assignment
-  :from 
left-of-assignment)))
-  (when (funcall predicate left-of-assignment)
-(throw 'return (phpinspect--make-assignment :from 
right-of-assignment
-:to 
left-of-assignment))
-  

[elpa] externals/phpinspect c20f010ee4 10/18: Introduce `phpinspect-buffer-fresh-p' and `phpinspect-buffer-reparse-if-not-fresh'

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit c20f010ee4ab326f04c4bec176d44586a91230ba
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Introduce `phpinspect-buffer-fresh-p' and 
`phpinspect-buffer-reparse-if-not-fresh'

+ use in `phpinspect-fix-imports' instead of `phpinspect-buffer-reparse'
---
 phpinspect-buffer.el  | 31 +--
 phpinspect-imports.el |  2 +-
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/phpinspect-buffer.el b/phpinspect-buffer.el
index 058d31cecb..d894021da3 100644
--- a/phpinspect-buffer.el
+++ b/phpinspect-buffer.el
@@ -76,12 +76,39 @@ emacs buffer."
 (phpinspect--cache-get-project-create 
(phpinspect--get-or-create-global-cache)
   
(phpinspect-current-project-root)
 
+(defun phpinspect-buffer-tainted-p (buffer)
+  "Whether or not BUFFER's current tree needs updating to incorporate edits."
+  (and (phpinspect-edtrack-taint-pool (phpinspect-buffer-edit-tracker buffer)) 
t))
+
+(defun phpinspect-buffer-needs-parse-p (buffer)
+  "Whether or not BUFFER needs to be parsed for an updated tree to be present."
+  (or (not (phpinspect-buffer-tree buffer))
+  (phpinspect-buffer-tainted-p buffer)))
+
+(defun phpinspect-buffer-fresh-p (buffer)
+  "Whether or not BUFFER's metadata is fresh.
+
+A buffer's metadata is fresh when the buffer's last parsed tree
+was parsed from scratch and no edits have been applied
+afterwards. An incrementally parsed tree that has incorporated
+edits does not count as fresh (because incremental parsing has its flaws)."
+  (and (not (phpinspect-buffer-needs-parse-p buffer))
+  ;; If the buffer map has overlays, the last parsed tree has incorporated
+  ;; edits and is not fresh.
+  (phpinspect-splayt-empty-p (phpinspect-bmap-overlays 
(phpinspect-buffer-map buffer)
+
+(defun phpinspect-buffer-reparse-if-not-fresh (buffer)
+  "If BUFFER's tree is fresh, return it. Otherwise reparse the
+ buffer and return the result."
+  (if (phpinspect-buffer-fresh-p buffer)
+  (phpinspect-buffer-tree buffer)
+(phpinspect-buffer-reparse buffer)))
+
 (cl-defmethod phpinspect-buffer-parse ((buffer phpinspect-buffer) &optional 
no-interrupt)
   "Parse the PHP code in the the emacs buffer that this object is
 linked with."
   (let ((tree))
-  (if (or (not (phpinspect-buffer-tree buffer))
-  (phpinspect-edtrack-taint-pool (phpinspect-buffer-edit-tracker 
buffer)))
+  (if (phpinspect-buffer-needs-parse-p buffer)
   (with-current-buffer (phpinspect-buffer-buffer buffer)
 (let* ((map (phpinspect-make-bmap))
(buffer-map (phpinspect-buffer-map buffer))
diff --git a/phpinspect-imports.el b/phpinspect-imports.el
index 6a5f2516fd..81ba8ba540 100644
--- a/phpinspect-imports.el
+++ b/phpinspect-imports.el
@@ -194,7 +194,7 @@ that there are import (\"use\") statements for them."
  ;;
  ;; FIXME: Change to buffer-parse when this particular problem in
  ;; incremental parsing has been solved
- (tree (phpinspect-buffer-reparse buffer))
+ (tree (phpinspect-buffer-reparse-if-not-fresh buffer))
  (index (phpinspect--index-tokens
  tree nil (phpinspect-buffer-location-resolver buffer)))
  (classes (alist-get 'classes index))



[elpa] externals/phpinspect 2520c89680 02/18: Account for tokens after @method annotation when indexing

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 2520c8968011ba714919448e09c59c857ecc77e0
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Account for tokens after @method annotation when indexing

- Add :rest keyword to  `phpinspect--match-sequence'
- Use :rest keyword in  `phpinspect--index-method-annotations'
---
 phpinspect-index.el | 12 
 phpinspect-util.el  | 23 +++
 test/test-index.el  |  2 +-
 test/test-util.el   | 28 
 4 files changed, 56 insertions(+), 9 deletions(-)

diff --git a/phpinspect-index.el b/phpinspect-index.el
index f948d6f61b..474e9123ca 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -224,24 +224,28 @@ SCOPE should be a scope token (`phpinspect-scope-p')."
 (dolist (annotation annotations)
   (let ((return-type) (name) (arg-list) (static))
 ;; Annotation is static
-(when (phpinspect--match-sequence (take 2 annotation)
-:m :method-annotation :m '(:word "static"))
+(when (phpinspect--match-sequence annotation
+:m :method-annotation :m '(:word "static") :rest *)
   (setcdr annotation (cddr annotation))
   (setq static t))
 
 (cond
+ ;; Sequence is: return-type, method-name, method signature
  ((phpinspect--match-sequence annotation
 :m :method-annotation
 :f #'phpinspect-word-p
 :f #'phpinspect-word-p
-:f #'phpinspect-list-p)
+:f #'phpinspect-list-p
+:rest *)
   (setq return-type (cadr (nth 1 annotation)))
   (setq name (cadr (nth 2 annotation)))
   (setq arg-list (nth 3 annotation)))
+ ;; Sequence is: method-name, method-signature
  ((phpinspect--match-sequence annotation
 :m :method-annotation
 :f #'phpinspect-word-p
-:f #'phpinspect-list-p)
+:f #'phpinspect-list-p
+:rest *)
   (setq return-type "void")
   (setq name (cadr (nth 1 annotation)))
   (setq arg-list (nth 2 annotation
diff --git a/phpinspect-util.el b/phpinspect-util.el
index bd722871f2..4aaf2fa32a 100644
--- a/phpinspect-util.el
+++ b/phpinspect-util.el
@@ -170,6 +170,13 @@ pattern. See `phpinspect--match-sequence'."
   "Match SEQUENCE to PATTERN."
   (funcall (phpinspect--pattern-matcher pattern) sequence))
 
+(defun phpinspect--list-all-equal (val sequence)
+  (catch 'not-equal
+(dolist (item sequence)
+  (unless (equal val item)
+(throw 'not-equal nil)))
+t))
+
 (defmacro phpinspect--match-sequence (sequence &rest pattern)
   "Match SEQUENCE to positional matchers defined in PATTERN.
 
@@ -201,7 +208,7 @@ it evaluates to a non-nil value."
  (match-rear-sym (gensym))
  (checkers (cons nil nil))
  (checkers-rear checkers)
- key value)
+ rest key value)
 
 (while (setq key (pop pattern))
   (unless (keywordp key)
@@ -224,6 +231,8 @@ it evaluates to a non-nil value."
  `(,value (elt ,sequence-sym ,sequence-pos))
`(funcall ,value (elt ,sequence-sym ,sequence-pos)))
  nil
+((eq key :rest)
+ (setq rest value))
 (t (error "Invalid keyword: %s" key)))
 
   (setq checkers-rear
@@ -240,9 +249,15 @@ it evaluates to a non-nil value."
 `(let* ((,sequence-sym ,sequence)
 (,match-sym (cons nil nil))
 (,match-rear-sym ,match-sym))
-   (and (= ,sequence-length (length ,sequence))
-,@checkers
-(cdr ,match-sym)
+   ,(if rest
+`(and ,@checkers
+  (cdr ,match-sym)
+  ,(if (eq rest '*)
+   't
+ `(phpinspect--list-all-equal ,rest (nthcdr 
,sequence-length ,sequence-sym
+  `(and (= ,sequence-length (length ,sequence))
+,@checkers
+(cdr ,match-sym))
 
 (defun phpinspect--pattern-concat (pattern1 pattern2)
   (let* ((pattern1-sequence-length (/ (length (phpinspect--pattern-code 
pattern1)) 2)))
diff --git a/test/test-index.el b/test/test-index.el
index d1621bc8ae..5f3f4bf4e0 100644
--- a/test/test-index.el
+++ b/test/test-index.el
@@ -127,7 +127,7 @@ return StaticThing::create(new 
ThingFactory())->makeThingnew Potato())->anti
"

[elpa] externals/phpinspect 2d93ec7f79 15/18: Fix infinite recursion bug in `phpinspect--get-pattern-type-in-block'

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 2d93ec7f7955b7566bf632d3d55121d6cc77586b
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Fix infinite recursion bug in `phpinspect--get-pattern-type-in-block'
---
 phpinspect-resolve.el   | 90 -
 phpinspect-util.el  |  3 ++
 test/phpinspect-test.el | 29 ++--
 3 files changed, 74 insertions(+), 48 deletions(-)

diff --git a/phpinspect-resolve.el b/phpinspect-resolve.el
index 2dfc2b5452..5a2d0a 100644
--- a/phpinspect-resolve.el
+++ b/phpinspect-resolve.el
@@ -79,10 +79,16 @@
 (phpinspect--log "Found statements in token: %s" statements)
 assignments))
 
-(defun phpinspect--find-assignments-by-predicate (token predicate)
-  (let ((variable-assignments)
-(all-assignments (phpinspect--find-assignments-in-token token)))
-(dolist (assignment all-assignments)
+(defun phpinspect--find-assignment-by-predicate (assignment-tokens predicate)
+  "Find first assignment in ASSIGNMENT-TOKENS matching PREDICATE.
+
+Destructively removes tokens from the end of ASSIGNMENT-TOKENS."
+  (catch 'return
+(while-let ((assignment (car (last assignment-tokens
+  (if (cdr assignment-tokens)
+  (setcdr assignment-tokens (butlast (cdr assignment-tokens)))
+(setcar assignment-tokens nil))
+
   (let* ((is-loop-assignment nil)
  (left-of-assignment
   (seq-filter #'phpinspect-not-comment-p
@@ -105,15 +111,14 @@
 (when (funcall predicate right-of-assignment)
   ;; Masquerade as an array access assignment
   (setq left-of-assignment (append left-of-assignment '((:array
-  (push (phpinspect--make-assignment :to right-of-assignment
- :from left-of-assignment)
-variable-assignments))
+  (throw 'return (phpinspect--make-assignment :to 
right-of-assignment
+  :from 
left-of-assignment)))
   (when (funcall predicate left-of-assignment)
-(push (phpinspect--make-assignment :from right-of-assignment
-   :to left-of-assignment)
-  variable-assignments)
-(phpinspect--log "Returning the thing %s" variable-assignments)
-(nreverse variable-assignments)))
+(throw 'return (phpinspect--make-assignment :from 
right-of-assignment
+:to 
left-of-assignment))
+nil))
+;; (phpinspect--log "Returning the thing %s" variable-assignments)
+;; (nreverse variable-assignments)))
 
 (defsubst phpinspect-drop-preceding-barewords (statement)
   (while (and statement (phpinspect-word-p (cadr statement)))
@@ -181,7 +186,7 @@
   (phpinspect--function-return-type method))
 
 (defun phpinspect-get-derived-statement-type-in-block
-(resolvecontext statement php-block type-resolver &optional 
function-arg-list)
+(resolvecontext statement php-block type-resolver &optional 
function-arg-list assignments)
   "Get type of RESOLVECONTEXT subject in PHP-BLOCK.
 
 Use TYPE-RESOLVER and FUNCTION-ARG-LIST in the process.
@@ -194,6 +199,8 @@ self::method();
 ClassName::method();
 $variable = ClassName::method();
 $variable = $variable->method();"
+(setq assignments (or assignments (nreverse 
(phpinspect--find-assignments-in-token php-block
+
 ;; A derived statement can be an assignment itself.
 (when (seq-find #'phpinspect-assignment-p statement)
   (phpinspect--log "Derived statement is an assignment: %s" statement)
@@ -221,11 +228,8 @@ $variable = $variable->method();"
;; No bare word, assume we're dealing with a 
variable.
(when (phpinspect-variable-p first-token)
  (phpinspect-get-variable-type-in-block
-  resolvecontext
-  (cadr first-token)
-  php-block
-  type-resolver
-  function-arg-list)
+  resolvecontext (cadr first-token) php-block
+  type-resolver function-arg-list assignments)
 
 (phpinspect--log "Statement: %s" statement)
 (phpinspect--log "Starting attribute type: %s" previous-attribute-type)
@@ -283,7 +287,7 @@ $variable = $variable->method();"
 ;; we may as well always return FQNs in stead of relative type names.
 
 (defun phpinspect-get-variable-type-in-block
-(resolvecontext variable-name php-block type-resolver &optional 
function-arg-list)
+(resolvecontext variable-name php-block type-resolver &optional 
function-arg-list assignments)
   "Find the type of VARIABLE-NAME in PHP-BLOCK using TYPE-RESOLVER.
 
 Returns either a FQN or a relative type name, depending on
@@ -292,15 +296,17 @@ 

[elpa] externals/phpinspect updated (3887bc58d4 -> 4ec4c40c9d)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/phpinspect.

  from  3887bc58d4 Implement indexation of readonly variables + allow 
invalid keywords
   new  5528aff2a2 Handle cases where the filepath of a type cannot be 
determined
   new  2520c89680 Account for tokens after @method annotation when indexing
   new  3fff772d8a Fix phpinspect-buffer-index-functions test
   new  d3f100388e Resolve property types using other methods when 
resolving from constructor fails
   new  f2f1ac9b84 Add property types and anonymous function argument types 
to used-types index
   new  6a175c9e44 Update a few doc strings in phpinspect-index.el
   new  8296641ba9 Implement removal of unused imports in 
`phpinspect-fix-imports'
   new  d141f8a6db Infer namespace token within import manipulation loop
   new  31c6e06934 Reparse buffer when fixing import (+ add comment 
explaining why)
   new  c20f010ee4 Introduce `phpinspect-buffer-fresh-p' and 
`phpinspect-buffer-reparse-if-not-fresh'
   new  f1dc699560 Detect types used with "instanceoff"
   new  b6eadfb799 Make autoload indexation more robust and prevent double 
indexation
   new  130e2c06c5 Index types used in arrays
   new  93b815d71a Index used traits (juste use of type, no actual 
functionality outside of that)
   new  2d93ec7f79 Fix infinite recursion bug in 
`phpinspect--get-pattern-type-in-block'
   new  3a0ce3ac2d Fix another infinite recursion bug
   new  2e064d52e1 Implement containing type inference for collection-like 
class properties
   new  4ec4c40c9d Add eldoc for sigil variables and allow display of 
multiple eldoc results


Summary of changes:
 phpinspect-autoload.el   | 117 --
 phpinspect-buffer.el |  47 ++---
 phpinspect-class.el  |   1 +
 phpinspect-eldoc.el  |  43 ++---
 phpinspect-imports.el|  84 ++--
 phpinspect-index.el  | 146 ++--
 phpinspect-meta.el   |   6 ++
 phpinspect-pipeline.el   |   2 +-
 phpinspect-project.el|   9 +-
 phpinspect-resolve.el| 224 +--
 phpinspect-resolvecontext.el |   6 +-
 phpinspect-type.el   |  24 +++--
 phpinspect-util.el   |  26 -
 test/phpinspect-test.el  |  73 +-
 test/test-buffer.el  |  83 +++-
 test/test-eldoc.el   |   9 +-
 test/test-index.el   |  17 +++-
 test/test-resolve.el |  64 +
 test/test-util.el|  28 ++
 19 files changed, 684 insertions(+), 325 deletions(-)
 create mode 100644 test/test-resolve.el



[elpa] externals/phpinspect 6a175c9e44 06/18: Update a few doc strings in phpinspect-index.el

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 6a175c9e44f52b4726398bfcc959ef6d1f80fdfb
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Update a few doc strings in phpinspect-index.el
---
 phpinspect-index.el | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/phpinspect-index.el b/phpinspect-index.el
index 417b7f38c9..913c2f616a 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -467,7 +467,7 @@ NAMESPACE will be assumed the root namespace if not 
provided"
 indexed))
 
 (defun phpinspect--index-functions-in-tokens (tokens type-resolver-factory 
&optional imports namespace add-used-types)
-  "TODO: implement function indexation. This is a stub function."
+  "Index functions in TOKENS."
   (let ((type-resolver (funcall type-resolver-factory imports nil namespace))
 comment-before functions)
 (dolist (token tokens)
@@ -496,9 +496,16 @@ NAMESPACE will be assumed the root namespace if not 
provided"
 
 
 (defun phpinspect--find-used-types-in-tokens (tokens)
-  "Find usage of the \"new\" keyword in TOKENS.
+  "Find usage of bareword types in TOKENS.
 
-Return value is a list of the types that are \"newed\"."
+Covers usage of types:
+- with the \"new\" keyword
+- as function argument/return types
+
+see `phpinspect--index-class' for indexation of types used in
+classes (like property typehints).
+
+Returns a list of type name strings."
   (let* ((previous-tokens)
  (used-types (cons nil nil))
  (used-types-rear used-types))



[elpa] externals/phpinspect f1dc699560 11/18: Detect types used with "instanceoff"

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit f1dc69956022977baa5b8bede66620e72a4dfcc7
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Detect types used with "instanceoff"
---
 phpinspect-index.el | 2 +-
 test/test-index.el  | 8 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/phpinspect-index.el b/phpinspect-index.el
index 913c2f616a..861e355716 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -513,7 +513,7 @@ Returns a list of type name strings."
   (let ((token (pop tokens))
 (previous-token (car previous-tokens)))
 (cond ((and (phpinspect-word-p previous-token)
-(string= "new" (cadr previous-token))
+(member (cadr previous-token) `("new" "instanceof"))
 (phpinspect-word-p token))
(let ((type (cadr token)))
  (when (not (string-match-p "" type))
diff --git a/test/test-index.el b/test/test-index.el
index 31635b950d..faf243eab2 100644
--- a/test/test-index.el
+++ b/test/test-index.el
@@ -96,7 +96,11 @@ public function makeThing(): Thing
 if ((new Monkey())->tree() === true) {
return new ExtendedThing();
 }
-return StaticThing::create(new ThingFactory())->makeThingnew 
Potato())->antiPotato(new OtherThing(function (InnerFunctionParam $param) 
{});
+return StaticThing::create(new ThingFactory())->makeThingnew 
Potato())->antiPotato(new OtherThing(function (InnerFunctionParam $param) {
+if ($param instanceof InstanceOffed) {
+// nothing
+}
+});
 }")))
  (used-types (alist-get 'used-types (car (alist-get 'classes 
result)
 (should (equal
@@ -105,7 +109,7 @@ return StaticThing::create(new 
ThingFactory())->makeThingnew Potato())->anti
   (copy-sequence
'("Cheese" "Bacon" "Ham" "Bagel" "Monkey" 
"ExtendedThing"
  "StaticThing" "Thing" "ThingFactory" "Potato" 
"OtherThing"
- "InnerFunctionParam" "PropertyType"))
+ "InnerFunctionParam" "PropertyType" "InstanceOffed"))
   #'string<))
  (sort used-types (lambda (s1 s2) (string< (phpinspect-name-string 
s1) (phpinspect-name-string s2
 



[elpa] externals/phpinspect 5528aff2a2 01/18: Handle cases where the filepath of a type cannot be determined

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 5528aff2a21f71eac37c5c378e8e5be0accab872
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Handle cases where the filepath of a type cannot be determined
---
 phpinspect-autoload.el | 5 +
 phpinspect-project.el  | 9 +++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/phpinspect-autoload.el b/phpinspect-autoload.el
index 95043bf7d1..d556c9c395 100644
--- a/phpinspect-autoload.el
+++ b/phpinspect-autoload.el
@@ -114,6 +114,11 @@ bareword typenames."))
(string-remove-prefix ,dir ,filename
 
 (defun phpinspect-find-composer-json-files (fs project-root)
+  "Find all composer.json files that are relevant for a project.
+
+Usually, the relevant files are the current project's
+composer.json and the composer.json files of all dependencies in
+the vendor directory."
   (let ((cj-path (concat project-root "/composer.json"))
 (vendor-dir (concat project-root "/vendor"))
 files)
diff --git a/phpinspect-project.el b/phpinspect-project.el
index f3cae30dec..d30b078a15 100644
--- a/phpinspect-project.el
+++ b/phpinspect-project.el
@@ -126,6 +126,10 @@ serious performance hits. Enable at your own risk (:")
 (dolist (func (alist-get 'functions (cdr index)))
   (phpinspect-project-set-function project func
 
+(cl-defmethod phpinspect-project-add-index ((_project phpinspect-project) 
index)
+  (cl-assert (not index))
+  (phpinspect--log "phpinspect-project-add-index: ignoring added nil index"))
+
 (cl-defmethod phpinspect-project-set-function
   ((project phpinspect-project) (func phpinspect--function))
   (phpinspect-project-edit project
@@ -305,10 +309,11 @@ before the search is executed."
   (condition-case error
   (let* ((file (phpinspect-project-get-type-filepath project type))
  (visited-buffer (when file (find-buffer-visiting file
-(when file
+(if file
   (if visited-buffer
   (with-current-buffer visited-buffer 
(phpinspect-index-current-buffer))
-(with-temp-buffer (phpinspect-project-index-file project file)
+(with-temp-buffer (phpinspect-project-index-file project file)))
+  (phpinspect--log "Failed to determine filepath for type %s" 
(phpinspect--type-name type
 (file-missing
  (phpinspect--log "Failed to find file for type %s:  %s" type error)
  nil)))



[elpa] externals/phpinspect b6eadfb799 12/18: Make autoload indexation more robust and prevent double indexation

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit b6eadfb79970350b5ebc5441207931ad2247539a
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Make autoload indexation more robust and prevent double indexation

Prevent the project directory from being indexed multiple times (because of
directory-files-recursively also returning "." and "..".
---
 phpinspect-autoload.el | 112 ++---
 phpinspect-pipeline.el |   2 +-
 2 files changed, 60 insertions(+), 54 deletions(-)

diff --git a/phpinspect-autoload.el b/phpinspect-autoload.el
index d556c9c395..1481c8705c 100644
--- a/phpinspect-autoload.el
+++ b/phpinspect-autoload.el
@@ -127,7 +127,9 @@ the vendor directory."
 
 (when (phpinspect-fs-file-directory-p fs vendor-dir)
   (dolist (author-dir (phpinspect-fs-directory-files fs vendor-dir))
-(when (phpinspect-fs-file-directory-p fs author-dir)
+(when (and (phpinspect-fs-file-directory-p fs author-dir)
+   ;; Exclude current/parent directory
+   (not (member (file-name-base author-dir) (list ".." "."
   (dolist (dependency-dir (phpinspect-fs-directory-files fs 
author-dir))
 (setq cj-path (concat dependency-dir "/composer.json"))
 (when (and (phpinspect-fs-file-directory-p fs dependency-dir)
@@ -169,9 +171,13 @@ the vendor directory."
 
 (cl-defmethod phpinspect-al-strategy-execute ((strat phpinspect-files))
   (phpinspect--log "indexing files list: %s" (phpinspect-files-list strat))
-  (let* ((indexer (phpinspect-autoloader-file-indexer 
(phpinspect-files-autoloader strat
+  (let* ((indexer (phpinspect-autoloader-file-indexer 
(phpinspect-files-autoloader strat)))
+ (wrapped-indexer (lambda (file)
+(condition-case-unless-debug err
+(funcall indexer file)
+  (t (phpinspect--log "Error indexing file %s: %s" 
file err))
 (phpinspect-pipeline (phpinspect-files-list strat)
-  :into (funcall :with-context indexer
+  :into (funcall :with-context wrapped-indexer
 
 (cl-defmethod phpinspect-autoloader-put-type-bag ((al phpinspect-autoloader) 
(type-fqn (head phpinspect-name)))
   (let* ((type-name (phpinspect-intern-name
@@ -189,62 +195,62 @@ the vendor directory."
   ((al phpinspect-autoloader) file)
   (let* ((fs (phpinspect-autoloader-fs  al))
  (project-root (file-name-directory (cdr file)))
- json autoload batch)
-
+ json batch)
 
 (condition-case err
 (setq json (phpinspect--read-json-file fs (cdr file)))
   (t (phpinspect-message "Error parsing composer json at %s : %s " (cdr 
file) err)))
 
 (when json
-  (setq autoload (gethash "autoload" json))
-
-  (when (hash-table-p autoload)
-(maphash
- (lambda (type prefixes)
-   (let ((strategy))
- (pcase type
-   ("psr-0"
-(maphash
- (lambda (prefix directory-paths)
-   (when (stringp directory-paths)
- (setq directory-paths (list directory-paths)))
-   (setq strategy (phpinspect-make-psr0-generated
-   :autoloader al
-   :fs fs
-   :prefix prefix
-   :own (eq 'local (car file
-   (dolist (path directory-paths)
- (push (file-name-concat project-root path)
-   (phpinspect-psr0-directories strategy)))
-   (push strategy batch))
- prefixes))
-   ("psr-4"
-(maphash
- (lambda (prefix directory-paths)
-   (when (stringp directory-paths)
- (setq directory-paths (list directory-paths)))
-   (setq strategy (phpinspect-make-psr4-generated
-   :fs fs
-   :autoloader al
-   :prefix prefix
-   :own (eq 'local (car file
-   (dolist (path directory-paths)
- (push (file-name-concat project-root path)
-   (phpinspect-psr4-directories strategy)))
-   (push strategy batch))
- prefixes))
-   ("files"
-(setq strategy
-  (phpinspect-make-files
-   :list (mapcar
-  (lambda (file) (file-name-concat project-root 
file))
-  prefixes)
-   :autoloader al))
-(push strategy batch))
-   (_ (phpinspect--log "Unsupported autoload strategy \"%s\" 
encountered" type)
- autoload)
-(phpinspect-pipeline-emit-all batch)
+  (dolist (autoload (lis

[elpa] externals/phpinspect d141f8a6db 08/18: Infer namespace token within import manipulation loop

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit d141f8a6db96e7a72c049970f8fccea5bee979b8
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Infer namespace token within import manipulation loop
---
 phpinspect-imports.el | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/phpinspect-imports.el b/phpinspect-imports.el
index ec5fd7658f..f2329abd61 100644
--- a/phpinspect-imports.el
+++ b/phpinspect-imports.el
@@ -131,8 +131,10 @@ NAMESPACE-META itself is returned without alterations."
   (phpinspect--type= import-type (phpinspect-use-name-to-type (cadadr 
token)))
 
 (defun phpinspect-remove-unneeded-use-statements (types buffer imports 
parent-token)
-  (let ((namespace (phpinspect-meta-find-parent-matching-token parent-token 
#'phpinspect-namespace-p)))
-(dolist (import imports)
+  (dolist (import imports)
+;; Namespace must be inferred within the loop, see comments in
+;; `phpinspect-add-use-statements-for-missing-types' for context.
+(let ((namespace (phpinspect-meta-find-parent-matching-token parent-token 
#'phpinspect-namespace-p)))
   (unless (member (car import) types)
 (when-let ((use-meta (phpinspect-find-use-statement-for-import 
namespace (cdr import
   (let ((start-point (phpinspect-meta-start use-meta))
@@ -155,12 +157,16 @@ Uses PROJECT's autoloader to determine available types 
for import.
 
 PARENT-TOKEN must be a `token-meta' object and is used to
 determine the scope of the imports (global or local namespace)."
-  (let* ((namespace (phpinspect-meta-find-parent-matching-token
+  (dolist (type types)
+;; Namespace token must be inferred within the loop, as the ancestors of
+;; PARENT-TOKEN may change after a buffer reparse (which happens after each
+;; insert)
+(let* ((namespace (phpinspect-meta-find-parent-matching-token
parent-token #'phpinspect-namespace-p))
- (namespace-name (if namespace
+   (namespace-name (if namespace
(phpinspect-namespace-name 
(phpinspect-meta-token namespace))
  "")))
-(dolist (type types)
+
   ;; Add use statements for types that aren't imported or already 
referenced
   ;; with a fully qualified name.
   (unless (or (or (alist-get type imports))
@@ -169,8 +175,9 @@ determine the scope of the imports (global or local 
namespace)."
  nil namespace-name (phpinspect-name-string type)))
(phpinspect-autoloader-types
 (phpinspect-project-autoload project
-(phpinspect-add-use-interactive type buffer project namespace)
-(phpinspect-buffer-parse buffer 'no-interrupt)
+(unless (member (phpinspect-name-string type) 
phpinspect-native-typenames)
+  (phpinspect-add-use-interactive type buffer project namespace)
+  (phpinspect-buffer-parse buffer 'no-interrupt))
 
 (defun phpinspect-fix-imports ()
   "Find types that are used in the current buffer and make sure



[elpa] externals/phpinspect 4ec4c40c9d 18/18: Add eldoc for sigil variables and allow display of multiple eldoc results

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 4ec4c40c9df59ce395fa3796e12799b6f7abc32f
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Add eldoc for sigil variables and allow display of multiple eldoc results

By allowing multiple eldoc results, displaying variable information doesn't
interfere with function parameter hints.
---
 phpinspect-eldoc.el  | 43 ++-
 phpinspect-index.el  |  7 ---
 phpinspect-resolvecontext.el |  3 ++-
 phpinspect-type.el   |  9 +
 test/test-eldoc.el   |  9 +
 5 files changed, 50 insertions(+), 21 deletions(-)

diff --git a/phpinspect-eldoc.el b/phpinspect-eldoc.el
index 613c1c4df0..1a24485767 100644
--- a/phpinspect-eldoc.el
+++ b/phpinspect-eldoc.el
@@ -53,6 +53,22 @@ and CONTEXT. All strategies must implement this method.")
   "Should return a string to be displayed by eldoc. This needs to
 be implemented for return values of `phpinspect-eld-strategy-execute'")
 
+(cl-defstruct (phpinspect-eld-sigil (:constructor phpinspect-make-eld-sigil))
+  "Eldoc strategy for sigil ($) variables.")
+
+(cl-defmethod phpinspect-eld-strategy-supports
+  ((_strat phpinspect-eld-sigil) (_q phpinspect-eldoc-query) (rctx 
phpinspect--resolvecontext))
+  (phpinspect-variable-p (car (last (phpinspect--resolvecontext-subject 
rctx)
+
+(cl-defmethod phpinspect-eld-strategy-execute
+  ((_strat phpinspect-eld-sigil) (_q phpinspect-eldoc-query) (rctx 
phpinspect--resolvecontext))
+  (when-let ((type (phpinspect-resolve-type-from-context rctx))
+ (variable (car (last (phpinspect--resolvecontext-subject rctx)
+(when (and (phpinspect-variable-p variable) (cadr variable))
+  (phpinspect--make-variable :name (cadr variable)
+ :scope '(:public)
+ :type type
+
 (cl-defstruct (phpinspect-eld-attribute (:constructor 
phpinspect-make-eld-attribute))
   "Eldoc strategy for object attributes.")
 
@@ -120,25 +136,23 @@ be implemented for return values of 
`phpinspect-eld-strategy-execute'")
  (left-sibling )
  (statement )
  match-result static arg-list arg-pos)
-
 (cond
  ;; Subject is a statement
  ((and (phpinspect-list-p (car (last (phpinspect--resolvecontext-subject 
rctx
enclosing-token)
-
   (setq left-sibling (phpinspect-meta-find-child-before-recursively
   enclosing-token (phpinspect-eldoc-query-point q
 ;; Subject is inside an argument list
  ((and enclosing-token
-(phpinspect-list-p (phpinspect-meta-token enclosing-token)))
+   (phpinspect-list-p (phpinspect-meta-token enclosing-token)))
   (setq left-sibling (phpinspect-meta-find-left-sibling enclosing-token)
 statement (list enclosing-token
 
 (phpinspect--log "Left sibling: %s" (phpinspect-meta-string left-sibling))
 (phpinspect--log "Enclosing parent: %s" (phpinspect-meta-string 
(phpinspect-meta-parent enclosing-token)))
 
-
 (while (and left-sibling
+(not (phpinspect-variable-p (phpinspect-meta-token (car 
statement
 (not (phpinspect-statement-introduction-p 
(phpinspect-meta-token left-sibling
   (unless (phpinspect-comment-p (phpinspect-meta-token left-sibling))
 (push left-sibling statement))
@@ -212,7 +226,7 @@ be implemented for return values of 
`phpinspect-eld-strategy-execute'")
'face 'font-lock-variable-name-face)
phpinspect-eldoc-word-width)
   ": "
-  (propertize (phpinspect--format-type-name (phpinspect--variable-type 
var))
+  (propertize (phpinspect--display-format-type-name 
(phpinspect--variable-type var))
   'face 'font-lock-type-face)))
 
 (cl-defstruct (phpinspect-function-doc (:constructor 
phpinspect-make-function-doc))
@@ -232,7 +246,7 @@ be implemented for return values of 
`phpinspect-eld-strategy-execute'")
(concat "$" (truncate-string-to-width
 (car arg) phpinspect-eldoc-word-width)
(if (cadr arg) " " "")
-   (phpinspect--format-type-name (or (cadr arg) 
"")
+   (phpinspect--display-format-type-name (or (cadr 
arg) "")
   (when (and arg-pos (= arg-count arg-pos))
 (setq doc-string
   (propertize
@@ -243,11 +257,12 @@ be implemented for return values of 
`phpinspect-eld-strategy-execute'")
   ", ")
  "): "
  (propertize
-  (phpinspect--format-type-name (phpinspect--function-return-type 
fn))
+  (phpinspect--display-format-type-name 
(phpinspect--function-return-type fn))
   'face 'font-lock-type-face
 
 (defvar phpinspect-eldoc-strategies (list (phpinspect-make-eld-attri

[elpa] externals/csv-mode 849ce3e754: csv-mode.el: More cosmetic changes

2024-08-16 Thread Stefan Monnier via
branch: externals/csv-mode
commit 849ce3e754f291c3643bc36ed802226606955c3f
Author: Stefan Monnier 
Commit: Stefan Monnier 

csv-mode.el: More cosmetic changes

* csv-mode.el: Use `setq-local` and `defvar-local`.
(csv-interactive-args): Improve docstring markup.  Use `csv--field-index`.
---
 csv-mode.el | 47 ---
 1 file changed, 20 insertions(+), 27 deletions(-)

diff --git a/csv-mode.el b/csv-mode.el
index 3dc6ddd9d5..829de07703 100644
--- a/csv-mode.el
+++ b/csv-mode.el
@@ -254,15 +254,13 @@ FIELD-QUOTES should be a list of single-character 
strings."
   (symbol-value 'csv-mode-syntax-table)))
field-quotes))
 
-(defvar csv-comment-start nil
+(defvar-local csv-comment-start nil
   "String that starts a comment line, or nil if no comment syntax.
 Such comment lines are ignored by CSV mode commands.
 This variable is buffer local; its default value is that of
 `csv-comment-start-default'.  It is set by the function
 `csv-set-comment-start' -- do not set it directly!")
 
-(make-variable-buffer-local 'csv-comment-start)
-
 (defcustom csv-comment-start-default "#"
   "String that starts a comment line, or nil if no comment syntax.
 Such comment lines are ignored by CSV mode commands.
@@ -372,19 +370,19 @@ CSV mode provides the following specific keyboard key 
bindings:
   ;; Set syntax for field quotes:
   (csv-set-quote-syntax csv-field-quotes)
   ;; Make sexp functions apply to fields:
-  (set (make-local-variable 'forward-sexp-function) #'csv-forward-field)
+  (setq-local forward-sexp-function #'csv-forward-field)
   (csv-set-comment-start csv-comment-start)
   ;; Font locking -- separator plus syntactic:
   (setq font-lock-defaults '(csv-font-lock-keywords))
   (setq-local jit-lock-contextually nil) ;Each line should be independent.
   (if csv-invisibility-default (add-to-invisibility-spec 'csv))
   ;; Mode line to support `csv-field-index-mode':
-  (set (make-local-variable 'mode-line-position)
-   (pcase mode-line-position
- (`(,(or (pred consp) (pred stringp)) . ,_)
-  `(,@mode-line-position ,csv-mode-line-format))
- (_ `("" ,mode-line-position ,csv-mode-line-format
-  (set (make-local-variable 'truncate-lines) t)
+  (setq-local mode-line-position
+  (pcase mode-line-position
+(`(,(or (pred consp) (pred stringp)) . ,_)
+ `(,@mode-line-position ,csv-mode-line-format))
+(_ `("" ,mode-line-position ,csv-mode-line-format
+  (setq-local truncate-lines t)
   ;; Enable or disable `csv-field-index-mode' (could probably do this
   ;; a bit more efficiently):
   (csv-field-index-mode (symbol-value 'csv-field-index-mode)))
@@ -396,8 +394,8 @@ It must be either a string or nil."
(list (edit-and-eval-command
  "Comment start (string or nil): " csv-comment-start)))
   ;; Paragraph means a group of contiguous records:
-  (set (make-local-variable 'paragraph-separate) "[[:space:]]*$") ; White 
space.
-  (set (make-local-variable 'paragraph-start) "\n");Must include \n explicitly!
+  (setq-local paragraph-separate "[[:space:]]*$") ; White space.
+  (setq-local paragraph-start "\n");Must include \n explicitly!
   ;; Remove old comment-start/end if available
   (with-syntax-table text-mode-syntax-table
 (when comment-start
@@ -410,7 +408,7 @@ It must be either a string or nil."
   (when string
 (setq paragraph-separate (concat paragraph-separate "\\|" string)
  paragraph-start (concat paragraph-start "\\|" string))
-(set (make-local-variable 'comment-start) string)
+(setq-local comment-start string)
 (modify-syntax-entry
  (string-to-char string) "<" csv-mode-syntax-table)
 (modify-syntax-entry ?\n ">" csv-mode-syntax-table))
@@ -536,11 +534,11 @@ Assumes point is at beginning of line."
 (defun csv-interactive-args (&optional type)
   "Get arg or field(s) and region interactively, offering sensible defaults.
 Signal an error if the buffer is read-only.
-If TYPE is noarg then return a list (beg end).
-Otherwise, return a list (arg beg end), where arg is:
+If TYPE is `noarg' then return a list (beg end).
+Otherwise, return a list (ARG BEG END), where ARG is:
   the raw prefix argument by default;
-  a single field index if TYPE is single;
-  a list of field indices or index ranges if TYPE is multiple.
+  a single field index if TYPE is `single';
+  a list of field indices or index ranges if TYPE is `multiple'.
 Field defaults to the current prefix arg; if not set, prompt user.
 
 A field index list consists of positive or negative integers or ranges,
@@ -557,12 +555,9 @@ The default field when read interactively is the current 
field."
  (if (not (use-region-p))
  ;; Set region automatically:
  (save-excursion
-(if arg
-(beginning-of-line)
-  (let ((lbp (line-beginning-position)))
-(while (re-search-backwar

[elpa] elpa-admin 722a92ae25 3/4: Merge make-atom-feed, add batch-make-atom-feed

2024-08-16 Thread Stefan Monnier via
branch: elpa-admin
commit 722a92ae25398a85e9ce4bea2610413b51417d2f
Author: Stefan Monnier 
Commit: Stefan Monnier 

Merge make-atom-feed, add batch-make-atom-feed
---
 elpa-admin.el | 108 +-
 1 file changed, 62 insertions(+), 46 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 8f022351c2..84d02b6f5d 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1877,34 +1877,6 @@ arbitrary code."
  ))
   (insert "\n"
 
-(defun elpaa--make-atom-feed (pkg pkg-spec srcdir files)
-  (let* ((name (symbol-name (car pkg)))
- (metadata (elpaa--metadata srcdir pkg-spec))
- (filename (concat name ".xml"))
- (desc (nth 2 metadata)))
-(with-temp-buffer
-  (elpaa--render-atom
-   (format "Update feed for %s" name)
-   filename
-   (mapcan
-(lambda (file)
-  (let ((version (car file)))
-`(( :title ,(format "%s ELPA: Release of \"%s\", Version %s"
-elpaa--name name version)
-:time ,(file-attribute-modification-time
-(file-attributes (cdr file)))
-:path ,(format "%s.xml#v%s" name version)
-:content
-((p nil
-,(concat "Version " version " of package ")
-(a ((href . ,(elpaa--default-url name))) ,name)
-,(concat " has just been released in " elpaa--name " 
ELPA."))
- (p nil "You can now find it in " (kbd nil "M-x list-packages 
RET") ".")
- (p nil ,(concat name " describes itself as:"))
- (blockquote nil ,desc))
-files))
-  (write-region (point-min) (point-max) filename
-
 (defun elpaa--html-make-pkg (pkg pkg-spec files srcdir plain-readme)
   (let* ((name (symbol-name (car pkg)))
  (latest (package-version-join (aref (cdr pkg) 0)))
@@ -3212,18 +3184,24 @@ relative to elpa root."
 (concat "tag:" domain "," (format-time-string "%F" time)
 ":" specific)))
 
-(defun elpaa--render-atom (title filename articles)
-  "Insert an Atom feed at point.
-TITLE sets the title of the feed, FILENAME is where the Atom feed will be
-stored.  ARTICLES is a list of plists, consisting of the keys
-`:title' for an article title, `:time' a timestamp in in
-`current-time'-format, `:path' is a relative HTTP path to
-the article."
-  (cl-flet ((newer-p (a1 a2)
-  (time-less-p (plist-get a1 :time) (plist-get a2 :time
-;; FIXME: Why do we need to split elpaa--url into a domain and a path?
-(let* ((articles (sort articles #'newer-p))
-   (self (concat elpaa--url filename)))
+(defun elpaa--make-atom-feed (pkg pkg-spec srcdir files)
+  (let* ((name (symbol-name (car pkg)))
+ (metadata (elpaa--metadata srcdir pkg-spec))
+ (filename (concat name ".xml"))
+ (desc (nth 2 metadata))
+ ;; RFC4287 says "This specification assigns no significance
+ ;; to the order of atom:entry elements within the feed", but we
+ ;; sort them from oldest to newest.
+ (sorted (sort (mapcar
+(lambda (file)
+  (cons (file-attribute-modification-time
+ (file-attributes (cdr file)))
+file))
+files)
+   (lambda (a1 a2) (time-less-p (car a1) (car a2)
+ (title (format "Update feed for %s" name))
+ (self (concat elpaa--url filename)))
+(with-temp-buffer
   (insert "\n")
   (xml-print
;; See https://validator.w3.org/feed/docs/rfc4287.html
@@ -3234,12 +3212,24 @@ the article."
   (id nil ,self)
   (updated nil ,(elpaa--rfc3339 (current-time)))
   ,@(mapcar
- (pcase-lambda ((map (:title title) (:time time)
- (:path path) (:content content)))
-   (let ((self (concat elpaa--url path)))
+ (pcase-lambda (`(,time ,version . ,_file))
+   (let ((self (concat elpaa--url
+   (format "%s.xml#v%s" name version)))
+ (content
+  `((p nil
+   ,(concat "Version " version " of package ")
+   (a ((href . ,(elpaa--default-url name))) ,name)
+   ,(concat " has just been released in " elpaa--name
+" ELPA."))
+(p nil "You can now find it in "
+   (kbd nil "M-x list-packages RET") ".")
+(p nil ,(concat name " describes itself as:"))
+(blockquote nil ,desc
  `(entry
nil
-   (title nil ,title)
+   (title nil
+  ,(format "%s ELPA: Release of \"%s\", Version

[elpa] elpa-admin 9bd65395f1 4/4: elpa-admin.el (elpaa--wsl-read): Filter out status 400 and entries with a "/"

2024-08-16 Thread Stefan Monnier via
branch: elpa-admin
commit 9bd65395f1d4875915731ddbdd73a471f10d7794
Author: Stefan Monnier 
Commit: Stefan Monnier 

elpa-admin.el (elpaa--wsl-read): Filter out status 400 and entries with a 
"/"
---
 elpa-admin.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 84d02b6f5d..34afd895c2 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -2060,7 +2060,7 @@ arbitrary code."
   (message "Unrecognized timestamp: %s" timestr)
   timestr))
(time (encode-time (parse-time-string timestr
-  (when (and file (not (member status '("404"
+  (when (and file (not (member status '("404" "400"
 (let ((pkg (if (string-match
 (rx bos "/"
 (or "packages" "devel" "nongnu" "nongnu-devel")
@@ -2079,7 +2079,11 @@ arbitrary code."
 (or "tar" "txt" "el" "html"))
 file)
(match-string 1 file
-  (funcall fn time pkg file line)
+  ;; It would make sense to include accesses to "doc/" in
+  ;; the counts, except that  is not always the name of the
+  ;; corresponding package.
+  (when (and pkg (not (string-match-p "/" pkg)))
+(funcall fn time pkg file line))
   (forward-line 1
 
 (defun elpaa--wsl-one-file (logfile stats)



[elpa] elpa-admin updated (584bb472c8 -> 9bd65395f1)

2024-08-16 Thread Stefan Monnier via
monnier pushed a change to branch elpa-admin.

  from  584bb472c8 Merge remote-tracking branch 
'refs/remotes/origin/elpa-admin' into elpa-admin
   new  ba613c0dc2 (elpaa--make-atom-feed): Avoid parsing the `elpaa--url`
   new  2c6eeec610 * elpa-admin.el (elpaa--render-atom): Fix timestamp
   new  722a92ae25 Merge make-atom-feed, add batch-make-atom-feed
   new  9bd65395f1 elpa-admin.el (elpaa--wsl-read): Filter out status 400 
and entries with a "/"


Summary of changes:
 elpa-admin.el | 163 --
 1 file changed, 91 insertions(+), 72 deletions(-)



[elpa] elpa-admin ba613c0dc2 1/4: (elpaa--make-atom-feed): Avoid parsing the `elpaa--url`

2024-08-16 Thread Stefan Monnier via
branch: elpa-admin
commit ba613c0dc2af1e4363da873627aa94bf09b5eaf3
Author: Stefan Monnier 
Commit: Stefan Monnier 

(elpaa--make-atom-feed): Avoid parsing the `elpaa--url`

* elpa-admin.el (elpaa--make-atom-feed): Don't split the URL into
domain+path any more.  Use names relative to the current dir instead.
(elpaa--rfc4151): New function.
(elpaa--render-atom): Use it.
---
 elpa-admin.el | 67 +--
 1 file changed, 33 insertions(+), 34 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index cb0810c38f..450478f212 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1879,15 +1879,13 @@ arbitrary code."
 
 (defun elpaa--make-atom-feed (pkg pkg-spec srcdir files)
   (let* ((name (symbol-name (car pkg)))
- (path (if (string-match "\\`https?://[^/]+/\\(.*\\)" elpaa--url)
-   (match-string 1 elpaa--url)
- (error "Failed to infer path from %S" elpaa--url)))
  (metadata (elpaa--metadata srcdir pkg-spec))
+ (filename (concat name ".xml"))
  (desc (nth 2 metadata)))
 (with-temp-buffer
   (elpaa--render-atom
(format "Update feed for %s" name)
-   (concat "/" path  name ".xml")
+   filename
(mapcan
 (lambda (file)
   (let ((version (car file)))
@@ -1895,7 +1893,7 @@ arbitrary code."
 elpaa--name name version)
 :time ,(file-attribute-modification-time
 (file-attributes (cdr file)))
-:path ,(format "%s%s.xml#v%s" path name version)
+:path ,(format "%s.xml#v%s" name version)
 :content
 ((p nil
 ,(concat "Version " version " of package ")
@@ -1905,7 +1903,7 @@ arbitrary code."
  (p nil ,(concat name " describes itself as:"))
  (blockquote nil ,desc))
 files))
-  (write-region (point-min) (point-max) (concat name ".xml")
+  (write-region (point-min) (point-max) filename
 
 (defun elpaa--html-make-pkg (pkg pkg-spec files srcdir plain-readme)
   (let* ((name (symbol-name (car pkg)))
@@ -3206,22 +3204,26 @@ relative to elpa root."
 (defun elpaa--rfc3339 (time)
   (format-time-string "%Y-%m-%dT%H:%M:%SZ" time))
 
-(defun elpaa--render-atom (title path articles)
+(defun elpaa--rfc4151 (url time)
+  (unless (string-match "\\`\\(?:[^:/]*:\\)?/*\\([^/]+\\)/?" url)
+(error "Can't find the \"domain\" of this URL: %S" url))
+  (let ((domain (match-string 1 url))
+(specific (substring url (match-end 0
+(concat "tag:" domain "," (format-time-string "%F" time)
+":" specific)))
+
+(defun elpaa--render-atom (title filename articles)
   "Insert an Atom feed at point.
-TITLE sets the title of the feed, PATH is the request path
-relative to the server route of where the Atom feed will be
-hosted.  ARTICLES is a list of plists, consisting of the keys
+TITLE sets the title of the feed, FILENAME is where the Atom feed will be
+stored.  ARTICLES is a list of plists, consisting of the keys
 `:title' for an article title, `:time' a timestamp in in
-`current-time'-format, `:path' is a root-relative HTTP path to
+`current-time'-format, `:path' is a relative HTTP path to
 the article."
   (cl-flet ((newer-p (a1 a2)
   (time-less-p (plist-get a1 :time) (plist-get a2 :time
 ;; FIXME: Why do we need to split elpaa--url into a domain and a path?
 (let* ((articles (sort articles #'newer-p))
-   (domain (if (string-match "\\`https?://\\([^/]+/\\)" elpaa--url)
-   (match-string 1 elpaa--url)
- (error "Failed to infer domain from %S" elpaa--url)))
-   (self (concat "https://"; domain path)))
+   (self (concat elpaa--url filename)))
   (insert "\n")
   (xml-print
;; See https://validator.w3.org/feed/docs/rfc4287.html
@@ -3234,25 +3236,22 @@ the article."
   ,@(mapcar
  (pcase-lambda ((map (:title title) (:time time)
  (:path path) (:content content)))
-   `(entry
- nil
- (title nil ,title)
- (updated nil ,(elpaa--rfc3339 time))
- (author
-  nil
-  (name nil "elpa-admin")
-  (email nil "emacs-de...@gnu.org"))
- (id nil ,(format "tag:%s,%s:%s"
-  domain
-  (format-time-string "%F" time)
-  path))
- (link ((href . ,(concat "https://"; domain path))
-(rel . "self")))
- (content
-  ((type . "html"))
-  ,(with-temp-buffer
- (xml-print content)
- (buffer-string)
+   (let ((self (concat elpaa--url path)))
+ 

[elpa] elpa-admin 2c6eeec610 2/4: * elpa-admin.el (elpaa--render-atom): Fix timestamp

2024-08-16 Thread Stefan Monnier via
branch: elpa-admin
commit 2c6eeec610557b18db6591f8557dcf62b3b68b48
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-admin.el (elpaa--render-atom): Fix timestamp

We ended up using the time/date of the oldest file.  Rather than
change it to the date of the newest file, just use the current time.
---
 elpa-admin.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 450478f212..8f022351c2 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -3232,7 +3232,7 @@ the article."
   (title nil ,title)
   (link ((href . ,self) (rel . "self")))
   (id nil ,self)
-  (updated nil ,(elpaa--rfc3339 (plist-get :time (car articles
+  (updated nil ,(elpaa--rfc3339 (current-time)))
   ,@(mapcar
  (pcase-lambda ((map (:title title) (:time time)
  (:path path) (:content content)))



[elpa] externals/phpinspect 2052c289e1 1/3: Use `phpinspect--display-format-type-name' as standardized propertized string

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 2052c289e1cf97137b41e839042f0ec96ded2efe
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Use `phpinspect--display-format-type-name' as standardized propertized 
string

- Move `propertize' calls into `phpinspect--display-format-type-name'
- Use for completion as well as eldoc hints
---
 phpinspect-completion.el | 6 +++---
 phpinspect-eldoc.el  | 7 ++-
 phpinspect-type.el   | 8 +---
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/phpinspect-completion.el b/phpinspect-completion.el
index 45d610be3c..69d1c23d83 100644
--- a/phpinspect-completion.el
+++ b/phpinspect-completion.el
@@ -255,7 +255,7 @@ Returns list of `phpinspect--completion'."
 (phpinspect--function-arguments 
completion-candidate)
 ", ")
  ") "
- (phpinspect--format-type-name 
(phpinspect--function-return-type completion-candidate)))
+ (phpinspect--display-format-type-name 
(phpinspect--function-return-type completion-candidate)))
:annotation (concat " "
(phpinspect--type-bare-name
 (phpinspect--function-return-type 
completion-candidate)))
@@ -266,7 +266,7 @@ Returns list of `phpinspect--completion'."
   ((completion-candidate phpinspect--variable))
   (phpinspect--construct-completion
:value (phpinspect--variable-name completion-candidate)
-   :meta (phpinspect--format-type-name
+   :meta (phpinspect--display-format-type-name
   (or (phpinspect--variable-type completion-candidate)
   phpinspect--null-type))
:target completion-candidate
@@ -300,7 +300,7 @@ Returns list of `phpinspect--completion'."
  (dolist (comp completions)
(setq completion 
(phpinspect--completion-list-get-metadata comp-list comp))
(push (list comp (phpinspect--prefix-for-completion 
completion)
-   (phpinspect--completion-meta completion))
+   (concat " " (phpinspect--completion-meta 
completion)))
  affixated))
  (nreverse affixated)))
  :exit-function
diff --git a/phpinspect-eldoc.el b/phpinspect-eldoc.el
index 1a24485767..8208114066 100644
--- a/phpinspect-eldoc.el
+++ b/phpinspect-eldoc.el
@@ -226,8 +226,7 @@ be implemented for return values of 
`phpinspect-eld-strategy-execute'")
'face 'font-lock-variable-name-face)
phpinspect-eldoc-word-width)
   ": "
-  (propertize (phpinspect--display-format-type-name 
(phpinspect--variable-type var))
-  'face 'font-lock-type-face)))
+  (phpinspect--display-format-type-name (phpinspect--variable-type 
var
 
 (cl-defstruct (phpinspect-function-doc (:constructor 
phpinspect-make-function-doc))
   (fn nil
@@ -256,9 +255,7 @@ be implemented for return values of 
`phpinspect-eld-strategy-execute'")
   (phpinspect--function-arguments fn)
   ", ")
  "): "
- (propertize
-  (phpinspect--display-format-type-name 
(phpinspect--function-return-type fn))
-  'face 'font-lock-type-face
+  (phpinspect--display-format-type-name 
(phpinspect--function-return-type fn)
 
 (defvar phpinspect-eldoc-strategies (list (phpinspect-make-eld-attribute)
   (phpinspect-make-eld-function-args)
diff --git a/phpinspect-type.el b/phpinspect-type.el
index dc55ae143e..3f716371bd 100644
--- a/phpinspect-type.el
+++ b/phpinspect-type.el
@@ -216,13 +216,15 @@ NAMESPACE may be nil, or a string with a namespace FQN."
   (phpinspect--format-type-name (phpinspect--type-name type)))
 
 (cl-defmethod phpinspect--display-format-type-name ((name string))
-  (phpinspect--format-type-name name))
+  (propertize (phpinspect--format-type-name name) 'face 'font-lock-type-face))
 
 (cl-defmethod phpinspect--display-format-type-name ((type phpinspect--type))
   (let ((self (phpinspect--format-type-name type)))
-(if (phpinspect--type-contains type)
+(propertize
+ (if (phpinspect--type-contains type)
 (concat self "<" (phpinspect--format-type-name 
(phpinspect--type-contains type)) ">")
-  self)))
+   self)
+ 'face 'font-lock-type-face)))
 
 (cl-defstruct (phpinspect--function (:constructor 
phpinspect--make-function-generated)
 (:copier phpinspect--copy-function))



[elpa] externals/phpinspect e04ab0c118 3/3: Resolve types of suggested variable completions

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit e04ab0c11852fa095db1183c404376241482f657
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Resolve types of suggested variable completions
---
 phpinspect-resolve.el|  8 
 phpinspect-resolvecontext.el | 17 +
 phpinspect-suggest.el| 34 +-
 3 files changed, 46 insertions(+), 13 deletions(-)

diff --git a/phpinspect-resolve.el b/phpinspect-resolve.el
index 04a9cb558f..f50f208443 100644
--- a/phpinspect-resolve.el
+++ b/phpinspect-resolve.el
@@ -73,6 +73,7 @@
 (blocks-or-lists)
 (statements (phpinspect--split-statements token)))
 (dolist (statement statements)
+  (phpinspect--log "Finding assignment in statement '%s'" statement)
   (when (seq-find #'phpinspect-maybe-assignment-p statement)
 (phpinspect--log "Found assignment statement")
 (push (phpinspect--make-assignment-context
@@ -500,9 +501,16 @@ EXPRESSION."
 
 
 (defun phpinspect-resolve-type-from-context (resolvecontext &optional 
type-resolver)
+  "Resolve the type that RESOLVECONTEXT's subject evaluates to."
+  ;; Subject should be a statement, not a single token.
+  (when (phpinspect-probably-token-p (phpinspect--resolvecontext-subject 
resolvecontext))
+(setf (phpinspect--resolvecontext-subject resolvecontext)
+  (list (phpinspect--resolvecontext-subject resolvecontext
+
   (unless type-resolver
 (setq type-resolver
   (phpinspect--make-type-resolver-for-resolvecontext resolvecontext)))
+
   (phpinspect--log "Looking for type of statement: %s in nested token"
(phpinspect--resolvecontext-subject resolvecontext))
   ;; Find all enclosing tokens that aren't classes. Classes do not contain 
variable
diff --git a/phpinspect-resolvecontext.el b/phpinspect-resolvecontext.el
index 8d3b9f580b..0d7b48b75e 100644
--- a/phpinspect-resolvecontext.el
+++ b/phpinspect-resolvecontext.el
@@ -68,6 +68,23 @@
 :documentation
 "Tokens that enclose the subject."))
 
+(defun phpinspect--repurpose-resolvecontext (rctx &optional enclosing-tokens 
subject)
+  "Copy RCTX, optionally replacing the enclosing tokens and subject.
+
+Note: if ENCLOSING-TOKENS are provided, the repurposed
+resolvecontext will have it's enclosing token metadata unset as
+it would no longer be valid for the new enclosing tokens."
+  (let ((rctx (phpinspect--copy-resolvecontext rctx)))
+(when subject
+  (setf (phpinspect--resolvecontext-subject rctx) subject))
+
+(when enclosing-tokens
+  ;; Unset enclosing-metadata as it is no longer valid.
+  (setf (phpinspect--resolvecontext-enclosing-metadata rctx) nil)
+  (setf (phpinspect--resolvecontext-enclosing-tokens rctx) 
enclosing-tokens))
+
+rctx))
+
 (cl-defmethod phpinspect--resolvecontext-push-enclosing-token
   ((resolvecontext phpinspect--resolvecontext) enclosing-token)
   "Add ENCLOSING-TOKEN to RESOLVECONTEXTs enclosing token stack."
diff --git a/phpinspect-suggest.el b/phpinspect-suggest.el
index 0a56fd3614..d7be82cd35 100644
--- a/phpinspect-suggest.el
+++ b/phpinspect-suggest.el
@@ -38,7 +38,8 @@
 
 (defun phpinspect-suggest-variables-at-point (resolvecontext)
   (phpinspect--log "Suggesting variables at point")
-  (let ((variables))
+
+  (let ((variables (make-hash-table :test 'equal)))
 (dolist (token (phpinspect--resolvecontext-enclosing-tokens 
resolvecontext))
   (when (phpinspect-not-class-p token)
 (let ((token-list token)
@@ -46,26 +47,33 @@
 (while token-list
   (setq potential-variable (pop token-list))
   (cond ((phpinspect-variable-p potential-variable)
- (phpinspect--log "Pushing variable %s" potential-variable)
- (push (phpinspect--make-variable
-:name (cadr potential-variable)
-:type phpinspect--null-type)
-   variables))
+ (puthash (cadr potential-variable)
+  (phpinspect--make-variable :name (cadr 
potential-variable))
+  variables))
 ((phpinspect-function-p potential-variable)
  (push (phpinspect-function-block potential-variable) 
token-list)
  (dolist (argument (phpinspect-function-argument-list 
potential-variable))
(when (phpinspect-variable-p argument)
- (push (phpinspect--make-variable
-:name (cadr argument)
-:type phpinspect--null-type)
-   variables
+ (puthash (cadr argument)
+  (phpinspect--make-variable :name (cadr argument))
+  variables
 ((phpinspect-block-p potential-variable)
  (dolist (nested-token (cdr potential-variable))
(push nested-token to

[elpa] externals/phpinspect updated (4ec4c40c9d -> e04ab0c118)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/phpinspect.

  from  4ec4c40c9d Add eldoc for sigil variables and allow display of 
multiple eldoc results
   new  2052c289e1 Use `phpinspect--display-format-type-name' as 
standardized propertized string
   new  ae681a0663 Fix bug that broke stub cache
   new  e04ab0c118 Resolve types of suggested variable completions


Summary of changes:
 phpinspect-cache.el  | 23 ---
 phpinspect-completion.el |  6 +++---
 phpinspect-eldoc.el  |  7 ++-
 phpinspect-project.el|  2 --
 phpinspect-resolve.el|  8 
 phpinspect-resolvecontext.el | 17 +
 phpinspect-suggest.el| 34 +-
 phpinspect-type.el   |  8 +---
 8 files changed, 72 insertions(+), 33 deletions(-)



[elpa] externals/phpinspect ae681a0663 2/3: Fix bug that broke stub cache

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit ae681a06636d546b957e67f9b68a9ffc899e794c
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Fix bug that broke stub cache

Empty, non-indexed classes were created by
`phpinspect-project-enqueue-if-not-present', which caused them to override 
any
fully indexed stub classes that might be available.
---
 phpinspect-cache.el   | 23 ---
 phpinspect-project.el |  2 --
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/phpinspect-cache.el b/phpinspect-cache.el
index eda831bff8..25dec47917 100644
--- a/phpinspect-cache.el
+++ b/phpinspect-cache.el
@@ -98,29 +98,29 @@ about.")
 as keys and project caches as values."))
 
 (defun phpinspect--get-stub-class (fqn)
-  (when phpinspect-stub-cache
-(phpinspect--log "Getting stub class")
+  (when-let ((stub-cache (phpinspect-get-or-load-stub-cache)))
+(phpinspect--log "Getting stub class for %s" fqn)
 (catch 'return
   (maphash (lambda (_name project)
  (when-let ((class (phpinspect-project-get-class project fqn)))
(throw 'return class)))
-   (phpinspect--cache-projects phpinspect-stub-cache)
+   (phpinspect--cache-projects stub-cache)
 
 (defun phpinspect--get-stub-function (name)
-  (when phpinspect-stub-cache
+  (when-let ((stub-cache (phpinspect-get-or-load-stub-cache)))
 (if name
 (catch 'return
   (phpinspect--log "Getting stub function by name %s" name)
   (maphash (lambda (_name project)
  (when-let ((class (phpinspect-project-get-function 
project name)))
(throw 'return class)))
-   (phpinspect--cache-projects phpinspect-stub-cache)))
+   (phpinspect--cache-projects stub-cache)))
   (let* ((funcs (cons nil nil))
  (funcs-rear funcs))
 (phpinspect--log "Retrieving all stub functions for nil name")
 (maphash (lambda (_name project)
(setq funcs-rear (last (nconc funcs-rear 
(phpinspect-project-get-functions project)
- (phpinspect--cache-projects phpinspect-stub-cache))
+ (phpinspect--cache-projects stub-cache))
 (cdr funcs)
 
 (defun phpinspect--get-or-create-global-cache ()
@@ -284,7 +284,16 @@ then returned."
 (setq phpinspect-stub-cache (phpinspect--make-cache))
 (phpinspect-project-add-index project (alist-get 'index data))
 (puthash "builtins" project (phpinspect--cache-projects 
phpinspect-stub-cache))
-(setf (phpinspect--cache-read-only-p phpinspect-stub-cache) t)))
+(setf (phpinspect--cache-read-only-p phpinspect-stub-cache) t))
+  phpinspect-stub-cache)
+
+(defun phpinspect-get-or-load-stub-cache (&optional ignore-setting)
+  "Get stub cache if available,otherwise load stubs if setting is enabled.
+
+if IGNORE-SETTING is non-nil, stubs are always loaded when not available."
+  (or phpinspect-stub-cache
+  (and (or phpinspect-load-stubs ignore-setting)
+   (phpinspect-load-stub-index
 
 ;;; phpinspect.el ends here
 (provide 'phpinspect-cache)
diff --git a/phpinspect-project.el b/phpinspect-project.el
index d30b078a15..abffa9e9d2 100644
--- a/phpinspect-project.el
+++ b/phpinspect-project.el
@@ -93,8 +93,6 @@ serious performance hits. Enable at your own risk (:")
   (let ((class (phpinspect-project-get-class project type)))
 (when (or (not class)
   (not (or (phpinspect--class-initial-index class
-  (when (not class)
-(setq class (phpinspect-project-create-class project type)))
   (unless (or (phpinspect--type= phpinspect--null-type type)
   (phpinspect--type-is-native type))
 (phpinspect--log "Adding unpresent class %s to index queue" type)



[nongnu] elpa/drupal-mode 1e6f973ed5 02/11: Merge branch 'release/0.7.1'

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit 1e6f973ed5dfdbbfda96c4ab266bd8ef3d6436d7
Merge: d920370dc6 f9d5596a57
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge branch 'release/0.7.1'
---
 drupal-mode.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 0458356ecf..091cd49d28 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -5,7 +5,7 @@
 ;; Author: Arne Jørgensen 
 ;; URL: https://github.com/arnested/drupal-mode
 ;; Created: January 17, 2012
-;; Version: 0.7.0
+;; Version: 0.7.1
 ;; Package-Requires: ((php-mode "1.5.0"))
 ;; Keywords: programming, php, drupal
 
@@ -347,7 +347,12 @@ According to 
https://drupal.org/coding-standards#indenting.";
   :group 'drupal)
 
 (c-add-style "drupal" drupal-style)
-(add-to-list 'c-default-style '(drupal-mode . "drupal"))
+
+(if (and
+ (boundp 'c-default-style)
+ (stringp c-default-style))
+(setq c-default-style `((drupal-mode . "drupal") (other . 
,c-default-style)))
+  (add-to-list 'c-default-style '(drupal-mode . "drupal")))
 
 
 



[nongnu] elpa/drupal-mode updated (17927723ad -> 3f91d1d44d)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch elpa/drupal-mode.

  from  17927723ad Merge pull request #85 from skangas/bump-version
   new  d920370dc6 Merge branch 'release/0.7.0'
   new  1e6f973ed5 Merge branch 'release/0.7.1'
   new  afa84f7b28 Merge branch 'release/0.7.2'
   new  49ce63c659 Merge branch 'release/0.7.3'
   new  541a0c014a Fix c-basic-offset, indent-tabs-mode, and more
   new  b5302b45d4 Merge pull request #88 from arnested/tweaks
   new  a971073b50 Merge branch 'release/0.8.0'
   new  1177191767 Merge tag '0.8.0' into develop
   new  f632fa5f14 Bump version number
   new  a353f8bdf3 Merge branch 'release/0.8.1'
   new  3f91d1d44d Merge tag '0.8.1' into develop


Summary of changes:
 drupal-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[nongnu] elpa/drupal-mode 49ce63c659 04/11: Merge branch 'release/0.7.3'

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit 49ce63c659aa0af7a2daf0c9e74e58fbce6deb71
Merge: afa84f7b28 7f26310cc7
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge branch 'release/0.7.3'
---
 drupal-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index f8da836cc5..4c22434358 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -1,11 +1,11 @@
 ;;; drupal-mode.el --- Advanced minor mode for Drupal development
 
-;; Copyright (C) 2012, 2013, 2014, 2015, 2016 Arne Jørgensen
+;; Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Arne Jørgensen
 
 ;; Author: Arne Jørgensen 
 ;; URL: https://github.com/arnested/drupal-mode
 ;; Created: January 17, 2012
-;; Version: 0.7.1
+;; Version: 0.7.3
 ;; Package-Requires: ((php-mode "1.5.0"))
 ;; Keywords: programming, php, drupal
 



[nongnu] elpa/drupal-mode a971073b50 07/11: Merge branch 'release/0.8.0'

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit a971073b5028e58fa530746bcab77f05582e8057
Merge: 49ce63c659 b5302b45d4
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge branch 'release/0.8.0'
---
 .travis.yml | 22 ++
 CODE_OF_CONDUCT.md  | 76 +
 COPYING |  8 +++---
 Cask|  2 +-
 Makefile|  8 +++---
 README.md   | 40 --
 SECURITY.md | 11 +++
 drupal-mode.el  | 67 ++-
 drupal-tests.el |  2 +-
 drupal/autoinsert.el| 27 --
 drupal/eldoc.el |  2 +-
 drupal/emacs-drush.el   |  8 +++---
 drupal/etags.el |  2 +-
 drupal/flycheck.el  |  4 +--
 drupal/flymake-phpcs.el |  6 ++--
 drupal/ggtags.el|  2 +-
 drupal/gtags.el |  2 +-
 drupal/gxref.el | 69 
 drupal/helm-gtags.el|  2 +-
 drupal/ispell.el|  6 ++--
 drupal/pcomplete.el |  2 +-
 drupal/phpcs.el |  6 ++--
 drupal/webjump.el   |  6 ++--
 drush-make-mode.el  |  6 ++--
 24 files changed, 272 insertions(+), 114 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 68bb672f5f..dcd2450dd4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,20 +1,14 @@
 language: emacs-lisp
 before_install:
-  - curl -fsSkL https://gist.githubusercontent.com/rejeep/7736123/raw | sh
-  - export PATH="/home/travis/.cask/bin:$PATH"
-  - export PATH="/home/travis/.evm/bin:$PATH"
-  - evm install $EVM_EMACS --use
-  - cask
+  - git clone https://github.com/rejeep/evm.git $HOME/.evm
+  - export PATH=$HOME/.cask/bin:$HOME/.evm/bin:$PATH
+  - evm config path /tmp
+  - evm install $EVM_EMACS --use --skip
+  - curl -fsSkL https://raw.github.com/cask/cask/master/go | python
 env:
-  - EVM_EMACS=emacs-24.1-bin
-  - EVM_EMACS=emacs-24.2-bin
-  - EVM_EMACS=emacs-24.4-bin
-  - EVM_EMACS=emacs-24.5-bin
+  - EVM_EMACS=emacs-25.3-travis
+  - EVM_EMACS=emacs-26.3-travis-linux-xenial
+  - EVM_EMACS=emacs-git-snapshot-travis-linux-xenial
 script:
   - emacs --version
   - make test
-notifications:
-  webhooks: https://webhooks.gitter.im/e/fa0500ce49cab8dc8144
-  on_success: change
-  on_failure: always
-  on_start: never
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00..15bca2b3df
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, 
body
+size, disability, ethnicity, sex characteristics, gender identity and 
expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an 
appointed
+representative at an online or offline event. Representation of a project may 
be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contact

[nongnu] elpa/drupal-mode afa84f7b28 03/11: Merge branch 'release/0.7.2'

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit afa84f7b2800dd2f1ec04fd779184d5df0c58e68
Merge: 1e6f973ed5 9d5808972f
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge branch 'release/0.7.2'
---
 .travis.yml|  5 +
 drupal-mode.el | 37 +++--
 drupal/flycheck.el | 35 +++
 3 files changed, 27 insertions(+), 50 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 88b3b49822..68bb672f5f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,3 +13,8 @@ env:
 script:
   - emacs --version
   - make test
+notifications:
+  webhooks: https://webhooks.gitter.im/e/fa0500ce49cab8dc8144
+  on_success: change
+  on_failure: always
+  on_start: never
diff --git a/drupal-mode.el b/drupal-mode.el
index 091cd49d28..f8da836cc5 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -252,8 +252,6 @@ See `drupal-mode-map'.")
 ;; mode map on C-c C-v C-`mnemonic-key'.
 (dolist (elem drupal-mode-map-alist)
   (define-key map `[(control c) (control v) (control ,(car elem))] (cdr 
elem)))
-
-(define-key map [(control a)] #'drupal-mode-beginning-of-line)
 map)
   "Keymap for `drupal-mode'")
 
@@ -336,7 +334,8 @@ function arguments.")
 (require-final-newline . t)
 (c-offsets-alist . ((arglist-close . 0)
 (arglist-cont-nonempty . c-lineup-math)
-(arglist-intro . +)))
+(arglist-intro . +)
+(statement-cont . +)))
 (c-doc-comment-style . (php-mode . javadoc))
 (c-label-minimum-indentation . 1)
 (c-special-indent-hook . c-gnu-impose-minimum)
@@ -699,35 +698,6 @@ instead."
((fboundp 'php-extras-eldoc-documentation-function)
 (php-extras-eldoc-documentation-function))
 
-(defun drupal-mode-beginning-of-line (&optional n)
-  "Move point to beginning of property value or to beginning of line.
-The prefix argument N is passed directly to `beginning-of-line'.
-
-This command is identical to `beginning-of-line' if not in a mode
-derived from `conf-mode'.
-
-If point is on a (non-continued) property line, move point to the
-beginning of the property value or the beginning of line,
-whichever is closer.  If point is already at beginning of line,
-move point to beginning of property value.  Therefore, repeated
-calls will toggle point between beginning of property value and
-beginning of line.
-
-Heavily based on `message-beginning-of-line' from Gnus."
-  (interactive "p")
-  (let ((zrs 'zmacs-region-stays))
-(when (and (featurep 'xemacs) (interactive-p) (boundp zrs))
-  (set zrs t)))
-  (if (derived-mode-p 'conf-mode)
-  (let* ((here (point))
- (bol (progn (beginning-of-line n) (point)))
- (eol (point-at-eol))
- (eoh (re-search-forward "= *" eol t)))
-(goto-char
- (if (and eoh (or (< eoh here) (= bol here)))
- eoh bol)))
-(beginning-of-line n)))
-
 
 
 (defvar drupal-local-variables (make-hash-table :test 'equal)
@@ -898,8 +868,7 @@ If major version number is 4 - return both major and minor."
 (defun drupal-mode-bootstrap ()
   "Activate Drupal minor mode if major mode is supported.
 The command will activate `drupal-mode' if the current major mode
-is a mode supported by `drupal-mode' (currently only
-`php-mode').
+is a mode supported by `drupal-mode'.
 
 The function is suitable for adding to the supported major modes
 mode-hook."
diff --git a/drupal/flycheck.el b/drupal/flycheck.el
index 1eb3675bf7..42b22527ae 100644
--- a/drupal/flycheck.el
+++ b/drupal/flycheck.el
@@ -49,21 +49,24 @@ The Drupal standard includes checks for non-PHP files, this
 checker runs those.
 
 See URL `http://pear.php.net/package/PHP_CodeSniffer/'."
-  :command ("phpcs" "--report=emacs"
-(option "--standard=" drupal/phpcs-standard concat)
-source-inplace)
-  ;; Though phpcs supports Checkstyle output which we could feed to
-  ;; `flycheck-parse-checkstyle', we are still using error patterns here,
-  ;; because PHP has notoriously unstable output habits.  See URL
-  ;; `https://github.com/lunaryorn/flycheck/issues/78' and URL
-  ;; `https://github.com/lunaryorn/flycheck/issues/118'
-  :error-patterns
-  ((error line-start
-  (file-name) ":" line ":" column ": error - " (message)
-  line-end)
-   (warning line-start
-(file-name) ":" line ":" column ": warning - " (message)
-line-end))
+  :command ("phpcs" "--report=checkstyle"
+(option "--standard=" flycheck-phpcs-standard concat)
+;; Pass original file name to phpcs.  We need to concat explicitly
+;; here, because phpcs really insists to get option and argument as
+;; a single command line argument :|
+(eval (when (buffer-file-name)
+(concat "--stdin-path=" (buffer-file-name)
+  :standard-input t
+  :error-parser flycheck-parse-checkstyle
+  :error-filter
+  (lambda (errors)

[nongnu] elpa/drupal-mode 3f91d1d44d 11/11: Merge tag '0.8.1' into develop

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit 3f91d1d44df11ebd0137a896055fca6a1bb2f554
Merge: 1177191767 a353f8bdf3
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge tag '0.8.1' into develop

0.8.1
---
 drupal-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 83cb184d08..6a23f28fd1 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -5,7 +5,7 @@
 ;; Author: Arne Jørgensen 
 ;; URL: https://github.com/arnested/drupal-mode
 ;; Created: January 17, 2012
-;; Version: 0.7.4
+;; Version: 0.8.1
 ;; Package-Requires: ((php-mode "1.5.0"))
 ;; Keywords: programming, php, drupal
 



[nongnu] elpa/drupal-mode d920370dc6 01/11: Merge branch 'release/0.7.0'

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit d920370dc632bd0b4abf736a7315aa20748d2676
Merge: cf0364cbaf f604acedb1
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge branch 'release/0.7.0'
---
 .travis.yml  | 15 +++
 drupal-mode.el   | 59 ---
 drupal/autoinsert.el | 71 +++-
 drupal/etags.el  | 13 +-
 drupal/flycheck.el   |  8 +++---
 drupal/helm-gtags.el | 63 ++
 drupal/phpcs.el  |  4 +--
 7 files changed, 215 insertions(+), 18 deletions(-)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00..88b3b49822
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+language: emacs-lisp
+before_install:
+  - curl -fsSkL https://gist.githubusercontent.com/rejeep/7736123/raw | sh
+  - export PATH="/home/travis/.cask/bin:$PATH"
+  - export PATH="/home/travis/.evm/bin:$PATH"
+  - evm install $EVM_EMACS --use
+  - cask
+env:
+  - EVM_EMACS=emacs-24.1-bin
+  - EVM_EMACS=emacs-24.2-bin
+  - EVM_EMACS=emacs-24.4-bin
+  - EVM_EMACS=emacs-24.5-bin
+script:
+  - emacs --version
+  - make test
diff --git a/drupal-mode.el b/drupal-mode.el
index f6c9476da6..0458356ecf 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -1,11 +1,11 @@
 ;;; drupal-mode.el --- Advanced minor mode for Drupal development
 
-;; Copyright (C) 2012, 2013, 2014, 2015 Arne Jørgensen
+;; Copyright (C) 2012, 2013, 2014, 2015, 2016 Arne Jørgensen
 
 ;; Author: Arne Jørgensen 
 ;; URL: https://github.com/arnested/drupal-mode
 ;; Created: January 17, 2012
-;; Version: 0.6.1
+;; Version: 0.7.0
 ;; Package-Requires: ((php-mode "1.5.0"))
 ;; Keywords: programming, php, drupal
 
@@ -36,6 +36,8 @@
 (require 'cl)
 (require 'php-mode)
 (require 'format-spec)
+(require 'json)
+(require 'sql)
 
 ;; Silence byte compiler.
 (defvar css-indent-level)
@@ -239,7 +241,8 @@ get better filling in Doxygen comments."
 (?f . drupal-insert-function)
 (?m . drupal-module-name)
 (?e . drupal-drush-php-eval)
-(?t . drupal-wrap-string-in-t-function))
+(?t . drupal-wrap-string-in-t-function)
+(?s . drupal-drush-sql-cli))
   "Map of mnemonic keys and functions for keyboard shortcuts.
 See `drupal-mode-map'.")
 
@@ -428,6 +431,10 @@ of the project)."
   [menu-bar drupal cache-clear]
   '(menu-item "Clear all caches" drupal-drush-cache-clear
   :enable (and drupal-rootdir drupal-drush-program)))
+(define-key drupal-mode-map
+  [menu-bar drupal sql-cli]
+  '(menu-item "Open SQL shell" drupal-drush-sql-cli
+:enable (and drupal-rootdir drupal-drush-program)))
 
 (define-key drupal-mode-map
   [menu-bar drupal drupal-project drupal-project-bugs]
@@ -519,6 +526,48 @@ buffer."
 (search-forward-regexp "\\(\"\\|'\\)")
 (insert ")")
 
+(defun drupal-drush-sql-cli ()
+  "Run a SQL shell using \"drush sql-cli\" in a SQL-mode comint buffer."
+  (interactive)
+  (let* ((json-object-type 'plist)
+ (config
+  (json-read-from-string
+   (with-temp-buffer
+ (call-process drupal-drush-program nil t nil
+   "sql-conf" "--format=json")
+ (buffer-string)
+(when (not config)
+  (error "No Drupal SQL configuration found."))
+(destructuring-bind (&key database driver &allow-other-keys) config
+  (let ((sql-interactive-product
+ (drupal--db-driver-to-sql-product driver))
+(start-buffer (current-buffer))
+(sqli-buffer
+ (make-comint (format "SQL (%s)" database)
+  drupal-drush-program nil "sql-cli")))
+(with-current-buffer sqli-buffer
+  (sql-interactive-mode)
+  (set (make-local-variable 'sql-buffer)
+   (buffer-name (current-buffer)))
+
+  ;; Set `sql-buffer' in the start buffer
+  (with-current-buffer start-buffer
+(when (derived-mode-p 'sql-mode)
+  (setq sql-buffer (buffer-name sqli-buffer))
+  (run-hooks 'sql-set-sqli-hook)))
+
+  ;; All done.
+  (run-hooks 'sql-login-hook)
+  (pop-to-buffer sqli-buffer))
+
+(defun drupal--db-driver-to-sql-product (driver)
+  "Translate a Drupal DB driver name into a sql-mode symbol."
+  (let ((driver (intern driver)))
+(cond
+  ((eq driver 'pgsql) 'postgres)
+  ((assq driver sql-product-alist) driver)
+  (t 'ansi
+
 
 
 (defvar drupal-form-id-history nil
@@ -556,7 +605,8 @@ buffer."
 (user-error "%s already exists in file." (replace-regexp-in-string "^hook" 
(drupal-module-name) v2)))
   ;; User error if the hook is already inserted elsewhere.
   (when (and drupal-get-function-args
- (funcall drupal-get-function-args (replace-regexp-in-string 
"^hook" (drupal-module-name) v2)))
+ (ignore-errors
+   (funcall drupal-get-function-args (replace-regexp-in-string 
"^hook" (drupal-module-name) v2
 (

[nongnu] elpa/drupal-mode a353f8bdf3 10/11: Merge branch 'release/0.8.1'

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit a353f8bdf3ed98f76b9418afbbc4ef17b5552647
Merge: a971073b50 f632fa5f14
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge branch 'release/0.8.1'
---
 drupal-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 83cb184d08..6a23f28fd1 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -5,7 +5,7 @@
 ;; Author: Arne Jørgensen 
 ;; URL: https://github.com/arnested/drupal-mode
 ;; Created: January 17, 2012
-;; Version: 0.7.4
+;; Version: 0.8.1
 ;; Package-Requires: ((php-mode "1.5.0"))
 ;; Keywords: programming, php, drupal
 



[nongnu] elpa/drupal-mode b5302b45d4 06/11: Merge pull request #88 from arnested/tweaks

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit b5302b45d43accb4260e2658f7248ba20424f3b6
Merge: 17927723ad 541a0c014a
Author: Arne Jørgensen 
Commit: GitHub 

Merge pull request #88 from arnested/tweaks

Fix c-basic-offset, indent-tabs-mode, and more
---
 drupal-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 07d91a9c12..83cb184d08 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -310,7 +310,7 @@ function arguments.")
 (setq comment-end "")
 
 ;; Setup cc-mode style stuff.
-(when (derived-mode-p 'c-mode)
+(when (or (derived-mode-p 'php-base-mode) (derived-mode-p 'c-mode))
   (c-add-language 'drupal-mode 'c-mode)
   (c-set-style "drupal"))
 



[nongnu] elpa/drupal-mode 541a0c014a 05/11: Fix c-basic-offset, indent-tabs-mode, and more

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit 541a0c014aa1860855df5a8457192d7d9032daa1
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Fix c-basic-offset, indent-tabs-mode, and more

php-mode is no longer based on c-mode, but php-base-mode (see
https://github.com/emacs-php/php-mode/pull/772).

This prevented the drupal style to be used.
---
 drupal-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 07d91a9c12..83cb184d08 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -310,7 +310,7 @@ function arguments.")
 (setq comment-end "")
 
 ;; Setup cc-mode style stuff.
-(when (derived-mode-p 'c-mode)
+(when (or (derived-mode-p 'php-base-mode) (derived-mode-p 'c-mode))
   (c-add-language 'drupal-mode 'c-mode)
   (c-set-style "drupal"))
 



[nongnu] elpa/drupal-mode f632fa5f14 09/11: Bump version number

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit f632fa5f140b04260fa23b15ffccbfe5a787b2e2
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Bump version number
---
 drupal-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drupal-mode.el b/drupal-mode.el
index 83cb184d08..6a23f28fd1 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -5,7 +5,7 @@
 ;; Author: Arne Jørgensen 
 ;; URL: https://github.com/arnested/drupal-mode
 ;; Created: January 17, 2012
-;; Version: 0.7.4
+;; Version: 0.8.1
 ;; Package-Requires: ((php-mode "1.5.0"))
 ;; Keywords: programming, php, drupal
 



[nongnu] elpa/drupal-mode 1177191767 08/11: Merge tag '0.8.0' into develop

2024-08-16 Thread ELPA Syncer
branch: elpa/drupal-mode
commit 11771917677e06e641f176f48e4414fd2a1e946b
Merge: b5302b45d4 a971073b50
Author: Arne Jørgensen 
Commit: Arne Jørgensen 

Merge tag '0.8.0' into develop

0.8.0



[elpa] externals/dape daa32c5715 2/2: Remove delay when disabling of dape-active-mode

2024-08-16 Thread ELPA Syncer
branch: externals/dape
commit daa32c57156641023dbbf03d1aa8353e72f5cdd6
Author: Daniel Pettersson 
Commit: Daniel Pettersson 

Remove delay when disabling of dape-active-mode

The delay in disabling dape-active-mode served its purpose by ensuring
that the "terminated" status message was displayed before hiding the
dape mode line. As the log message and removal of the mode line
information now adequately communicate the status change from running
to terminated, disabling dape-active-mode can proceed without further
delay.
---
 dape.el | 30 +-
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/dape.el b/dape.el
index e6c80f52aa..e7523509a1 100644
--- a/dape.el
+++ b/dape.el
@@ -2201,10 +2201,9 @@ symbol `dape-connection'."
(while (process-live-p server-process)
  (accept-process-output nil nil 0.1
;; ui
-   (run-with-timer 1 nil (lambda ()
-   (when (eq dape--connection conn)
- (dape-active-mode -1)
- (force-mode-line-update t)
+   (when (eq dape--connection conn)
+ (dape-active-mode -1)
+ (force-mode-line-update t)))
  :request-dispatcher 'dape-handle-request
  :notification-dispatcher 'dape-handle-event
  :process process)))
@@ -4123,15 +4122,19 @@ or `prefix' part of variable string."
  ((zerop (or (plist-get object :variablesReference) 0))
   (concat prefix "  "))
  ((and expanded (plist-get object :variables))
-  (propertize (concat prefix "- ")
-  'mouse-face 'highlight
-  'help-echo "mouse-2: contract"
-  'keymap map))
+  (concat
+   (propertize (concat prefix "-")
+   'mouse-face 'highlight
+   'help-echo "mouse-2: contract"
+   'keymap map)
+   " "))
  (t
-  (propertize (concat prefix "+ ")
-  'mouse-face 'highlight
-  'help-echo "mouse-2: expand"
-  'keymap map)
+  (concat
+   (propertize (concat prefix "+")
+   'mouse-face 'highlight
+   'help-echo "mouse-2: expand"
+   'keymap map)
+   " ")
 (setq row (dape--info-locals-table-columns-list
`((name  . ,name)
  (type  . ,type)
@@ -4148,7 +4151,8 @@ or `prefix' part of variable string."
   ;; TODO Should be paged
   (dolist (variable (plist-get object :variables))
 (dape--info-scope-add-variable
- table variable (plist-get object :variablesReference) path expanded-p 
maps)
+ table variable (plist-get object :variablesReference)
+ path expanded-p maps)
 
 ;; FIXME Empty header line when adapter is killed
 (define-derived-mode dape-info-scope-mode dape-info-parent-mode "Scope"



[elpa] externals/dape f596fc42b4 1/2: Remove Y/N on quit from dape-repl

2024-08-16 Thread ELPA Syncer
branch: externals/dape
commit f596fc42b49e58cd071dfa9baec987cb2be6080e
Author: Daniel Pettersson 
Commit: Daniel Pettersson 

Remove Y/N on quit from dape-repl
---
 dape.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dape.el b/dape.el
index 43563eeddd..e6c80f52aa 100644
--- a/dape.el
+++ b/dape.el
@@ -4461,7 +4461,7 @@ Send INPUT to DUMMY-PROCESS."
   ;;   `comint-input-sender'.  Kill buffer with timer instead
   ;;   to avoid error signal.
   (if (eq 'dape-quit cmd)
- (run-with-timer 0 nil 'dape-quit)
+  (run-with-timer 0 nil 'call-interactively #'dape-quit)
(call-interactively cmd)))
  ;; Evaluate expression
  (t



[elpa] externals/dape updated (7b432a8558 -> daa32c5715)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/dape.

  from  7b432a8558 Fix source buffer being displayed in minibuffer
   new  f596fc42b4 Remove Y/N on quit from dape-repl
   new  daa32c5715 Remove delay when disabling of dape-active-mode


Summary of changes:
 dape.el | 32 ++--
 1 file changed, 18 insertions(+), 14 deletions(-)



[elpa] externals/phpinspect 14c63e4187 2/2: Improve method return-type test

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 14c63e4187ed7221ecc4baa0a2d3fbdd122014d3
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Improve method return-type test
---
 test/test-index.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/test/test-index.el b/test/test-index.el
index 4e9b23d193..b547fadc9e 100644
--- a/test/test-index.el
+++ b/test/test-index.el
@@ -376,11 +376,14 @@ public function doStuff()
 }")
   (phpinspect-project-add-index project (phpinspect-index-current-buffer))
 
-  (let ((class (phpinspect-project-get-class
-   project
-(phpinspect--make-type
+  (let* ((type (phpinspect--make-type
  :name 
"\\App\\Controller\\Api\\V1\\AccountStatisticsController"
- :fully-qualified t
+ :fully-qualified t))
+ (class (phpinspect-project-get-class project type)))
+
 (should class)
 
-(should (phpinspect--class-get-method class "doStuff"))
+(let ((method (phpinspect--class-get-method class "doStuff")))
+  (should method)
+  (should (phpinspect--function-return-type method))
+  (should (phpinspect--type= type (phpinspect--function-return-type 
method



[elpa] externals/phpinspect 58ef5e3599 1/2: Refactor use of project root to project obj injection + test and fix some bugs

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 58ef5e359976ad60c9bb45c9f686aaa724e64abb
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Refactor use of project root to project obj injection + test and fix some 
bugs

- Test/Fix indexation of method return types
- Get rid of some technical debt (use of project-root and global variables)
- Cleanup/refactor tests
---
 phpinspect-cache.el  |  11 ++---
 phpinspect-class.el  |   7 +++
 phpinspect-completion.el |   3 +-
 phpinspect-eldoc.el  |  45 +-
 phpinspect-index.el  |   9 ++--
 phpinspect-resolve.el| 107 ++-
 phpinspect-resolvecontext.el |  28 +--
 phpinspect-suggest.el|  40 +++-
 phpinspect.el|   7 ---
 test/phpinspect-test-env.el  |   6 +++
 test/phpinspect-test.el  |  68 +++
 test/test-autoload.el|   4 ++
 test/test-eldoc.el   |  85 +-
 test/test-index.el   |  28 +++
 test/test-resolve.el |  42 -
 test/test-resolvecontext.el  |   7 +--
 16 files changed, 248 insertions(+), 249 deletions(-)

diff --git a/phpinspect-cache.el b/phpinspect-cache.el
index 25dec47917..14bfe62767 100644
--- a/phpinspect-cache.el
+++ b/phpinspect-cache.el
@@ -163,13 +163,6 @@ currently opened projects."
 
 project))
 
-(defun phpinspect-get-or-create-cached-project-class (project-root class-fqn 
&optional no-enqueue)
-  (when project-root
-(let ((project (phpinspect--cache-get-project-create
-(phpinspect--get-or-create-global-cache)
-project-root)))
-  (phpinspect-project-get-class-extra-or-create project class-fqn 
no-enqueue
-
 (cl-defmethod phpinspect--cache-get-project-create
   ((cache phpinspect--cache) (project-root string))
   "Get a project that is located in PROJECT-ROOT from CACHE.
@@ -196,6 +189,10 @@ then returned."
   (phpinspect-project-enqueue-include-dirs project
 project))
 
+(defun phpinspect-current-project ()
+  (phpinspect--cache-get-project-create 
(phpinspect--get-or-create-global-cache)
+(phpinspect-current-project-root)))
+
 (defun phpinspect-project-enqueue-include-dirs (project)
   (interactive (list (phpinspect--cache-get-project-create
   (phpinspect--get-or-create-global-cache)
diff --git a/phpinspect-class.el b/phpinspect-class.el
index 2a71acc1ff..478f175603 100644
--- a/phpinspect-class.el
+++ b/phpinspect-class.el
@@ -104,9 +104,16 @@ Conditionally executes BODY depending on
 (cl-defmethod phpinspect--class-get-method ((class phpinspect--class) 
(method-name (head phpinspect-name)))
   (gethash method-name (phpinspect--class-methods class)))
 
+(cl-defmethod phpinspect--class-get-method ((class phpinspect--class) 
(method-name string))
+  (phpinspect--class-get-method class (phpinspect-intern-name method-name)))
+
 (cl-defmethod phpinspect--class-get-static-method ((class phpinspect--class) 
(method-name (head phpinspect-name)))
   (gethash method-name (phpinspect--class-static-methods class)))
 
+(cl-defmethod phpinspect--class-get-static-method ((class phpinspect--class) 
(method-name string))
+  (phpinspect--class-get-static-method class (phpinspect-intern-name 
method-name)))
+
+
 (cl-defmethod phpinspect--class-get-variable
   ((class phpinspect--class) (variable-name string))
   (catch 'found
diff --git a/phpinspect-completion.el b/phpinspect-completion.el
index 69d1c23d83..0e15a9bd6d 100644
--- a/phpinspect-completion.el
+++ b/phpinspect-completion.el
@@ -224,7 +224,8 @@ Returns list of `phpinspect--completion'."
   (let* ((buffer (phpinspect-completion-query-buffer query))
  (point (phpinspect-completion-query-point query))
  (buffer-map (phpinspect-buffer-parse-map buffer))
- (rctx (phpinspect-get-resolvecontext buffer-map point))
+ (rctx (phpinspect-get-resolvecontext
+(phpinspect-buffer-project buffer) buffer-map point))
  (completion-list (phpinspect--make-completion-list)))
 (phpinspect-buffer-update-project-index buffer)
 
diff --git a/phpinspect-eldoc.el b/phpinspect-eldoc.el
index 8208114066..166acb3293 100644
--- a/phpinspect-eldoc.el
+++ b/phpinspect-eldoc.el
@@ -128,21 +128,15 @@ be implemented for return values of 
`phpinspect-eld-strategy-execute'")
 (phpinspect-list-p
  (car (last (phpinspect--resolvecontext-subject rctx)))
 
-(cl-defmethod phpinspect-eld-strategy-execute
-  ((_strat phpinspect-eld-function-args) (q phpinspect-eldoc-query) (rctx 
phpinspect--resolvecontext))
-  (phpinspect--log "Executing `phpinspect-eld-function-args' strategy")
-  (let* ((enclosing-token (car (phpinspect--resolvecontext-enclosing-metadata
- rctx)))
- (left-sibling )
- (statement )
- match-result static arg-l

[elpa] externals/phpinspect updated (e04ab0c118 -> 14c63e4187)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/phpinspect.

  from  e04ab0c118 Resolve types of suggested variable completions
   new  58ef5e3599 Refactor use of project root to project obj injection + 
test and fix some bugs
   new  14c63e4187 Improve method return-type test


Summary of changes:
 phpinspect-cache.el  |  11 ++---
 phpinspect-class.el  |   7 +++
 phpinspect-completion.el |   3 +-
 phpinspect-eldoc.el  |  45 +-
 phpinspect-index.el  |   9 ++--
 phpinspect-resolve.el| 107 ++-
 phpinspect-resolvecontext.el |  28 +--
 phpinspect-suggest.el|  40 +++-
 phpinspect.el|   7 ---
 test/phpinspect-test-env.el  |   6 +++
 test/phpinspect-test.el  |  68 +++
 test/test-autoload.el|   4 ++
 test/test-eldoc.el   |  85 +-
 test/test-index.el   |  31 +
 test/test-resolve.el |  42 -
 test/test-resolvecontext.el  |   7 +--
 16 files changed, 251 insertions(+), 249 deletions(-)



[elpa] externals/phpinspect 5032ae74ff: Resolve types of expressions nested in list tokens

2024-08-16 Thread ELPA Syncer
branch: externals/phpinspect
commit 5032ae74ff6f44912ca0ece057325b3ae2a1716e
Author: Hugo Thunnissen 
Commit: Hugo Thunnissen 

Resolve types of expressions nested in list tokens

- Resolve "(new Foo())->bar"
- Resolve "if ($foo = new Bar()) { $foo->baz"
---
 phpinspect-resolve.el | 60 ++-
 test/test-resolve.el  | 57 
 2 files changed, 102 insertions(+), 15 deletions(-)

diff --git a/phpinspect-resolve.el b/phpinspect-resolve.el
index 8ce62634c5..46b24adbcd 100644
--- a/phpinspect-resolve.el
+++ b/phpinspect-resolve.el
@@ -208,11 +208,25 @@ $variable = $variable->method();"
 
 (defun phpinspect--get-derived-statement-type-in-block
 (resolvecontext statement php-block assignments type-resolver &optional 
function-arg-list)
+  "Determine the type that STATEMENT evaluates to in RESOLVECONTEXT.
+
+PHP-BLOCK should be the block that STATEMENT was found in.
+ASSIGNMENTS should be a list of assignment-contexts.
+
+A statement is derived when it contains multiple components that
+derive off a base token. Object property access is an example of
+a derived statement. In the statement $foo->bar which is parsed
+into ((:variable foo) (:object-attrib (:word bar))), the
+value/type of ->bar must be derived from the type of $foo. So
+->bar derives from the base token $foo."
+
 ;; A derived statement can be an assignment itself.
 (when (seq-find #'phpinspect-assignment-p statement)
   (phpinspect--log "Derived statement is an assignment: %s" statement)
   (setq statement (cdr (seq-drop-while #'phpinspect-not-assignment-p 
statement
-(phpinspect--log "Get derived statement type in block: %s" statement)
+(phpinspect--log "Get derived statement type in block: (truncated, real 
length: %d) %s"
+ (length statement)
+ (take 10 statement))
 (let* ((first-token (pop statement))
(current-token)
(previous-attribute-type))
@@ -232,6 +246,12 @@ $variable = $variable->method();"
  (funcall type-resolver (phpinspect--make-type
  :name (cadr 
first-token
 
+   ;; First token is a list, for example "(new 
DateTime())"
+   (when (phpinspect-list-p first-token)
+ (phpinspect--interpret-expression-type-in-context
+  resolvecontext php-block type-resolver (cdr 
first-token)
+  function-arg-list assignments))
+
;; No bare word, assume we're dealing with a 
variable.
(when (phpinspect-variable-p first-token)
  (phpinspect--get-variable-type-in-block
@@ -286,11 +306,6 @@ $variable = $variable->method();"
 ;; Make sure to always return a FQN
 (funcall type-resolver previous-attribute-type
 
-
-;; TODO: since we're passing type-resolver to all of the get-variable-type 
functions now,
-;; we may as well always return FQNs in stead of relative type names.
-
-
 (defun phpinspect-get-variable-type-in-block
 (resolvecontext variable-name php-block type-resolver &optional 
function-arg-list)
   (phpinspect--get-variable-type-in-block
@@ -348,7 +363,8 @@ resolve types of function argument variables."
   (phpinspect--assignment-from 
last-assignment)))
  (pattern-code (phpinspect--pattern-code pattern))
  (result))
-(phpinspect--log "Looking for assignments of pattern %s in assignment list 
%s" pattern-code assignments)
+(phpinspect--log "Looking for assignments of pattern %s in assignment list 
of length %d"
+ pattern-code (length assignments))
 
 (if (not last-assignment)
 (when (and (= (length pattern-code) 2) (phpinspect-variable-p (cadr 
pattern-code)))
@@ -431,18 +447,20 @@ ARG-LIST. ARG-LIST should be a list token as returned by
 
 Use RESOLVECONTEXT, PHP-BLOCK, TYPE-RESOLVER and
 FUNCTION-ARG-LIST as contextual information to infer type of
-EXPRESSION."
+EXPRESSION.
 
-  ;; When the right of an assignment is more than $variable; or "string";(so
-  ;; (:variable "variable") (:terminator ";") or (:string "string") 
(:terminator ";")
-  ;; in tokens), we're likely working with a derived assignment like 
$object->method()
-  ;; or $object->attributen
+An expression can be any sequence of tokens that evaluates to a
+value/type."
+  (phpinspect--log "Interpreting type of expression (truncated, full-length: 
%s) %s"
+   (length expression)
+   (take 10 expression))
 
   (cond ((phpinspect-array-p (car expression))
  (let ((collection-contains)
(collection-items (phpinspect--split-statements (cdr (car 
expression
(count 0))
-   (phpinspect--log "Checki

[nongnu] elpa/hyperdrive updated (78035e0e21 -> 74cd5f6ce3)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  78035e0e21 Tidy: (he/within-version-range) Docstring
   new  b2fdfa121d Tidy: (he//api-then) Tidy pcase
   new  74cd5f6ce3 Docs: Document history buffer file size color


Summary of changes:
 doc/hyperdrive.org  | 3 +++
 doc/hyperdrive.texi | 3 +++
 hyperdrive-lib.el   | 9 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)



[nongnu] elpa/hyperdrive 74cd5f6ce3 2/2: Docs: Document history buffer file size color

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 74cd5f6ce35a20aed6872968d69ebdfcd2e035c6
Author: Joseph Turner 
Commit: Joseph Turner 

Docs: Document history buffer file size color
---
 doc/hyperdrive.org  | 3 +++
 doc/hyperdrive.texi | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/hyperdrive.org b/doc/hyperdrive.org
index 771f0d4ee7..9c68ad5524 100644
--- a/doc/hyperdrive.org
+++ b/doc/hyperdrive.org
@@ -528,6 +528,9 @@ of a hyperdrive file (~hyperdrive-blob-mode~):
 The history buffer displays the entire known history of a hyperdrive
 file.  For an explanation of how it works, see [[*Partial version data]].
 
+Like in the [[*Directory view][directory view]], the file size color in the 
history view
+indicates how much of a file you have already downloaded.
+
 - Command: hyperdrive-history ::
 
   Open the history buffer for the current hyperdrive file.  To open
diff --git a/doc/hyperdrive.texi b/doc/hyperdrive.texi
index 826f758ecb..746f3bb430 100644
--- a/doc/hyperdrive.texi
+++ b/doc/hyperdrive.texi
@@ -823,6 +823,9 @@ Traverse version history for the current file.
 The history buffer displays the entire known history of a hyperdrive
 file.  For an explanation of how it works, see @ref{Partial version data}.
 
+Like in the @ref{Directory view, , directory view}, the file size color in the 
history view
+indicates how much of a file you have already downloaded.
+
 @deffn Command hyperdrive-history
 Open the history buffer for the current hyperdrive file.  To open
 the history for a different file, use the universal prefix argument



[nongnu] elpa/hyperdrive b2fdfa121d 1/2: Tidy: (he//api-then) Tidy pcase

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit b2fdfa121d9b55b8295e775a023a27cd90267b0c
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (he//api-then) Tidy pcase
---
 hyperdrive-lib.el | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 430a1468d2..c59eb58e9c 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -232,12 +232,9 @@ Sets ENTRY's hyperdrive to the persisted version of the 
drive if
 it exists.  Updates ENTRY's hyperdrive's disk usage and latest
 version.  Finally, persists ENTRY's hyperdrive."
   (pcase-let*
-  (((cl-struct
- plz-response
- (headers (map link allow content-length content-type last-modified
-   x-drive-size x-drive-version
-   x-file-block-length x-file-block-length-downloaded)))
-response)
+  (((map link allow content-length content-type last-modified x-drive-size
+ x-drive-version x-file-block-length 
x-file-block-length-downloaded)
+(plz-response-headers response))
;; RESPONSE is guaranteed to have a "Link" header with the public key,
;; while ENTRY may have a DNSLink domain but no public key yet.
(public-key (progn (string-match h//public-key-re link)



[nongnu] elpa/with-editor 7189486efb 1/2: make: Ensure documentation is cleaned up and regenerated when needed

2024-08-16 Thread ELPA Syncer
branch: elpa/with-editor
commit 7189486efbd16b34a599075ec9c5e4f0bab2d656
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

make: Ensure documentation is cleaned up and regenerated when needed

- Files are not the only inputs to `texi', so we cannot rely on their
  modification times alone, to determine whether a rebuild is required.
  The new `redo-docs' always regenerates the texi file and thus all
  other formats.  Use that target before publishing the manual.

- Teach `html-dir' to only regenerate if the texi file has actually
  been touched.

- However when `html-dir' does regenerate, we must first remove all
  existing html files, to avoid files that used to be generated but
  are not being generated anymore, from sticking around.
---
 Makefile  |  9 ++---
 docs/Makefile | 20 +---
 2 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index f5cf0d58e1..865b143f40 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,8 @@ help:
$(info make all  - generate lisp and manual)
$(info make lisp - generate byte-code and autoloads)
$(info make redo - re-generate byte-code and autoloads)
-   $(info make docs - generate most manual formats)
+   $(info make docs - generate all manual formats)
+   $(info make redo-docs- re-generate all manual formats)
$(info make texi - generate texi manual)
$(info make info - generate info manual)
$(info make html - generate html manual file)
@@ -22,13 +23,15 @@ help:
$(info make clean- remove most generated files)
@printf "\n"
 
-redo:
-   @$(MAKE) -C lisp clean lisp
 lisp:
@$(MAKE) -C lisp lisp
+redo:
+   @$(MAKE) -C lisp clean lisp
 
 docs:
@$(MAKE) -C docs docs
+redo-docs:
+   @$(MAKE) -C docs redo-docs
 texi:
@$(MAKE) -C docs texi
 info:
diff --git a/docs/Makefile b/docs/Makefile
index 8341a90aae..7a39da8682 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -3,16 +3,21 @@ include ../default.mk
 
 docs: texi info html html-dir pdf
 
-texi: $(PKG).texi
-info: $(PKG).info dir
-html: $(PKG).html
-pdf:  $(PKG).pdf
+texi: $(PKG).texi
+info: $(PKG).info dir
+html: $(PKG).html
+html-dir: $(PKG)/index.html
+pdf:  $(PKG).pdf
 
 ORG_ARGS  = --batch -Q $(ORG_LOAD_PATH)
 ORG_EVAL += --eval "(setq indent-tabs-mode nil)"
 ORG_EVAL += --eval "(setq org-src-preserve-indentation nil)"
 ORG_EVAL += --funcall org-texinfo-export-to-texinfo
 
+redo-docs:
+   @touch $(PKG).org
+   @make docs
+
 %.texi: %.org
@printf "Generating $@\n"
@$(EMACS) $(ORG_ARGS) $< $(ORG_EVAL)
@@ -40,8 +45,9 @@ HTML_FIXUP_MENU   = '/<\/body>/i<\/div>'
@$(MAKEINFO) --html --no-split $(MANUAL_HTML_ARGS) $<
@sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e 
$(HTML_FIXUP_MENU) $@
 
-html-dir: $(PKG).texi
+%/index.html: %.texi
@printf "Generating $(PKG)/*.html\n"
+   @rm -rf $(PKG)
@$(MAKEINFO) --html -o $(PKG)/ $(MANUAL_HTML_ARGS) $<
@for f in $$(find $(PKG) -name '*.html') ; do \
sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e 
$(HTML_FIXUP_MENU) $$f ; \
@@ -62,7 +68,7 @@ comma := ,
 empty :=
 space := $(empty) $(empty)
 
-publish: html html-dir pdf
+publish: redo-docs
@aws s3 cp $(PKG).html $(PUBLISH_TARGET)
@aws s3 cp $(PKG).pdf  $(PUBLISH_TARGET)
@aws s3 sync $(PKG)$(PUBLISH_TARGET)$(PKG)/
@@ -70,7 +76,7 @@ publish: html html-dir pdf
@aws cloudfront create-invalidation --distribution-id $(CFRONT_DIST) 
--paths \
"$(subst $(space),$(comma),$(addprefix 
$(PUBLISH_PATH),$(CFRONT_PATHS)))" > /dev/null
 
-release: html html-dir pdf
+release: redo-docs
@aws s3 cp $(PKG).html $(RELEASE_TARGET)
@aws s3 cp $(PKG).pdf  $(RELEASE_TARGET)
@aws s3 sync $(PKG)$(RELEASE_TARGET)$(PKG)/



[nongnu] elpa/with-editor 4fa6c31c8f 2/2: make release: Don't pass along $VERSION

2024-08-16 Thread ELPA Syncer
branch: elpa/with-editor
commit 4fa6c31c8f8e3fb5536334bac9d62b652dfb5634
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

make release: Don't pass along $VERSION

This currently isn't being used.
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 865b143f40..bdcd56733e 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ pdf:
 publish:
@$(MAKE) -C docs publish
 release:
-   @$(MAKE) VERSION=$(VERSION) -C docs release
+   @$(MAKE) -C docs release
 
 stats:
@$(MAKE) -C docs stats



[nongnu] elpa/with-editor updated (d30a96c7b2 -> 4fa6c31c8f)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch elpa/with-editor.

  from  d30a96c7b2 ci: Publish manual for tagged releases
   new  7189486efb make: Ensure documentation is cleaned up and regenerated 
when needed
   new  4fa6c31c8f make release: Don't pass along $VERSION


Summary of changes:
 Makefile  | 11 +++
 docs/Makefile | 20 +---
 2 files changed, 20 insertions(+), 11 deletions(-)



[elpa] externals-release/plz 3df4f3c0a3 3/5: Fix: (plz) Docstring, documentation

2024-08-16 Thread ELPA Syncer
branch: externals-release/plz
commit 3df4f3c0a3e6843b1b9dc6a0dda2ea95399bde08
Author: Adam Porter 
Commit: Adam Porter 

Fix: (plz) Docstring, documentation
---
 README.org | 2 +-
 plz.el | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 7c27a40aeb..06cb9861c4 100644
--- a/README.org
+++ b/README.org
@@ -125,7 +125,7 @@ Synchronously download a JPEG file, then create an Emacs 
image object from the d
- ~string~ to pass the response body as a decoded string.
- ~response~ to pass a ~plz-response~ structure.
- ~file~ to pass a temporary filename to which the response body has been 
saved without decoding.
-   - ~(file ~FILENAME)~ to pass ~FILENAME~ after having saved the response 
body to it without decoding.  ~FILENAME~ must be a non-existent file; if it 
exists, it will not be overwritten, and an error will be signaled.
+   - ~(file ~FILENAME)~ to pass ~FILENAME~ after having saved the response 
body to it without decoding.  ~FILENAME~ must be a non-existent file; if it 
exists, it will not be overwritten, and an error will be signaled.  ~FILENAME~ 
is passed through ~expand-file-name~, which see.
- A function, which is called in the response buffer with it narrowed to 
the response body (suitable for, e.g. ~json-read~).
 
If ~DECODE~ is non-nil, the response body is decoded automatically.  For 
binary content, it should be nil.  When ~AS~ is ~binary~, ~DECODE~ is 
automatically set to nil.
diff --git a/plz.el b/plz.el
index 7425f155a3..f34710f77d 100644
--- a/plz.el
+++ b/plz.el
@@ -359,7 +359,8 @@ It may be:
 - `(file FILENAME)' to pass FILENAME after having saved the
   response body to it without decoding.  FILENAME must be a
   non-existent file; if it exists, it will not be overwritten,
-  and an error will be signaled.
+  and an error will be signaled.  FILENAME is passed through
+  `expand-file-name', which see.
 
 - A function, which is called in the response buffer with it
   narrowed to the response body (suitable for, e.g. `json-read').



[elpa] externals-release/plz 635a026926 1/5: Meta: v0.9.1-pre

2024-08-16 Thread ELPA Syncer
branch: externals-release/plz
commit 635a026926ea4ad33d78033a4ba4870e9e34156f
Author: Adam Porter 
Commit: Adam Porter 

Meta: v0.9.1-pre
---
 README.org | 4 
 plz.el | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index bc7b2866a6..7c27a40aeb 100644
--- a/README.org
+++ b/README.org
@@ -188,6 +188,10 @@ You may also clear a queue with ~plz-clear~, which cancels 
any active or queued
 :TOC:  :depth 0
 :END:
 
+** 0.9.1-pre
+
+Nothing new yet.
+
 ** 0.9
 
 *Compatibility*
diff --git a/plz.el b/plz.el
index 49b37add06..3eb64ed78a 100644
--- a/plz.el
+++ b/plz.el
@@ -5,7 +5,7 @@
 ;; Author: Adam Porter 
 ;; Maintainer: Adam Porter 
 ;; URL: https://github.com/alphapapa/plz.el
-;; Version: 0.9
+;; Version: 0.9.1-pre
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: comm, network, http
 



[elpa] externals-release/plz c579f039ff 5/5: Release: v0.9.1

2024-08-16 Thread ELPA Syncer
branch: externals-release/plz
commit c579f039ffdb52ff61775ff25510a9c26e25d0c5
Author: Adam Porter 
Commit: Adam Porter 

Release: v0.9.1
---
 README.org | 2 +-
 plz.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index d817fd33e1..8132cccaeb 100644
--- a/README.org
+++ b/README.org
@@ -188,7 +188,7 @@ You may also clear a queue with ~plz-clear~, which cancels 
any active or queued
 :TOC:  :depth 0
 :END:
 
-** 0.9.1-pre
+** 0.9.1
 
 *Fixes*
 
diff --git a/plz.el b/plz.el
index f34710f77d..6da2251d1f 100644
--- a/plz.el
+++ b/plz.el
@@ -5,7 +5,7 @@
 ;; Author: Adam Porter 
 ;; Maintainer: Adam Porter 
 ;; URL: https://github.com/alphapapa/plz.el
-;; Version: 0.9.1-pre
+;; Version: 0.9.1
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: comm, network, http
 



[elpa] externals/plz 99202f2149 4/9: Docs: Update changelog

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit 99202f2149abbe880fc8cbd8169548684ff032c3
Author: Adam Porter 
Commit: Adam Porter 

Docs: Update changelog
---
 README.org | 4 
 1 file changed, 4 insertions(+)

diff --git a/README.org b/README.org
index 3181c1c58e..2705cbddc3 100644
--- a/README.org
+++ b/README.org
@@ -204,6 +204,10 @@ Nothing new yet.
 
 + The minimum supported Emacs version is now 27.1.  (It is no longer practical 
to test ~plz~ with Emacs versions older than 27.1.  For Emacs 26.3, an earlier 
version of ~plz~ may be used, or this version might be compatible, with or 
without minor changes, which the maintainer cannot offer support for.)
 
+*Additions*
+
++ When downloading to a file, the ~--create-dirs~ option is passed to Curl so 
it will create any necessary subdirectories automatically.  
([[https://github.com/alphapapa/plz.el/pull/64][#64]].  Thanks to 
[[https://github.com/josephmturner][Joseph Turner]] and 
[[https://ushin.org/][USHIN]].)
+
 *Changes*
 
 + Option ~plz-timeout~ is removed.  (It was the default value for ~plz~'s 
~:timeout~ argument, which is passed to Curl as its ~--max-time~ argument, 
limiting the total duration of a request operation.  This argument should be 
unset by default, because larger or slower downloads might not finish within a 
certain duration, and it is surprising to the user to have this option set by 
default, potentially causing requests to timeout unnecessarily.)



[elpa] externals-release/plz 528ce2fba2 2/5: Fix: (plz) Expand as-filename

2024-08-16 Thread ELPA Syncer
branch: externals-release/plz
commit 528ce2fba20e14c5ec63c14e53141db1cd4b7e93
Author: Joseph Turner 
Commit: Adam Porter 

Fix: (plz) Expand as-filename
---
 plz.el | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/plz.el b/plz.el
index 3eb64ed78a..7425f155a3 100644
--- a/plz.el
+++ b/plz.el
@@ -454,7 +454,9 @@ into the process buffer.
 (`(file ,(and (pred stringp) 
as-filename))
  (when (file-exists-p 
as-filename)
(error "File exists, will 
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name' 
because curl doesn't
+ ;; expand, e.g. "~" into 
"/home/...".
+ (setf filename 
(expand-file-name as-filename))
  (list (cons "--output" 
filename))
  ((or 'put 'post)
   (append (list (cons "--dump-header" "-")
@@ -466,7 +468,9 @@ into the process buffer.
 (`(file ,(and (pred stringp) 
as-filename))
  (when (file-exists-p 
as-filename)
(error "File exists, will 
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name' 
because curl doesn't
+ ;; expand, e.g. "~" into 
"/home/...".
+ (setf filename 
(expand-file-name as-filename))
  (list (cons "--output" 
filename
   (list
;; It appears that this must be 
the last argument
@@ -487,7 +491,9 @@ into the process buffer.
 (`(file ,(and (pred stringp) 
as-filename))
  (when (file-exists-p 
as-filename)
(error "File exists, will 
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name' 
because curl doesn't
+ ;; expand, e.g. "~" into 
"/home/...".
+ (setf filename 
(expand-file-name as-filename))
  (list (cons "--output" 
filename))
  ('head
   (list (cons "--head" "")



[elpa] externals/plz 570eae7fe4 7/9: Tidy: (plz) Consolidate duplicate (pcase as ...) forms

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit 570eae7fe435e2655d09cd61ae9b5db90f5c30f6
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (plz) Consolidate duplicate (pcase as ...) forms

This commit avoids duplicate headers by passing --dump-header with "-"
as its value in all requests and then passing it again with the
overriding "/dev/null" value forn HEAD requests which output to the
terminal.  For HEAD requests which output to a file with --output,
--dump-header "-" is necessary since plz--http-status expects the
process buffer to always contain the headers.
---
 plz.el | 82 +-
 1 file changed, 26 insertions(+), 56 deletions(-)

diff --git a/plz.el b/plz.el
index f7b0651e65..903d71e6b9 100644
--- a/plz.el
+++ b/plz.el
@@ -433,69 +433,39 @@ into the process buffer.
  (curl-config-args (append curl-config-header-args
(list (cons "--url" url)
  (cons "--create-dirs" "")
- (cons "--request" (upcase 
(symbol-name method
+ (cons "--request" (upcase 
(symbol-name method)))
+ (cons "--dump-header" "-"))
(when connect-timeout
  (list (cons "--connect-timeout"
  (number-to-string 
connect-timeout
(when timeout
  (list (cons "--max-time" 
(number-to-string timeout
-   ;; NOTE: To make a HEAD request
-   ;; requires using the "--head"
-   ;; option rather than "--request
-   ;; HEAD", and doing so with
-   ;; "--dump-header" duplicates the
-   ;; headers, so we must instead
-   ;; specify that for each other
-   ;; method.
+   (pcase as
+ ('file
+  (setf filename (make-temp-file "plz-"))
+  (list (cons "--output" filename)))
+ (`(file ,(and (pred stringp) as-filename))
+  (when (file-exists-p as-filename)
+(error "File exists, will not 
overwrite: %S" as-filename))
+  ;; Use `expand-file-name' because curl 
doesn't
+  ;; expand, e.g. "~" into "/home/...".
+  (setf filename (expand-file-name 
as-filename))
+  (list (cons "--output" filename)))
+ ((guard (eq 'head method))
+  ;; Don't duplicate headers for HEAD
+  ;; requests which output to the terminal.
+  (list (cons "--dump-header" 
null-device
(pcase method
- ('get
-  (append (list (cons "--dump-header" "-"))
-  (pcase as
-('file
- (setf filename 
(make-temp-file "plz-"))
- (list (cons "--output" 
filename)))
-(`(file ,(and (pred stringp) 
as-filename))
- (when (file-exists-p 
as-filename)
-   (error "File exists, will 
not overwrite: %S" as-filename))
- ;; Use `expand-file-name' 
because curl doesn't
- ;; expand, e.g. "~" into 
"/home/...".
- (setf filename 
(expand-file-name as-filename))
- (list (cons "--output" 
filename))
  ((or 'put 'post)
-  (append (list (cons "--dump-header" "-"))
-  (pcase as
-('file
- (setf filename 
(make-temp-file "plz-"))
- (list (cons "--output" 
filename)))
-(`(file ,(and (pred stringp) 
as-filename))
-

[elpa] externals-release/plz updated (df44acec4b -> c579f039ff)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals-release/plz.

  from  df44acec4b Merge: v0.9
   new  635a026926 Meta: v0.9.1-pre
   new  528ce2fba2 Fix: (plz) Expand as-filename
   new  3df4f3c0a3 Fix: (plz) Docstring, documentation
   new  6b319645d5 Docs: Update changelog
   new  c579f039ff Release: v0.9.1


Summary of changes:
 README.org |  8 +++-
 plz.el | 17 -
 2 files changed, 19 insertions(+), 6 deletions(-)



[elpa] externals/plz 56b930559c 3/9: Fix: (plz) Create empty directories when outputting to a file

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit 56b930559c5e9e20e872cc0090de8622b6816bc8
Author: Joseph Turner 
Commit: Adam Porter 

Fix: (plz) Create empty directories when outputting to a file
---
 plz.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plz.el b/plz.el
index c3316dd481..aff43bdd64 100644
--- a/plz.el
+++ b/plz.el
@@ -431,7 +431,8 @@ into the process buffer.
  (curl-config-header-args (cl-loop for (key . value) in headers
collect (cons "--header" (format 
"%s: %s" key value
  (curl-config-args (append curl-config-header-args
-   (list (cons "--url" url))
+   (list (cons "--url" url)
+ (cons "--create-dirs" ""))
(when connect-timeout
  (list (cons "--connect-timeout"
  (number-to-string 
connect-timeout



[elpa] externals/plz 5008920318 1/9: Meta: v0.10-pre

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit 5008920318e93de6ab4b1a57451dc8437edfe4d6
Author: Adam Porter 
Commit: Adam Porter 

Meta: v0.10-pre
---
 README.org | 4 
 plz.el | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index bc7b2866a6..5e40920a33 100644
--- a/README.org
+++ b/README.org
@@ -188,6 +188,10 @@ You may also clear a queue with ~plz-clear~, which cancels 
any active or queued
 :TOC:  :depth 0
 :END:
 
+** 0.10-pre
+
+Nothing new yet.
+
 ** 0.9
 
 *Compatibility*
diff --git a/plz.el b/plz.el
index 49b37add06..7d5246ca5d 100644
--- a/plz.el
+++ b/plz.el
@@ -5,7 +5,7 @@
 ;; Author: Adam Porter 
 ;; Maintainer: Adam Porter 
 ;; URL: https://github.com/alphapapa/plz.el
-;; Version: 0.9
+;; Version: 0.10-pre
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: comm, network, http
 



[elpa] externals-release/plz 6b319645d5 4/5: Docs: Update changelog

2024-08-16 Thread ELPA Syncer
branch: externals-release/plz
commit 6b319645d5ebfec5a9be8059f6121496a283e18d
Author: Adam Porter 
Commit: Adam Porter 

Docs: Update changelog
---
 README.org | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 06cb9861c4..d817fd33e1 100644
--- a/README.org
+++ b/README.org
@@ -190,7 +190,9 @@ You may also clear a queue with ~plz-clear~, which cancels 
any active or queued
 
 ** 0.9.1-pre
 
-Nothing new yet.
+*Fixes*
+
++ Expand filenames when downloading to files (which was already applied to 
filenames passed for uploading).  (Thanks to 
[[https://github.com/josephmturner][Joseph Turner]].)  
 
 ** 0.9
 



[elpa] externals/plz f7357edb4e 2/9: Merge: v0.9.1

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit f7357edb4e4111a3d602c21185f319772e831229
Merge: 5008920318 c579f039ff
Author: Adam Porter 
Commit: Adam Porter 

Merge: v0.9.1
---
 README.org |  8 +++-
 plz.el | 15 +++
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 5e40920a33..3181c1c58e 100644
--- a/README.org
+++ b/README.org
@@ -125,7 +125,7 @@ Synchronously download a JPEG file, then create an Emacs 
image object from the d
- ~string~ to pass the response body as a decoded string.
- ~response~ to pass a ~plz-response~ structure.
- ~file~ to pass a temporary filename to which the response body has been 
saved without decoding.
-   - ~(file ~FILENAME)~ to pass ~FILENAME~ after having saved the response 
body to it without decoding.  ~FILENAME~ must be a non-existent file; if it 
exists, it will not be overwritten, and an error will be signaled.
+   - ~(file ~FILENAME)~ to pass ~FILENAME~ after having saved the response 
body to it without decoding.  ~FILENAME~ must be a non-existent file; if it 
exists, it will not be overwritten, and an error will be signaled.  ~FILENAME~ 
is passed through ~expand-file-name~, which see.
- A function, which is called in the response buffer with it narrowed to 
the response body (suitable for, e.g. ~json-read~).
 
If ~DECODE~ is non-nil, the response body is decoded automatically.  For 
binary content, it should be nil.  When ~AS~ is ~binary~, ~DECODE~ is 
automatically set to nil.
@@ -192,6 +192,12 @@ You may also clear a queue with ~plz-clear~, which cancels 
any active or queued
 
 Nothing new yet.
 
+** 0.9.1
+
+*Fixes*
+
++ Expand filenames when downloading to files (which was already applied to 
filenames passed for uploading).  (Thanks to 
[[https://github.com/josephmturner][Joseph Turner]].)  
+
 ** 0.9
 
 *Compatibility*
diff --git a/plz.el b/plz.el
index 7d5246ca5d..c3316dd481 100644
--- a/plz.el
+++ b/plz.el
@@ -359,7 +359,8 @@ It may be:
 - `(file FILENAME)' to pass FILENAME after having saved the
   response body to it without decoding.  FILENAME must be a
   non-existent file; if it exists, it will not be overwritten,
-  and an error will be signaled.
+  and an error will be signaled.  FILENAME is passed through
+  `expand-file-name', which see.
 
 - A function, which is called in the response buffer with it
   narrowed to the response body (suitable for, e.g. `json-read').
@@ -454,7 +455,9 @@ into the process buffer.
 (`(file ,(and (pred stringp) 
as-filename))
  (when (file-exists-p 
as-filename)
(error "File exists, will 
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name' 
because curl doesn't
+ ;; expand, e.g. "~" into 
"/home/...".
+ (setf filename 
(expand-file-name as-filename))
  (list (cons "--output" 
filename))
  ((or 'put 'post)
   (append (list (cons "--dump-header" "-")
@@ -466,7 +469,9 @@ into the process buffer.
 (`(file ,(and (pred stringp) 
as-filename))
  (when (file-exists-p 
as-filename)
(error "File exists, will 
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name' 
because curl doesn't
+ ;; expand, e.g. "~" into 
"/home/...".
+ (setf filename 
(expand-file-name as-filename))
  (list (cons "--output" 
filename
   (list
;; It appears that this must be 
the last argument
@@ -487,7 +492,9 @@ into the process buffer.
 (`(file ,(and (pred stringp) 
as-filename))
  (when (file-exists-p 
as-filename)
(error "File exists, will 
not overwrite: %S" as-filename))
- (setf filename as-filename)
+ ;; Use `expand-file-name' 
because curl doesn't
+ ;; expand, e.g. "~" into 
"/home/...".
+ (setf filename 
(expand-file-name as-filename))
 

[elpa] externals/plz updated (399ad3e1aa -> 9fb22d84d9)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/plz.

  from  399ad3e1aa Release: v0.9
   new  5008920318 Meta: v0.10-pre
  adds  9b681d4893 Merge: v0.8
  adds  df44acec4b Merge: v0.9
   new  635a026926 Meta: v0.9.1-pre
   new  528ce2fba2 Fix: (plz) Expand as-filename
   new  3df4f3c0a3 Fix: (plz) Docstring, documentation
   new  6b319645d5 Docs: Update changelog
   new  c579f039ff Release: v0.9.1
   new  f7357edb4e Merge: v0.9.1
   new  56b930559c Fix: (plz) Create empty directories when outputting to a 
file
   new  99202f2149 Docs: Update changelog
   new  8ddabbb5a9 Merge: Create missing subdirectories when downloading to 
a file
   new  a91994aae9 Tidy: (plz) Consolidate --request argument
   new  570eae7fe4 Tidy: (plz) Consolidate duplicate (pcase as ...) forms
   new  60c8e3fe16 Tests: (plz-head-temp-file) Add
   new  9fb22d84d9 Merge: Consolidate curl argument logic


Summary of changes:
 README.org| 16 +-
 plz.el| 88 ---
 tests/test-plz.el | 10 +++
 3 files changed, 57 insertions(+), 57 deletions(-)



[elpa] externals/plz 8ddabbb5a9 5/9: Merge: Create missing subdirectories when downloading to a file

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit 8ddabbb5a95a0d3ef0b6b0cfd6e17cb616b2981c
Merge: f7357edb4e 99202f2149
Author: Adam Porter 
Commit: Adam Porter 

Merge: Create missing subdirectories when downloading to a file
---
 README.org | 4 
 plz.el | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 3181c1c58e..2705cbddc3 100644
--- a/README.org
+++ b/README.org
@@ -204,6 +204,10 @@ Nothing new yet.
 
 + The minimum supported Emacs version is now 27.1.  (It is no longer practical 
to test ~plz~ with Emacs versions older than 27.1.  For Emacs 26.3, an earlier 
version of ~plz~ may be used, or this version might be compatible, with or 
without minor changes, which the maintainer cannot offer support for.)
 
+*Additions*
+
++ When downloading to a file, the ~--create-dirs~ option is passed to Curl so 
it will create any necessary subdirectories automatically.  
([[https://github.com/alphapapa/plz.el/pull/64][#64]].  Thanks to 
[[https://github.com/josephmturner][Joseph Turner]] and 
[[https://ushin.org/][USHIN]].)
+
 *Changes*
 
 + Option ~plz-timeout~ is removed.  (It was the default value for ~plz~'s 
~:timeout~ argument, which is passed to Curl as its ~--max-time~ argument, 
limiting the total duration of a request operation.  This argument should be 
unset by default, because larger or slower downloads might not finish within a 
certain duration, and it is surprising to the user to have this option set by 
default, potentially causing requests to timeout unnecessarily.)
diff --git a/plz.el b/plz.el
index c3316dd481..aff43bdd64 100644
--- a/plz.el
+++ b/plz.el
@@ -431,7 +431,8 @@ into the process buffer.
  (curl-config-header-args (cl-loop for (key . value) in headers
collect (cons "--header" (format 
"%s: %s" key value
  (curl-config-args (append curl-config-header-args
-   (list (cons "--url" url))
+   (list (cons "--url" url)
+ (cons "--create-dirs" ""))
(when connect-timeout
  (list (cons "--connect-timeout"
  (number-to-string 
connect-timeout



[elpa] externals/plz 9fb22d84d9 9/9: Merge: Consolidate curl argument logic

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit 9fb22d84d9e39692392276d7b7b9979ca6ca1c01
Merge: 8ddabbb5a9 60c8e3fe16
Author: Adam Porter 
Commit: Adam Porter 

Merge: Consolidate curl argument logic

Also adds Joseph's test for "'head :as 'file".
---
 plz.el| 88 ++-
 tests/test-plz.el | 10 +++
 2 files changed, 38 insertions(+), 60 deletions(-)

diff --git a/plz.el b/plz.el
index aff43bdd64..903d71e6b9 100644
--- a/plz.el
+++ b/plz.el
@@ -432,74 +432,42 @@ into the process buffer.
collect (cons "--header" (format 
"%s: %s" key value
  (curl-config-args (append curl-config-header-args
(list (cons "--url" url)
- (cons "--create-dirs" ""))
+ (cons "--create-dirs" "")
+ (cons "--request" (upcase 
(symbol-name method)))
+ (cons "--dump-header" "-"))
(when connect-timeout
  (list (cons "--connect-timeout"
  (number-to-string 
connect-timeout
(when timeout
  (list (cons "--max-time" 
(number-to-string timeout
-   ;; NOTE: To make a HEAD request
-   ;; requires using the "--head"
-   ;; option rather than "--request
-   ;; HEAD", and doing so with
-   ;; "--dump-header" duplicates the
-   ;; headers, so we must instead
-   ;; specify that for each other
-   ;; method.
+   (pcase as
+ ('file
+  (setf filename (make-temp-file "plz-"))
+  (list (cons "--output" filename)))
+ (`(file ,(and (pred stringp) as-filename))
+  (when (file-exists-p as-filename)
+(error "File exists, will not 
overwrite: %S" as-filename))
+  ;; Use `expand-file-name' because curl 
doesn't
+  ;; expand, e.g. "~" into "/home/...".
+  (setf filename (expand-file-name 
as-filename))
+  (list (cons "--output" filename)))
+ ((guard (eq 'head method))
+  ;; Don't duplicate headers for HEAD
+  ;; requests which output to the terminal.
+  (list (cons "--dump-header" 
null-device
(pcase method
- ('get
-  (append (list (cons "--dump-header" "-"))
-  (pcase as
-('file
- (setf filename 
(make-temp-file "plz-"))
- (list (cons "--output" 
filename)))
-(`(file ,(and (pred stringp) 
as-filename))
- (when (file-exists-p 
as-filename)
-   (error "File exists, will 
not overwrite: %S" as-filename))
- ;; Use `expand-file-name' 
because curl doesn't
- ;; expand, e.g. "~" into 
"/home/...".
- (setf filename 
(expand-file-name as-filename))
- (list (cons "--output" 
filename))
  ((or 'put 'post)
-  (append (list (cons "--dump-header" "-")
-(cons "--request" (upcase 
(symbol-name method
-  (pcase as
-('file
- (setf filename 
(make-temp-file "plz-"))
- (list (cons "--output" 
filename)))
-(`(file ,(and (pred stringp) 
as-filename))
- (when (file-exists-p 
as-filename)
-   (error "File exists, will 
not ov

[elpa] externals/plz a91994aae9 6/9: Tidy: (plz) Consolidate --request argument

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit a91994aae91e4db96062abc7cbabbccf8e09cd16
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (plz) Consolidate --request argument

This tidy-up commit means that GET requests now explicitly pass
"--request GET" to curl, which appears to make no difference.
---
 plz.el | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/plz.el b/plz.el
index aff43bdd64..f7b0651e65 100644
--- a/plz.el
+++ b/plz.el
@@ -432,7 +432,8 @@ into the process buffer.
collect (cons "--header" (format 
"%s: %s" key value
  (curl-config-args (append curl-config-header-args
(list (cons "--url" url)
- (cons "--create-dirs" ""))
+ (cons "--create-dirs" "")
+ (cons "--request" (upcase 
(symbol-name method
(when connect-timeout
  (list (cons "--connect-timeout"
  (number-to-string 
connect-timeout
@@ -461,8 +462,7 @@ into the process buffer.
  (setf filename 
(expand-file-name as-filename))
  (list (cons "--output" 
filename))
  ((or 'put 'post)
-  (append (list (cons "--dump-header" "-")
-(cons "--request" (upcase 
(symbol-name method
+  (append (list (cons "--dump-header" "-"))
   (pcase as
 ('file
  (setf filename 
(make-temp-file "plz-"))
@@ -484,8 +484,7 @@ into the process buffer.
   (cons "--upload-file" 
(expand-file-name filename)))
  (_ (cons data-arg "@-"))
  ('delete
-  (append (list (cons "--dump-header" "-")
-(cons "--request" (upcase 
(symbol-name method
+  (append (list (cons "--dump-header" "-"))
   (pcase as
 ('file
  (setf filename 
(make-temp-file "plz-"))
@@ -498,8 +497,7 @@ into the process buffer.
  (setf filename 
(expand-file-name as-filename))
  (list (cons "--output" 
filename))
  ('head
-  (list (cons "--head" "")
-(cons "--request" "HEAD"))
+  (list (cons "--head" ""))
  (curl-config (cl-loop for (key . value) in curl-config-args
concat (format "%s \"%s\"\n" key value)))
  (decode (pcase as



[elpa] externals/plz 60c8e3fe16 8/9: Tests: (plz-head-temp-file) Add

2024-08-16 Thread ELPA Syncer
branch: externals/plz
commit 60c8e3fe160f0fbd3385983ad65ed5407e2d4fcc
Author: Joseph Turner 
Commit: Joseph Turner 

Tests: (plz-head-temp-file) Add
---
 tests/test-plz.el | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/tests/test-plz.el b/tests/test-plz.el
index 8725b9e4dc..415edfd6f5 100644
--- a/tests/test-plz.el
+++ b/tests/test-plz.el
@@ -470,6 +470,16 @@ in URL-encoded form)."
   ;; It's a temp file, so it should always be deleted.
   (delete-file filename
 
+(plz-deftest plz-head-temp-file ()
+  (let ((filename (plz 'head (url "/image/jpeg")
+:as 'file :then 'sync)))
+(unwind-protect
+(with-temp-buffer
+  (insert-file-contents filename)
+  (should (re-search-forward "Content-Type: image/jpeg")))
+  ;; It's a temp file, so it should always be deleted.
+  (delete-file filename
+
 (plz-deftest plz-get-named-file ()
   (let ((filename (make-temp-file "plz-")))
 ;; HACK: Delete the temp file and reuse its name, because



[nongnu] elpa/hyperdrive de0d6f98ec 2/8: Change: (hyperdrive-download-url) Make async

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit de0d6f98ec1ab49af28049e2fe34ec064d10cf1a
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-download-url) Make async
---
 hyperdrive.el | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index d27a80426a..72dd2b97ca 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -464,11 +464,15 @@ in a directory.  Otherwise, or with universal prefix 
argument
 ;; TODO(plz v0.10.0): In an upcoming version of `plz', nonexistent parent
 ;; directories will be created for us.  At that point, remove this line.
 (make-directory (file-name-parent-directory filename) t)
-(h/api 'get url :as `(file ,filename))
-;; TODO: If plz adds support for getting response headers when downloading
-;; as a file (), use it 
here.
-;; Filling entry is necessary in order to update hyperdrive disk-usage.
-(he/fill (h/url-entry url
+(h/api 'get url :as `(file ,filename)
+  :then (lambda (_)
+  (h/message "Downloaded `%s' to `%s'." url filename)
+  ;; TODO: If plz adds support for getting response headers when 
downloading
+  ;; as a file (), 
use it here.
+  ;; Filling entry is necessary in order to update hyperdrive 
disk-usage.
+  (he/fill (h/url-entry url)))
+  :else (lambda (plz-error)
+  (h/message "Unable to download: %s: %S" url plz-error)
 
 ;;;###autoload
 (defun hyperdrive-write-buffer (entry &optional overwritep)



[nongnu] elpa/hyperdrive 1e539c435c 3/8: Meta: Update changelog

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 1e539c435c941ebc1a44f57ca2f4d7f358b3302d
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Update changelog
---
 CHANGELOG.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index e0edbd7a22..b98516d7d4 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -47,6 +47,7 @@ space by "forgetting" your copy of a file 
(~hyperdrive-forget-file~)!
   bar labels cannot be updated while the menu bar is open.
 - Better error message when the gateway is not installed.
   Thanks to ~magnum~ on XMPP for reporting.
+- Make ~hyperdrive-download~ asynchronous.
 - Remove ~hyperdrive-reuse-buffers~ user option to ensure consistent
   behavior when uniquifying buffer names.
 - Remove ~hyperdrive-honor-auto-mode-alist~ user option; hyperdrives



[nongnu] elpa/hyperdrive updated (74cd5f6ce3 -> f78087ede8)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  74cd5f6ce3 Docs: Document history buffer file size color
   new  a234d3ee28 Fix: (hyperdrive-download-url) Create nonexistent parent 
directories
   new  de0d6f98ec Change: (hyperdrive-download-url) Make async
   new  1e539c435c Meta: Update changelog
   new  9524d30b2f Docs: Update installation instructions
   new  fd64117c35 Change: (he/within-version-range-p) Rename from 
he/within-version-range
   new  bba6d9a8d0 Tidy: (h/history--invalidate-entry) Remove unnecessary 
`and' check
   new  0718055eef Tidy: (h/dir--invalidate-entry) Remove unnecessary `and' 
check
   new  f78087ede8 Tidy: (h/history-find-file) Use defun, not cl-defun


Summary of changes:
 CHANGELOG.org |  1 +
 doc/hyperdrive.org|  3 +++
 doc/hyperdrive.texi   |  3 +++
 hyperdrive-dir.el |  5 ++---
 hyperdrive-history.el |  7 +++
 hyperdrive-lib.el |  2 +-
 hyperdrive.el | 17 -
 7 files changed, 25 insertions(+), 13 deletions(-)



[nongnu] elpa/hyperdrive 9524d30b2f 4/8: Docs: Update installation instructions

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 9524d30b2fcef74ca15dbc444fc7bcd3d99b494d
Author: Joseph Turner 
Commit: Joseph Turner 

Docs: Update installation instructions
---
 doc/hyperdrive.org  | 3 +++
 doc/hyperdrive.texi | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/doc/hyperdrive.org b/doc/hyperdrive.org
index 9c68ad5524..7ba5486314 100644
--- a/doc/hyperdrive.org
+++ b/doc/hyperdrive.org
@@ -47,6 +47,9 @@ modify this GNU manual."
 
 ~hyperdrive.el~ requires a reasonably up-to-date version of 
[[https://curl.se/download.html][curl]].
 
+Feel free to skip this step.  ~curl~ may already installed on your
+machine, and ~hyperdrive.el~ will warn you otherwise.
+
 ** Install hyperdrive.el
 
 ~hyperdrive.el~ can be installed from 
[[https://elpa.nongnu.org/nongnu/hyperdrive.html][NonGNU ELPA]] with ~M-x
diff --git a/doc/hyperdrive.texi b/doc/hyperdrive.texi
index 746f3bb430..575656c44a 100644
--- a/doc/hyperdrive.texi
+++ b/doc/hyperdrive.texi
@@ -227,6 +227,9 @@ modify this GNU manual.''
 
 @code{hyperdrive.el} requires a reasonably up-to-date version of 
@uref{https://curl.se/download.html, curl}.
 
+Feel free to skip this step.  @code{curl} may already installed on your
+machine, and @code{hyperdrive.el} will warn you otherwise.
+
 @node Install hyperdriveel
 @section Install hyperdrive.el
 



[nongnu] elpa/hyperdrive a234d3ee28 1/8: Fix: (hyperdrive-download-url) Create nonexistent parent directories

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit a234d3ee2885adc4a56468359dd6aaca28adc130
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (hyperdrive-download-url) Create nonexistent parent directories
---
 hyperdrive.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hyperdrive.el b/hyperdrive.el
index ce4a989256..d27a80426a 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -461,6 +461,9 @@ in a directory.  Otherwise, or with universal prefix 
argument
 (when (file-exists-p filename)
   ;; plz.el will not overwrite existing files: ensure there's no file 
there.
   (delete-file filename))
+;; TODO(plz v0.10.0): In an upcoming version of `plz', nonexistent parent
+;; directories will be created for us.  At that point, remove this line.
+(make-directory (file-name-parent-directory filename) t)
 (h/api 'get url :as `(file ,filename))
 ;; TODO: If plz adds support for getting response headers when downloading
 ;; as a file (), use it 
here.



[nongnu] elpa/hyperdrive fd64117c35 5/8: Change: (he/within-version-range-p) Rename from he/within-version-range

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit fd64117c3597e3c375a3da7472ad85d924b7b5fd
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he/within-version-range-p) Rename from he/within-version-range

Suggested-by: Adam Porter 
---
 hyperdrive-history.el | 2 +-
 hyperdrive-lib.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index d02b5a961d..7bf8a04224 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -125,7 +125,7 @@ All other slots in each ewoc node entry data will be 
reused."
   (history-ewoc (buffer-local-value 'h/ewoc history-buffer))
   (history-node (and history-ewoc
  (h/ewoc-find-node history-ewoc entry
-   :predicate #'he/within-version-range)))
+   :predicate #'he/within-version-range-p)))
   (history-ewoc-entry (ewoc-data history-node)))
 (setf (map-elt (he/etc history-ewoc-entry) 'block-length-downloaded)
   (map-elt (he/etc entry) 'block-length-downloaded))
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index c59eb58e9c..85c4746e3b 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1735,7 +1735,7 @@ Compares their public keys."
   "Return non-nil if entries A and B have the same hyperdrive."
   (h/equal-p (he/hyperdrive a) (he/hyperdrive b)))
 
-(defun he/within-version-range (entry entry-with-range-end)
+(defun he/within-version-range-p (entry entry-with-range-end)
   "Return non-nil if ENTRY is within ENTRY-WITH-RANGE-END's range."
   (<= (he/version entry-with-range-end)
   (or (he/version entry)



[nongnu] elpa/hyperdrive 0718055eef 7/8: Tidy: (h/dir--invalidate-entry) Remove unnecessary `and' check

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 0718055eefe85f0269b116e9d8247b5233780f0a
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (h/dir--invalidate-entry) Remove unnecessary `and' check
---
 hyperdrive-dir.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 35593d1856..bfe95d6ff3 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -102,9 +102,8 @@ All other slots in each ewoc node entry data will be 
reused."
   (when-let* ((dir-buffer (hyperdrive--find-buffer-visiting
(hyperdrive-parent entry)))
   (dir-ewoc (buffer-local-value 'h/ewoc dir-buffer))
-  (dir-node (and dir-ewoc
- (h/ewoc-find-node dir-ewoc entry
-   :predicate #'he/equal-p)))
+  (dir-node (h/ewoc-find-node dir-ewoc entry
+  :predicate #'he/equal-p))
   (dir-ewoc-entry (ewoc-data dir-node)))
 (setf (map-elt (he/etc dir-ewoc-entry) 'block-length-downloaded)
   (map-elt (he/etc entry) 'block-length-downloaded))



[nongnu] elpa/hyperdrive f78087ede8 8/8: Tidy: (h/history-find-file) Use defun, not cl-defun

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit f78087ede84f9fc10f3f0311c7110fce83828053
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (h/history-find-file) Use defun, not cl-defun

Suggested-by: Adam Porter 
---
 hyperdrive-history.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 0cca7334b3..dea451616c 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -276,7 +276,7 @@ Interactively, diff entry at point with previous entry."
 :then (lambda ()
 (pop-to-buffer (current-buffer)
 
-(cl-defun h/history-find-file (entry)
+(defun h/history-find-file (entry)
   "Visit hyperdrive ENTRY at point.
 When entry does not exist, does nothing and returns nil.  When
 entry is not known to exist, attempts to load entry at ENTRY's



[nongnu] elpa/hyperdrive bba6d9a8d0 6/8: Tidy: (h/history--invalidate-entry) Remove unnecessary `and' check

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit bba6d9a8d0c76a20ddcbe5eff100ac7545b55b5d
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (h/history--invalidate-entry) Remove unnecessary `and' check
---
 hyperdrive-history.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 7bf8a04224..0cca7334b3 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -123,9 +123,8 @@ Invalidated ewoc node entries will have these slots updated:
 All other slots in each ewoc node entry data will be reused."
   (when-let* ((history-buffer (h/history-find-buffer-visiting entry))
   (history-ewoc (buffer-local-value 'h/ewoc history-buffer))
-  (history-node (and history-ewoc
- (h/ewoc-find-node history-ewoc entry
-   :predicate #'he/within-version-range-p)))
+  (history-node (h/ewoc-find-node history-ewoc entry
+  :predicate #'he/within-version-range-p))
   (history-ewoc-entry (ewoc-data history-node)))
 (setf (map-elt (he/etc history-ewoc-entry) 'block-length-downloaded)
   (map-elt (he/etc entry) 'block-length-downloaded))



[elpa] externals/taxy 3099ae5cb2 3/3: Release: v0.10.2

2024-08-16 Thread ELPA Syncer
branch: externals/taxy
commit 3099ae5cb27a34961e06a3af67555919c62c12d7
Author: Adam Porter 
Commit: Adam Porter 

Release: v0.10.2
---
 README.org |   2 +-
 taxy.el|   2 +-
 taxy.info  | 106 ++---
 3 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/README.org b/README.org
index 624240f53f..23c7f04eac 100644
--- a/README.org
+++ b/README.org
@@ -933,7 +933,7 @@ In Emacs 28+, see also =M-x shortdoc-display-group RET taxy 
RET=.
 :TOC:  :depth 0
 :END:
 
-** 0.10.2-pre
+** 0.10.2
 
 *Fixes*
 + Reduce potential length of macro-expanded docstrings to prevent 
byte-compiler warnings in downstream packages.
diff --git a/taxy.el b/taxy.el
index 3c40dd7e8b..b6da5ec5a8 100644
--- a/taxy.el
+++ b/taxy.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Adam Porter 
 ;; URL: https://github.com/alphapapa/taxy.el
 ;; Package-Requires: ((emacs "26.3"))
-;; Version: 0.10.2-pre
+;; Version: 0.10.2
 ;; Keywords: lisp
 
 ;; This program is free software; you can redistribute it and/or modify
diff --git a/taxy.info b/taxy.info
index c4db8a58ef..80e959dadf 100644
--- a/taxy.info
+++ b/taxy.info
@@ -76,7 +76,7 @@ Reference
 
 Changelog
 
-* 0.10.2-pre: 0102-pre.
+* 0.10.2: 0102.
 * 0.10.1: 0101.
 * 0.10: 010.
 * 0.9: 09.
@@ -1137,7 +1137,7 @@ File: README.info,  Node: Changelog,  Next: Development,  
Prev: Usage,  Up: Top
 
 * Menu:
 
-* 0.10.2-pre: 0102-pre.
+* 0.10.2: 0102.
 * 0.10.1: 0101.
 * 0.10: 010.
 * 0.9: 09.
@@ -1151,17 +1151,17 @@ File: README.info,  Node: Changelog,  Next: 
Development,  Prev: Usage,  Up: Top
 * 0.1: 01.
 
 
-File: README.info,  Node: 0102-pre,  Next: 0101,  Up: Changelog
+File: README.info,  Node: 0102,  Next: 0101,  Up: Changelog
 
-4.1 0.10.2-pre
-==
+4.1 0.10.2
+==
 
 *Fixes*
• Reduce potential length of macro-expanded docstrings to prevent
  byte-compiler warnings in downstream packages.
 
 
-File: README.info,  Node: 0101,  Next: 010,  Prev: 0102-pre,  Up: Changelog
+File: README.info,  Node: 0101,  Next: 010,  Prev: 0102,  Up: Changelog
 
 4.2 0.10.1
 ==
@@ -1480,53 +1480,53 @@ GPLv3
 
 Tag Table:
 Node: Top218
-Node: Examples2321
-Node: Numbery (starting basically)2640
-Node: Lettery (filling incrementally)8401
-Node: Sporty (understanding completely)10915
-Node: Applications16902
-Node: Installation17377
-Node: Usage17690
-Node: Reusable taxys19845
-Node: Threading macros23998
-Node: Modifying filled taxys24537
-Node: Dynamic taxys25355
-Node: Multi-level dynamic taxys28004
-Node: "Chains" of independent multi-level dynamic taxys30197
-Node: Defining a classification domain-specific language33128
-Node: Magit section37291
-Node: Reference37959
-Node: Functions38167
-Node: Macros40145
-Node: Changelog40795
-Node: 0102-pre41065
-Node: 010141295
-Node: 01041459
-Node: 0941675
-Node: Changes41785
-Node: 0842157
-Node: Additions42278
-Node: Fixes42422
-Node: 0742560
-Node: Additions (1)42685
-Node: 0643004
-Node: Additions (2)43129
-Node: 0544479
-Node: Additions (3)44624
-Node: Fixes (1)45734
-Node: 0445892
-Node: 0346114
-Node: Changes (1)46257
-Node: Fixes (2)46626
-Node: 0247067
-Node: Changes (2)47238
-Node: Additions (4)47532
-Node: Fixes (3)48457
-Node: 0148713
-Node: Development48814
-Node: Copyright assignment49020
-Node: Credits49608
-Node: License49798
+Node: Examples2313
+Node: Numbery (starting basically)2632
+Node: Lettery (filling incrementally)8393
+Node: Sporty (understanding completely)10907
+Node: Applications16894
+Node: Installation17369
+Node: Usage17682
+Node: Reusable taxys19837
+Node: Threading macros23990
+Node: Modifying filled taxys24529
+Node: Dynamic taxys25347
+Node: Multi-level dynamic taxys27996
+Node: "Chains" of independent multi-level dynamic taxys30189
+Node: Defining a classification domain-specific language33120
+Node: Magit section37283
+Node: Reference37951
+Node: Functions38159
+Node: Macros40137
+Node: Changelog40787
+Node: 010241049
+Node: 010141267
+Node: 01041427
+Node: 0941643
+Node: Changes41753
+Node: 0842125
+Node: Additions42246
+Node: Fixes42390
+Node: 0742528
+Node: Additions (1)42653
+Node: 0642972
+Node: Additions (2)43097
+Node: 057
+Node: Additions (3)44592
+Node: Fixes (1)45702
+Node: 0445860
+Node: 0346082
+Node: Changes (1)46225
+Node: Fixes (2)46594
+Node: 0247035
+Node: Changes (2)47206
+Node: Additions (4)47500
+Node: Fixes (3)48425
+Node: 0148681
+Node: Development48782
+Node: Copyright assignment48988
+Node: Credits49576
+Node: License49766
 
 End Tag Table
 



[elpa] externals/taxy 43e1e47aed 2/3: Fix: (taxy-define-key-definer) Reduce expanded docstring width

2024-08-16 Thread ELPA Syncer
branch: externals/taxy
commit 43e1e47aed3f77c3270ce70a6a29154f2447f388
Author: Adam Porter 
Commit: Adam Porter 

Fix: (taxy-define-key-definer) Reduce expanded docstring width
---
 README.org |   3 +-
 taxy.el|   6 +-
 taxy.info  | 247 -
 3 files changed, 137 insertions(+), 119 deletions(-)

diff --git a/README.org b/README.org
index 7acde9d019..624240f53f 100644
--- a/README.org
+++ b/README.org
@@ -935,7 +935,8 @@ In Emacs 28+, see also =M-x shortdoc-display-group RET taxy 
RET=.
 
 ** 0.10.2-pre
 
-Nothing new yet.
+*Fixes*
++ Reduce potential length of macro-expanded docstrings to prevent 
byte-compiler warnings in downstream packages.
 
 ** 0.10.1
 
diff --git a/taxy.el b/taxy.el
index bacef75d33..3c40dd7e8b 100644
--- a/taxy.el
+++ b/taxy.el
@@ -298,7 +298,11 @@ item being tested, bound within the function to `item'."
   ;; breaks the second expansion, and this works around that.
   `(let ((variable ',variable))
  (defvar ,variable nil
-   ,(format "Alist mapping key aliases to key functions defined with `%s'."
+   ;; For the best chance for this docstring to not exceed 80 characters 
in width, the
+   ;; macro's name goes on its own line.
+   ,(format "Alist mapping key aliases to key functions.
+This instance is defined with the macro:
+`%s'."
 name))
  (defmacro ,name (name args &rest body)
,docstring
diff --git a/taxy.info b/taxy.info
index 5406876a44..c4db8a58ef 100644
--- a/taxy.info
+++ b/taxy.info
@@ -1,4 +1,4 @@
-This is README.info, produced by makeinfo version 5.2 from README.texi.
+This is README.info, produced by makeinfo version 6.7 from README.texi.
 
 INFO-DIR-SECTION Emacs
 START-INFO-DIR-ENTRY
@@ -14,7 +14,7 @@ taxy.el
 https://elpa.gnu.org/packages/taxy.svg
 (https://elpa.gnu.org/packages/taxy.html)
 
-   _Now, where did I put that…_
+   _Now, where did I put that..._
 
This library provides a programmable way to classify arbitrary
 objects into a hierarchical taxonomy.  (That’s a lot of fancy words to
@@ -66,7 +66,7 @@ Usage
 Dynamic taxys
 
 * Multi-level dynamic taxys::
-* "Chains" of independent, multi-level dynamic taxys: "Chains" of independent 
multi-level dynamic taxys. 
+* "Chains" of independent, multi-level dynamic taxys: "Chains" of independent 
multi-level dynamic taxys.
 * Defining a classification domain-specific language::
 
 Reference
@@ -76,17 +76,18 @@ Reference
 
 Changelog
 
-* 0.10.1: 0101. 
-* 0.10: 010. 
-* 0.9: 09. 
-* 0.8: 08. 
-* 0.7: 07. 
-* 0.6: 06. 
-* 0.5: 05. 
-* 0.4: 04. 
-* 0.3: 03. 
-* 0.2: 02. 
-* 0.1: 01. 
+* 0.10.2-pre: 0102-pre.
+* 0.10.1: 0101.
+* 0.10: 010.
+* 0.9: 09.
+* 0.8: 08.
+* 0.7: 07.
+* 0.6: 06.
+* 0.5: 05.
+* 0.4: 04.
+* 0.3: 03.
+* 0.2: 02.
+* 0.1: 01.
 
 0.9
 
@@ -99,27 +100,27 @@ Changelog
 
 0.7
 
-* Additions: Additions (1). 
+* Additions: Additions (1).
 
 0.6
 
-* Additions: Additions (2). 
+* Additions: Additions (2).
 
 0.5
 
-* Additions: Additions (3). 
-* Fixes: Fixes (1). 
+* Additions: Additions (3).
+* Fixes: Fixes (1).
 
 0.3
 
-* Changes: Changes (1). 
-* Fixes: Fixes (2). 
+* Changes: Changes (1).
+* Fixes: Fixes (2).
 
 0.2
 
-* Changes: Changes (2). 
-* Additions: Additions (4). 
-* Fixes: Fixes (3). 
+* Changes: Changes (2).
+* Additions: Additions (4).
+* Fixes: Fixes (3).
 
 Development
 
@@ -773,7 +774,7 @@ and it produces this taxonomy of buffers:
 * Menu:
 
 * Multi-level dynamic taxys::
-* "Chains" of independent, multi-level dynamic taxys: "Chains" of independent 
multi-level dynamic taxys. 
+* "Chains" of independent, multi-level dynamic taxys: "Chains" of independent 
multi-level dynamic taxys.
 * Defining a classification domain-specific language::
 
 
@@ -1136,22 +1137,33 @@ File: README.info,  Node: Changelog,  Next: 
Development,  Prev: Usage,  Up: Top
 
 * Menu:
 
-* 0.10.1: 0101. 
-* 0.10: 010. 
-* 0.9: 09. 
-* 0.8: 08. 
-* 0.7: 07. 
-* 0.6: 06. 
-* 0.5: 05. 
-* 0.4: 04. 
-* 0.3: 03. 
-* 0.2: 02. 
-* 0.1: 01. 
+* 0.10.2-pre: 0102-pre.
+* 0.10.1: 0101.
+* 0.10: 010.
+* 0.9: 09.
+* 0.8: 08.
+* 0.7: 07.
+* 0.6: 06.
+* 0.5: 05.
+* 0.4: 04.
+* 0.3: 03.
+* 0.2: 02.
+* 0.1: 01.
 
 
-File: README.info,  Node: 0101,  Next: 010,  Up: Changelog
+File: README.info,  Node: 0102-pre,  Next: 0101,  Up: Changelog
 
-4.1 0.10.1
+4.1 0.10.2-pre
+==
+
+*Fixes*
+   • Reduce potential length of macro-expanded docstrings to prevent
+ byte-compiler warnings in downstream packages.
+
+
+File: README.info,  Node: 0101,  Next: 010,  Prev: 0102-pre,  Up: Changelog
+
+4.2 0.10.1
 ==
 
 *Examples*
@@ -1160,7 +1172,7 @@ File: README.info,  Node: 0101,  Next: 010,  Up: Changelog
 
 File: README.info,  Node: 010,  Next: 09,  Prev: 0101,  Up: Changelog
 
-4.2 0.10
+4.3 0.10
 
 
 *Examples*
@@ -1171,7 +1183,7 @@ File: README.info,  Node: 010,  Next: 09,  Prev: 0101,  
Up: Changelog
 
 File: README.info,  Node: 09,  Next: 08,  Prev: 010,  Up: Changelog
 
-4.3 0.9
+4.4 0.9
 ==

[elpa] externals/taxy d847db3e5f 1/3: Meta: v0.10.2-pre

2024-08-16 Thread ELPA Syncer
branch: externals/taxy
commit d847db3e5f08a1bcce12271228ebef546be21a19
Author: Adam Porter 
Commit: Adam Porter 

Meta: v0.10.2-pre
---
 README.org | 4 
 taxy.el| 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 47f6e116e5..7acde9d019 100644
--- a/README.org
+++ b/README.org
@@ -933,6 +933,10 @@ In Emacs 28+, see also =M-x shortdoc-display-group RET 
taxy RET=.
 :TOC:  :depth 0
 :END:
 
+** 0.10.2-pre
+
+Nothing new yet.
+
 ** 0.10.1
 
 *Examples*
diff --git a/taxy.el b/taxy.el
index 0e26abf43b..bacef75d33 100644
--- a/taxy.el
+++ b/taxy.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Adam Porter 
 ;; URL: https://github.com/alphapapa/taxy.el
 ;; Package-Requires: ((emacs "26.3"))
-;; Version: 0.10.1
+;; Version: 0.10.2-pre
 ;; Keywords: lisp
 
 ;; This program is free software; you can redistribute it and/or modify



[elpa] externals/taxy-magit-section c4d8c1c539 2/2: Release: v0.14

2024-08-16 Thread ELPA Syncer
branch: externals/taxy-magit-section
commit c4d8c1c5393807c41a5b20030a6347beb088b47e
Author: Adam Porter 
Commit: Adam Porter 

Release: v0.14
---
 README.org  |  2 +-
 taxy-magit-section.el   |  2 +-
 taxy-magit-section.info | 40 
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/README.org b/README.org
index 00e6196382..980e0a1007 100644
--- a/README.org
+++ b/README.org
@@ -32,7 +32,7 @@ This library renders 
[[https://github.com/alphapapa/taxy.el][Taxy]] structs with
 :TOC:  :depth 0
 :END:
 
-** 0.14-pre
+** 0.14
 
 *Fixes*
 + Reduce the potential width of macro-expanded docstrings to prevent 
byte-compiler warnings.
diff --git a/taxy-magit-section.el b/taxy-magit-section.el
index cf4c15ee94..8792f0b392 100644
--- a/taxy-magit-section.el
+++ b/taxy-magit-section.el
@@ -5,7 +5,7 @@
 ;; Author: Adam Porter 
 ;; Maintainer: Adam Porter 
 ;; URL: https://github.com/alphapapa/taxy.el
-;; Version: 0.14-pre
+;; Version: 0.14
 ;; Package-Requires: ((emacs "26.3") (magit-section "3.2.1") (taxy "0.10"))
 ;; Keywords: lisp
 
diff --git a/taxy-magit-section.info b/taxy-magit-section.info
index c37cd5a9b9..4f7098f5b0 100644
--- a/taxy-magit-section.info
+++ b/taxy-magit-section.info
@@ -29,7 +29,7 @@ structs with magit-section 
(https://melpa.org/#/magit-section).
 
 Changelog
 
-* 0.14-pre: 014-pre.
+* 0.14: 014.
 * 0.13: 013.
 * 0.12.2: 0122.
 * 0.12.1: 0121.
@@ -59,7 +59,7 @@ File: README.info,  Node: Changelog,  Next: Development,  
Prev: Installation,  U
 
 * Menu:
 
-* 0.14-pre: 014-pre.
+* 0.14: 014.
 * 0.13: 013.
 * 0.12.2: 0122.
 * 0.12.1: 0121.
@@ -70,17 +70,17 @@ File: README.info,  Node: Changelog,  Next: Development,  
Prev: Installation,  U
 * 0.9: 09.
 
 
-File: README.info,  Node: 014-pre,  Next: 013,  Up: Changelog
+File: README.info,  Node: 014,  Next: 013,  Up: Changelog
 
-2.1 0.14-pre
-
+2.1 0.14
+
 
 *Fixes*
• Reduce the potential width of macro-expanded docstrings to prevent
  byte-compiler warnings.
 
 
-File: README.info,  Node: 013,  Next: 0122,  Prev: 014-pre,  Up: Changelog
+File: README.info,  Node: 013,  Next: 0122,  Prev: 014,  Up: Changelog
 
 2.2 0.13
 
@@ -191,20 +191,20 @@ GPLv3
 
 Tag Table:
 Node: Top221
-Node: Installation834
-Node: Changelog1188
-Node: 014-pre1443
-Node: 0131647
-Node: 01222122
-Node: 01212254
-Node: 0122387
-Node: 0112524
-Node: 0102725
-Node: 0912880
-Node: 093272
-Node: Development3462
-Node: Credits3689
-Node: License3879
+Node: Installation826
+Node: Changelog1180
+Node: 0141427
+Node: 0131619
+Node: 01222090
+Node: 0121
+Node: 0122355
+Node: 0112492
+Node: 0102693
+Node: 0912848
+Node: 093240
+Node: Development3430
+Node: Credits3657
+Node: License3847
 
 End Tag Table
 



[elpa] externals/taxy-magit-section updated (cfcfdaf25a -> c4d8c1c539)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/taxy-magit-section.

  from  cfcfdaf25a Docs: Fix typo
   new  c113fda80d Fix: (taxy-magit-section-define-column-definer) Reduce 
docstring width
   new  c4d8c1c539 Release: v0.14


Summary of changes:
 README.org  |  5 +++--
 taxy-magit-section.el   | 10 +++---
 taxy-magit-section.info | 44 +++-
 3 files changed, 33 insertions(+), 26 deletions(-)



[elpa] externals/taxy updated (b27fa67ecf -> 3099ae5cb2)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/taxy.

  from  b27fa67ecf Release: 0.10.1
   new  d847db3e5f Meta: v0.10.2-pre
   new  43e1e47aed Fix: (taxy-define-key-definer) Reduce expanded docstring 
width
   new  3099ae5cb2 Release: v0.10.2


Summary of changes:
 README.org |   5 ++
 taxy.el|   8 +-
 taxy.info  | 247 -
 3 files changed, 141 insertions(+), 119 deletions(-)



[elpa] externals/taxy-magit-section c113fda80d 1/2: Fix: (taxy-magit-section-define-column-definer) Reduce docstring width

2024-08-16 Thread ELPA Syncer
branch: externals/taxy-magit-section
commit c113fda80dcbb76b0a21048896f347530ac9d138
Author: Adam Porter 
Commit: Adam Porter 

Fix: (taxy-magit-section-define-column-definer) Reduce docstring width
---
 README.org  |  3 ++-
 taxy-magit-section.el   |  8 ++--
 taxy-magit-section.info | 26 ++
 3 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/README.org b/README.org
index c13b3b6e49..00e6196382 100644
--- a/README.org
+++ b/README.org
@@ -34,7 +34,8 @@ This library renders 
[[https://github.com/alphapapa/taxy.el][Taxy]] structs with
 
 ** 0.14-pre
 
-Nothing new yet.
+*Fixes*
++ Reduce the potential width of macro-expanded docstrings to prevent 
byte-compiler warnings.
 
 ** 0.13
 
diff --git a/taxy-magit-section.el b/taxy-magit-section.el
index 3c0ab5b84a..cf4c15ee94 100644
--- a/taxy-magit-section.el
+++ b/taxy-magit-section.el
@@ -276,8 +276,12 @@ PLIST may be a plist setting the following options:
  (format "Columns defined by `%s'."
  definer-name)))
  (column-formatters-variable-name (intern (format 
"%s-column-formatters" prefix)))
- (column-formatters-variable-docstring (format "Column formatters 
defined by `%s'."
-   definer-name)))
+ (column-formatters-variable-docstring
+  ;; For the best chance for this docstring to not exceed 80 
characters in width,
+  ;; the macro's name goes on its own line.
+  (format "Column formatters defined by the macro:
+`%s'."
+  definer-name)))
 `(let ((columns-variable ',columns-variable-name)
(column-formatters-variable ',column-formatters-variable-name))
(defcustom ,level-indent-variable-name 2
diff --git a/taxy-magit-section.info b/taxy-magit-section.info
index b78bc334ce..c37cd5a9b9 100644
--- a/taxy-magit-section.info
+++ b/taxy-magit-section.info
@@ -75,7 +75,9 @@ File: README.info,  Node: 014-pre,  Next: 013,  Up: Changelog
 2.1 0.14-pre
 
 
-Nothing new yet.
+*Fixes*
+   • Reduce the potential width of macro-expanded docstrings to prevent
+ byte-compiler warnings.
 
 
 File: README.info,  Node: 013,  Next: 0122,  Prev: 014-pre,  Up: Changelog
@@ -192,17 +194,17 @@ Node: Top221
 Node: Installation834
 Node: Changelog1188
 Node: 014-pre1443
-Node: 0131553
-Node: 01222028
-Node: 01212160
-Node: 0122293
-Node: 0112430
-Node: 0102631
-Node: 0912786
-Node: 093178
-Node: Development3368
-Node: Credits3595
-Node: License3785
+Node: 0131647
+Node: 01222122
+Node: 01212254
+Node: 0122387
+Node: 0112524
+Node: 0102725
+Node: 0912880
+Node: 093272
+Node: Development3462
+Node: Credits3689
+Node: License3879
 
 End Tag Table
 



[nongnu] elpa/hyperdrive updated (f78087ede8 -> e25bff2a7e)

2024-08-16 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  f78087ede8 Tidy: (h/history-find-file) Use defun, not cl-defun
   new  fc8fbb9141 Revert "Fix: (h/history-current-entry) Move into 
hyperdrive-lib.el"
   new  d53fe79960 Tidy: (h/history-find-buffer-visiting) Move into 
h/history.el
   new  cc77a88529 Meta: Upgrade plz.el to 0.9.1
   new  e25bff2a7e Meta: Upgrade taxy-magit-section dependency


Summary of changes:
 hyperdrive-history.el | 17 +
 hyperdrive-lib.el |  9 -
 hyperdrive-vars.el|  6 --
 hyperdrive.el |  2 +-
 4 files changed, 18 insertions(+), 16 deletions(-)



[nongnu] elpa/hyperdrive e25bff2a7e 4/4: Meta: Upgrade taxy-magit-section dependency

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit e25bff2a7e14d316a809a6e4a13610849e1cd2a0
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Upgrade taxy-magit-section dependency

This resolves the byte compilation warning:

hyperdrive-mirror.el:72:2: Error: defvar `hyperdrive-mirror-keys' docstring 
wider than 80 characters
---
 hyperdrive.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 90ee3179a6..2a14f23f9f 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Joseph Turner <~ushin/us...@lists.sr.ht>
 ;; Created: 2022
 ;; Version: 0.4-pre
-;; Package-Requires: ((emacs "28.1") (map "3.0") (compat "30.0.0.0") (org 
"9.7.6") (plz "0.9.1") (persist "0.6.1") (taxy-magit-section "0.13") (transient 
"0.7.4"))
+;; Package-Requires: ((emacs "28.1") (map "3.0") (compat "30.0.0.0") (org 
"9.7.6") (plz "0.9.1") (persist "0.6.1") (taxy-magit-section "0.14") (transient 
"0.7.4"))
 ;; Homepage: https://git.sr.ht/~ushin/hyperdrive.el
 
 ;; This program is free software; you can redistribute it and/or



[nongnu] elpa/hyperdrive d53fe79960 2/4: Tidy: (h/history-find-buffer-visiting) Move into h/history.el

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit d53fe79960ddea16cecd934e6c96dca302465ce0
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (h/history-find-buffer-visiting) Move into h/history.el
---
 hyperdrive-history.el | 9 +
 hyperdrive-lib.el | 9 -
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 064bb85cc5..5ed85a709c 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -41,6 +41,15 @@
 
  Functions
 
+(defun h/history-find-buffer-visiting (entry)
+  "Return a buffer showing ENTRY's history, or nil if none exists."
+  ;; There should only ever be one buffer showing ENTRY's history, so it's safe
+  ;; to return the first value in the list.
+  (car (match-buffers
+(lambda (buffer)
+  (and-let* ((local-entry (buffer-local-value 'h/history-current-entry 
buffer)))
+(he/equal-p entry local-entry t))
+
 (defun h/history-find-at-point (event)
   "Find entry at EVENT's position."
   (interactive "e")
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 85c4746e3b..cdaec1da96 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1622,15 +1622,6 @@ version."
   (and-let* ((local-entry (buffer-local-value 'h/current-entry 
buffer)))
 (he/equal-p entry local-entry any-version-p))
 
-(defun h/history-find-buffer-visiting (entry)
-  "Return a buffer showing ENTRY's history, or nil if none exists."
-  ;; There should only ever be one buffer showing ENTRY's history, so it's safe
-  ;; to return the first value in the list.
-  (car (match-buffers
-(lambda (buffer)
-  (and-let* ((local-entry (buffer-local-value 'h/history-current-entry 
buffer)))
-(he/equal-p entry local-entry t))
-
 (defun h//format-entry (entry &optional format formats)
   "Return ENTRY formatted according to FORMAT.
 FORMAT is a `format-spec' specifier string which maps to specifications



[nongnu] elpa/hyperdrive fc8fbb9141 1/4: Revert "Fix: (h/history-current-entry) Move into hyperdrive-lib.el"

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit fc8fbb9141e4960ce4e8ddc2f0cb77d7c007d0f1
Author: Joseph Turner 
Commit: Joseph Turner 

Revert "Fix: (h/history-current-entry) Move into hyperdrive-lib.el"

This reverts commit 3eae122932b92c45e4de5a580474fc3b737c158a.

Since 9815aae, this change is no longer necessary.
---
 hyperdrive-history.el | 8 
 hyperdrive-vars.el| 6 --
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index dea451616c..064bb85cc5 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -31,6 +31,14 @@
 (require 'hyperdrive-lib)
 (require 'hyperdrive-ewoc)
 
+ Variables
+
+(defvar-local h/history-current-entry nil
+  ;; NOTE: We don't reuse `hyperdrive-current-entry' in history buffers because
+  ;; functions like `hyperdrive--find-buffer-visiting' expect only one buffer 
to
+  ;; be visiting an entry at a time.
+  "Entry for current history buffer.")
+
  Functions
 
 (defun h/history-find-at-point (event)
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 6b54dd39e1..fc2ede7c43 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -401,12 +401,6 @@ If the version was unexpected,
   "Entry for current buffer.")
 (put 'h/current-entry 'permanent-local t)
 
-(defvar-local h/history-current-entry nil
-  ;; NOTE: We don't reuse `hyperdrive-current-entry' in history buffers because
-  ;; functions like `hyperdrive--find-buffer-visiting' expect only one buffer 
to
-  ;; be visiting an entry at a time.
-  "Entry for current history buffer.")
-
 (defvar h/type-handlers
   `(
 ;; Directories are sent from the gateway as JSON arrays



[nongnu] elpa/hyperdrive cc77a88529 3/4: Meta: Upgrade plz.el to 0.9.1

2024-08-16 Thread ELPA Syncer
branch: elpa/hyperdrive
commit cc77a8852957ffb6e6b9e37287d820017e919368
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Upgrade plz.el to 0.9.1

This version of plz expands filenames when downloading :as 'file.
---
 hyperdrive.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 72dd2b97ca..90ee3179a6 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Joseph Turner <~ushin/us...@lists.sr.ht>
 ;; Created: 2022
 ;; Version: 0.4-pre
-;; Package-Requires: ((emacs "28.1") (map "3.0") (compat "30.0.0.0") (org 
"9.7.6") (plz "0.9.0") (persist "0.6.1") (taxy-magit-section "0.13") (transient 
"0.7.4"))
+;; Package-Requires: ((emacs "28.1") (map "3.0") (compat "30.0.0.0") (org 
"9.7.6") (plz "0.9.1") (persist "0.6.1") (taxy-magit-section "0.13") (transient 
"0.7.4"))
 ;; Homepage: https://git.sr.ht/~ushin/hyperdrive.el
 
 ;; This program is free software; you can redistribute it and/or



  1   2   >