[elpa] externals/phpinspect 2d29bce498: Apply overall code quality improvements

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

Apply overall code quality improvements

Even benchmarks and tests now compile without warnings or errors :)

This includes patches from Stefan Monnier:
- https://lists.gnu.org/archive/html/emacs-devel/2023-08/msg00548.html
---
 benchmarks/parse-file.el|  38 +---
 benchmarks/splay-tree.el|   8 +-
 compile.bash|   5 +-
 phpinspect-index.el |  23 +++--
 phpinspect-parse-context.el |   2 +-
 phpinspect-parser.el| 204 +++-
 phpinspect-pipeline.el  |  12 ++-
 phpinspect-splayt.el|  44 -
 phpinspect-util.el  |   9 +-
 phpinspect.el   |  74 +++
 test/phpinspect-test-env.el |  12 +--
 test/phpinspect-test.el |   5 +-
 test/test-autoload.el   |  22 ++---
 test/test-bmap.el   |  10 +-
 test/test-buffer.el |  18 ++--
 test/test-edtrack.el|   3 +-
 test/test-index.el  |  16 +++-
 test/test-meta.el   |  25 -
 test/test-parse-context.el  |   1 +
 test/test-parser.el |  19 +---
 test/test-pipeline.el   |  20 ++--
 test/test-project.el|   4 +-
 test/test-resolvecontext.el |  19 ++--
 test/test-splayt.el |   6 +-
 test/test-toc.el|   1 +
 test/test-type.el   |   2 +
 test/test-util.el   |   2 +
 test/util/generate-test-data.el |   6 +-
 28 files changed, 294 insertions(+), 316 deletions(-)

diff --git a/benchmarks/parse-file.el b/benchmarks/parse-file.el
index 89bc6f2cb9..a769770799 100644
--- a/benchmarks/parse-file.el
+++ b/benchmarks/parse-file.el
@@ -30,30 +30,35 @@
(current-buffer)
(point-max)))
 
