[elpa] externals/denote ffad320332: Make 'denote-all-files' accept optional OMIT-CURRENT

2023-10-17 Thread ELPA Syncer
branch: externals/denote
commit ffad320332645abb922b26d1d83781066eeff937
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make 'denote-all-files' accept optional OMIT-CURRENT

We had this before and it was used to omit the current file from the
'denote-link' prompt (i.e. not give users the option to link the file
to itself). We probably lost that when 'denote-all-files' was
introduced, though I believe it was not by design. I am adding it back
in, as I see no obvious downside with this.
---
 README.org |  6 ++
 denote.el  | 15 ++-
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 9b84cf138f..b62b288752 100644
--- a/README.org
+++ b/README.org
@@ -3683,6 +3683,12 @@ might change them without further notice.
 + Function ~denote-directory-files-matching-regexp~ :: Return list of
   files matching =REGEXP= in ~denote-directory-files~.
 
+#+findex: denote-all-files
++ Function ~denote-all-files~ :: Return the list of Denote files in
+  the variable ~denote-directory~. With optional =OMIT-CURRENT=, do
+  not include the current Denote file in the returned list. [ The
+  =OMIT-CURRENT= is part of {{{development-version}}}. ]
+
 #+findex: denote-file-name-relative-to-denote-directory
 + Function ~denote-file-name-relative-to-denote-directory~ :: Return
   name of =FILE= relative to the variable ~denote-directory~.  =FILE=
diff --git a/denote.el b/denote.el
index f553cba535..642e9b7e31 100644
--- a/denote.el
+++ b/denote.el
@@ -892,12 +892,17 @@ The path is relative to DIRECTORY (default: 
‘default-directory’)."
  (string-match-p regexp (denote-get-file-name-relative-to-denote-directory 
f)))
(denote-directory-files)))
 