-(let ((here (file-name-directory (or load-file-name buffer-file-name
+(let ((here (file-name-directory (macroexp-file-name)))
+  result)
 
   (with-temp-buffer
-(insert-file-contents (concat here "/Response.php"))
+(insert-file-contents (expand-file-name "Response.php" here))
 
 (message "Incremental parse (warmup):")
 (phpinspect-with-parse-context (phpinspect-make-pctx :incremental t :bmap 
(phpinspect-make-bmap))
-  (benchmark 1 '(phpinspect-parse-current-buffer)))
+  (setq result (benchmark-run 1 (phpinspect-parse-current-buffer
+
+(message "Elapsed time: %f (%f in %d GC's)" (car result) (caddr result) 
(cadr result))
 
 (let ((bmap (phpinspect-make-bmap))
   (bmap2 (phpinspect-make-bmap)))
   (message "Incremental parse:")
   (phpinspect-with-parse-context (phpinspect-make-pctx :incremental t 
:bmap bmap)
-(benchmark 1 '(phpinspect-parse-current-buffer)))
+(setq result (benchmark-run 1 (phpinspect-parse-current-buffer
 
-  (garbage-collect)
+  (message "Elapsed time: %f (%f in %d GC's)" (car result) (caddr result) 
(cadr result))
 
+  (garbage-collect)
   (message "Incremental parse (no edits):")
   (phpinspect-with-parse-context (phpinspect-make-pctx :incremental t
:bmap bmap2
:previous-bmap bmap
:edtrack 
(phpinspect-make-edtrack))
-(benchmark 1 '(phpinspect-parse-current-buffer)))
+(setq result (benchmark-run 1 (phpinspect-parse-current-buffer
 
+  (message "Elapsed time: %f (%f in %d GC's)" (car result) (caddr result) 
(cadr result))
   (garbage-collect)
 
   (message "Incremental parse repeat (no edits):")
@@ -61,7 +66,8 @@
:bmap 
(phpinspect-make-bmap)
:previous-bmap bmap2
:edtrack 
(phpinspect-make-edtrack))
-(benchmark 1 '(phpinspect-parse-current-buffer)))
+(setq result (benchmark-run 1 (phpinspect-parse-current-buffer
+  (message "Elapsed time: %f (%f in %d GC's)" (car result) (caddr result) 
(cadr result))
 
   (garbage-collect)
 
@@ -81,8 +87,9 @@
 
 (phpinspect-edtrack-register-edit edtrack 9061 9061 1)
 (phpinspect-with-parse-context (phpinspect-make-pctx :bmap bmap-after 
:incremental t :previous-bmap bmap :edtrack edtrack)
-  (benchmark 1 '(phpinspect-parse-current-buffer)))
+  (setq result (benchmark-run 1 (phpinspect-parse-current-buffer
 
+(message "Elapsed time: %f (%f in %d GC's)" (car result) (caddr 
result) (cadr result))
 (phpinspect-edtrack-clear edtrack)
 (insert "{")
 
@@ -98,22 +105,27 @@
  :incremental t
 

[elpa] externals-release/org 27a41d418d: org-element--cache-before-change: Fix edge case creating heading

2023-08-16 Thread ELPA Syncer
branch: externals-release/org
commit 27a41d418d4558b511f4ab74bf26dde0b72d2526
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-element--cache-before-change: Fix edge case creating heading

* lisp/org-element.el (org-element--cache-before-change): Fix edge
case when a heading is created because we insert a newline right
before .
* testing/lisp/test-org-element.el (test-org-element/cache-headline):
Add tests.

Reported-by: Rodrigo Morales 
Link: 
https://orgmode.org/list/CAGxMbPbbqc33iaqJ=eceykrlaf4majaxaumjgapovg_rpw+...@mail.gmail.com
---
 lisp/org-element.el  | 16 ++--
 testing/lisp/test-org-element.el | 27 ++-
 2 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index ffd492d723..0debd1a681 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6705,20 +6705,8 @@ The function returns the new value of 
`org-element--cache-change-warning'."
(setq org-element--cache-change-tic (buffer-chars-modified-tick))
(setq org-element--cache-last-buffer-size (buffer-size))
(goto-char beg)
-   (beginning-of-line)
-   (let ((bottom (save-excursion
-   (goto-char end)
-   (if (and (bolp)
-;; When beg == end, still extent to eol.
-(> (point) beg))
-   ;; FIXME: Potential pitfall.
-   ;; We are appending to an element end.
-   ;; Unless the last inserted char is not
-   ;; newline, the next element is not broken
-   ;; and does not need to be purged from the
-   ;; cache.
-   end
- (line-end-position)
+   (forward-line 0)
+   (let ((bottom (save-excursion (goto-char end) (line-end-position
  (prog1
  ;; Use the worst change warning to not miss important edits.
  ;; This function is called before edit and after edit by
diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index 8c97371bba..6e7658759e 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -4372,7 +4372,32 @@ paragraph
 (let ((org-element-use-cache t))
   (org-element-at-point (point-max))
   (delete-region (point) (point-max))
-  (should (eq 'paragraph (org-element-type (org-element-at-point)))
+  (should (eq 'paragraph (org-element-type (org-element-at-point))
+  ;; Remove/re-introduce heading.
+  (org-test-with-temp-text
+  "
+* 1
+** 1-1
+a
+** 1-2
+a
+"
+(let ((org-element-use-cache t))
+  (org-element-at-point (point-max))
+  (insert "FOO")
+  (should
+   (equal
+"1-1"
+(org-element-property
+ :title
+ (org-element-lineage (org-element-at-point) '(headline)
+  (insert "\n")
+  (should
+   (equal
+"1"
+(org-element-property
+ :title
+ (org-element-lineage (org-element-at-point) '(headline
 
 (provide 'test-org-element)
 



[elpa] externals/phpinspect d806c4ef4a 2/2: Use class-keyword handler regexp when extracting class name from declaration

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

Use class-keyword handler regexp when extracting class name from declaration
---
 phpinspect-type.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/phpinspect-type.el b/phpinspect-type.el
index e113b85a19..3d6ccbb4ec 100644
--- a/phpinspect-type.el
+++ b/phpinspect-type.el
@@ -320,7 +320,10 @@ mutability of the variable")
  (setq encountered-extends nil)
  (phpinspect--log "Class %s implements in interface" 
class-name)
  (setq encountered-implements t))
-((string= (cadr word) "class")
+((string-match-p
+  (eval-when-compile
+(concat "^" (phpinspect--class-keyword-handler-regexp) 
"?$"))
+  (cadr word))
  (setq encountered-class t))
 (t
  (phpinspect--log "Calling Resolver from index-class on %s" 
(cadr word))



[elpa] externals/org 99c8425bc7 2/6: org-babel-insert-result: Remove duplicate let-binding

2023-08-16 Thread ELPA Syncer
branch: externals/org
commit 99c8425bc73b8ba565c79e4401c99a11f5ce2c3a
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-babel-insert-result: Remove duplicate let-binding

* lisp/ob-core.el (org-babel-insert-result): Remove duplicate
computation of the INLINE value.
---
 lisp/ob-core.el | 4 
 1 file changed, 4 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 63f83a2712..13e1ef49ae 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2459,10 +2459,6 @@ INFO may provide the values of these header arguments 
(in the
   (save-excursion
(let* ((visible-beg (point-min-marker))
   (visible-end (copy-marker (point-max) t))
-  (inline (let ((context (org-element-context)))
-(and (org-element-type-p
-   context '(inline-babel-call inline-src-block))
- context)))
   (existing-result (org-babel-where-is-src-block-result t nil 
hash))
   (results-switches (cdr (assq :results_switches (nth 2 info
   ;; When results exist outside of the current visible



[elpa] externals/phpinspect b82c786346 1/2: Fix native compilation warnings

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

Fix native compilation warnings
---
 compile.bash   |  2 ++
 native-compile.bash| 11 +++
 phpinspect-autoload.el |  1 +
 phpinspect-index.el|  1 +
 phpinspect-parser.el   |  2 +-
 5 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/compile.bash b/compile.bash
index 5353dbabc7..81f4d27f0f 100644
--- a/compile.bash
+++ b/compile.bash
@@ -4,10 +4,12 @@ rm ./**/*.elc
 rm *.elc
 
 for file in ./*.el; do
+echo 'Compiling '"$file"' ...'
 cask emacs -batch -L . --eval '(setq byte-compile-error-on-warn t)' -f 
batch-byte-compile "$file" || break
 done
 
 for file in ./**/*.el; do
+echo 'Compiling '"$file"' ...'
 cask emacs -batch -L . --eval '(setq byte-compile-error-on-warn t)' -f 
batch-byte-compile "$file" || break
 done
 
diff --git a/native-compile.bash b/native-compile.bash
new file mode 100644
index 00..3e88f3d35e
--- /dev/null
+++ b/native-compile.bash
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+for file in ./*.el; do
+echo 'Compiling '"$file"' ...'
+cask emacs -batch -L . --eval '(setq native-compile-error-on-warn t)' -f 
batch-native-compile "$file" || break
+done
+
+for file in ./**/*.el; do
+echo 'Compiling '"$file"' ...'
+cask emacs -batch -L . --eval '(setq byte-compile-error-on-warn t)' -f 
batch-native-compile "$file" || break
+done
diff --git a/phpinspect-autoload.el b/phpinspect-autoload.el
index f3e78eca3f..db57e9aedf 100644
--- a/phpinspect-autoload.el
+++ b/phpinspect-autoload.el
@@ -27,6 +27,7 @@
 (require 'phpinspect-fs)
 (require 'phpinspect-util)
 (require 'phpinspect-pipeline)
+(require 'json)
 
 (cl-defstruct (phpinspect-psr0
(:constructor phpinspect-make-psr0-generated))
diff --git a/phpinspect-index.el b/phpinspect-index.el
index b3dc9d1bcf..b89c7e4883 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -27,6 +27,7 @@
 (require 'phpinspect-util)
 (require 'phpinspect-type)
 (require 'phpinspect-token-predicates)
+(require 'phpinspect-parser)
 
 (defun phpinspect--function-from-scope (scope)
   (cond ((and (phpinspect-static-p (cadr scope))
diff --git a/phpinspect-parser.el b/phpinspect-parser.el
index 67bd327053..beb32f721f 100644
--- a/phpinspect-parser.el
+++ b/phpinspect-parser.el
@@ -53,7 +53,7 @@ If STRING has text properties, they are stripped."
 (set-text-properties 0 length nil value)
 (list token-keyword value)))
 
-(eval-when-compile
+(eval-and-compile
   (defun phpinspect-handler-func-name (handler-name)
 (intern (concat "phpinspect--" (symbol-name handler-name) "-handler")))
 



[elpa] externals/org 9fd547dd3a 4/6: org-babel-where-is-src-block-result: Fix inside affiliated parsed keyword

2023-08-16 Thread ELPA Syncer
branch: externals/org
commit 9fd547dd3a16c473b2109bfd7bad7f1cb015a5b2
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-babel-where-is-src-block-result: Fix inside affiliated parsed keyword

* lisp/ob-core.el (org-babel-where-is-src-block-result): Do not assume
that parent has contents-end and that we are inside contents, but not
inside secondary object/affiliated keyword.
*
testing/lisp/test-ob.el 
(test-ob/inline-src_blk-default-results-replace-line-1):
Add tests.

Reported-by: Tom Gillespie 
Link: 
https://orgmode.org/list/ca+g3_pnt7wqkczchv+dx1fespgtevknse41a3qc5wv3g+jt...@mail.gmail.com
---
 lisp/ob-core.el |  7 ++-
 testing/lisp/test-ob.el | 16 +++-
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 13e1ef49ae..abf48dd649 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2187,11 +2187,8 @@ to HASH."
 ((or `inline-babel-call `inline-src-block)
  ;; Results for inline objects are located right after them.
  ;; There is no RESULTS line to insert either.
- (let ((limit (pcase (org-element-type (org-element-parent context))
- (`section (org-element-end
-(org-element-parent context)))
- (_ (org-element-contents-end
-(org-element-parent context))
+ (let ((limit (or (org-element-contents-end (org-element-parent 
context))
+   (org-element-end (org-element-parent context)
(goto-char (org-element-end context))
(skip-chars-forward " \t\n" limit)
(throw :found
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index c8dbd44f44..42c77ca56c 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -404,7 +404,21 @@ at the beginning of a line."
   "src_emacs-lisp{(+ 1 2)}\n{{{results(=3=)}}}"
   (org-test-with-temp-text "src_emacs-lisp{(+ 1 2)}\n{{{results(=2=)}}}"
(let ((org-babel-inline-result-wrap "=%s=")) (org-babel-execute-maybe))
-   (buffer-string))
+   (buffer-string)
+  ;; Handle inline src blocks inside parsed affiliated keyword.
+  (should
+   (equal
+"#+caption: src_elisp{1} {{{results(=1=)}}}\n#+begin_src 
emacs-lisp\n1\n#+end_src"
+(org-test-with-temp-text "#+caption: src_elisp{1}\n#+begin_src 
emacs-lisp\n1\n#+end_src"
+  (let ((org-babel-inline-result-wrap "=%s=")) (org-babel-execute-maybe))
+  (buffer-string
+  ;; Handle inline src blocks inside heading title.
+  (should
+   (equal
+"* Heading src_elisp{1} {{{results(=1=)}}}"
+(org-test-with-temp-text "* Heading src_elisp{1}"
+  (let ((org-babel-inline-result-wrap "=%s=")) (org-babel-execute-maybe))
+  (buffer-string)
 
 (ert-deftest test-ob/inline-src_blk-default-results-replace-line-2 ()
   ;; src_ at bol line 2...



[elpa] externals/org updated (5496f5277f -> cc435cba71)

2023-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  5496f5277f org-babel-load-in-session: Document argument INFO
   new  487f39efa6 org-babel-insert-result: Err on :results drawer inline 
src block
   new  99c8425bc7 org-babel-insert-result: Remove duplicate let-binding
   new  54c09c84e9 org-element-context: Fix when point is at the beginning 
of parsed value
   new  9fd547dd3a org-babel-where-is-src-block-result: Fix inside 
affiliated parsed keyword
   new  27a41d418d org-element--cache-before-change: Fix edge case creating 
heading
   new  e4504853b5 Merge branch 'bugfix'
   new  cc435cba71 lisp/ob-core.el: Fix some docstrings that do not detail 
all the arguments


Summary of changes:
 lisp/ob-core.el  | 23 +--
 lisp/org-element.el  | 18 +++---
 testing/lisp/test-ob.el  | 16 +++-
 testing/lisp/test-org-element.el | 27 ++-
 4 files changed, 53 insertions(+), 31 deletions(-)



[elpa] externals/org 54c09c84e9 3/6: org-element-context: Fix when point is at the beginning of parsed value

2023-08-16 Thread ELPA Syncer
branch: externals/org
commit 54c09c84e9d903ef414016662352acd59a9f6fb7
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-element-context: Fix when point is at the beginning of parsed value

* lisp/org-element.el (org-element-context): When point is at the
first point in parsed affiliated keyword value, do not return parent
"keyword".

Reported-by: Tom Gillespie 
Link: 
https://orgmode.org/list/ca+g3_pnt7wqkczchv+dx1fespgtevknse41a3qc5wv3g+jt...@mail.gmail.com
---
 lisp/org-element.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 5574da4520..a104d540e6 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -8140,9 +8140,9 @@ This function may modify match data."
 (let ((case-fold-search t)) (looking-at org-element--affiliated-re))
 (cond
  ((not (member-ignore-case (match-string 1)
-   org-element-parsed-keywords))
+ org-element-parsed-keywords))
   (throw 'objects-forbidden element))
- ((< (match-end 0) pos)
+ ((<= (match-end 0) pos)
   (narrow-to-region (match-end 0) (line-end-position)))
  ((and (match-beginning 2)
(>= pos (match-beginning 2))



[elpa] externals/org cc435cba71 6/6: lisp/ob-core.el: Fix some docstrings that do not detail all the arguments

2023-08-16 Thread ELPA Syncer
branch: externals/org
commit cc435cba71a99ee7b12676be3b6e1211a9cb7285
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

lisp/ob-core.el: Fix some docstrings that do not detail all the arguments

* lisp/ob-core.el (org-babel-initiate-session):
(org-babel-switch-to-session):
(org-babel-switch-to-session-with-code): Explain all the arguments in
the docstring.
---
 lisp/ob-core.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index abf48dd649..8c22ca07b5 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1096,8 +1096,8 @@ session."
 
 ;;;###autoload
 (defun org-babel-initiate-session (&optional arg info)
-  "Initiate session for current code block.
-If called with a prefix argument then resolve any variable
+  "Initiate session for current code block or the block defined by INFO.
+If called with a prefix argument ARG, then resolve any variable
 references in the header arguments and assign these variables in
 the session.  Copy the body of the code block to the kill ring."
   (interactive "P")
@@ -1125,9 +1125,9 @@ the session.  Copy the body of the code block to the kill 
ring."
 
 ;;;###autoload
 (defun org-babel-switch-to-session (&optional arg info)
-  "Switch to the session of the current code block.
+  "Switch to the session of the current code block or block defined by INFO.
 Uses `org-babel-initiate-session' to start the session.  If called
-with a prefix argument then this is passed on to
+with a prefix argument ARG, then this is passed on to
 `org-babel-initiate-session'."
   (interactive "P")
   (pop-to-buffer (org-babel-initiate-session arg info))
@@ -1139,7 +1139,8 @@ with a prefix argument then this is passed on to
 
 ;;;###autoload
 (defun org-babel-switch-to-session-with-code (&optional arg _info)
-  "Switch to code buffer and display session."
+  "Switch to code buffer and display session.
+Prefix argument ARG is passed to `org-babel-switch-to-session'."
   (interactive "P")
   (let ((swap-windows
 (lambda ()



[elpa] externals/phpinspect updated (2d29bce498 -> d806c4ef4a)

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

  from  2d29bce498 Apply overall code quality improvements
   new  b82c786346 Fix native compilation warnings
   new  d806c4ef4a Use class-keyword handler regexp when extracting class 
name from declaration


Summary of changes:
 compile.bash   |  2 ++
 native-compile.bash| 11 +++
 phpinspect-autoload.el |  1 +
 phpinspect-index.el|  1 +
 phpinspect-parser.el   |  2 +-
 phpinspect-type.el |  5 -
 6 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 native-compile.bash



[elpa] externals/org 487f39efa6 1/6: org-babel-insert-result: Err on :results drawer inline src block

2023-08-16 Thread ELPA Syncer
branch: externals/org
commit 487f39efa68fa2d857f8d446d1c4b3a3b3e3f482
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-babel-insert-result: Err on :results drawer inline src block

* lisp/ob-core.el (org-babel-insert-result): Throw an error when
trying to insert :results drawer in inline src blocks.
---
 lisp/ob-core.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 0270624013..63f83a2712 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2450,6 +2450,7 @@ INFO may provide the values of these header arguments (in 
the
   (when inline
(let ((warning
   (or (and (member "table" result-params) "`:results table'")
+   (and (member "drawer" result-params) "`:results drawer'")
   (and result (listp result) "list result")
   (and result (string-match-p "\n." result) "multiline result")
   (and (member "list" result-params) "`:results list'"



[elpa] externals/org e4504853b5 5/6: Merge branch 'bugfix'

2023-08-16 Thread ELPA Syncer
branch: externals/org
commit e4504853b514185cf776db893103a25b3912d034
Merge: 9fd547dd3a 27a41d418d
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Merge branch 'bugfix'
---
 lisp/org-element.el  | 14 +-
 testing/lisp/test-org-element.el | 27 ++-
 2 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index a104d540e6..f197e34a94 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6812,19 +6812,7 @@ The function returns the new value of 
`org-element--cache-change-warning'."
(setq org-element--cache-last-buffer-size (buffer-size))
(goto-char beg)
(forward-line 0)
-   (let ((bottom (save-excursion
-   (goto-char end)
-   (if (and (bolp)
-;; When beg == end, still extent to eol.
-(> (point) beg))
-   ;; FIXME: Potential pitfall.
-   ;; We are appending to an element end.
-   ;; Unless the last inserted char is not
-   ;; newline, the next element is not broken
-   ;; and does not need to be purged from the
-   ;; cache.
-   end
- (line-end-position)
+   (let ((bottom (save-excursion (goto-char end) (line-end-position
  (prog1
  ;; Use the worst change warning to not miss important edits.
  ;; This function is called before edit and after edit by
diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index 92fd630781..92047bfd7e 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -5194,7 +5194,32 @@ paragraph
 (let ((org-element-use-cache t))
   (org-element-at-point (point-max))
   (delete-region (point) (point-max))
-  (should (eq 'paragraph (org-element-type (org-element-at-point)))
+  (should (eq 'paragraph (org-element-type (org-element-at-point))
+  ;; Remove/re-introduce heading.
+  (org-test-with-temp-text
+  "
+* 1
+** 1-1
+a
+** 1-2
+a
+"
+(let ((org-element-use-cache t))
+  (org-element-at-point (point-max))
+  (insert "FOO")
+  (should
+   (equal
+"1-1"
+(org-element-property
+ :title
+ (org-element-lineage (org-element-at-point) '(headline)
+  (insert "\n")
+  (should
+   (equal
+"1"
+(org-element-property
+ :title
+ (org-element-lineage (org-element-at-point) '(headline
 
 (provide 'test-org-element)
 



[nongnu] elpa/cider e28fe55d55: Add a Makefile

2023-08-16 Thread ELPA Syncer
branch: elpa/cider
commit e28fe55d55a490c332fd8a812952f30f9fb528fd
Author: vemv 
Commit: Bozhidar Batsov 

Add a Makefile
---
 Makefile | 30 
 doc/modules/ROOT/pages/contributing/hacking.adoc | 12 +-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
new file mode 100644
index 00..cb7bfc438f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+.PHONY: clean compile lint test-all test-integration test-unit
+
+# Per our CircleCI, linting/compiling assumes Emacs 28.
+# If you primarily use a different version, you can download Emacs 28 to a 
separate directory and set up:
+# export ELDEV_EMACS="$HOME/emacs28/Emacs.app/Contents/MacOS/Emacs"
+
+# Remove byte-compilation artifacts, which can alter the result of the test 
suite:
+clean:
+   cd ~/.emacs.d; find . -type f -name "*.elc" -exec rm {} +
+
+# You can find a generic `eldev` installation script in 
https://github.com/emacs-eldev/eldev/blob/master/webinstall/eldev
+# (Don't use the one defined for CircleCI in your local machine)
+
+lint: clean
+   eldev lint
+
+# Checks for byte-compilation warnings.
+compile: clean
+eldev -dtT compile --warnings-as-errors
+
+test-all: clean
+   eldev -dtT -p test --test-type all
+
+test-integration: clean
+   eldev -dtT -p test --test-type integration
+
+test-unit: clean
+   eldev -dtT -p test
+
+test: lint test-unit compile
diff --git a/doc/modules/ROOT/pages/contributing/hacking.adoc 
b/doc/modules/ROOT/pages/contributing/hacking.adoc
index 19b8ece460..f8d11227ad 100644
--- a/doc/modules/ROOT/pages/contributing/hacking.adoc
+++ b/doc/modules/ROOT/pages/contributing/hacking.adoc
@@ -90,14 +90,20 @@ default only main tests are run.
 Run all unit tests with:
 
  $ eldev[.bat] test
+ # Or:
+ $ make test-unit
 
 Run integration tests with:
 
  $ eldev[.bat] test --test-type integration
+ # Or:
+ $ make test-integration
 
 or all tests with:
 
  $ eldev[.bat] test --test-type all
+ # Or:
+ $ make test-all
 
 NOTE: Tests may not run correctly inside Emacs' `shell-mode` buffers. Running
 them in a terminal is recommended.
@@ -105,10 +111,14 @@ them in a terminal is recommended.
 You can also check for compliance with a variety of coding standards in batch 
mode (including docstrings):
 
  $ eldev lint
+ # Or:
+ $ make lint
 
 To check for byte-compilation warnings you can just compile the project with 
Eldev:
 
- $ eldev compile
+ $ eldev -dtT compile --warnings-as-errors
+ # Or:
+ # make compile
 
  Running the tests in CircleCI
 



[elpa] externals/xr 5c638b3035: Check xr-lint CHECKS argument value for validity

2023-08-16 Thread ELPA Syncer
branch: externals/xr
commit 5c638b30355fad1ae5d87df66070cadef3bb36d3
Author: Mattias Engdegård 
Commit: Mattias Engdegård 

Check xr-lint CHECKS argument value for validity
---
 xr-test.el | 1 +
 xr.el  | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/xr-test.el b/xr-test.el
index 0cb3ae24b5..9d9256f145 100644
--- a/xr-test.el
+++ b/xr-test.el
@@ -478,6 +478,7 @@
 ))
 
 (ert-deftest xr-lint-noisy ()
+  (should-error (xr-lint "." nil 'bad))
   (let ((text-quoting-style 'grave))
 (dolist (checks '(nil all))
   (ert-info ((prin1-to-string checks) :prefix "checks: ")
diff --git a/xr.el b/xr.el
index 80b7a3d0e5..35033fc81b 100644
--- a/xr.el
+++ b/xr.el
@@ -1877,6 +1877,8 @@ including ones more likely to generate false alarms.
 
 Return a list of (OFFSET . COMMENT) where COMMENT applies at OFFSET
 in RE-STRING."
+  (unless (memq checks '(nil all))
+(error "Bad xr-lint CHECKS argument: %S" checks))
   (let ((warnings (list nil)))
 (xr--parse re-string warnings purpose checks)
 (sort (car warnings) #'car-less-than-car)))



[nongnu] elpa/haskell-mode e437466bc2 1/2: Improve cabal font-lock

2023-08-16 Thread ELPA Syncer
branch: elpa/haskell-mode
commit e437466bc2f38474faf01b8745aac241c9effd06
Author: Javier Sagredo 
Commit: Javier Sagredo 

Improve cabal font-lock

- Remove outdated stanzas
- Add missing keywords (elif)
- ensure `pkg:component` is not displayed as a field
---
 haskell-cabal.el | 37 ++---
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/haskell-cabal.el b/haskell-cabal.el
index 5afeb9c9bb..43015735bf 100644
--- a/haskell-cabal.el
+++ b/haskell-cabal.el
@@ -99,22 +99,29 @@ By default these are:
 (defvar haskell-cabal-font-lock-keywords
   ;; The comment syntax can't be described simply in syntax-table.
   ;; We could use font-lock-syntactic-keywords, but is it worth it?
-  '(("^[ \t]*--.*" . font-lock-comment-face)
-("^ *\\([^ \t:]+\\):" (1 font-lock-keyword-face))
-("^\\(Library\\)[ \t]*\\({\\|$\\)" (1 font-lock-keyword-face))
-("^\\(Library\\|Executable\\|Test-Suite\\|Benchmark\\|Common\\|package\\)[ 
\t]+\\([^\n \t]*\\)"
+  '(;; comments
+("^[ \t]*--.*" . font-lock-comment-face)
+;; fields ending in colon
+("^ *\\([^ \t:]+\\):\\( +\\|$\\)" (1 font-lock-keyword-face))
+;; stanzas that start a line, followed by an identifier
+
("^\\(Library\\|Executable\\|Test-Suite\\|Benchmark\\|Common\\|Package\\|Flag\\|Repository\\)[
 \t]+\\([^\n \t]*\\)"
  (1 font-lock-keyword-face) (2 font-lock-function-name-face))
-("^\\(Flag\\|install-dirs\\|repository\\)[ \t]+\\([^\n \t]*\\)"
- (1 font-lock-keyword-face) (2 font-lock-constant-face))
-("^\\(Source-Repository\\)[ \t]+\\(head\\|this\\)"
- (1 font-lock-keyword-face) (2 font-lock-constant-face))
-
("^\\(haddock\\|source-repository-package\\|program-options\\|program-locations\\|program-default-options\\)\\([
 \t]\\|$\\)"
- (1 font-lock-keyword-face))
-("^ *\\(if\\)[ \t]+.*\\({\\|$\\)" (1 font-lock-keyword-face))
-("^ *\\(}[ \t]*\\)?\\(else\\)[ \t]*\\({\\|$\\)"
- (2 font-lock-keyword-face))
-("\\<\\(?:True\\|False\\)\\>"
- (0 font-lock-constant-face
+;; stanzas that start a line, followed by a constant
+("^\\(Source-Repository\\)[ \t]+\\(head\\|this\\)" (1 
font-lock-keyword-face) (2 font-lock-constant-face))
+;; stanzas that start a line, followed by a constant in cabal config
+("^\\(install-dirs\\)[ \t]+\\(global\\|user\\)" (1 font-lock-keyword-face) 
(2 font-lock-constant-face))
+;; stanzas that start a line
+("^\\(Library\\|Custom-Setup\\|source-repository-package\\)[ \t]*$" (1 
font-lock-keyword-face))
+;; stanzas that start a line in cabal config
+("^\\(haddock\\|init\\|program-locations\\|program-default-options\\)[ 
\t]*$" (1 font-lock-keyword-face))
+;; stanzas that can live inside if-blocks
+("^[ \t]*\\(program-options\\)$" (1 font-lock-keyword-face))
+;; if clause
+("^ *\\(if\\|elif\\)[ \t]+.*$" (1 font-lock-keyword-face))
+;; else clause
+("^ *\\(else\\)[ \t]*$" (1 font-lock-keyword-face))
+;; True/False
+("\\<\\(?:True\\|False\\)\\>" (0 font-lock-constant-face
 
 (defvar haskell-cabal-buffers nil
   "List of Cabal buffers.")



[nongnu] elpa/haskell-mode 3e146c1a89 2/2: Merge pull request #1818 from jasagredo/jasagredo/improve-cabal-font-lock

2023-08-16 Thread ELPA Syncer
branch: elpa/haskell-mode
commit 3e146c1a89db257bb75c7b33fa2a5a1a85aabd51
Merge: de7f13faaf e437466bc2
Author: Steve Purcell 
Commit: GitHub 

Merge pull request #1818 from jasagredo/jasagredo/improve-cabal-font-lock

Improve cabal font-lock
---
 haskell-cabal.el | 37 ++---
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/haskell-cabal.el b/haskell-cabal.el
index 21cdfb0b08..c0707009fe 100644
--- a/haskell-cabal.el
+++ b/haskell-cabal.el
@@ -99,22 +99,29 @@ By default these are:
 (defvar haskell-cabal-font-lock-keywords
   ;; The comment syntax can't be described simply in syntax-table.
   ;; We could use font-lock-syntactic-keywords, but is it worth it?
-  '(("^[ \t]*--.*" . font-lock-comment-face)
-("^ *\\([^ \t:]+\\):" (1 font-lock-keyword-face))
-("^\\(Library\\)[ \t]*\\({\\|$\\)" (1 font-lock-keyword-face))
-("^\\(Library\\|Executable\\|Test-Suite\\|Benchmark\\|Common\\|package\\)[ 
\t]+\\([^\n \t]*\\)"
+  '(;; comments
+("^[ \t]*--.*" . font-lock-comment-face)
+;; fields ending in colon
+("^ *\\([^ \t:]+\\):\\( +\\|$\\)" (1 font-lock-keyword-face))
+;; stanzas that start a line, followed by an identifier
+
("^\\(Library\\|Executable\\|Test-Suite\\|Benchmark\\|Common\\|Package\\|Flag\\|Repository\\)[
 \t]+\\([^\n \t]*\\)"
  (1 font-lock-keyword-face) (2 font-lock-function-name-face))
-("^\\(Flag\\|install-dirs\\|repository\\)[ \t]+\\([^\n \t]*\\)"
- (1 font-lock-keyword-face) (2 font-lock-constant-face))
-("^\\(Source-Repository\\)[ \t]+\\(head\\|this\\)"
- (1 font-lock-keyword-face) (2 font-lock-constant-face))
-
("^\\(haddock\\|source-repository-package\\|program-options\\|program-locations\\|program-default-options\\)\\([
 \t]\\|$\\)"
- (1 font-lock-keyword-face))
-("^ *\\(if\\)[ \t]+.*\\({\\|$\\)" (1 font-lock-keyword-face))
-("^ *\\(}[ \t]*\\)?\\(else\\)[ \t]*\\({\\|$\\)"
- (2 font-lock-keyword-face))
-("\\<\\(?:True\\|False\\)\\>"
- (0 font-lock-constant-face
+;; stanzas that start a line, followed by a constant
+("^\\(Source-Repository\\)[ \t]+\\(head\\|this\\)" (1 
font-lock-keyword-face) (2 font-lock-constant-face))
+;; stanzas that start a line, followed by a constant in cabal config
+("^\\(install-dirs\\)[ \t]+\\(global\\|user\\)" (1 font-lock-keyword-face) 
(2 font-lock-constant-face))
+;; stanzas that start a line
+("^\\(Library\\|Custom-Setup\\|source-repository-package\\)[ \t]*$" (1 
font-lock-keyword-face))
+;; stanzas that start a line in cabal config
+("^\\(haddock\\|init\\|program-locations\\|program-default-options\\)[ 
\t]*$" (1 font-lock-keyword-face))
+;; stanzas that can live inside if-blocks
+("^[ \t]*\\(program-options\\)$" (1 font-lock-keyword-face))
+;; if clause
+("^ *\\(if\\|elif\\)[ \t]+.*$" (1 font-lock-keyword-face))
+;; else clause
+("^ *\\(else\\)[ \t]*$" (1 font-lock-keyword-face))
+;; True/False
+("\\<\\(?:True\\|False\\)\\>" (0 font-lock-constant-face
 
 (defvar haskell-cabal-buffers nil
   "List of Cabal buffers.")



[elpa] externals/transient updated (a1575e5833 -> 226db67b36)

2023-08-16 Thread Jonas Bernoulli via
tarsius pushed a change to branch externals/transient.

  from  a1575e5833 Release version 0.4.1
   new  e163a904b5 Fix typo
   new  323d6b6c84 manual: Document when to invoke prefix arguments
   new  d056a6c013 transient--pp-to-file: Use consistent format across 
Emacs releases
   new  775d00de5c Add comma in docstring
   new  226db67b36 All suffix commands now must be accessed through fbound 
symbols


Summary of changes:
 CHANGELOG   |   2 +-
 docs/transient.org  |  31 +++---
 docs/transient.texi |  56 -
 lisp/transient.el   | 172 +---
 4 files changed, 117 insertions(+), 144 deletions(-)



[elpa] externals/transient d056a6c013 3/5: transient--pp-to-file: Use consistent format across Emacs releases

2023-08-16 Thread Jonas Bernoulli via
branch: externals/transient
commit d056a6c013b9e7160a676365bcf29905bfe65093
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient--pp-to-file: Use consistent format across Emacs releases
---
 lisp/transient.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 3e9924e527..64e73d8f31 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -68,6 +68,7 @@
 
 (defvar display-line-numbers) ; since Emacs 26.1
 (defvar Man-notify-method)
+(defvar pp-default-function) ; since Emacs 29.1
 
 (defmacro transient--with-emergency-exit (&rest body)
   (declare (indent defun))
@@ -566,7 +567,9 @@ the previous prefix."
   (setq list (cl-sort (copy-sequence list) #'string< :key #'car))
   (with-temp-file file
 (let ((print-level nil)
-  (print-length nil))
+  (print-length nil)
+  (pp-default-function 'pp-28)
+  (fill-column 999))
   (pp list (current-buffer)
 
 (defvar transient-values



[elpa] externals/transient e163a904b5 1/5: Fix typo

2023-08-16 Thread Jonas Bernoulli via
branch: externals/transient
commit e163a904b5b98f9a43299805296934da27fc1f55
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Fix typo
---
 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index cbbb633ea3..2fe4bf8f86 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -241,7 +241,7 @@ Also contains various documentation updates and code 
clean-ups.
   this again, once we are sure that cannot cause Emacs to enter an
   inconsistent state, that causes most events to be ignored.  #112
 
-- Improved the backtrace that is shown when a fatal error occured in a
+- Improved the backtrace that is shown when a fatal error occurred in a
   critical context.  This involved some back and forth.  See commits
   mentioning the "emergency exit".
 



[elpa] externals/transient 775d00de5c 4/5: Add comma in docstring

2023-08-16 Thread Jonas Bernoulli via
branch: externals/transient
commit 775d00de5ca5a63aa550b2751de34abfb4eda009
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Add comma in docstring
---
 lisp/transient.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 64e73d8f31..f8933eb1a8 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1444,7 +1444,7 @@ commands) may also need the object to guide their 
behavior.
 This function attempts to return the object associated with the
 current suffix command even if the suffix command was not invoked
 from a transient.  (For some suffix command that is a valid thing
-to do, for others it is not.)  In that case nil may be returned
+to do, for others it is not.)  In that case nil may be returned,
 if the command was not defined using one of the macros intended
 to define such commands.
 



[elpa] externals/transient 226db67b36 5/5: All suffix commands now must be accessed through fbound symbols

2023-08-16 Thread Jonas Bernoulli via
branch: externals/transient
commit 226db67b3680acbeb74cb0403e1a302917054174
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

All suffix commands now must be accessed through fbound symbols

Even before, all suffix commands had to be associated with a symbol.
Every suffix command is associated with a suffix object, and that
symbol is what allows us to see that association.  We often compare
`this-command' with some constant symbols.

For most commands that simply worked because they are ultimately
defined using `defun' or `defalias'.  For infix commands, which are
defined inline in the definition of a prefix, we didn't do that,
because we don't want those commands to be offered as completion
candidates by `execute-extended-command'.

We no longer have to do that because, since Emacs 28.2, there is an
alternative mechanism to achieve the same.  Previously infix commands
were not installed in the function slot of their symbol, but in its
`transient--infix-command' property.  That complicated things a lot,
so we remove it completely, instead of preserving it for older Emacs
releases.  If someone is bothered by infix commands being offered for
completion, then they have to update to a recent Emacs release and
customize `read-extended-command-predicate'.

This also fixes how `transient--wrap-command' advises commands.
Previously it used different approaches for commands accessed via a
fboundp symbol and "anonymous" infix commands, and the latter did not
actually work.

As a side-note, we have to advice commands via fboundp symbols.
Advising `this-command' instead, is not feasible, because we heavily
rely on comparing the value of this variable with known symbols.
---
 lisp/transient.el | 165 +-
 1 file changed, 63 insertions(+), 102 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index f8933eb1a8..271f780934 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -956,7 +956,7 @@ keyword.
   (pcase-let ((`(,class ,slots ,_ ,docstr ,_)
(transient--expand-define-args args arglist)))
 `(progn
-   (defalias ',name ,(transient--default-infix-command))
+   (defalias ',name #'transient--default-infix-command)
(put ',name 'interactive-only t)
(put ',name 'command-modes (list 'not-a-mode))
(put ',name 'function-documentation ,docstr)
@@ -972,6 +972,15 @@ example, sets a variable, use `transient-define-infix' 
instead.
 
 \(fn NAME ARGLIST [DOCSTRING] [KEYWORD VALUE]...)")
 
+(defun transient--default-infix-command ()
+  "Most transient infix commands are but an alias for this command."
+  (interactive)
+  (let ((obj (transient-suffix-object)))
+(transient-infix-set obj (transient-infix-read obj)))
+  (transient--show))
+(put 'transient--default-infix-command 'interactive-only t)
+(put 'transient--default-infix-command 'command-modes (list 'not-a-mode))
+
 (defun transient--expand-define-args (args &optional arglist)
   (unless (listp arglist)
 (error "Mandatory ARGLIST is missing"))
@@ -1074,11 +1083,16 @@ example, sets a variable, use `transient-define-infix' 
instead.
   (if (and desc (or (stringp desc) (symbolp desc)))
   desc
 (plist-get args :key)))
-  (setq args (plist-put args :command
-`(defalias ',sym ,(macroexp-quote cmd))
+  (setq args (plist-put
+  args :command
+  `(prog1 ',sym
+ (put ',sym 'interactive-only t)
+ (put ',sym 'command-modes (list 'not-a-mode))
+ (defalias ',sym ,(macroexp-quote cmd)))
((or (stringp car)
 (and car (listp car)))
-(let ((arg pop))
+(let ((arg pop)
+  (sym nil))
   (cl-typecase arg
 (list
  (setq args (plist-put args :shortarg (car  arg)))
@@ -1088,9 +1102,13 @@ example, sets a variable, use `transient-define-infix' 
instead.
  (when-let ((shortarg (transient--derive-shortarg arg)))
(setq args (plist-put args :shortarg shortarg)))
  (setq args (plist-put args :argument arg
-  (setq args (plist-put args :command
-(list 'quote (intern (format "transient:%s:%s"
- prefix arg)
+  (setq sym (intern (format "transient:%s:%s" prefix arg)))
+  (setq args (plist-put
+  args :command
+  `(prog1 ',sym
+ (put ',sym 'interactive-only t)
+ (put ',sym 'command-modes (list 'not-a-mode))
+ (defalias ',sym #'transient--default-infix-command)))

[elpa] externals/transient 323d6b6c84 2/5: manual: Document when to invoke prefix arguments

2023-08-16 Thread Jonas Bernoulli via
branch: externals/transient
commit 323d6b6c84e6ae55e578efa1efb6bb4d42a69cac
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

manual: Document when to invoke prefix arguments
---
 docs/transient.org  | 31 ++---
 docs/transient.texi | 56 +++--
 2 files changed, 48 insertions(+), 39 deletions(-)

diff --git a/docs/transient.org b/docs/transient.org
index b1c71e94b3..02389c83c2 100644
--- a/docs/transient.org
+++ b/docs/transient.org
@@ -142,13 +142,13 @@ When using Transient, one can call a command with 
arguments that are
 just as complex as when calling the same function non-interactively
 from Lisp.
 
-Invoking a transient command with arguments is similar to invoking a
-command in a shell with command-line completion and history enabled.
-One benefit of the Transient interface is that it remembers history
-not only on a global level (“this command was invoked using these
-arguments, and previously it was invoked using those other arguments”),
-but also remembers the values of individual arguments independently.
-See [[*Using History]].
+Invoking a transient suffix command with arguments is similar to
+invoking a command in a shell with command-line completion and history
+enabled.  One benefit of the Transient interface is that it remembers
+history not only on a global level (“this command was invoked using
+these arguments, and previously it was invoked using those other
+arguments”), but also remembers the values of individual arguments
+independently.  See [[*Using History]].
 
 After a transient prefix command is invoked, {{{kbdvar(C-h )}}} can be 
used to
 show the documentation for the infix or suffix command that {{{var(KEY)}}} is
@@ -164,6 +164,23 @@ Additionally, Transient provides abstractions for defining 
new types,
 which the author of Transient did not anticipate (or didn't get around
 to implementing yet).
 
+Note that suffix commands also support regular prefix arguments.  A
+suffix command may even be called with both infix and prefix arguments
+at the same time.  If you invoke a command as a suffix of a transient
+prefix command, but also want to pass prefix arguments to it, then
+first invoke the prefix command, and only after doing that invoke the
+prefix arguments, before finally invoking the suffix command.  If you
+instead began by providing the prefix arguments, then those would
+apply to the prefix command, not the suffix command.  Likewise, if you
+want to change infix arguments before invoking a suffix command with
+prefix arguments, then change the infix arguments before invoking the
+prefix arguments.  In other words, regular prefix arguments always
+apply to the next command, and since transient prefix, infix and
+suffix commands are just regular commands, the same applies to them.
+(Regular prefix keys behave differently because they are not commands
+at all, instead they are just incomplete key sequences, and those
+cannot be interrupted with prefix commands.)
+
 * Usage
 ** Invoking Transients
 #+cindex: invoking transients
diff --git a/docs/transient.texi b/docs/transient.texi
index 3aef6d7352..7d8bce0875 100644
--- a/docs/transient.texi
+++ b/docs/transient.texi
@@ -248,13 +248,13 @@ When using Transient, one can call a command with 
arguments that are
 just as complex as when calling the same function non-interactively
 from Lisp.
 
-Invoking a transient command with arguments is similar to invoking a
-command in a shell with command-line completion and history enabled.
-One benefit of the Transient interface is that it remembers history
-not only on a global level (“this command was invoked using these
-arguments, and previously it was invoked using those other arguments”),
-but also remembers the values of individual arguments independently.
-See @ref{Using History}.
+Invoking a transient suffix command with arguments is similar to
+invoking a command in a shell with command-line completion and history
+enabled.  One benefit of the Transient interface is that it remembers
+history not only on a global level (“this command was invoked using
+these arguments, and previously it was invoked using those other
+arguments”), but also remembers the values of individual arguments
+independently.  See @ref{Using History}.
 
 After a transient prefix command is invoked, @kbd{C-h @var{KEY}} can be used to
 show the documentation for the infix or suffix command that @var{KEY} is
@@ -270,21 +270,26 @@ Additionally, Transient provides abstractions for 
defining new types,
 which the author of Transient did not anticipate (or didn't get around
 to implementing yet).
 
+Note that suffix commands also support regular prefix arguments.  A
+suffix command may even be called with both infix and prefix arguments
+at the same time.  If you invoke a command as a suffix of a transient
+prefix command, but also want to pass prefix arguments to it, then
+first invoke the prefix command, and only after doing that invo

[nongnu] elpa/solarized-theme 07a681fff2: Add corfu face (#442)

2023-08-16 Thread ELPA Syncer
branch: elpa/solarized-theme
commit 07a681fff27ff22d268b726b05576ef93fc4e615
Author: Ruslan Kamashev 
Commit: GitHub 

Add corfu face (#442)

Add corfu face
---
 solarized-faces.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/solarized-faces.el b/solarized-faces.el
index e5f6be95b7..7d834f9a0e 100644
--- a/solarized-faces.el
+++ b/solarized-faces.el
@@ -433,6 +433,11 @@
  `(company-tooltip-search ((,class (:foreground ,magenta
  `(company-tooltip-search-selection ((,class (:foreground ,magenta :weight 
bold
  `(company-tooltip-selection ((,class (:weight bold
+; corfu
+ `(corfu-default ((,class (:foreground ,base1 :background ,base02
+ `(corfu-current ((,class (:inherit corfu-default :weight bold 
:inverse-video t
+ `(corfu-bar ((,class (:background ,base0
+ `(corfu-border ((,class (:background ,base02
 ; consult
  `(consult-preview-insertion ((,class (:background ,base02
  `(consult-preview-line ((,class (:background ,base02



[elpa] externals/corfu 5476fc2ccc: Use without-restriction

2023-08-16 Thread ELPA Syncer
branch: externals/corfu
commit 5476fc2cccfec1859849d3fab3d6dfef827568cb
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use without-restriction
---
 extensions/corfu-info.el  | 3 +--
 extensions/corfu-popupinfo.el | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/extensions/corfu-info.el b/extensions/corfu-info.el
index e976be753d..7dbbab263a 100644
--- a/extensions/corfu-info.el
+++ b/extensions/corfu-info.el
@@ -99,8 +99,7 @@ If called with a prefix ARG, the buffer is persistent."
  (or (and (bufferp (car loc)) (car loc))
  (find-file-noselect (car loc) t))
  (and arg (format "*corfu loc: %s*" cand)))
-  (save-restriction
-(widen)
+  (without-restriction
 (goto-char (point-min))
 (when-let (pos (cdr loc))
   (if (bufferp (car loc))
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 5d502666b3..fdf02ee396 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -194,8 +194,7 @@ all values are in pixels relative to the origin.  See
 (find-file-noselect (car loc) t))
 (with-current-buffer buffer
   (save-excursion
-(save-restriction
-  (widen)
+(without-restriction
   (goto-char (point-min))
   (when-let (pos (cdr loc))
 (if (bufferp (car loc))



[elpa] externals/consult updated (ea36a460e0 -> 7e660440c1)

2023-08-16 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  ea36a460e0 Update readme
   new  951c8b47b7 Use without-restriction
   new  7e660440c1 Minor simplification


Summary of changes:
 consult-flymake.el  | 51 +--
 consult-imenu.el|  3 +--
 consult-register.el |  3 +--
 consult.el  |  9 +++--
 4 files changed, 30 insertions(+), 36 deletions(-)



[elpa] externals/consult 951c8b47b7 1/2: Use without-restriction

2023-08-16 Thread ELPA Syncer
branch: externals/consult
commit 951c8b47b74b8196468852f9e94828a03188226f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use without-restriction
---
 consult-flymake.el  | 51 +--
 consult-imenu.el|  3 +--
 consult-register.el |  3 +--
 consult.el  |  3 +--
 4 files changed, 28 insertions(+), 32 deletions(-)

diff --git a/consult-flymake.el b/consult-flymake.el
index ae47e55dc3..f96fbee4ea 100644
--- a/consult-flymake.el
+++ b/consult-flymake.el
@@ -27,6 +27,7 @@
 
 (require 'consult)
 (require 'flymake)
+(eval-when-compile (require 'cl-lib))
 
 (defconst consult-flymake--narrow
   '((?e . "Error")
@@ -41,26 +42,29 @@ DIAGS should be a list of diagnostics as returned from 
`flymake-diagnostics'."
(lambda (diag)
  (let ((buffer (flymake-diagnostic-buffer diag))
(type (flymake-diagnostic-type diag)))
-   (with-current-buffer buffer
- (save-excursion
-   (save-restriction
- (widen)
- (goto-char (flymake-diagnostic-beg diag))
- (list (buffer-name buffer)
-   (line-number-at-pos)
-   type
-   (flymake-diagnostic-text diag)
-   (point-marker)
-   (flymake-diagnostic-end diag)
-   (pcase (flymake--lookup-type-property type 
'flymake-category)
-  ('flymake-error ?e)
-  ('flymake-warning ?w)
-  (_ ?n
-   (seq-filter (lambda (diag)
- (buffer-live-p (flymake-diagnostic-buffer diag)))
-   diags)))
- (buffer-width (apply #'max (mapcar (lambda (x) (length (nth 0 x))) 
diags)))
- (line-width (apply #'max (mapcar (lambda (x) (length 
(number-to-string (nth 1 x diags)))
+   (when (buffer-live-p buffer)
+ (with-current-buffer buffer
+   (save-excursion
+ (without-restriction
+   (goto-char (flymake-diagnostic-beg diag))
+   (list (buffer-name buffer)
+ (line-number-at-pos)
+ type
+ (flymake-diagnostic-text diag)
+ (point-marker)
+ (flymake-diagnostic-end diag)
+ (pcase (flymake--lookup-type-property type 
'flymake-category)
+   ('flymake-error ?e)
+   ('flymake-warning ?w)
+   (_ ?n)
+   diags))
+ (diags (or (delq nil diags)
+(user-error "No flymake errors (Status: %s)"
+(if (seq-difference (flymake-running-backends)
+
(flymake-reporting-backends))
+'running 'finished
+ (buffer-width (cl-loop for x in diags maximize (length (nth 0 x
+ (line-width (cl-loop for x in diags maximize (length 
(number-to-string (nth 1 x)
  (fmt (format "%%-%ds %%-%dd %%-7s %%s" buffer-width line-width)))
 (mapcar
  (pcase-lambda (`(,buffer ,line ,type ,text ,beg ,end ,narrow))
@@ -94,15 +98,10 @@ buffers in the current project instead of just the current 
buffer."
   (consult--forbid-minibuffer)
   (consult--read
(consult-flymake--candidates
-(or
  (if-let (((and project (fboundp 'flymake--project-diagnostics)))
   (project (project-current)))
  (flymake--project-diagnostics project)
-   (flymake-diagnostics))
- (user-error "No flymake errors (Status: %s)"
- (if (seq-difference (flymake-running-backends)
- (flymake-reporting-backends))
- 'running 'finished
+   (flymake-diagnostics)))
:prompt "Flymake diagnostic: "
:category 'consult-flymake-error
:history t ;; disable history
diff --git a/consult-imenu.el b/consult-imenu.el
index 53f65e5972..d1b073b930 100644
--- a/consult-imenu.el
+++ b/consult-imenu.el
@@ -117,8 +117,7 @@ TYPES is the mode-specific types configuration."
  ;; Generate imenu, see `imenu--make-index-alist'.
  (items (imenu--truncate-items
  (save-excursion
-   (save-restriction
- (widen)
+   (without-restriction
  (funcall imenu-create-index-function)
  (config (cdr (seq-find (lambda (x) (derived-mode-p (car x))) 
consult-imenu-config
 ;; Fix toplevel items, e.g., emacs-lisp-mode toplevel items are functions
diff --git a/consult-register.el b/consult-register.el
index f7e58cba01..dff679d288 100644
--- a/consult-regi

[elpa] externals/consult 7e660440c1 2/2: Minor simplification

2023-08-16 Thread ELPA Syncer
branch: externals/consult
commit 7e660440c1636dc28d86b4ce86e9dc20df7e64c2
Author: Daniel Mendler 
Commit: Daniel Mendler 

Minor simplification
---
 consult.el | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/consult.el b/consult.el
index 99c06b739e..6a0dcb8e34 100644
--- a/consult.el
+++ b/consult.el
@@ -3092,10 +3092,8 @@ The symbol at point is added to the future history."
   (let* ((candidates (consult--slow-operation
  "Collecting headings..."
(consult--outline-candidates)))
- (min-level (- (apply #'min (mapcar
- (lambda (cand)
-   (get-text-property 0 
'consult--outline-level cand))
- candidates))
+ (min-level (- (cl-loop for cand in candidates minimize
+(get-text-property 0 'consult--outline-level 
cand))
?1))
  (narrow-pred (lambda (cand)
 (<= (get-text-property 0 'consult--outline-level cand)



[elpa] externals/jinx 417d95002f: Use without-restriction

2023-08-16 Thread ELPA Syncer
branch: externals/jinx
commit 417d95002fbf6737d6463e56d2633badff25522c
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use without-restriction
---
 jinx.el | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/jinx.el b/jinx.el
index 74bb55a344..06df5cebd6 100644
--- a/jinx.el
+++ b/jinx.el
@@ -497,8 +497,7 @@ If CHECK is non-nil, always check first."
 (defun jinx--cleanup ()
   "Cleanup all overlays and trigger fontification."
   (with-silent-modifications
-(save-restriction
-  (widen)
+(without-restriction
   (jinx--delete-overlays (point-min) (point-max))
   (remove-list-of-text-properties (point-min) (point-max) '(jinx--pending))
   (jinx--in-base-buffer #'jit-lock-refontify
@@ -623,8 +622,7 @@ If CHECK is non-nil, always check first."
 (defun jinx--recheck-overlays ()
   "Recheck all overlays in buffer after a dictionary update."
   (save-excursion
-(save-restriction
-  (widen)
+(without-restriction
   (dolist (ov (overlays-in (point-min) (point-max)))
 (when (eq (overlay-get ov 'category) 'jinx-overlay)
   (goto-char (overlay-end ov))



[elpa] externals/org-modern 905a601796: Use without-restriction

2023-08-16 Thread ELPA Syncer
branch: externals/org-modern
commit 905a601796d02283e94a603b6011a537ee7e6090
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use without-restriction
---
 org-modern.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index 0416a6e644..e253451f72 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -796,8 +796,7 @@ the font.")
 (remove-hook 'pre-redisplay-functions #'org-modern--pre-redisplay 'local)
 (remove-hook 'org-after-promote-entry-hook #'org-modern--unfontify-line 
'local)
 (remove-hook 'org-after-demote-entry-hook #'org-modern--unfontify-line 
'local)))
-  (save-restriction
-(widen)
+  (without-restriction
 (with-silent-modifications
   (org-modern--unfontify (point-min) (point-max)))
 (font-lock-flush)))



[nongnu] elpa/devil 95677d158f: Add repeatable keys C-a, C-e, M-a, M-e, and M-@

2023-08-16 Thread ELPA Syncer
branch: elpa/devil
commit 95677d158fba0f0248e9cf5aa1357bee4b293d8e
Author: Susam Pal 
Commit: Susam Pal 

Add repeatable keys C-a, C-e, M-a, M-e, and M-@
---
 CHANGES.org | 12 +++-
 MANUAL.org  |  2 +-
 devil.el|  8 
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/CHANGES.org b/CHANGES.org
index c998e2e380..49439c498a 100644
--- a/CHANGES.org
+++ b/CHANGES.org
@@ -10,10 +10,12 @@
 *** Added
 
 - Repeatable key sequence =, m e=.
-- Repeatable key sequence =, m h=.
-- Repeatable key sequence group for =, x [= and =, x ]=.
-- Repeatable key sequence group for =, x ^=, =, x {=, and =, x }=.
 - Repeatable key sequence =, x u=.
+- Repeatable key sequence group for =, m @= and =, m h=.
+- Repeatable key sequence group for =, x [= and =, x ]=.
+- Repeatable key sequence group for =, x ^= and =, x {= and =, x }=.
+- Repeatable key sequences =, a= and =, e= added to group for =, p=.
+- Repeatable key sequences =, m a= and =, m e= added to group for =, m b=.
 
 *** Changed
 
@@ -23,8 +25,8 @@
   typing the last character of that key sequence.
 - Repeatable key groups defined in =devil-repeatable-keys= is not
   ignored anymore when =devil-all-keys-repeatable= is set to non-nil.
-- Devil key sequences =, p=, =, n=, =, f=, and =, b= have been grouped
-  together into a repeatable key group.
+- Devil key sequences =, p= and =, n= and =, b= and =, f= have been
+  grouped together into a repeatable key group.
 - Devil key sequences =, m f= and =, m b= have been grouped together
   into a repeatable key group.
 
diff --git a/MANUAL.org b/MANUAL.org
index 33e04bbed5..4b165ad69a 100644
--- a/MANUAL.org
+++ b/MANUAL.org
@@ -974,7 +974,7 @@ Devil is a minor mode to translate key sequences.  Devil 
utilises this
 translation capability to provide a modifier-free editing experience
 and it does so without resorting to modal-editing.  Devil retains the
 non-modal editing of vanilla Emacs.  This mode was written as a quirky
-experiment to make it easier to use Emacs with only one =ctrl= key.
+experiment to make it easier to use Emacs without modifier keys.
 However, the resulting mode turned out to be quite convenient to use,
 in general.  You might find Devil comfortable.  Or you might find
 Devil to be a terrible idea.  It is also possible that you might find
diff --git a/devil.el b/devil.el
index 20a7d7d1b7..069de34a72 100644
--- a/devil.el
+++ b/devil.el
@@ -4,7 +4,7 @@
 
 ;; Author: Susam Pal 
 ;; Maintainer: Susam Pal 
-;; Version: 0.7.0-beta2
+;; Version: 0.7.0-beta3
 ;; Package-Requires: ((emacs "24.4"))
 ;; Keywords: convenience, abbrev
 ;; URL: https://github.com/susam/devil
@@ -168,10 +168,10 @@ by `devil-format' may be used in the keys and values."
 ("%k k")
 ("%k m ^")
 ("%k m e")
-("%k m f" "%k m b")
-("%k m h")
+("%k m b" "%k m f" "%k m a" "% k m e")
+("%k m @" "%k m h")
 ("%k m y")
-("%k p" "%k n" "%k f" "%k b")
+("%k p" "%k n" "%k b" "%k f" "%k a" "%k e")
 ("%k s")
 ("%k x [" "%k x ]")
 ("%k x ^" "%k x {" "%k x }")