-(defun denote-all-files ()
-  "Return the list of Denote files in variable `denote-directory'."
+(defun denote-all-files (&optional omit-current)
+  "Return the list of Denote files in variable `denote-directory'.
+With optional OMIT-CURRENT, do not include the current Denote
+file in the returned list."
   (let* ((project-find-functions #'denote-project-find)
  (project (project-current nil (denote-directory)))
- (dirs (list (project-root project
-(project-files project dirs)))
+ (dirs (list (project-root project)))
+ (files (project-files project dirs)))
+(if (and omit-current (denote-file-has-identifier-p buffer-file-name))
+(delete buffer-file-name files)
+  files)))
 
 (defvar denote--file-history nil
   "Minibuffer history of `denote-file-prompt'.")
@@ -908,7 +913,7 @@ With optional FILES-MATCHING-REGEXP, filter the candidates 
per
 the given regular expression."
   (when-let ((files (if files-matching-regexp
 (denote-directory-files-matching-regexp 
files-matching-regexp)
-  (denote-all-files)))
+  (denote-all-files :omit-current)))
  (file (funcall project-read-file-name-function
 ;; FIXME 2023-10-15: Why do I get an empty history 
at the prompt even
 ;; though it is given as an argument and it is not 
empty?



[nongnu] elpa/eat d9af04ef82 1/3: Don't mess up terminal when switching to line mode

2023-10-17 Thread ELPA Syncer
branch: elpa/eat
commit d9af04ef829a9a1db2240d3b17c5819e97c5bc56
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Don't mess up terminal when switching to line mode

* eat.el (eat--line-mode-enter-auto-1)
(eat--line-mode-exit-auto-1): New function.
* eat.el (eat--line-mode-enter-auto, eat--line-mode-exit-auto):
Do everything after the output is processed.
---
 eat.el | 57 -
 1 file changed, 36 insertions(+), 21 deletions(-)

diff --git a/eat.el b/eat.el
index fc7c68b77b..b9072bdbd1 100644
--- a/eat.el
+++ b/eat.el
@@ -5141,32 +5141,47 @@ If HOST isn't the host Emacs is running on, don't do 
anything."
 (defvar eat--semi-char-mode)
 (defvar eat--char-mode)
 
+(defun eat--line-mode-enter-auto-1 (buffer)
+  "Enter line mode in BUFFER."
+  (with-current-buffer buffer
+(unless (or eat--inhibit-auto-line-mode eat--line-mode)
+  (unless eat--line-mode
+(setq eat--auto-line-mode-prev-mode
+  (cond (eat--semi-char-mode 'semi-char)
+(eat--char-mode 'char)
+(t 'emacs)))
+(eat-line-mode)
+;; We're entering automatically, so we should be able to exit it
+;; automatically.
+(setq eat--inhibit-auto-line-mode nil)
+
 (defun eat--line-mode-enter-auto ()
   "Enter line mode."
-  (unless (or eat--inhibit-auto-line-mode eat--line-mode)
-(unless eat--line-mode
-  (setq eat--auto-line-mode-prev-mode
-(cond (eat--semi-char-mode 'semi-char)
-  (eat--char-mode 'char)
-  (t 'emacs)))
-  (eat-line-mode)
-  ;; We're entering automatically, so we should be able to exit it
-  ;; automatically.
-  (setq eat--inhibit-auto-line-mode nil
+  (run-with-idle-timer 0 nil #'eat--line-mode-enter-auto-1
+   (current-buffer)))
+
+(defun eat--line-mode-exit-auto-1 (buffer)
+  "Exit line mode in BUFFER."
+  (with-current-buffer buffer
+(when (and (not eat--inhibit-auto-line-mode)
+   eat--auto-line-mode-prev-mode)
+  (pcase eat--auto-line-mode-prev-mode
+('emacs (eat-emacs-mode))
+('semi-char (eat-semi-char-mode))
+('char (eat-char-mode)))
+  (setq eat--auto-line-mode-prev-mode nil)
+  (when (/= (eat-term-end eat-terminal) (point-max))
+(eat-line-send))
+  ;; Toggle line mode _after_ we exit from
+  ;; `eat-term-process-output'.
+  (run-with-idle-timer 0 nil #'eat-line-mode)
+  (eat--line-mode -1)
+  (setq buffer-undo-list nil
 
 (defun eat--line-mode-exit-auto ()
   "Exit line mode."
-  (when (and (not eat--inhibit-auto-line-mode)
- eat--auto-line-mode-prev-mode)
-(pcase eat--auto-line-mode-prev-mode
-  ('emacs (eat-emacs-mode))
-  ('semi-char (eat-semi-char-mode))
-  ('char (eat-char-mode)))
-(setq eat--auto-line-mode-prev-mode nil)
-(when (/= (eat-term-end eat-terminal) (point-max))
-  (eat-line-send))
-(eat--line-mode -1)
-(setq buffer-undo-list nil)))
+  (run-with-idle-timer 0 nil #'eat--line-mode-exit-auto-1
+   (current-buffer)))
 
 (defun eat--post-prompt ()
   "Put a mark in the marginal area and enter line mode."



[nongnu] elpa/eat 187e18a24a 3/3: Fix compiler warnings

2023-10-17 Thread ELPA Syncer
branch: elpa/eat
commit 187e18a24a73007bf0be8d27279f193561663479
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Fix compiler warnings

* eat.el: Wrap all 'emacs-major-version' checks with
'eval-when-compile'.
* eat.el (eat--process-input-queue): Don't use obsolete
generalized variable 'buffer-local-value'.
---
 eat.el | 85 ++
 1 file changed, 49 insertions(+), 36 deletions(-)

diff --git a/eat.el b/eat.el
index 328d909bcb..660b377302 100644
--- a/eat.el
+++ b/eat.el
@@ -783,7 +783,8 @@ If your process is choking on big inputs, try lowering the 
value."
   (let ((face (intern (format "eat-term-color-%i" face-counter
 (custom-declare-face
  face `((t :inherit
-   ,(intern (format (if (>= emacs-major-version 28)
+   ,(intern (format (if (eval-when-compile
+  (>= emacs-major-version 28))
 "ansi-color-%s"
   "term-color-%s")
 color
@@ -797,7 +798,8 @@ If your process is choking on big inputs, try lowering the 
value."
   (let ((face (intern (format "eat-term-color-%i" face-counter
 (custom-declare-face
  face `((t :inherit
-   ,(intern (format (if (>= emacs-major-version 28)
+   ,(intern (format (if (eval-when-compile
+  (>= emacs-major-version 28))
 "ansi-color-bright-%s"
   "term-color-%s")
 color
@@ -4454,7 +4456,8 @@ client process may get confused."
   (pos (if (memq 'drag modifiers)
(event-end mouse)
  (event-start mouse)))
-  (x-y (if (< emacs-major-version 29)
+  (x-y (if (eval-when-compile
+ (< emacs-major-version 29))
(posn-col-row pos)
  (with-suppressed-warnings
  ((callargs posn-col-row))
@@ -4474,7 +4477,8 @@ client process may get confused."
  b)))
  (when ref-pos
(let ((ref-x-y
-  (if (< emacs-major-version 29)
+  (if (eval-when-compile
+(< emacs-major-version 29))
   (posn-col-row ref-pos)
 (with-suppressed-warnings
 ((callargs posn-col-row))
@@ -4552,7 +4556,8 @@ client process may get confused."
 (pred mouse-movement-p)
 movement)
(let* ((pos (event-start movement))
-  (x-y (if (< emacs-major-version 29)
+  (x-y (if (eval-when-compile
+ (< emacs-major-version 29))
(posn-col-row pos)
  (with-suppressed-warnings
  ((callargs posn-col-row))
@@ -4566,7 +4571,8 @@ client process may get confused."
  35)))
  (when ref-pos
(let ((ref-x-y
-  (if (< emacs-major-version 29)
+  (if (eval-when-compile
+(< emacs-major-version 29))
   (posn-col-row ref-pos)
 (with-suppressed-warnings
 ((callargs posn-col-row))
@@ -5663,11 +5669,11 @@ ARG is passed to `yank', which see."
 STRING and ARG are passed to `yank-pop', which see."
   (interactive
(progn
- (unless (>= emacs-major-version 28)
+ (unless (eval-when-compile (>= emacs-major-version 28))
(error "`eat-yank-from-kill-ring' requires at least Emacs 28"))
  (list (read-from-kill-ring "Yank from kill-ring: ")
current-prefix-arg)))
-  (unless (>= emacs-major-version 28)
+  (unless (eval-when-compile (>= emacs-major-version 28))
 (error "`eat-yank-from-kill-ring' requires at least Emacs 28"))
   (when eat-terminal
 (funcall eat--synchronize-scroll-function
@@ -6752,22 +6758,21 @@ OS's."
 
 (defun eat--process-input-queue (buffer)
   "Process the input queue on BUFFER."
-  (setf (buffer-local-value 'eat--process-input-queue-timer buffer)
-nil)
-  (when-let* (((buffer-live-p buffer))
-  (terminal (buffer-local-value 'eat-terminal buffer))
-  (proc (eat-term-parameter terminal 'eat--process))
-  ((process-live-p proc)))
+  (when (buffer-live-p buffer)
 (with-current-buffer buffer
   ;; We don't want to recurse this function.
   (unless eat--defer-input-processing
-(let ((inhibit-quit t); Don't disturb!
-  (eat--defer-input-processing t))
-  (while eat--pending-

[nongnu] elpa/eat updated (1d7a1ea0b5 -> 187e18a24a)

2023-10-17 Thread ELPA Syncer
elpasync pushed a change to branch elpa/eat.

  from  1d7a1ea0b5 Don't flicker due to screen line breaking
   new  d9af04ef82 Don't mess up terminal when switching to line mode
   new  e0fa65c225 Don't let 'eat--process-input-queue' to recurse
   new  187e18a24a Fix compiler warnings


Summary of changes:
 eat.el | 146 +
 1 file changed, 92 insertions(+), 54 deletions(-)



[nongnu] elpa/eat e0fa65c225 2/3: Don't let 'eat--process-input-queue' to recurse

2023-10-17 Thread ELPA Syncer
branch: elpa/eat
commit e0fa65c22592e30c0d9aa1e3578077802af385ff
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Don't let 'eat--process-input-queue' to recurse

* eat.el (eat--defer-input-processing): New variable.
* eat.el (eat-mode, eat--eshell-local-mode): Make
'eat--defer-input-processing' buffer-local.
* eat.el (eat--process-input-queue): If
'eat--defer-input-processing' is non-nil, do nothing, otherwise
bind it to non-nil while sending input.
---
 eat.el | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/eat.el b/eat.el
index b9072bdbd1..328d909bcb 100644
--- a/eat.el
+++ b/eat.el
@@ -6572,6 +6572,7 @@ END if it's safe to do so."
   isearch-push-state-function
   eat--pending-input-chunks
   eat--process-input-queue-timer
+  eat--defer-input-processing
   eat--pending-output-chunks
   eat--output-queue-first-chunk-time
   eat--process-output-queue-timer
@@ -6711,6 +6712,9 @@ The input chunks are pushed, so last input appears 
first.")
 (defvar eat--process-input-queue-timer nil
   "Timer to process input queue.")
 
+(defvar eat--defer-input-processing nil
+  "Non-nil meaning process input later.")
+
 (defvar eat--shell-prompt-annotation-correction-timer nil
   "Timer to correct shell prompt annotations.")
 
@@ -6755,10 +6759,15 @@ OS's."
   (proc (eat-term-parameter terminal 'eat--process))
   ((process-live-p proc)))
 (with-current-buffer buffer
-  (let ((chunks (nreverse eat--pending-input-chunks)))
-(setq eat--pending-input-chunks nil)
-(dolist (str chunks)
-  (eat--send-string proc str))
+  ;; We don't want to recurse this function.
+  (unless eat--defer-input-processing
+(let ((inhibit-quit t); Don't disturb!
+  (eat--defer-input-processing t))
+  (while eat--pending-input-chunks
+(let ((chunks (nreverse eat--pending-input-chunks)))
+  (setq eat--pending-input-chunks nil)
+  (dolist (str chunks)
+(eat--send-string proc str)
 
 (defun eat--process-output-queue (buffer)
   "Process the output queue on BUFFER."
@@ -7541,6 +7550,7 @@ symbol `buffer', in which case the point of current 
buffer is set."
   eat--mouse-grabbing-type
   eat--pending-input-chunks
   eat--process-input-queue-timer
+  eat--defer-input-processing
   eat--pending-output-chunks
   eat--output-queue-first-chunk-time
   eat--process-output-queue-timer



[nongnu] elpa/sweeprolog 79b2bb3a8a 1/3: Sort predicate completion candidates by functor length

2023-10-17 Thread ELPA Syncer
branch: elpa/sweeprolog
commit 79b2bb3a8a72a10a7959093fb02ec3139b4cedf2
Author: Eshel Yaron 
Commit: Eshel Yaron 

Sort predicate completion candidates by functor length

* sweeprolog.el (sweeprolog-predicate-completion-sort): New function.
(sweeprolog-predicate-completion-candidates): Use it as
`display-sort-function`.
---
 sweeprolog.el | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/sweeprolog.el b/sweeprolog.el
index 9a0f064f67..a90baeb2b1 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -1436,6 +1436,13 @@ list even when found in the current clause."
 (push (match-string-no-properties 0) vars)))
 vars))
 
+(defun sweeprolog-predicate-completion-sort (candidates)
+  "Sort predicate completion CANDIDATES by functor length."
+  (sort candidates
+(lambda (a b)
+  (< (or (string-search "(" a) (length a))
+ (or (string-search "(" b) (length b))
+
 (defun sweeprolog-predicate-completion-candidates (beg end cxt)
   (let ((col (sweeprolog--query-once
   "sweep" "sweep_heads_collection"
@@ -1443,7 +1450,13 @@ list even when found in the current clause."
 (sweeprolog--qualyfing-module beg)
 (buffer-substring-no-properties beg (point))
 (buffer-substring-no-properties (point) end)
-(list beg end col
+(list beg end
+  (lambda (s p a)
+(if (eq a 'metadata)
+'(metadata
+  (display-sort-function . 
sweeprolog-predicate-completion-sort)
+  (cycle-sort-function   . 
sweeprolog-predicate-completion-sort))
+  (complete-with-action a col s p)))
   :exclusive 'no
   :annotation-function (lambda (_) " Predicate functor")
   :exit-function



[nongnu] elpa/sweeprolog dd8412682b 2/3: ; Adapt tests following last change

2023-10-17 Thread ELPA Syncer
branch: elpa/sweeprolog
commit dd8412682b33c66d810bfe7bc590737bf0cbbd57
Author: Eshel Yaron 
Commit: Eshel Yaron 

; Adapt tests following last change
---
 sweeprolog-tests.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el
index b65c6031d8..06c8638eab 100644
--- a/sweeprolog-tests.el
+++ b/sweeprolog-tests.el
@@ -479,8 +479,8 @@ baz(Baz) :- fooba-!-"
   (let ((cap (sweeprolog-completion-at-point)))
 (should (= 64 (nth 0 cap)))
 (should (= 69 (nth 1 cap)))
-(should (equal '(("foobar(Baz)" compound "term_position" 0 11 0 6 
((compound "-" 7 10
-   (nth 2 cap)
+(should (equal '("foobar(Baz)")
+   (all-completions "" (nth 2 cap))
 
 (sweeprolog-deftest cap-autoloaded-predicate ()
   "Completion at point for remote predicates."
@@ -491,8 +491,8 @@ baz(Baz) :- lists:memberc-!-"
   (let ((cap (sweeprolog-completion-at-point)))
 (should (= 70 (nth 0 cap)))
 (should (= 77 (nth 1 cap)))
-(should (equal '(("memberchk(Elem, List)" compound "term_position" 0 21 0 
9 ((compound "-" 10 14) (compound "-" 16 20
-   (nth 2 cap)
+(should (equal '("memberchk(Elem, List)")
+   (all-completions "" (nth 2 cap))
 
 (sweeprolog-deftest cap-compound ()
   "Completion at point for compound terms."



[nongnu] elpa/sweeprolog e9bf72bfe8 3/3: * sweep.texi (Things To Do): Add new to-do items

2023-10-17 Thread ELPA Syncer
branch: elpa/sweeprolog
commit e9bf72bfe8a3eb14ac238da9b73957d7c8497da4
Author: Eshel Yaron 
Commit: Eshel Yaron 

* sweep.texi (Things To Do): Add new to-do items
---
 sweep.texi | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/sweep.texi b/sweep.texi
index 0d46ba8065..b69905a6d2 100644
--- a/sweep.texi
+++ b/sweep.texi
@@ -3477,6 +3477,17 @@ level (1, 2 or 3) for which it should apply.
 target to the value of @code{(font-lock-value-in-major-mode
 font-lock-maximum-decoration)} and decide whether or not to apply the
 fragment.
+
+@item Support @kbd{M-x align}
+Sweep Prolog mode should integrate with @file{align.el} such that
+@kbd{M-x align} aligns arguments of consecutive predicate calls.
+Concretely, we need to locally set @code{align-mode-rules-list} to a
+suitable value in @code{sweeprolog-mode}.
+
+@item Support code filling/formatting
+Sweep Prolog mode should define a @code{fill-paragraph-function}, and
+perhaps also a @code{normal-auto-fill-function}, for code filling that
+takes into account Prolog-specific conventions.
 @end table
 
 @node General Improvements



[nongnu] elpa/sweeprolog updated (10b6f8fb9d -> e9bf72bfe8)

2023-10-17 Thread ELPA Syncer
elpasync pushed a change to branch elpa/sweeprolog.

  from  10b6f8fb9d Announce recent changes in NEWS.org and bump version to 
0.25.4
   new  79b2bb3a8a Sort predicate completion candidates by functor length
   new  dd8412682b ; Adapt tests following last change
   new  e9bf72bfe8 * sweep.texi (Things To Do): Add new to-do items


Summary of changes:
 sweep.texi  | 11 +++
 sweeprolog-tests.el |  8 
 sweeprolog.el   | 15 ++-
 3 files changed, 29 insertions(+), 5 deletions(-)



[elpa] externals/org updated (9bbc21df84 -> b223a3cc75)

2023-10-17 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  9bbc21df84 Merge branch 'bugfix'
   new  24a0e7f8df * lisp/ob-python.el: Fix misspelled constant name
   new  b223a3cc75 org-num: Allow property inheritance for UNNUMBERED 
property


Summary of changes:
 etc/ORG-NEWS  | 10 ++
 lisp/ob-python.el |  2 +-
 lisp/org-num.el   |  2 +-
 3 files changed, 12 insertions(+), 2 deletions(-)



[elpa] externals/org b223a3cc75 2/2: org-num: Allow property inheritance for UNNUMBERED property

2023-10-17 Thread ELPA Syncer
branch: externals/org
commit b223a3cc75a45e817a78df08959dbf2c8111e411
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-num: Allow property inheritance for UNNUMBERED property

* lisp/org-num.el (org-num--skip-value): Honour property inheritance.
* etc/ORG-NEWS (=UNNUMBERED= property inheritance is now honored by
~org-num-mode~): Document the change.

Link: 
https://orgmode.org/list/249cd3af-c173-5ff2-df27-c32af3886...@gmail.com
---
 etc/ORG-NEWS| 10 ++
 lisp/org-num.el |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index e37bba2bdf..6c7db4e52f 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -479,6 +479,16 @@ Currently implemented options are:
   iCalendar programs support this usage.
 
 ** New features
+*** =UNNUMBERED= property inheritance is now honored by ~org-num-mode~
+
+When ~org-num-skip-unnumbered~ is non-nil, ~org-num-mode~ now honors
+~org-use-property-inheritance~ for =UNNUMBERED= property.  Previously,
+only local =UNNUMBERED= property was taken into account.
+
+Users can add ="UNNUMBERED"= to ~org-use-property-inheritance~ and set
+~org-numb-skip-unnumbered~ to ~t~ to make ~org-num-mode~ skip
+numbering of all the sub-headings with non-nil =UNNUMBERED= property.
+
 *** New final hooks for Modifier-Cursor keys
 
 Final hooks are added to the following commands:
diff --git a/lisp/org-num.el b/lisp/org-num.el
index 0f8dca28dd..17e405b2d9 100644
--- a/lisp/org-num.el
+++ b/lisp/org-num.el
@@ -267,7 +267,7 @@ otherwise."
   tags)
  t)
 (and org-num-skip-unnumbered
- (org-entry-get (point) "UNNUMBERED")
+ (org-entry-get (point) "UNNUMBERED" 'selective)
  t
 
 (defun org-num--current-numbering (level skip)



[elpa] externals/org 24a0e7f8df 1/2: * lisp/ob-python.el: Fix misspelled constant name

2023-10-17 Thread ELPA Syncer
branch: externals/org
commit 24a0e7f8dfce4d8a66206db981a047a7d17afa26
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

* lisp/ob-python.el: Fix misspelled constant name

(org-babel-default-header-args:python):
(org-babel-header-args:python): Rename.
`org-babel-header-args:python' is the correct name for extra
language-specific allowed header arguments.
---
 lisp/ob-python.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index e7cc4d5a84..d6bc10eee1 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -41,7 +41,7 @@
 
 (defvar org-babel-default-header-args:python '())
 
-(defconst org-babel-default-header-args:python
+(defconst org-babel-header-args:python
   '((return . :any)
 (python . :any))
   "Python-specific header arguments.")



[nongnu] elpa/cider 27ed547099 2/2: Introduce `cider-shorten-error-overlays` customization option (#3531)

2023-10-17 Thread ELPA Syncer
branch: elpa/cider
commit 27ed54709944cf11e4050ba944855fcacdb2ed83
Author: vemv 
Commit: GitHub 

Introduce `cider-shorten-error-overlays` customization option (#3531)

Fixes #3525
---
 CHANGELOG.md  |  1 +
 cider-eval.el | 27 ++-
 doc/modules/ROOT/pages/usage/code_evaluation.adoc | 13 +--
 3 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d9692c9fe..c986919fd6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
 - [#3522](https://github.com/clojure-emacs/cider/issues/3522): Introduce a new 
possible value for 
[`cider-use-overlays`](https://docs.cider.mx/cider/usage/code_evaluation.html#overlays):
 `errors-only`.
   - If specified, only errors will result in an overlay being shown.
 - [#3527](https://github.com/clojure-emacs/cider/issues/3527): Preserve the 
font size as one navigates through the CIDER inspector.
+- [#3525](https://github.com/clojure-emacs/cider/issues/3525): Introduce 
[`cider-inline-error-message-function`](https://docs.cider.mx/cider/usage/code_evaluation.html#overlays)
 customization option.
 
 ## 1.8.2 (2023-10-15)
 
diff --git a/cider-eval.el b/cider-eval.el
index 33fc97b60a..73d914c55d 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -821,6 +821,26 @@ REPL buffer.  This is controlled via
  conn)))
   (nrepl-dict-get result "phase"))
 
+(defcustom cider-inline-error-message-function #'cider--shorten-error-message
+  "A function that will shorten a given error message,
+as shown in overlays / the minibuffer (per `cider-use-overlays').
+
+The function takes a single arg.  You may want to use `identity',
+for leaving the message as-is."
+  :type 'boolean
+  :group 'cider
+  :package-version '(cider . "1.19.0"))
+
+(defun cider--shorten-error-message (err)
+  "Removes from ERR the prefix matched by `cider-clojure-compilation-regexp',
+and the suffix matched by `cider-module-info-regexp'."
+  (thread-last err
+   (replace-regexp-in-string cider-clojure-compilation-regexp
+ "")
+   (replace-regexp-in-string cider-module-info-regexp
+ "")
+   (string-trim)))
+
 (declare-function cider-inspect-last-result "cider-inspector")
 (defun cider-interactive-eval-handler (&optional buffer place)
   "Make an interactive eval handler for BUFFER.
@@ -856,12 +876,7 @@ when `cider-auto-inspect-after-eval' is non-nil."
  (member phase 
cider-clojure-compilation-error-phases)))
;; Display errors as temporary overlays
(let 
((cider-result-use-clojure-font-lock nil)
- (trimmed-err (thread-last err
-   
(replace-regexp-in-string cider-clojure-compilation-regexp
-   
  "")
-   
(replace-regexp-in-string cider-module-info-regexp
-   
  "")
-   
(string-trim
+ (trimmed-err (funcall 
cider-inline-error-message-function err)))
  
(cider--display-interactive-eval-result
   trimmed-err
   'error
diff --git a/doc/modules/ROOT/pages/usage/code_evaluation.adoc 
b/doc/modules/ROOT/pages/usage/code_evaluation.adoc
index 612530b1bd..ebc7cea0ca 100644
--- a/doc/modules/ROOT/pages/usage/code_evaluation.adoc
+++ b/doc/modules/ROOT/pages/usage/code_evaluation.adoc
@@ -207,6 +207,17 @@ bottom) with the `cider-use-overlays` variable:
 (setq cider-use-overlays nil)
 
 
+Overlays that indicate errors are by default trimmed of file/line/phase 
information.
+
+(Example: the entire `Syntax error compiling at (src/ns.clj:227:3).` preamble)
+
+You can prevent any trimming by customizing instead:
+
+[source,lisp]
+
+(setq cider-inline-error-message-function #'identity)
+
+
 By default, result overlays are displayed at the end of the line. You can set
 the variable `cider-result-overlay-position` to display results at the end of
 their respective forms instead.
@@ -217,7 +228,6 @@ Note that this also affects the position of debugger 
overlays.
 (setq cider-result-overlay-position 'at-point)
 
 
-
 You can also customize how overlays are persisted using the variable
 `cider-eval-result-duration`.
 
@@ -228,7 +238,6 @@ Setting the variable to a number represents 

[nongnu] elpa/cider updated (55e5d229dc -> 27ed547099)

2023-10-17 Thread ELPA Syncer
elpasync pushed a change to branch elpa/cider.

  from  55e5d229dc Fix `cider-expected-ns` and `cider-provide-file` issues 
on Windows tests (#3532)
   new  ac38d36da4 Preserve the font size as one navigates through the 
CIDER inspector (#3530)
   new  27ed547099 Introduce `cider-shorten-error-overlays` customization 
option (#3531)


Summary of changes:
 CHANGELOG.md  |  2 ++
 cider-eval.el | 27 ++-
 cider-inspector.el| 13 ---
 doc/modules/ROOT/pages/usage/code_evaluation.adoc | 13 +--
 4 files changed, 44 insertions(+), 11 deletions(-)



[nongnu] elpa/cider ac38d36da4 1/2: Preserve the font size as one navigates through the CIDER inspector (#3530)

2023-10-17 Thread ELPA Syncer
branch: elpa/cider
commit ac38d36da471136d0378c887150d48ea19de8cc0
Author: vemv 
Commit: GitHub 

Preserve the font size as one navigates through the CIDER inspector (#3530)

Fixes #3527
---
 CHANGELOG.md   |  1 +
 cider-inspector.el | 13 ++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80b0a37e8a..9d9692c9fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
   - Example string that is now trimmed away: `(java.lang.Long is in module 
java.base of loader 'bootstrap'; clojure.lang.IObj is in unnamed module of 
loader 'app')`
 - [#3522](https://github.com/clojure-emacs/cider/issues/3522): Introduce a new 
possible value for 
[`cider-use-overlays`](https://docs.cider.mx/cider/usage/code_evaluation.html#overlays):
 `errors-only`.
   - If specified, only errors will result in an overlay being shown.
+- [#3527](https://github.com/clojure-emacs/cider/issues/3527): Preserve the 
font size as one navigates through the CIDER inspector.
 
 ## 1.8.2 (2023-10-15)
 
diff --git a/cider-inspector.el b/cider-inspector.el
index 744e0d9547..c8cf1bdab8 100644
--- a/cider-inspector.el
+++ b/cider-inspector.el
@@ -388,8 +388,13 @@ MAX-COLL-SIZE if non nil."
 ;; Render Inspector from Structured Values
 (defun cider-inspector--render-value (value)
   "Render VALUE."
-  (cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode 
'ancillary)
-  (cider-inspector-render cider-inspector-buffer value)
+  (let ((font-size (when-let ((b (get-buffer cider-inspector-buffer)))
+ ;; The font size is lost between inspector 'screens',
+ ;; because on each re-rendering, we wipe everything, 
including the mode.
+ ;; Enabling cider-inspector-mode is the specific step 
that loses the font size.
+ (buffer-local-value 'text-scale-mode-amount b
+(cider-make-popup-buffer cider-inspector-buffer 'cider-inspector-mode 
'ancillary)
+(cider-inspector-render cider-inspector-buffer value font-size))
   (cider-popup-buffer-display cider-inspector-buffer 
cider-inspector-auto-select-buffer)
   (when cider-inspector-fill-frame (delete-other-windows))
   (ignore-errors (cider-inspector-next-inspectable-object 1))
@@ -408,10 +413,12 @@ MAX-COLL-SIZE if non nil."
   (when cider-inspector-page-location-stack
 (goto-char (pop cider-inspector-page-location-stack))
 
-(defun cider-inspector-render (buffer str)
+(defun cider-inspector-render (buffer str &optional font-size)
   "Render STR in BUFFER."
   (with-current-buffer buffer
 (cider-inspector-mode)
+(when font-size
+  (text-scale-set font-size))
 (let ((inhibit-read-only t))
   (condition-case nil
   (cider-inspector-render* (car (read-from-string str)))



[nongnu] elpa/org-contrib 85dac62517: * lisp/org-panel.el: Rearrange definitions to be before they are used

2023-10-17 Thread ELPA Syncer
branch: elpa/org-contrib
commit 85dac62517ca022d87468bceb1907a12b29239e6
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

* lisp/org-panel.el: Rearrange definitions to be before they are used

This fixes compiler warnings.
---
 lisp/org-panel.el | 322 +++---
 1 file changed, 160 insertions(+), 162 deletions(-)

diff --git a/lisp/org-panel.el b/lisp/org-panel.el
index ec3c57217b..d7575d65fb 100644
--- a/lisp/org-panel.el
+++ b/lisp/org-panel.el
@@ -89,106 +89,125 @@ active.)"
 ;; Fix-me: add org-mode-map
 (defconst orgpan-org-mode-commands nil)
 (defconst orgpan-org-commands
- '(
-   orgpan-copy-subtree
-   orgpan-cut-subtree
-   orgpan-paste-subtree
-   undo
-   ;;
-   ;orgpan-occur
-   ;;
-   org-cycle
-   org-global-cycle
-   outline-up-heading
-   outline-next-visible-heading
-   outline-previous-visible-heading
-   outline-forward-same-level
-   outline-backward-same-level
-   org-todo
-   org-show-todo-tree
-   org-priority-up
-   org-priority-down
-   org-move-subtree-up
-   org-move-subtree-down
-   org-do-promote
-   org-do-demote
-   org-promote-subtree
-   org-demote-subtree))
+  '(
+orgpan-copy-subtree
+orgpan-cut-subtree
+orgpan-paste-subtree
+undo
+;;
+   ;orgpan-occur
+;;
+org-cycle
+org-global-cycle
+outline-up-heading
+outline-next-visible-heading
+outline-previous-visible-heading
+outline-forward-same-level
+outline-backward-same-level
+org-todo
+org-show-todo-tree
+org-priority-up
+org-priority-down
+org-move-subtree-up
+org-move-subtree-down
+org-do-promote
+org-do-demote
+org-promote-subtree
+org-demote-subtree))
 
 
 ;;;
 ;;; Hook functions etc
 
+(defvar orgpan-panel-buffer nil
+  "The panel buffer.
+There can be only one such buffer at any time.")
+
+(defvar orgpan-panel-window nil
+  "The window showing `orgpan-panel-buffer'.")
+
 (defun orgpan-delete-panel ()
- "Remove the panel."
- (interactive)
- (when (buffer-live-p orgpan-panel-buffer)
-   (delete-windows-on orgpan-panel-buffer)
-   (kill-buffer orgpan-panel-buffer))
- (setq orgpan-panel-buffer nil)
- (setq orgpan-panel-window nil)
- (orgpan-panel-minor-mode 0)
- (remove-hook 'post-command-hook 'orgpan-minor-post-command)
- (remove-hook 'post-command-hook 'orgpan-mode-post-command)
- ;;(remove-hook 'window-configuration-change-hook 'orgpan-window-config-change)
- )
+  "Remove the panel."
+  (interactive)
+  (when (buffer-live-p orgpan-panel-buffer)
+(delete-windows-on orgpan-panel-buffer)
+(kill-buffer orgpan-panel-buffer))
+  (setq orgpan-panel-buffer nil)
+  (setq orgpan-panel-window nil)
+  (orgpan-panel-minor-mode 0)
+  (remove-hook 'post-command-hook 'orgpan-minor-post-command)
+  (remove-hook 'post-command-hook 'orgpan-mode-post-command)
+  ;;(remove-hook 'window-configuration-change-hook 
'orgpan-window-config-change)
+  )
+
+(defvar orgpan-org-window nil)
+;;(make-variable-buffer-local 'orgpan-org-window)
+
+(defvar orgpan-last-org-buffer nil)
+;;(make-variable-buffer-local 'orgpan-last-org-buffer)
+
+(defvar orgpan-org-buffer nil)
+;;(make-variable-buffer-local 'orgpan-org-buffer)
 
 (defvar orgpan-last-command-was-from-panel nil)
 (defun orgpan-mode-pre-command ()
- (setq orgpan-last-command-was-from-panel nil)
- (condition-case err
- (if (not (and (windowp orgpan-org-window)
-   (window-live-p orgpan-org-window)))
- (progn
-   (setq this-command 'ignore)
-   (orgpan-delete-panel)
-   (message "The window belonging to the panel had disappeared, 
removed panel."))
-   (let ((buf (window-buffer orgpan-org-window)))
- (when (with-current-buffer buf
- (derived-mode-p 'org-mode))
-   (setq orgpan-last-org-buffer buf))
- ;; Fix me: add a list of those commands that are not
- ;; meaningful from the panel (for example org-time-stamp)
- (when (or (memq this-command orgpan-org-commands)
-   (memq this-command orgpan-org-mode-commands)
-   ;; For some reason not all org commands are found above:
-   (string= "org-" (substring (format "%s" this-command) 0 4)))
-   (if (not (with-current-buffer buf
-  (derived-mode-p 'org-mode)))
-   (progn
- (if (buffer-live-p orgpan-org-buffer)
- (set-window-buffer orgpan-org-window orgpan-org-buffer)
-   (message "Please use `l' or `b' to choose an org-mode 
buffer"))
- (setq this-command 'ignore))
- (setq orgpan-org-buffer (window-buffer orgpan-org-window))
- (setq orgpan-last-command-was-from-panel t)
- (select-window orgpan-org-window)
- ;;(when (active-minibuffer-window
- ;;(set-buffer orgpan-org-buffer)
- 
-   (e

[elpa] externals/denote 382cce8b9f 3/3: Write ERT test for denote-journal-extras-daily--title-format

2023-10-17 Thread ELPA Syncer
branch: externals/denote
commit 382cce8b9fae5dd3ffb4a482e3177736b1fdaec5
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Write ERT test for denote-journal-extras-daily--title-format
---
 tests/denote-test.el | 46 ++
 1 file changed, 46 insertions(+)

diff --git a/tests/denote-test.el b/tests/denote-test.el
index c73f4c55ed..f99a7ece03 100644
--- a/tests/denote-test.el
+++ b/tests/denote-test.el
@@ -265,5 +265,51 @@ identifier: 20230605T102234
(eq (denote-filetype-heuristics 
"20231010T105034--some-test-file__denote_testing.md.gpg") 'markdown-yaml)
(eq (denote-filetype-heuristics 
"20231010T105034--some-test-file__denote_testing.md.age") 'markdown-yaml
 
+ denote-journal-extras.el
+
+(require 'denote-journal-extras)
+
+(ert-deftest denote-test--denote-journal-extras-daily--title-format ()
+  "Make sure that `denote-journal-extras-daily--title-format' yields the 
desired format."
+  (should (and
+   ;; These three should prompt, but I am here treating the
+   ;; prompt as if already returned a string.  The test for
+   ;; the `denote-title-prompt' can be separate.
+   (stringp
+(cl-letf (((symbol-function 'denote-title-prompt) #'identity)
+  (denote-journal-extras-title-format nil))
+  (denote-journal-extras-daily--title-format)))
+
+   (stringp
+(cl-letf (((symbol-function 'denote-title-prompt) #'identity)
+  (denote-journal-extras-title-format t))
+  (denote-journal-extras-daily--title-format)))
+
+   (stringp
+(cl-letf (((symbol-function 'denote-title-prompt) #'identity)
+  (denote-journal-extras-title-format 
:some-arbitrary-keyword))
+  (denote-journal-extras-daily--title-format)))
+
+   ;; And these return the following values
+   (string-match-p
+"\\<.*?\\>"
+(let ((denote-journal-extras-title-format 'day))
+  (denote-journal-extras-daily--title-format)))
+
+   (string-match-p
+"\\<.*?\\> [0-9]\\{,2\\} \\<.*?\\> [0-9]\\{,4\\}"
+(let ((denote-journal-extras-title-format 'day-date-month-year))
+  (denote-journal-extras-daily--title-format)))
+
+   (string-match-p
+"\\<.*?\\> [0-9]\\{,2\\} \\<.*?\\> [0-9]\\{,4\\} 
[0-9]\\{,2\\}:[0-9]\\{,2\\} \\<.*?\\>"
+(let ((denote-journal-extras-title-format 
'day-date-month-year-12h))
+  (denote-journal-extras-daily--title-format)))
+
+   (string-match-p
+"\\<.*?\\> [0-9]\\{,2\\} \\<.*?\\> [0-9]\\{,4\\} 
[0-9]\\{,2\\}:[0-9]\\{,2\\}"
+(let ((denote-journal-extras-title-format 
'day-date-month-year-24h))
+  (denote-journal-extras-daily--title-format))
+
 (provide 'denote-test)
 ;;; denote-test.el ends here



[elpa] externals/denote 4d75e1e37a 1/3: Make sure some tests are done with 'ert-deftest'

2023-10-17 Thread ELPA Syncer
branch: externals/denote
commit 4d75e1e37a2508ce8ab539098edcce802cabb88e
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make sure some tests are done with 'ert-deftest'
---
 tests/denote-test.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/denote-test.el b/tests/denote-test.el
index 0d518cbb79..c73f4c55ed 100644
--- a/tests/denote-test.el
+++ b/tests/denote-test.el
@@ -233,21 +233,21 @@ identifier: 20230605T102234
 ;;  (denote-sluggify title)
 ;;  (denote--file-extension type
 
-(defun denote-test--denote-get-file-extension ()
+(ert-deftest denote-test--denote-get-file-extension ()
   "Test that `denote-get-file-extension' gets the correct file extension."
   (should (and (equal (denote-get-file-extension 
"20231010T105034--some-test-file__denote_testing") "")
(equal (denote-get-file-extension 
"20231010T105034--some-test-file__denote_testing.org") ".org")
(equal (denote-get-file-extension 
"20231010T105034--some-test-file__denote_testing.org.gpg") ".org.gpg")
(equal (denote-get-file-extension 
"20231010T105034--some-test-file__denote_testing.org.age") ".org.age"
 
-(defun denote-test--denote-get-file-extension-sans-encryption ()
+(ert-deftest denote-test--denote-get-file-extension-sans-encryption ()
   "Test that `denote-get-file-extension-sans-encryption' gets the file 
extension without encryption."
   (should (and (equal (denote-get-file-extension-sans-encryption 
"20231010T105034--some-test-file__denote_testing") "")
(equal (denote-get-file-extension-sans-encryption 
"20231010T105034--some-test-file__denote_testing.org") ".org")
(equal (denote-get-file-extension-sans-encryption 
"20231010T105034--some-test-file__denote_testing.org.gpg") ".org")
(equal (denote-get-file-extension-sans-encryption 
"20231010T105034--some-test-file__denote_testing.org.age") ".org"
 
-(defun denote-test--denote-filetype-heuristics ()
+(ert-deftest denote-test--denote-filetype-heuristics ()
   "Test that `denote-filetype-heuristics' gets the correct file type."
   (should (and (eq (denote-filetype-heuristics 
"20231010T105034--some-test-file__denote_testing") (caar denote-file-types))
(eq (denote-filetype-heuristics 
"20231010T105034--some-test-file__denote_testing.org") 'org)



[elpa] externals/denote 194e43c89e 2/3: Simplify denote-journal-extras-daily--title-format

2023-10-17 Thread ELPA Syncer
branch: externals/denote
commit 194e43c89e9879c1c237f3a0ff79bb27ba38d8a7
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Simplify denote-journal-extras-daily--title-format
---
 denote-journal-extras.el | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/denote-journal-extras.el b/denote-journal-extras.el
index c9c26edc74..a2c537b985 100644
--- a/denote-journal-extras.el
+++ b/denote-journal-extras.el
@@ -110,19 +110,16 @@ journal entry (refer to the `tmr' package on GNU ELPA)."
 
 (defun denote-journal-extras-daily--title-format ()
   "Return `denote-journal-extras-title-format' or prompt for title."
-  (cond
-   ((and denote-journal-extras-title-format
- (stringp denote-journal-extras-title-format))
-(format-time-string denote-journal-extras-title-format))
-   ((and (symbolp denote-journal-extras-title-format)
- (not (null  denote-journal-extras-title-format)))
-(format-time-string
+  (format-time-string
+   (if (and denote-journal-extras-title-format
+(stringp denote-journal-extras-title-format))
+   denote-journal-extras-title-format
  (pcase denote-journal-extras-title-format
('day "%A")
('day-date-month-year "%A %e %B %Y")
('day-date-month-year-24h "%A %e %B %Y %H:%M")
-   ('day-date-month-year-12h "%A %e %B %Y %I:%M %^p"
-   (t (denote-title-prompt (format-time-string "%F")
+   ('day-date-month-year-12h "%A %e %B %Y %I:%M %^p")
+   (_ (denote-title-prompt (format-time-string "%F")))
 
 (defun denote-journal-extras--get-template ()
   "Return template that has `journal' key in `denote-templates'.



[elpa] externals/denote updated (ffad320332 -> 382cce8b9f)

2023-10-17 Thread ELPA Syncer
elpasync pushed a change to branch externals/denote.

  from  ffad320332 Make 'denote-all-files' accept optional OMIT-CURRENT
   new  4d75e1e37a Make sure some tests are done with 'ert-deftest'
   new  194e43c89e Simplify denote-journal-extras-daily--title-format
   new  382cce8b9f Write ERT test for 
denote-journal-extras-daily--title-format


Summary of changes:
 denote-journal-extras.el | 15 ++
 tests/denote-test.el | 52 +---
 2 files changed, 55 insertions(+), 12 deletions(-)



[nongnu] elpa/eat ab479f9c27: Fix input processing & auto line mode

2023-10-17 Thread ELPA Syncer
branch: elpa/eat
commit ab479f9c2722dbe3f9639b6b4f3a99e1f5bb6092
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Fix input processing & auto line mode

* eat.el (eat--process-input-queue): Set
'eat--process-input-queue-timer' to 'nil'.
* eat.el (eat--auto-line-mode-pending-toggles): New variable.
* eat.el (eat--line-mode-enter-auto-1): Don't take any
argument.
* eat.el (eat--line-mode-exit-auto-1): Don't take any argument.
Don't call 'eat-line-mode'.
* eat.el (eat--line-mode-enter-auto, eat--line-mode-exit-auto):
Queue the toggle in 'eat--auto-line-mode-pending-toggles'
instead of starting a timer.
* eat.el (eat--line-mode-do-toggles): New function.
* eat.el (eat--process-output-queue): Let-bind
'eat--auto-line-mode-pending-toggles' to nil.  Call
'eat--line-mode-do-toggles'.
---
 eat.el | 101 -
 1 file changed, 63 insertions(+), 38 deletions(-)

diff --git a/eat.el b/eat.el
index 660b377302..bd0ac27718 100644
--- a/eat.el
+++ b/eat.el
@@ -5002,6 +5002,11 @@ return \"eat-color\", otherwise return \"eat-mono\"."
 (defvar eat--auto-line-mode-prev-mode nil
   "The input mode active before line mode.")
 
+(defvar eat--auto-line-mode-pending-toggles nil
+  "Automatic line mode toggles left to do.
+
+Don't change the toplevel value of this, let-bind instead.")
+
 (defun eat-reset ()
   "Perform a terminal reset."
   (interactive)
@@ -5147,47 +5152,64 @@ If HOST isn't the host Emacs is running on, don't do 
anything."
 (defvar eat--semi-char-mode)
 (defvar eat--char-mode)
 
-(defun eat--line-mode-enter-auto-1 (buffer)
-  "Enter line mode in BUFFER."
-  (with-current-buffer buffer
-(unless (or eat--inhibit-auto-line-mode eat--line-mode)
-  (unless eat--line-mode
-(setq eat--auto-line-mode-prev-mode
-  (cond (eat--semi-char-mode 'semi-char)
-(eat--char-mode 'char)
-(t 'emacs)))
-(eat-line-mode)
-;; We're entering automatically, so we should be able to exit it
-;; automatically.
-(setq eat--inhibit-auto-line-mode nil)
+(defun eat--line-mode-enter-auto-1 ()
+  "Enter line mode."
+  (unless (or eat--inhibit-auto-line-mode eat--line-mode)
+(unless eat--line-mode
+  (setq eat--auto-line-mode-prev-mode
+(cond (eat--semi-char-mode 'semi-char)
+  (eat--char-mode 'char)
+  (t 'emacs)))
+  (eat-line-mode)
+  ;; We're entering automatically, so we should be able to exit it
+  ;; automatically.
+  (setq eat--inhibit-auto-line-mode nil
 
 (defun eat--line-mode-enter-auto ()
-  "Enter line mode."
-  (run-with-idle-timer 0 nil #'eat--line-mode-enter-auto-1
-   (current-buffer)))
+  "Arrange that line mode will be enabled eventually."
+  (push 'enter eat--auto-line-mode-pending-toggles))
 
-(defun eat--line-mode-exit-auto-1 (buffer)
-  "Exit line mode in BUFFER."
-  (with-current-buffer buffer
-(when (and (not eat--inhibit-auto-line-mode)
-   eat--auto-line-mode-prev-mode)
-  (pcase eat--auto-line-mode-prev-mode
-('emacs (eat-emacs-mode))
-('semi-char (eat-semi-char-mode))
-('char (eat-char-mode)))
-  (setq eat--auto-line-mode-prev-mode nil)
-  (when (/= (eat-term-end eat-terminal) (point-max))
-(eat-line-send))
-  ;; Toggle line mode _after_ we exit from
-  ;; `eat-term-process-output'.
-  (run-with-idle-timer 0 nil #'eat-line-mode)
-  (eat--line-mode -1)
-  (setq buffer-undo-list nil
+(defun eat--line-mode-exit-auto-1 ()
+  "Exit line mode."
+  (when (and (not eat--inhibit-auto-line-mode)
+ eat--auto-line-mode-prev-mode)
+(pcase eat--auto-line-mode-prev-mode
+  ('emacs (eat-emacs-mode))
+  ('semi-char (eat-semi-char-mode))
+  ('char (eat-char-mode)))
+(setq eat--auto-line-mode-prev-mode nil)
+(when (/= (eat-term-end eat-terminal) (point-max))
+  (eat-line-send))
+;; Toggle line mode _after_ we exit from
+;; `eat-term-process-output'.
+(eat--line-mode -1)
+(setq buffer-undo-list nil)))
 
 (defun eat--line-mode-exit-auto ()
-  "Exit line mode."
-  (run-with-idle-timer 0 nil #'eat--line-mode-exit-auto-1
-   (current-buffer)))
+  "Arrange that line mode will be disabled eventually."
+  (push 'exit eat--auto-line-mode-pending-toggles))
+
+(defun eat--line-mode-do-toggles ()
+  "Do the pending line mode toggle."
+  (let* ((inhibit-quit t)
+ (actions (nreverse eat--auto-line-mode-pending-toggles))
+ (toggle nil))
+(while (setq toggle (pop actions))
+  (pcase-exhaustive toggle
+('enter (eat--line-mode-enter-auto-1))
+('exit (eat--line-mode-exit-auto-1)))
+  ;; Don't do extra unnecessary toggles.
+  (let ((loop t))
+(while loop
+  (setq loop nil)
+  (while (eq toggle (car actions))
+   

[elpa] main 1f7cf5ed71: elpa-packages: Update status of some packages

2023-10-17 Thread Stefan Monnier via
branch: main
commit 1f7cf5ed71a67be73c9ca9e672b35e897017ea73
Author: Stefan Monnier 
Commit: Stefan Monnier 

elpa-packages: Update status of some packages

(dict-tree, heap, queue, tNFA, trie): Remove long-dead upstream.
(eldoc-eval, package-fixes): Remove, obsolete.
---
 elpa-packages | 32 
 1 file changed, 12 insertions(+), 20 deletions(-)

diff --git a/elpa-packages b/elpa-packages
index 8120e90ba1..4689cad46d 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -205,9 +205,7 @@
   :news "CHANGELOG.org"
   :readme "README.md")
  (devdocs  :url "https://github.com/astoff/devdocs.el";)
- (dict-tree:url "http://www.dr-qubit.org/git/predictive.git";
-  :manual-sync t ;; The upstream doesn't exist any more!
-  )
+ (dict-tree:url nil) ;"http://www.dr-qubit.org/git/predictive.git";
  (diff-hl  :url "https://github.com/dgutov/diff-hl.git";)
  (diffview :url "https://github.com/mgalgs/diffview-mode.git";)
  (diminish :url "https://github.com/myrjola/diminish.el.git";
@@ -252,7 +250,8 @@
 :news "EGLOT-NEWS")
  (el-search:url nil)
  (eldoc:core "lisp/emacs-lisp/eldoc.el")
- (eldoc-eval   :url 
"https://github.com/thierryvolpiatto/eldoc-eval.git";)
+ ;; `eldoc-eval' is obsoleted by core support for eldoc in minibuffer (2013).
+ ;;(eldoc-eval :url 
"https://github.com/thierryvolpiatto/eldoc-eval.git";)
  (electric-spacing :url nil)
  (elisp-benchmarks :url nil)
  (emacs-gc-stats   :url "https://git.sr.ht/~yantar92/emacs-gc-stats";
@@ -338,9 +337,7 @@
  (gtags-mode   :url "https://github.com/Ergus/gtags-mode";)
  (guess-language   :url "https://github.com/tmalsburg/guess-language.el";)
  (hcel :url "https://g.ypei.me/hc.el.git";)
- (heap :url "http://www.dr-qubit.org/git/predictive.git";
-  :manual-sync t ;; The upstream doesn't exist any more!
-  )
+ (heap :url nil) ;"http://www.dr-qubit.org/git/predictive.git";
  (hiddenquote  :url 
"https://gitlab.com/mauroaranda/hiddenquote/hiddenquote";)
  (highlight-escape-sequences
:url 
"https://github.com/dgutov/highlight-escape-sequences/";)
@@ -530,7 +527,8 @@
  (paced:url 
"bzr::bzr://bzr.savannah.nongnu.org/paced-el/trunk"
   ;; The Bzr<->Git bridge wasn't working well enough last time I tried.
   :manual-sync t)
- (package-fixes:url nil)
+ ;; `package-fixes` is obsolete and was never released.
+ ;; (package-fixes :url nil)
  (parsec   :url "https://github.com/cute-jumper/parsec.el.git";)
  (parser-generator :url 
"https://github.com/cjohansson/emacs-parser-generator";)
  (path-iterator:url nil)
@@ -577,9 +575,7 @@
  (pyim-basedict:url 
"https://github.com/tumashu/pyim-basedict.git";)
  (python   :core "lisp/progmodes/python.el")
  (quarter-plane:url nil)
- (queue:url 
"http://www.dr-qubit.org/git/predictive.git";
-  :manual-sync t ;; The upstream doesn't exist any more!
-  )
+ (queue:url nil) 
;"http://www.dr-qubit.org/git/predictive.git";
  ;; (rails-routes  :url 
"https://github.com/otavioschwanck/emacs-rails-routes";)
  (rainbow-mode :url nil)
  (rbit :url nil)
@@ -666,9 +662,7 @@
   :ignored-files ("COPYING"))
  (system-packages  :url "https://gitlab.com/jabranham/system-packages";)
  (systemd  :url nil)
- (tNFA :url "http://www.dr-qubit.org/git/predictive.git";
-  :manual-sync t ;; The upstream doesn't exist any more!
-  )
+ (tNFA :url nil) ;"http://www.dr-qubit.org/git/predictive.git";
  (tam  :url 
"https://github.com/owinebar/emacs-table-allocation-manager";)
  (taxy :url "https://github.com/alphapapa/taxy.el.git";
   :doc "taxy.info"
@@ -711,17 +705,15 @@
   :doc "docs/transient.texi")
  (transient-cycles :url nil)
  (tree-inspector:url 
"https://github.com/mmontone/emacs-tree-inspector";)
- (trie :url "http://www.dr-qubit.org/git/predictive.git";
-  :manual-sync t ;; The upstream doesn't exist any more!
-  )
+ (trie :url nil) ;"http://www.dr-qubit.org/git/predictive.git";
  (trinary  :url "https://github.com/emacs-elsa/trinary-logic";)
  (triples  :url "https://github.com/ahyatt/triples";
   :readme "README.org")
+ (typo  :url "https://git.sr.ht/~pkal/typo";)
+ (ulisp-repl   :url "https://git.sr.ht/~fitzsim/ulisp-repl";)
  ;; FIXME: The upstream of `undo-tree' has diverged.  I tried to
  ;; contact Toby but he's quite busy.  He mentioned thinking of using the
  ;; `elpa.git` branch as the official upstream.
- (typo  :url "https://git.sr.ht/~pkal/typo";)
- (ulisp-repl   :url "

[elpa] scratch/yasnippet b09ab98419 3/9: * yasnippet-tests.el: Minor cosmetic changes

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit b09ab9841959abff8cccb5eddff4677b4dad9fa8
Author: Stefan Monnier 
Commit: Stefan Monnier 

* yasnippet-tests.el: Minor cosmetic changes

Use utf-8 rather than latin-1.
Prefer #' to quote function names.
(special-mode): Remove backward compatibility code which never worked
since it uses `fundamental` which doesn't exist).
---
 yasnippet-tests.el | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/yasnippet-tests.el b/yasnippet-tests.el
index 7fc54ee329..582619ed75 100644
--- a/yasnippet-tests.el
+++ b/yasnippet-tests.el
@@ -1,8 +1,8 @@
 ;;; yasnippet-tests.el --- some yasnippet tests  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2012-2015, 2017-2018, 2021  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2023  Free Software Foundation, Inc.
 
-;; Author: Jo�o T�vora 
+;; Author: João Távora 
 ;; Keywords: emulations, convenience
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -136,9 +136,6 @@ This lets `yas--maybe-expand-from-keymap-filter' work as 
expected."
 
 ;;; Older emacsen
 ;;;
-(unless (fboundp 'special-mode)
-  ;; FIXME: Why provide this default definition here?!?
-  (defalias 'special-mode 'fundamental))
 
 (unless (fboundp 'string-suffix-p)
   ;; introduced in Emacs 24.4
@@ -1440,7 +1437,7 @@ hello ${1:$(when (stringp yas-text) (funcall func 
yas-text))} foo${1:$$(concat \
  (should (equal (sort expected-rest #'string<)
 (sort (cl-subseq observed (length expected-first)) 
#'string<
 
-(defalias 'yas--phony-c-mode 'c-mode)
+(defalias 'yas--phony-c-mode #'c-mode)
 
 (ert-deftest issue-492-and-494 ()
   (define-derived-mode yas--test-mode yas--phony-c-mode "Just a test mode")
@@ -1679,14 +1676,14 @@ TODO: be meaner"
:test #'eq :key #'car
 (define-key yas-minor-mode-map [tab] nil)
 (define-key yas-minor-mode-map (kbd "TAB") nil)
-(define-key yas-minor-mode-map (kbd "SPC") 'yas-expand)
+(define-key yas-minor-mode-map (kbd "SPC") #'yas-expand)
 (with-temp-buffer
   (yas-minor-mode 1)
-  (should-not (eq (key-binding (kbd "TAB")) 'yas-expand))
+  (should-not (eq (key-binding (kbd "TAB")) #'yas-expand))
   (should (eq (key-binding (kbd "SPC")) 'yas-expand))
   (yas-reload-all)
-  (should-not (eq (key-binding (kbd "TAB")) 'yas-expand))
-  (should (eq (key-binding (kbd "SPC")) 'yas-expand)
+  (should-not (eq (key-binding (kbd "TAB")) #'yas-expand))
+  (should (eq (key-binding (kbd "SPC")) #'yas-expand)
 
 (ert-deftest test-yas-in-org ()
   (yas-saving-variables



[elpa] branch scratch/yasnippet deleted (was 2f751c3a0a)

2023-10-17 Thread Stefan Monnier via
monnier pushed a change to branch scratch/yasnippet.

   was  2f751c3a0a * yasnippet.el (debug-ignored-errors): Don't modify it

This change permanently discards the following revisions:

  discards  2f751c3a0a * yasnippet.el (debug-ignored-errors): Don't modify it
  discards  b1c2baf4f6 * yasnippet.el: Cosmetic changes
  discards  30a1c18826 * yasnippet.el (yas-minor-mode-map): Don't bind to `tab`
  discards  9c52efc14a * yasnippet-debug.el: Use `advice-add` i.s.o `defadvice`.
  discards  714a9dca04 * yasnippet.el: Use `add-function` and remove left-over 
debug code
  discards  a0bbbc6eb5 * yasnippet.el: Use `lexical-binding`
  discards  64bb554272 * yasnippet-tests.el: Minor cosmetic changes
  discards  50a54c0775 * doc/yas-doc-helper.el: Use `cl-lib` and 
`lexical-binding`
  discards  c0aec2e779 * .gitignore: Add patterns for ELPA-generated files



[elpa] scratch/yasnippet 946b27ddca 1/9: * .gitignore: Add patterns for ELPA-generated files

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit 946b27ddcae541aac1e1c0465fc4422e7e53f56c
Author: Stefan Monnier 
Commit: Stefan Monnier 

* .gitignore: Add patterns for ELPA-generated files
---
 .gitignore | 4 
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index 3ce1c40517..0f7733372a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,7 @@ extras/imported/**
 *.elc
 ert-x.*
 ert.*
+
+# ELPA-generated files
+/yasnippet-autoloads.el
+/yasnippet-pkg.el



[elpa] scratch/yasnippet 043c52a5a9 7/9: * yasnippet.el (yas-minor-mode-map): Don't bind to `tab`

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit 043c52a5a91815703d40f5d5ec2766bfc304aeb4
Author: Stefan Monnier 
Commit: Stefan Monnier 

* yasnippet.el (yas-minor-mode-map): Don't bind to `tab`
---
 yasnippet.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/yasnippet.el b/yasnippet.el
index 4a6e716c49..a31be6f9b1 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -644,7 +644,12 @@ expanded.")
 
 (defvar yas-minor-mode-map
   (let ((map (make-sparse-keymap)))
-(define-key map [(tab)] yas-maybe-expand)
+;; Modes should always bind to TAB instead of `tab', so as not to override
+;; bindings that should take higher precedence but which bind to `TAB`
+;; instead (relying on `function-key-map` to remap `tab` to TAB).
+;; If this causes problem because of another package that binds to `tab`,
+;; complain to that other package!
+;;(define-key map [(tab)] yas-maybe-expand)
 (define-key map (kbd "TAB") yas-maybe-expand)
 (define-key map "\C-c&\C-s" 'yas-insert-snippet)
 (define-key map "\C-c&\C-n" 'yas-new-snippet)



[elpa] scratch/yasnippet 52a1c50319 9/9: * yasnippet.el (debug-ignored-errors): Don't modify it

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit 52a1c5031912243c791c55e0fe345d04f219b507
Author: Stefan Monnier 
Commit: Stefan Monnier 

* yasnippet.el (debug-ignored-errors): Don't modify it

(debug-ignored-errors): Remove left over code that became obsolete with
commit 175e0a3a102c22.
(yas--read-lisp): Fix code generation.
(yas-exception): Use `define-error`.
---
 yasnippet.el | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/yasnippet.el b/yasnippet.el
index ce59d25a9a..c4f8ae48fa 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -1490,7 +1490,7 @@ return an expression that when evaluated will issue an 
error."
   (condition-case err
   (read string)
 (error (and (not nil-on-error)
-`(error (error-message-string ,err))
+`(error (error-message-string ',err))
 
 (defun yas--read-keybinding (keybinding)
   "Read KEYBINDING as a snippet keybinding, return a vector."
@@ -3041,8 +3041,7 @@ snippet field.  The arguments are the same as 
`completing-read'.
 (defun yas-throw (text)
   "Signal `yas-exception' with TEXT as the reason."
   (signal 'yas-exception (list text)))
-(put 'yas-exception 'error-conditions '(error yas-exception))
-(put 'yas-exception 'error-message "[yas] Exception")
+(define-error 'yas-exception "[yas] Exception")
 
 (defun yas-verify-value (possibilities)
   "Verify that the current field value is in POSSIBILITIES.
@@ -3943,8 +3942,6 @@ Move the overlays, or create them if they do not exit."
   (cl-loop for snippet in snippets
do (yas--commit-snippet snippet)
 
-(add-to-list 'debug-ignored-errors "^Exit the snippet first!$")
-
 
 ;;; Snippet expansion and "stacked" expansion:
 ;;



[elpa] scratch/yasnippet e991530108 5/9: * yasnippet.el: Use `add-function` and remove left-over debug code

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit e9915301086b8ec868c14a0c32412ce75c81d15e
Author: Stefan Monnier 
Commit: Stefan Monnier 

* yasnippet.el: Use `add-function` and remove left-over debug code

Instead of using `setq` and storing the old value in
`yas--original-auto-fill-function`, use `add-function`.
This makes it virtually impossible for a bug like #873/#919 to appear.
Remove the left-over debug code we had added to try and track down
#873/#919.

This requires bumping the dependency on Emacs≥24.4.

(yas--original-auto-fill-function, yas--watch-auto-fill-backtrace):
Delete variables.
(yas--watch-auto-fill): Delete function.  Don't add it to variable watchers.
(yas--auto-fill-wrapper): Use `add-function`.
(yas-minor-mode): Use `remove-function`.
(yas--auto-fill): Adjust its calling convention for use with `:around`
in `add-function`.  Remove left-over debug code.
(yas--post-command-handler): Remove left-over debug code.
---
 yasnippet.el | 98 +---
 1 file changed, 8 insertions(+), 90 deletions(-)

diff --git a/yasnippet.el b/yasnippet.el
index f49563aaca..4a6e716c49 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -9,7 +9,7 @@
 ;; X-URL: http://github.com/joaotavora/yasnippet
 ;; Keywords: convenience, emulation
 ;; URL: http://github.com/joaotavora/yasnippet
-;; Package-Requires: ((cl-lib "0.5"))
+;; Package-Requires: ((cl-lib "0.5") (emacs "24.4"))
 ;; EmacsWiki: YaSnippetMode
 
 ;; This program is free software: you can redistribute it and/or modify
@@ -611,38 +611,6 @@ can be useful."
 (defvar yas--snippet-id-seed 0
   "Contains the next id for a snippet.")
 
-(defvar yas--original-auto-fill-function nil
-  "The original value of `auto-fill-function'.")
-(make-variable-buffer-local 'yas--original-auto-fill-function)
-
-(defvar yas--watch-auto-fill-backtrace nil)
-
-(defun yas--watch-auto-fill (sym newval op _where)
-  (when (and (or (and (eq sym 'yas--original-auto-fill-function)
-  (null newval)
-  (eq auto-fill-function 'yas--auto-fill))
- (and (eq sym 'auto-fill-function)
-  (eq newval 'yas--auto-fill)
-  (null yas--original-auto-fill-function)))
- (null yas--watch-auto-fill-backtrace)
- (fboundp 'backtrace-frames) ; Suppress compiler warning.
- ;; If we're about to change `auto-fill-function' too,
- ;; it's okay (probably).
- (not (and (eq op 'makunbound)
-   (not (eq (default-value 'auto-fill-function) 
'yas--auto-fill))
-   (cl-member 'kill-all-local-variables
-  (backtrace-frames 'yas--watch-auto-fill)
-  :key (lambda (frame) (nth 1 frame))
-(setq yas--watch-auto-fill-backtrace
-  (backtrace-frames 'yas--watch-auto-fill
-
-;; Try to get more info on #873/919 (this only works for Emacs 26+).
-(when (fboundp 'add-variable-watcher)
-  (add-variable-watcher 'yas--original-auto-fill-function
-#'yas--watch-auto-fill)
-  (add-variable-watcher 'auto-fill-function
-#'yas--watch-auto-fill))
-
 (defun yas--snippet-next-id ()
   (let ((id yas--snippet-id-seed))
 (cl-incf yas--snippet-id-seed)
@@ -860,10 +828,9 @@ which decides on the snippet to expand.")
   "Hook run when `yas-minor-mode' is turned on.")
 
 (defun yas--auto-fill-wrapper ()
-  (when (and auto-fill-function
- (not (eq auto-fill-function #'yas--auto-fill)))
-(setq yas--original-auto-fill-function auto-fill-function)
-(setq auto-fill-function #'yas--auto-fill)))
+  (when auto-fill-function ;Turning the mode ON.
+;; (cl-assert (local-variable-p 'auto-fill-function))
+(add-function :around (local 'auto-fill-function) #'yas--auto-fill)))
 
 ;;;###autoload
 (define-minor-mode yas-minor-mode
@@ -906,8 +873,8 @@ Key bindings:
  ;; auto-fill handler.
  (remove-hook 'post-command-hook #'yas--post-command-handler t)
  (remove-hook 'auto-fill-mode-hook #'yas--auto-fill-wrapper)
- (when (local-variable-p 'yas--original-auto-fill-function)
-   (setq auto-fill-function yas--original-auto-fill-function))
+ (when (local-variable-p 'auto-fill-function)
+   (remove-function (local 'auto-fill-function) #'yas--auto-fill))
  (setq emulation-mode-map-alists
(remove 'yas--direct-keymaps emulation-mode-map-alists)
 
@@ -3880,7 +3847,7 @@ field start.  This hook does nothing if an undo is in 
progress."
snippet (yas--snippet-field-mirrors snippet)))
   (setq yas--todo-snippet-indent nil
 
-(defun yas--auto-fill ()
+(defun yas--auto-fill (orig-fun &rest args)
   ;; Preserve snippet markers during auto-fill.
   (let* ((orig-point (point))
  (end (progn (forward-paragraph) (poin

[elpa] scratch/yasnippet 58c92ba393 8/9: * yasnippet.el: Cosmetic changes

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit 58c92ba3933e9ef4d3c686894ca813d7506a03c8
Author: Stefan Monnier 
Commit: Stefan Monnier 

* yasnippet.el: Cosmetic changes

Prefer #' to quote function names.
(yas-after-exit-snippet-hook, yas-before-expand-snippet-hook)
(yas-after-reload-hook): A hook is not a function, but a symbol
containing functions.  Fix doc accordingly.
(yas-define-snippets, yas-longest-key-from-whitespace)
(yas--field-parse-create): Make the doc fit within 80 columns.
(yas-skip-and-clear-or-delete-char): Fix ordering between `declare` and
`interactive`.
---
 yasnippet.el | 35 +++
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/yasnippet.el b/yasnippet.el
index a31be6f9b1..ce59d25a9a 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -474,20 +474,20 @@ See also Info node `(elisp) Syntax Descriptors'.")
 
 (defvar yas-after-exit-snippet-hook
   '()
-  "Hooks to run after a snippet exited.
+  "Hook run after a snippet exited.
 
-The hooks will be run in an environment where some variables bound to
+The functions will be run in an environment where some variables bound to
 proper values:
 
 `yas-snippet-beg' : The beginning of the region of the snippet.
 
 `yas-snippet-end' : Similar to beg.
 
-Attention: These hooks are not run when exiting nested/stacked snippet 
expansion!")
+Attention: This hook is not run when exiting nested/stacked snippet 
expansion!")
 
 (defvar yas-before-expand-snippet-hook
   '()
-  "Hooks to run just before expanding a snippet.")
+  "Hook run just before expanding a snippet.")
 
 (defconst yas-not-string-or-comment-condition
   '(if (let ((ppss (syntax-ppss)))
@@ -651,9 +651,9 @@ expanded.")
 ;; complain to that other package!
 ;;(define-key map [(tab)] yas-maybe-expand)
 (define-key map (kbd "TAB") yas-maybe-expand)
-(define-key map "\C-c&\C-s" 'yas-insert-snippet)
-(define-key map "\C-c&\C-n" 'yas-new-snippet)
-(define-key map "\C-c&\C-v" 'yas-visit-snippet-file)
+(define-key map "\C-c&\C-s" #'yas-insert-snippet)
+(define-key map "\C-c&\C-n" #'yas-new-snippet)
+(define-key map "\C-c&\C-v" #'yas-visit-snippet-file)
 map)
   "The keymap used when `yas-minor-mode' is active.")
 
@@ -1785,7 +1785,8 @@ Optional PROMPT sets the prompt to use."
 SNIPPETS is a list of snippet definitions, each taking the
 following form
 
- (KEY TEMPLATE NAME CONDITION GROUP EXPAND-ENV LOAD-FILE KEYBINDING UUID 
SAVE-FILE)
+ (KEY TEMPLATE
+  NAME CONDITION GROUP EXPAND-ENV LOAD-FILE KEYBINDING UUID SAVE-FILE)
 
 Within these, only KEY and TEMPLATE are actually mandatory.
 
@@ -2046,7 +2047,7 @@ prefix argument."
  "successfully")))
 
 (defvar yas-after-reload-hook nil
-  "Hooks run after `yas-reload-all'.")
+  "Hook run after `yas-reload-all'.")
 
 (defun yas--load-pending-jits ()
   (dolist (mode (yas--modes-to-activate))
@@ -2313,7 +2314,7 @@ value for the first time then always returns a cached 
value.")
(put ',func 'yas--condition-cache (cons 
yas--condition-cache-timestamp new-value))
new-value)
 
-(defalias 'yas-expand 'yas-expand-from-trigger-key)
+(defalias 'yas-expand #'yas-expand-from-trigger-key)
 (defun yas-expand-from-trigger-key (&optional field)
   "Expand a snippet before point.
 
@@ -2952,7 +2953,8 @@ marks it as something else (typically comment ender)."
 'again))
 
 (defun yas-longest-key-from-whitespace (start-point)
-  "As `yas-key-syntaxes' element, look for longest key between point and 
whitespace.
+  "Look for longest key between point and whitespace.
+For use as `yas-key-syntaxes' element.
 
 A newline will be considered whitespace even if the mode syntax
 marks it as something else (typically comment ender)."
@@ -3321,7 +3323,7 @@ equivalent to a range covering the whole buffer."
   (cl-sort snippets #'>= :key #'yas--snippet-id
 
 (define-obsolete-function-alias 'yas--snippets-at-point
-  'yas-active-snippets "0.12")
+  #'yas-active-snippets "0.12")
 
 (defun yas-next-field-or-maybe-expand ()
   "Try to expand a snippet at a key before point.
@@ -3700,8 +3702,8 @@ Use as a `:filter' argument for a conditional keybinding."
   "Clears unmodified field if at field start, skips to next tab.
 
 Otherwise deletes a character normally by calling `delete-char'."
-  (interactive)
   (declare (obsolete "Bind to `yas-maybe-skip-and-clear-field' instead." 
"0.13"))
+  (interactive)
   (cond ((yas--maybe-clear-field-filter t)
  (yas--skip-and-clear (or field (yas-current-field)))
  (yas-next-field 1))
@@ -4674,10 +4676,11 @@ The following count as a field:
 
 * \"${n: text}\", for a numbered field with default text, as long as N is not 
0;
 
-* \"${n: text$(expression)}, the same with a Lisp expression;
-  this is caught with the curiously named 
`yas--multi-dollar-lisp-expression-regexp'
+* \"${n: text$(expression)}, the same with a Lisp expression; this is caught
+  w

[elpa] scratch/yasnippet 97002af846 4/9: * yasnippet.el: Use `lexical-binding`

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit 97002af846e1d3751b75da2e4a7bf931b540e18e
Author: Stefan Monnier 
Commit: Stefan Monnier 

* yasnippet.el: Use `lexical-binding`
---
 yasnippet.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/yasnippet.el b/yasnippet.el
index 78ef38ac39..f49563aaca 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -1,6 +1,6 @@
-;;; yasnippet.el --- Yet another snippet extension for Emacs
+;;; yasnippet.el --- Yet another snippet extension for Emacs  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2023 Free Software Foundation, Inc.
 ;; Authors: pluskid ,
 ;;  João Távora ,
 ;;  Noam Postavsky 
@@ -1344,7 +1344,7 @@ string and TEMPLATE is a `yas--template' structure."
   (save-excursion
 (save-restriction
   (save-match-data
-(eval condition
+(eval condition t
 (error (progn
  (yas--message 1 "Error in condition evaluation: %s" 
(error-message-string err))
  nil
@@ -1502,7 +1502,7 @@ Also tries to work around Emacs Bug#30931."
 (save-excursion
   (yas--save-restriction-and-widen
 (save-match-data
-  (let ((result (eval form)))
+  (let ((result (eval form t)))
 (when result
   (format "%s" result))
   ((debug error) (error-message-string oops)
@@ -3208,7 +3208,7 @@ expression that evaluates to its value."
 `(let ((,envvar ,env))
(cl-progv
(mapcar #'car ,envvar)
-   (mapcar (lambda (v-f) (eval (cadr v-f))) ,envvar)
+   (mapcar (lambda (v-f) (eval (cadr v-f) t)) ,envvar)
  ,@body
 
 (defun yas--snippet-map-markers (fun snippet)



[elpa] scratch/yasnippet 6e4de312cf 2/9: * doc/yas-doc-helper.el: Use `cl-lib` and `lexical-binding`

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit 6e4de312cf7c2339df47e7af7a156d1480316df4
Author: Stefan Monnier 
Commit: Stefan Monnier 

* doc/yas-doc-helper.el: Use `cl-lib` and `lexical-binding`

Also silence compiler warnings.
---
 doc/yas-doc-helper.el | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/yas-doc-helper.el b/doc/yas-doc-helper.el
index 1a07728912..442bf8a0ee 100644
--- a/doc/yas-doc-helper.el
+++ b/doc/yas-doc-helper.el
@@ -1,6 +1,6 @@
-;;; yas-doc-helper.el --- Help generate documentation for YASnippet
+;;; yas-doc-helper.el --- Help generate documentation for YASnippet  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2023  Free Software Foundation, Inc.
 
 ;; Author: João Távora 
 ;; Keywords: convenience
@@ -30,6 +30,12 @@
 (require 'ox-publish)
 (require 'yasnippet) ; docstrings must be loaded
 
+;; Presumably one of org/ox-publish provided the following vars:
+(defvar org-publish-project-alist)
+(defvar org-publish-use-timestamps-flag)
+(defvar org-export-copy-to-kill-ring)
+(defvar org-html-htmlize-output-type)
+
 (defun yas--org-raw-html (tag content &optional attrs)
   ;; in version 8.0 org-mode changed the export syntax, see
   ;; http://orgmode.org/worg/org-8.0.html#sec-8-1
@@ -148,7 +154,7 @@
   (interactive)
   (yas-expand-snippet "[[#$1][=${1:`yas/selected-text`}=]]"))
 
-(define-key org-mode-map [M-f8] 'yas--internal-link-snippet)
+(define-key org-mode-map [M-f8] #'yas--internal-link-snippet)
 
 ;; This lets all the org files be exported to HTML with
 ;; `org-publish-current-project' (C-c C-e P).



[elpa] scratch/yasnippet 009322196c 6/9: * yasnippet-debug.el: Use `advice-add` i.s.o `defadvice`.

2023-10-17 Thread Stefan Monnier via
branch: scratch/yasnippet
commit 009322196cfaaff55272bbd341c03f6c5facf83e
Author: Stefan Monnier 
Commit: Stefan Monnier 

* yasnippet-debug.el: Use `advice-add` i.s.o `defadvice`.

Now that we use `add-function`, we may as well avoid using the deprecated
`defadvice`

(cl-flet): Remove confusing `cl-flet` fallback, always provided by `cl-lib`.
(yas--snippet-parse-create, yas--commit-snippet):
Use `advice-add` i.s.o `defadvice`.
---
 yasnippet-debug.el | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/yasnippet-debug.el b/yasnippet-debug.el
index d33e8a5f6f..798c7ce263 100644
--- a/yasnippet-debug.el
+++ b/yasnippet-debug.el
@@ -1,6 +1,6 @@
 ;;; yasnippet-debug.el --- debug functions for yasnippet -*- lexical-binding: 
t -*-
 
-;; Copyright (C) 2010, 2013-2014, 2017-2018  Free Software Foundation, Inc.
+;; Copyright (C) 2010-2023  Free Software Foundation, Inc.
 
 ;; Author: João Távora
 ;; Keywords: emulations, convenience
@@ -40,9 +40,6 @@
 ;; Don't require '-L ' when debugging.
 (expand-file-name "yasnippet" yas--loaddir)))
 (require 'cl-lib)
-(eval-when-compile
-  (unless (fboundp 'cl-flet)
-(defalias 'cl-flet 'flet)))
 (require 'color nil t)
 (require 'edebug)
 (eval-when-compile
@@ -224,13 +221,15 @@
   (setq yas-debug-undo value)
   (yas--message 3 "debug undo %sabled" (if yas-debug-undo "en" "dis")))
 
-(defadvice yas--snippet-parse-create (before yas-debug-target-snippet 
(snippet))
+(advice-add 'yas--snippet-parse-create :before #'yas-debug--target-snippet)
+(defun yas-debug--target-snippet (snippet)
   (add-to-list 'yas-debug-target-snippets snippet))
 
-(defadvice yas--commit-snippet (after yas-debug-untarget-snippet (snippet))
+(advice-add 'yas--commit-snippet :after #'yas-debug--untarget-snippet)
+(defun yas-debug--untarget-snippet (snippet)
   (setq yas-debug-target-snippets
 (remq snippet yas-debug-target-snippets))
-  (maphash (lambda (k color-ov)
+  (maphash (lambda (_k color-ov)
  (delete-overlay (cdr color-ov)))
yas-debug-live-indicators)
   (clrhash yas-debug-live-indicators))



[elpa] branch scratch/yasnippet created (now 52a1c50319)

2023-10-17 Thread Stefan Monnier via
monnier pushed a change to branch scratch/yasnippet.

at  52a1c50319 * yasnippet.el (debug-ignored-errors): Don't modify it

This branch includes the following new commits:

   new  946b27ddca * .gitignore: Add patterns for ELPA-generated files
   new  6e4de312cf * doc/yas-doc-helper.el: Use `cl-lib` and 
`lexical-binding`
   new  b09ab98419 * yasnippet-tests.el: Minor cosmetic changes
   new  97002af846 * yasnippet.el: Use `lexical-binding`
   new  e991530108 * yasnippet.el: Use `add-function` and remove left-over 
debug code
   new  009322196c * yasnippet-debug.el: Use `advice-add` i.s.o `defadvice`.
   new  043c52a5a9 * yasnippet.el (yas-minor-mode-map): Don't bind to `tab`
   new  58c92ba393 * yasnippet.el: Cosmetic changes
   new  52a1c50319 * yasnippet.el (debug-ignored-errors): Don't modify it




[elpa] externals/eldoc-eval fd60ac6a2f: Use `advice-add` rather than `defadvice`

2023-10-17 Thread Stefan Monnier via
branch: externals/eldoc-eval
commit fd60ac6a2f51699b49fe447fca0623be962c24b4
Author: Stefan Monnier 
Commit: Stefan Monnier 

Use `advice-add` rather than `defadvice`

Also prefer #' to quote function names.

* eldoc-eval.el (eldoc-in-minibuffer-mode): Fix boundness check.
* .gitignore: New file.
---
 .gitignore|  3 +++
 eldoc-eval.el | 42 ++
 2 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00..434b6537b0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.elc
+/eldoc-eval-autoloads.el
+/eldoc-eval-pkg.el
diff --git a/eldoc-eval.el b/eldoc-eval.el
index 01644ad8fe..49b48e171e 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -1,6 +1,6 @@
 ;;; eldoc-eval.el --- Enable eldoc support when minibuffer is in use. -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2011-2022  Free Software Foundation, Inc.
+;; Copyright (C) 2011-2023  Free Software Foundation, Inc.
 
 ;; Author: Thierry Volpiatto 
 ;; Version: 0.2
@@ -108,12 +108,12 @@ Should take one arg: the string to display"
 
 (defvar eldoc-in-minibuffer-mode-map
   (let ((map (make-sparse-keymap)))
-(define-key map [remap eval-expression] 'eldoc-eval-expression)
+(define-key map [remap eval-expression] #'eldoc-eval-expression)
 map))
 
 ;;;###autoload
 (define-minor-mode eldoc-in-minibuffer-mode
-"Show eldoc for current minibuffer input."
+  "Show eldoc for current minibuffer input."
   :global t
   :group 'eldoc-eval
   (if eldoc-in-minibuffer-mode
@@ -121,29 +121,31 @@ Should take one arg: the string to display"
 (add-hook 'minibuffer-exit-hook
   (lambda ()
 (setq eldoc-mode-line-rolling-flag nil)))
-(when (boundp 'eldoc-post-insert-mode)
-  (setq eldoc-message-function 'message)
+(when (fboundp 'eldoc-post-insert-mode)
+  (setq eldoc-message-function #'message)
   (remove-hook 'eval-expression-minibuffer-setup-hook
-   'eldoc-post-insert-mode))
+   #'eldoc-post-insert-mode))
 (define-key minibuffer-local-map (kbd "C-@")
-  'eldoc-mode-line-toggle-rolling)
+#'eldoc-mode-line-toggle-rolling)
 (setq eldoc-minor-mode-string eldoc-in-minibuffer-mode-lighter))
   (setq eldoc-minor-mode-string " Eldoc")
-  (when (boundp 'eldoc-post-insert-mode)
+  (when (fboundp 'eldoc-post-insert-mode)
 (setq eldoc-message-function eldoc-eval--old-message-function)
 (add-hook 'eval-expression-minibuffer-setup-hook
-  'eldoc-post-insert-mode))
-  (define-key minibuffer-local-map (kbd "C-@") 'set-mark-command)))
-
-(defadvice eldoc-display-message-no-interference-p
-(after eldoc-eval activate)
-  (when eldoc-in-minibuffer-mode
-(setq ad-return-value
-  (and ad-return-value
-   ;; Having this mode operate in an active minibuffer/echo area
-   ;; causes interference with what's going on there.
-   (not cursor-in-echo-area)
-   (not (eq (selected-window) (minibuffer-window)))
+  #'eldoc-post-insert-mode))
+  (define-key minibuffer-local-map (kbd "C-@") #'set-mark-command)))
+
+(advice-add 'eldoc-display-message-no-interference-p
+:around #'eldoc-eval--adjust-interference)
+(defun eldoc-eval--adjust-interference (orig-fun &rest args)
+  (let ((ret (apply orig-fun args)))
+(if eldoc-in-minibuffer-mode
+(and ret
+ ;; Having this mode operate in an active minibuffer/echo area
+ ;; causes interference with what's going on there.
+ (not cursor-in-echo-area)
+ (not (eq (selected-window) (minibuffer-window
+  ret)))
 
 (defun eldoc-store-minibuffer ()
   "Store minibuffer buffer name in `eldoc-active-minibuffers-list'.



[elpa] externals/beframe 993d4f47cd: Ensure project--list has a list value

2023-10-17 Thread ELPA Syncer
branch: externals/beframe
commit 993d4f47cdbe263124efd6eb5a22524fcdb93e9b
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Ensure project--list has a list value

By default, it is set to 'unset', which produces an error in
'beframe-infer-frame-name'.
---
 beframe.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/beframe.el b/beframe.el
index 66909d2cf6..dc64bc82c0 100644
--- a/beframe.el
+++ b/beframe.el
@@ -619,7 +619,9 @@ See `beframe-rename-frame'."
  (file-name (when (bufferp buffer) (buffer-file-name buffer)))
  (buf-name (buffer-name buffer))
  (dir (with-current-buffer buffer (or (vc-root-dir) 
default-directory)))
- (projectp (and (bound-and-true-p project--list) (member (list dir) 
project--list)))
+ (projectp (and (bound-and-true-p project--list)
+(listp project--list)
+(member (list dir) project--list)))
  (project-symbol (beframe-get-fork-symbol)))
 (cond
  ((and name (stringp name))



[elpa] externals/consult 7296f1de47: consult-locate: Split input into multiple words

2023-10-17 Thread ELPA Syncer
branch: externals/consult
commit 7296f1de471d9907c84df320cec78a475ca626b9
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult-locate: Split input into multiple words
---
 CHANGELOG.org | 1 +
 consult.el| 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index eb60bbd026..6af0ccb455 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -14,6 +14,7 @@
 - =consult-org-heading=: Specify category =org-heading= such that Embark 
provides
   appropriate Org heading actions.
 - =consult-org-heading=: Add annotation.
+- =consult-locate=: Split input into multiple words.
 - Remove unreliable =consult--maybe-recenter=.
 
 * Version 0.35 (2023-07-02)
diff --git a/consult.el b/consult.el
index 801f358f42..b7e4f8f8c2 100644
--- a/consult.el
+++ b/consult.el
@@ -5039,7 +5039,7 @@ regarding the asynchronous search and the arguments."
   (pcase-let ((`(,arg . ,opts) (consult--command-split input)))
 (unless (string-blank-p arg)
   (cons (append (consult--build-args consult-locate-args)
-(list arg) opts)
+(consult--split-escaped arg) opts)
 (cdr (consult--default-regexp-compiler input 'basic t))
 
 ;;;###autoload



[elpa] externals/emms 1dd448ef1d 2/6: * emms-source-file.el: Check if find is installed

2023-10-17 Thread ELPA Syncer
branch: externals/emms
commit 1dd448ef1d5e334a0c3a1aa19b97b53d07f18b73
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms-source-file.el: Check if find is installed

Set `emms-source-file-directory-tree-function' to
`emms-source-file-directory-tree-find` when find is installed.

Patch by Morgan Smith
---
 emms-source-file.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/emms-source-file.el b/emms-source-file.el
index 7186a92788..8d3ba8d5bb 100644
--- a/emms-source-file.el
+++ b/emms-source-file.el
@@ -56,8 +56,14 @@
   "The default directory to look for media files."
   :type '(choice (const :tag "None" nil) file))
 
+(defcustom emms-source-file-gnu-find "find"
+  "The program name for GNU find."
+  :type 'string)
+
 (defcustom emms-source-file-directory-tree-function
-  'emms-source-file-directory-tree-internal
+  (if (executable-find emms-source-file-gnu-find)
+  'emms-source-file-directory-tree-find
+'emms-source-file-directory-tree-internal)
   "*A function to call that searches in a given directory all files
 that match a given regex. DIR and REGEX are the only arguments passed
 to this function.



[elpa] externals/emms 0432f4e962 5/6: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emms

2023-10-17 Thread ELPA Syncer
branch: externals/emms
commit 0432f4e962afb0560b8618c4dffd537bb207bc77
Merge: 06d85d52b2 fb72781923
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

Merge branch 'master' of git.savannah.gnu.org:/srv/git/emms



[elpa] externals/emms fb72781923 3/6: * emms.el: Use defcustom :set for `emms-random-playlist'

2023-10-17 Thread ELPA Syncer
branch: externals/emms
commit fb72781923fc148b464a6343ec9447bd80c9dc65
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms.el: Use defcustom :set for `emms-random-playlist'

This allows users to customize `emms-random-playlist' in their
initialization file.
---
 emms.el | 25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/emms.el b/emms.el
index 398ee9d2fe..cda9c9b34b 100644
--- a/emms.el
+++ b/emms.el
@@ -84,10 +84,22 @@ If non-nil, EMMS will wrap back to the first track when 
that happens."
   :group 'emms
   :type 'boolean)
 
+(defcustom emms-player-next-function 'emms-next-noerror
+  "*A function run when EMMS thinks the next song should be played."
+  :group 'emms
+  :type 'function
+  :options '(emms-next-noerror
+emms-random))
+
 (defcustom emms-random-playlist nil
   "*Non-nil means that tracks are played randomly. If nil, tracks
 are played sequentially."
   :group 'emms
+  :set (lambda (symbol value)
+ (set symbol value)
+ (if value
+ (setq emms-player-next-function #'emms-random)
+   (setq emms-player-next-function #'emms-next-noerror)))
   :type 'boolean)
 
 (defcustom emms-repeat-track nil
@@ -243,13 +255,6 @@ interactively."
   :group 'emms
   :type 'hook)
 
-(defcustom emms-player-next-function 'emms-next-noerror
-  "*A function run when EMMS thinks the next song should be played."
-  :group 'emms
-  :type 'function
-  :options '(emms-next-noerror
-emms-random))
-
 (defcustom emms-player-paused-hook nil
   "*Hook run when a player is paused or resumed.
 Use `emms-player-paused-p' to find the current state."
@@ -579,11 +584,9 @@ This uses `emms-playlist-uniq-function'."
   "Toggle whether emms plays the tracks randomly or sequentially.
 See `emms-random-playlist'."
   (interactive)
-  (setq emms-random-playlist (not emms-random-playlist))
+  (customize-set-variable 'emms-random-playlist (not emms-random-playlist))
   (if emms-random-playlist
-  (progn (setq emms-player-next-function #'emms-random)
-(message "Will play the tracks randomly."))
-(setq emms-player-next-function #'emms-next-noerror)
+ (message "Will play the tracks randomly.")
 (message "Will play the tracks sequentially.")))
 
 (defun emms-toggle-repeat-playlist ()



[elpa] externals/emms 722dea2a35 1/6: * doc/emms.texinfo: fix typo

2023-10-17 Thread ELPA Syncer
branch: externals/emms
commit 722dea2a35d43efb3166d18d28fb65fc02378b09
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* doc/emms.texinfo: fix typo

patch by Morgan Smith
---
 doc/emms.texinfo | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/emms.texinfo b/doc/emms.texinfo
index 65f5ccab65..852fd5e4d8 100644
--- a/doc/emms.texinfo
+++ b/doc/emms.texinfo
@@ -871,9 +871,12 @@ An Emms source that will find files in @var{dir} or
 @defun emms-source-file-directory-tree &optional dir
 Return a list of all files under @var{dir} which match @var{regex}.
 @end defun
-@defun emms-source-dired
+@defun emms-play-dired
 Play all marked files of a dired buffer
 @end defun
+@defun emms-add-dired
+Add all marked files of a dired buffer
+@end defun
 @defun emms-source-file-regex
 Return a regexp that matches everything any player (that supports
 files) can play.



[elpa] externals/emms updated (4b05827071 -> b1c1c2ef57)

2023-10-17 Thread ELPA Syncer
elpasync pushed a change to branch externals/emms.

  from  4b05827071 * emms-playlist-mode.el: new function: 
emms-playlist-mode-add-after-current
   new  722dea2a35 * doc/emms.texinfo: fix typo
   new  1dd448ef1d * emms-source-file.el: Check if find is installed
   new  06d85d52b2 emms.el: Use defcustom :set for emms-random-playlist' in 
their initialization file. Patch by Morgan Smith.
   new  fb72781923 * emms.el: Use defcustom :set for `emms-random-playlist'
   new  0432f4e962 Merge branch 'master' of 
git.savannah.gnu.org:/srv/git/emms
   new  b1c1c2ef57 * emms-source-file.el: fix extra defcustom


Summary of changes:
 doc/emms.texinfo|  5 -
 emms-source-file.el | 12 +++-
 emms.el | 25 ++---
 3 files changed, 25 insertions(+), 17 deletions(-)



[elpa] externals/emms b1c1c2ef57 6/6: * emms-source-file.el: fix extra defcustom

2023-10-17 Thread ELPA Syncer
branch: externals/emms
commit b1c1c2ef579b1737a86b9d9550261c77afb93992
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms-source-file.el: fix extra defcustom
---
 emms-source-file.el | 4 
 1 file changed, 4 deletions(-)

diff --git a/emms-source-file.el b/emms-source-file.el
index 8d3ba8d5bb..5882906aad 100644
--- a/emms-source-file.el
+++ b/emms-source-file.el
@@ -86,10 +86,6 @@ You should set case-fold-search to nil before using this 
regexp
 in code."
   :type 'regexp)
 
-(defcustom emms-source-file-gnu-find "find"
-  "The program name for GNU find."
-  :type 'string)
-
 (defcustom emms-source-file-directory-hint-p t
   "When non-nil, guess the directory based on a track at point."
   :type 'boolean)



[elpa] externals/emms 06d85d52b2 4/6: emms.el: Use defcustom :set for emms-random-playlist' in their initialization file. Patch by Morgan Smith.

2023-10-17 Thread ELPA Syncer
branch: externals/emms
commit 06d85d52b26accf3e42467214b9dfff9151fcd5d
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

emms.el: Use defcustom :set for emms-random-playlist' in their 
initialization file. Patch by Morgan Smith.
---
 emms.el | 25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/emms.el b/emms.el
index 398ee9d2fe..cda9c9b34b 100644
--- a/emms.el
+++ b/emms.el
@@ -84,10 +84,22 @@ If non-nil, EMMS will wrap back to the first track when 
that happens."
   :group 'emms
   :type 'boolean)
 
+(defcustom emms-player-next-function 'emms-next-noerror
+  "*A function run when EMMS thinks the next song should be played."
+  :group 'emms
+  :type 'function
+  :options '(emms-next-noerror
+emms-random))
+
 (defcustom emms-random-playlist nil
   "*Non-nil means that tracks are played randomly. If nil, tracks
 are played sequentially."
   :group 'emms
+  :set (lambda (symbol value)
+ (set symbol value)
+ (if value
+ (setq emms-player-next-function #'emms-random)
+   (setq emms-player-next-function #'emms-next-noerror)))
   :type 'boolean)
 
 (defcustom emms-repeat-track nil
@@ -243,13 +255,6 @@ interactively."
   :group 'emms
   :type 'hook)
 
-(defcustom emms-player-next-function 'emms-next-noerror
-  "*A function run when EMMS thinks the next song should be played."
-  :group 'emms
-  :type 'function
-  :options '(emms-next-noerror
-emms-random))
-
 (defcustom emms-player-paused-hook nil
   "*Hook run when a player is paused or resumed.
 Use `emms-player-paused-p' to find the current state."
@@ -579,11 +584,9 @@ This uses `emms-playlist-uniq-function'."
   "Toggle whether emms plays the tracks randomly or sequentially.
 See `emms-random-playlist'."
   (interactive)
-  (setq emms-random-playlist (not emms-random-playlist))
+  (customize-set-variable 'emms-random-playlist (not emms-random-playlist))
   (if emms-random-playlist
-  (progn (setq emms-player-next-function #'emms-random)
-(message "Will play the tracks randomly."))
-(setq emms-player-next-function #'emms-next-noerror)
+ (message "Will play the tracks randomly.")
 (message "Will play the tracks sequentially.")))
 
 (defun emms-toggle-repeat-playlist ()



[elpa] externals/zones 10ebf386d4: Bunch of updates

2023-10-17 Thread Stefan Monnier via
branch: externals/zones
commit 10ebf386d48725fa3af2f8b0c60ad4ffa0ec9653
Author: Drew Adams 
Commit: Stefan Monnier 

Bunch of updates

2023/09/27 dadams
Require cl-lib when available, else defalias cl-case to case.
Added declare-function to quiet byte compiler.
zz-set-fringe-for-narrowing: Provide required arg for redraw-frame 
(Emacs 22+).
2023/06/11 dadams
Advise widen, to update mode-line lighter.
zz-narrow-advice: update mode-line lighter.
zz-narrow: Apply abs to (caar val) for zz-lighter-narrowing-part in 
default cond clause.
2022/12/30 dadams
Wrap condition-case-when-debug in eval-when-compile.
2022/06/25 dadams
zz-auto-add-region-as-izone-mode: Removed optional args for 
define-minor-mode - use only keywords.
zz-add-zones-matching-regexp: Error if can't require isearch-prop.el.
2020/04/12 dadams
zz-set-zones-from-face: Removed soft-require of zones.el. ;-)
2019/11/13 dadams
Renamed zz-izone-limits(-in-bufs) to zz-basic-zones(-in-bufs), and 
improved their doc strings.
2019/11/03 dadams
Added: zz-get-overlay-props.  Use in zz-zone-to-overlay.
zz-overlay-to-zone, zz-zone-to-overlay:
  Use (:zz-overlay . PROPS) in EXTRA, instead of just all of EXTRA, for 
overlay properties in a zone.
2019/10/10 dadams
Added: zz-narrowing-adds-zone-flag.
zz-narrow-advice: Add respect for zz-narrowing-adds-zone-flag.
zz(-map)-query-replace(-regexp)-zones, zz-replace-(string|regexp)-zones:
  Arg ZONES is a list of zones (izones or basic), not a noncontiguous 
region.
  Corrected: BEG and END were flipped.
2019/07/22 dadams
Added: zz-numberize, zz-readable-markerize, zz-position-from-object.
zz-do-izones, zz-map-izones: Use zz-izones-from-zones of zz-zone-union, 
not zz-unite-zones.
 IZONES defaults to value of zz-izones-var.
zz-do-(i)zones, zz-map-(i)zones:
  FUNCTION Is unary, not binary (incompatible change).  Invalid 
FUNCTION is no longer a no-op.
zz-order-zones: Map with unary function, not binary.
---
 zones.el | 580 ++-
 1 file changed, 390 insertions(+), 190 deletions(-)

diff --git a/zones.el b/zones.el
index d08a327c51..fb5e156669 100644
--- a/zones.el
+++ b/zones.el
@@ -1,17 +1,17 @@
 ;;; zones.el --- Zones of text - like multiple regions
 ;;
-;; Copyright (C) 2010-2019  Free Software Foundation, Inc.
+;; Copyright (C) 2010-2023  Free Software Foundation, Inc.
 ;;
 ;; Filename: zones.el
 ;; Description:  Zones of text - like multiple regions
 ;; Author: Drew Adams
 ;; Maintainer: Drew Adams 
 ;; Created: Sun Apr 18 12:58:07 2010 (-0700)
-;; Version: 2019.7.13
+;; Version: 2023.06.11
 ;; Package-Requires: ()
-;; Last-Updated: Sat Jul 13 17:40:21 2019 (-0700)
+;; Last-Updated: Tue Oct 17 16:10:36 2023 (-0700)
 ;;   By: dradams
-;; Update #: 3130
+;; Update #: 3328
 ;; URL: https://elpa.gnu.org/packages/zones.html
 ;; URL: https://www.emacswiki.org/emacs/download/zones.el
 ;; Doc URL: https://www.emacswiki.org/emacs/Zones
@@ -21,8 +21,7 @@
 ;;
 ;; Features that might be required by this library:
 ;;
-;;   `backquote', `bytecomp', `cconv', `cl', `cl-lib', `gv',
-;;   `macroexp'.
+;;   `backquote', `bytecomp', `cconv', `cl-lib', `macroexp'.
 ;;
 ;;
 ;;
@@ -41,7 +40,7 @@
 ;;major changes (named ''versions'') are posted to GNU ELPA.
 ;;
 ;;More description below.
-
+ 
 ;;(@> "Index")
 ;;
 ;;  Index
@@ -74,7 +73,7 @@
 ;;  (@> "General Commands")
 ;;  (@> "General Non-Interactive Functions")
 ;;  (@> "Key Bindings")
-
+ 
 ;;(@* "Things Defined Here")
 ;;
 ;;  Things Defined Here
@@ -101,7 +100,8 @@
 ;;  User options defined here:
 ;;
 ;;`zz-auto-remove-empty-izones-flag',
-;;`zz-narrowing-use-fringe-flag' (Emacs 23+).
+;;`zz-narrowing-adds-zone-flag', `zz-narrowing-use-fringe-flag'
+;;(Emacs 23+).
 ;;
 ;;  Faces defined here:
 ;;
@@ -109,25 +109,27 @@
 ;;
 ;;  Non-interactive functions defined here:
 ;;
-;;`zz-add-key-bindings-to-narrow-map', `zz-buffer-narrowed-p'
-;;(Emacs 22-23), `zz-buffer-of-markers', `zz-car-<',
+;;`zz-add-key-bindings-to-narrow-map', `zz-basic-zones',
+;;`zz-basic-zones-in-bufs', `zz-buffer-narrowed-p' (Emacs 22-23),
+;;`zz-buffer-of-markers', `zz-car-<',
 ;;`zz-choose-zone-by-id-and-text', `zz-do-izones',
 ;;`zz-dotted-zones-from-izones', `zz-do-zones', `zz-dot-pairs',
-;;`zz-empty-zone-p', `zz-every',
-;;`zz-izone-has-other-buffer-marker-p', `zz-izone-limits',
-;;`zz-izone-limits-in-bufs', `zz-izones-from-noncontiguous-region'
-;;(Emacs 25+), `zz-izones-from-zones', `zz-izone-p',
-;;`zz-izones-p', `zz-izones-renumber', `zz-map-izones',
-;;`zz-map-zones', `zz-marker-from-object', `zz-markerize',
-;;`zz-ma

[nongnu] elpa/markdown-mode 31d4fefdf2 2/2: Merge pull request #803 from jrblevin/issue-802

2023-10-17 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 31d4fefdf24d7bfc1778a5cd2288b15e4d7b03e5
Merge: c12adcfbeb ec2d21a18b
Author: Shohei YOSHIDA 
Commit: GitHub 

Merge pull request #803 from jrblevin/issue-802

Fix carets in math inline issue
---
 CHANGES.md |  5 +
 markdown-mode.el   |  7 ++-
 tests/markdown-test.el | 12 
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 69bc1cbc96..a758f2114e 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,11 @@
 
 *Under development*
 
+*   Bug fixes:
+- Don't highlight superscript/subscript in math inline/block [GH-802][]
+
+  [gh-802]: https://github.com/jrblevin/markdown-mode/issues/802
+
 # Markdown Mode 2.6
 
 *   **Breaking changes:**
diff --git a/markdown-mode.el b/markdown-mode.el
index 0cf1b54556..f549870bb8 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -1140,6 +1140,10 @@ If POS is not given, use point instead."
  thereis (memq face faces))
   (memq face-prop faces
 
+(defsubst markdown--math-block-p (&optional pos)
+  (when markdown-enable-math
+(markdown--face-p (or pos (point)) '(markdown-math-face
+
 (defun markdown-syntax-propertize-extend-region (start end)
   "Extend START to END region to include an entire block of text.
 This helps improve syntax analysis for block constructs.
@@ -3588,7 +3592,8 @@ SEQ may be an atom or a sequence."
   (when (markdown-search-until-condition
  (lambda () (and (not (markdown-code-block-at-point-p))
  (not (markdown-inline-code-at-point-p))
- (not (markdown-in-comment-p
+ (not (markdown-in-comment-p))
+ (not (markdown--math-block-p
  markdown-regex-sub-superscript last t)
 (let* ((subscript-p (string= (match-string 2) "~"))
(props
diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index c8213d82f7..29f18c33c0 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -6183,6 +6183,18 @@ Detail: 
https://github.com/jrblevin/markdown-mode/issues/352";
   (markdown-test-range-has-face 9 9 'markdown-math-face)
   (markdown-test-range-has-face 10 11 'markdown-markup-face
 
+(ert-deftest test-markdown-math/caret-in-math-inline ()
+  "Test for carets in math inline.
+Details: https://github.com/jrblevin/markdown-mode/issues/802";
+  (let ((markdown-enable-math t))
+(markdown-test-string "$a^b^c$"
+  (markdown-test-range-has-face 3 3 'markdown-math-face)
+  (markdown-test-range-has-face 5 5 'markdown-math-face))
+
+(markdown-test-string "$$a^b^c$$"
+  (markdown-test-range-has-face 4 4 'markdown-math-face)
+  (markdown-test-range-has-face 6 6 'markdown-math-face
+
 (ert-deftest test-markdown-math/math-inline-small-buffer ()
   "Test that font-lock parsing works with a single dollar."
   (let ((markdown-enable-math t))



[nongnu] elpa/markdown-mode ec2d21a18b 1/2: Fix carets in math inline issue

2023-10-17 Thread ELPA Syncer
branch: elpa/markdown-mode
commit ec2d21a18b6030cbbe056da36e9d2ae7c369157c
Author: Shohei YOSHIDA 
Commit: Shohei YOSHIDA 

Fix carets in math inline issue
---
 CHANGES.md |  5 +
 markdown-mode.el   |  7 ++-
 tests/markdown-test.el | 12 
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 69bc1cbc96..a758f2114e 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,11 @@
 
 *Under development*
 
+*   Bug fixes:
+- Don't highlight superscript/subscript in math inline/block [GH-802][]
+
+  [gh-802]: https://github.com/jrblevin/markdown-mode/issues/802
+
 # Markdown Mode 2.6
 
 *   **Breaking changes:**
diff --git a/markdown-mode.el b/markdown-mode.el
index 0cf1b54556..f549870bb8 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -1140,6 +1140,10 @@ If POS is not given, use point instead."
  thereis (memq face faces))
   (memq face-prop faces
 
+(defsubst markdown--math-block-p (&optional pos)
+  (when markdown-enable-math
+(markdown--face-p (or pos (point)) '(markdown-math-face
+
 (defun markdown-syntax-propertize-extend-region (start end)
   "Extend START to END region to include an entire block of text.
 This helps improve syntax analysis for block constructs.
@@ -3588,7 +3592,8 @@ SEQ may be an atom or a sequence."
   (when (markdown-search-until-condition
  (lambda () (and (not (markdown-code-block-at-point-p))
  (not (markdown-inline-code-at-point-p))
- (not (markdown-in-comment-p
+ (not (markdown-in-comment-p))
+ (not (markdown--math-block-p
  markdown-regex-sub-superscript last t)
 (let* ((subscript-p (string= (match-string 2) "~"))
(props
diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index c8213d82f7..29f18c33c0 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -6183,6 +6183,18 @@ Detail: 
https://github.com/jrblevin/markdown-mode/issues/352";
   (markdown-test-range-has-face 9 9 'markdown-math-face)
   (markdown-test-range-has-face 10 11 'markdown-markup-face
 
+(ert-deftest test-markdown-math/caret-in-math-inline ()
+  "Test for carets in math inline.
+Details: https://github.com/jrblevin/markdown-mode/issues/802";
+  (let ((markdown-enable-math t))
+(markdown-test-string "$a^b^c$"
+  (markdown-test-range-has-face 3 3 'markdown-math-face)
+  (markdown-test-range-has-face 5 5 'markdown-math-face))
+
+(markdown-test-string "$$a^b^c$$"
+  (markdown-test-range-has-face 4 4 'markdown-math-face)
+  (markdown-test-range-has-face 6 6 'markdown-math-face
+
 (ert-deftest test-markdown-math/math-inline-small-buffer ()
   "Test that font-lock parsing works with a single dollar."
   (let ((markdown-enable-math t))