[elpa] externals/compat 7e23c64bd7: Version 29.1.3.0

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 7e23c64bd74b8564a361961b58e08d43ca3dc616
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 29.1.3.0
---
 NEWS.org  | 4 +++-
 compat.el | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index ca8b6dfde3..8db740ed87 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,6 +1,6 @@
 #+title: compat.el - Changelog
 
-* Development
+* Release of "Compat" Version 29.1.3.0
 
 - compat-25: Add ~hash-table-empty-p~.
 - compat-25: Add ~macroexp-parse-body~ and ~macroexp-quote~.
@@ -33,6 +33,8 @@
 - compat-29: Add ~use-region-beginning~, ~use-region-end~ and 
~use-region-noncontiguous-p~.
 - compat-29: Add ~with-narrowing~.
 
+(Release <2023-01-22 Sun>)
+
 * Release of "Compat" Version 29.1.2.0
 
 - All compatibility functions are covered by tests!
diff --git a/compat.el b/compat.el
index a7f628a18b..62ca74a09c 100644
--- a/compat.el
+++ b/compat.el
@@ -4,7 +4,7 @@
 
 ;; Author: Philip Kaludercic , Daniel Mendler 

 ;; Maintainer: Daniel Mendler , Compat Development 
<~pkal/compat-de...@lists.sr.ht>
-;; Version: 29.1.2.0
+;; Version: 29.1.3.0
 ;; URL: https://github.com/emacs-compat/compat
 ;; Package-Requires: ((emacs "24.4"))
 ;; Keywords: lisp



[nongnu] elpa/scroll-on-jump 18e524a367: Add scroll-on-jump-mode-line-format to optionally override the mode-line

2023-01-21 Thread ELPA Syncer
branch: elpa/scroll-on-jump
commit 18e524a36706fbdf9ad88cf3df8f6d669b4e8221
Author: Campbell Barton 
Commit: Campbell Barton 

Add scroll-on-jump-mode-line-format to optionally override the mode-line

This can be used to prevent complex mode-lines interfering with
scrolling performance.
---
 readme.rst|  6 +-
 scroll-on-jump.el | 30 +++---
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/readme.rst b/readme.rst
index 714e640a0c..a4af4efebf 100644
--- a/readme.rst
+++ b/readme.rst
@@ -166,8 +166,12 @@ While the defaults seem to work well, these values can be 
customized.
The duration for jumping to take, set to ``0.0`` to jump immediately.
 ``scroll-on-jump-smooth``: t
When not nil, use smooth scrolling (by pixels).
-``scroll-on-jump-use-curve``
+``scroll-on-jump-use-curve``: t
Apply a curve to the scroll speed, starting and ending slow.
+``scroll-on-jump-mode-line-format``: nil
+   When non-nil, use this value for the ``mode-line-format`` while scrolling.
+   This can be used to temporarily override the mode-line while scrolling.
+   It can also help to avoid overly complex mode-lines from slowing down 
scrolling.
 
 
 Installation
diff --git a/scroll-on-jump.el b/scroll-on-jump.el
index 12d03ed442..baf19d0f8c 100644
--- a/scroll-on-jump.el
+++ b/scroll-on-jump.el
@@ -44,6 +44,12 @@
   "Apply a curve to the scroll speed, starting and ending slow."
   :type 'boolean)
 
+(defcustom scroll-on-jump-mode-line-format nil
+  "The `mode-line-format' to use or nil to leave the `mode-line-format' 
unchanged.
+
+This can be useful to use a simplified or event disabling the mode-line
+while scrolling, as a complex mode-line can interfere with smooth scrolling."
+  :type '(choice (const nil) string))
 
 ;; ---
 ;; Generic Utilities
@@ -321,14 +327,10 @@ Argument ALSO-MOVE-POINT moves the point while scrolling."
 
   (run-window-scroll-functions window))
 
-(defun scroll-on-jump--scroll-impl (window lines-scroll dir also-move-point)
-  "Scroll WINDOW LINES-SCROLL lines along DIR direction.
-Moving the point when ALSO-MOVE-POINT is set."
-
+(defun scroll-on-jump--scroll-animated (window lines-scroll dir 
also-move-point)
+  "Perform an animated scroll.
+see `scroll-on-jump--scroll-impl' for doc-strings for WINDOW, LINES-SCROLL, 
DIR & ALSO-MOVE-POINT."
   (cond
-   ;; No animation.
-   ((zerop scroll-on-jump-duration)
-(scroll-on-jump--immediate-scroll window lines-scroll dir))
;; Use pixel scrolling.
;;
;; NOTE: only pixel scroll >1 lines so actions that move the cursor up/down 
one
@@ -343,6 +345,20 @@ Moving the point when ALSO-MOVE-POINT is set."
(t
 (scroll-on-jump--animated-scroll-by-line window lines-scroll dir 
also-move-point
 
+(defun scroll-on-jump--scroll-impl (window lines-scroll dir also-move-point)
+  "Scroll WINDOW LINES-SCROLL lines along DIR direction.
+Moving the point when ALSO-MOVE-POINT is set."
+  (cond
+   ;; No animation.
+   ((zerop scroll-on-jump-duration)
+(scroll-on-jump--immediate-scroll window lines-scroll dir))
+   (scroll-on-jump-mode-line-format
+(let ((mode-line-format scroll-on-jump-mode-line-format))
+  (scroll-on-jump--scroll-animated window lines-scroll dir 
also-move-point))
+(force-mode-line-update))
+   (t
+(scroll-on-jump--scroll-animated window lines-scroll dir 
also-move-point
+
 (defun scroll-on-jump-auto-center (window point-prev point-next)
   "Re-frame WINDOW from POINT-PREV to POINT-NEXT, optionally animating."
   ;; Count lines, excluding the current line.



[elpa] externals/compat 31d1ad38f4 1/5: compat-macs: Use compat-macs-- namespace

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 31d1ad38f48f024101ad4eb5d78a3cfd41c03253
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-macs: Use compat-macs-- namespace

Avoid any potential clash with compat-- namespace of extended definitions.
---
 compat-macs.el | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index 113add2169..b46a4108bb 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -27,19 +27,19 @@
 (require 'subr-x)
 (require 'cl-lib)
 
-(defvar compat--version nil
+(defvar compat-macs--version nil
   "Version of the currently defined compatibility definitions.")
 
-(defmacro compat--strict (cond  error)
+(defmacro compat-macs--strict (cond  error)
   "Assert strict COND, otherwise fail with ERROR."
   (when (bound-and-true-p compat-strict)
-`(compat--assert ,cond ,@error)))
+`(compat-macs--assert ,cond ,@error)))
 
-(defmacro compat--assert (cond  error)
+(defmacro compat-macs--assert (cond  error)
   "Assert COND, otherwise fail with ERROR."
   `(unless ,cond (error ,@error)))
 
-(defun compat--docstring (type name docstring)
+(defun compat-macs--docstring (type name docstring)
   "Format DOCSTRING for NAME of TYPE.
 Prepend compatibility notice to the actual documentation string."
   (with-temp-buffer
@@ -49,38 +49,38 @@ Prepend compatibility notice to the actual documentation 
string."
 If this is not documented on yourself system, you can check \
 `(compat) Emacs %s' for more details.]\n\n%s"
   type name
-  compat--version compat--version
+  compat-macs--version compat-macs--version
   docstring))
 (let ((fill-column 80))
   (fill-region (point-min) (point-max)))
 (buffer-string)))
 
-(defun compat--check-attributes (attrs preds)
+(defun compat-macs--check-attributes (attrs preds)
   "Check ATTRS given PREDS predicate plist and return rest."
   (while (keywordp (car attrs))
-(compat--assert (cdr attrs) "Attribute list length is odd")
+(compat-macs--assert (cdr attrs) "Attribute list length is odd")
 (let ((pred (plist-get preds (car attrs
-  (compat--assert (and pred (or (eq pred t) (funcall pred (cadr attrs
+  (compat-macs--assert (and pred (or (eq pred t) (funcall pred (cadr 
attrs
   "Invalid attribute %s" (car attrs)))
 (setq attrs (cddr attrs)))
   attrs)
 
-(defun compat--guard (attrs preds fun)
+(defun compat-macs--guard (attrs preds fun)
   "Guard compatibility definition generation.
 The version constraints specified by ATTRS are checked.  PREDS is
 a plist of predicates for arguments which are passed to FUN."
   (declare (indent 2))
-  (let* ((body (compat--check-attributes
+  (let* ((body (compat-macs--check-attributes
 attrs `(,@preds :feature symbolp)))
  (feature (plist-get attrs :feature))
  (attrs `(:body ,body ,@attrs))
  args)
 ;; Require feature at compile time
 (when feature
-  (compat--assert (not (eq feature 'subr-x)) "Invalid feature subr-x")
+  (compat-macs--assert (not (eq feature 'subr-x)) "Invalid feature subr-x")
   (require feature))
 ;; The current Emacs must be older than the currently declared version.
-(when (version< emacs-version compat--version)
+(when (version< emacs-version compat-macs--version)
   (while preds
 (push (plist-get attrs (car preds)) args)
 (setq preds (cddr preds)))
@@ -89,16 +89,16 @@ a plist of predicates for arguments which are passed to 
FUN."
   `(with-eval-after-load ',feature ,@body)
 (macroexp-progn body)
 
-(defun compat--guard-defun (type name arglist docstring rest)
+(defun compat-macs--defun (type name arglist docstring rest)
   "Define function NAME of TYPE with ARGLIST and DOCSTRING.
 REST are attributes and the function BODY."
-  (compat--guard rest `(:extended ,(lambda (x) (or (booleanp x) 
(version-to-list x)))
+  (compat-macs--guard rest `(:extended ,(lambda (x) (or (booleanp x) 
(version-to-list x)))
 :obsolete ,(lambda (x) (or (booleanp x) (stringp x)))
 :body t)
 (lambda (extended obsolete body)
   (when (stringp extended)
 (setq extended (version<= extended emacs-version)))
-  (compat--strict (eq extended (fboundp name))
+  (compat-macs--strict (eq extended (fboundp name))
   "Wrong :extended flag for %s %s" type name)
   ;; Remove unsupported declares.  It might be possible to set these
   ;; properties otherwise.  That should be looked into and implemented
@@ -115,7 +115,7 @@ REST are attributes and the function BODY."
  (if (eq type 'macro) 'cl-defmacro 'cl-defun)
(if (eq type 'macro) 'defmacro 'defun))
 ,defname ,arglist
-,(compat--docstring type name docstring)
+,(compat-macs--docstring 

[elpa] externals/compat updated (0570e869bc -> a300320bae)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  0570e869bc compat: Improve docstrings
   new  31d1ad38f4 compat-macs: Use compat-macs-- namespace
   new  965fff2db0 Add :extended version check
   new  3bd6304770 compat-macs: Formatting
   new  bd37a3dcd6 compat-26: Optimize assoc
   new  a300320bae compat-tests: Use should-equal


Summary of changes:
 compat-26.el|  17 +++---
 compat-macs.el  |  75 +-
 compat-tests.el | 161 ++--
 3 files changed, 124 insertions(+), 129 deletions(-)



[elpa] externals/eev 6c9211708d: Added support for Raku.

2023-01-21 Thread ELPA Syncer
branch: externals/eev
commit 6c9211708df63b2c834756a2c1758189648e3de1
Author: Eduardo Ochs 
Commit: Eduardo Ochs 

Added support for Raku.
---
 ChangeLog |  6 ++
 VERSION   |  4 ++--
 eepitch.el|  5 +++--
 eev-testblocks.el | 20 ++--
 4 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2dae6f9563..a5e984629c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-21  Eduardo Ochs  
+
+   * eepitch.el (eepitch-raku): new function.
+
+   * eev-testblocks.el (ee-insert-test-raku-mode): new function.
+
 2023-01-18  Eduardo Ochs  
 
* eev-tlinks.el (find-try-sly-links): rewrote several parts.
diff --git a/VERSION b/VERSION
index 5d5e06a090..944aa30aef 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Wed Jan 18 05:54:12 GMT 2023
-Wed Jan 18 02:54:12 -03 2023
+Sun Jan 22 04:28:41 GMT 2023
+Sun Jan 22 01:28:41 -03 2023
diff --git a/eepitch.el b/eepitch.el
index b1df45e7f7..50703c6e8d 100644
--- a/eepitch.el
+++ b/eepitch.el
@@ -1,6 +1,6 @@
 ;; eepitch.el - record interactions with shells as readable notes, redo tasks. 
 -*- lexical-binding: nil; -*-
 
-;; Copyright (C) 2012,2015,2018-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2012,2015,2018-2023 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GNU eev.
 ;;
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20221228
+;; Version:20230121
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eepitch.el>
@@ -1044,6 +1044,7 @@ If the mrepl doesn't start in 30 seconds this function 
yields an error."
 (defun eepitch-python3 () (interactive) (eepitch-comint "python3" "python3"))
 (defun eepitch-python  () (interactive) (eepitch-comint "python3" "python3"))
 (defun eepitch-perl () (interactive) (eepitch-comint "perl" "perl -d -e 42"))
+(defun eepitch-raku() (interactive) (eepitch-comint "raku" "raku"))
 (defun eepitch-php () (interactive) (eepitch-comint "php -a" "php -a"))
 (defun eepitch-ruby() (interactive) (eepitch-ansiterm "irb" "irb"))
 (defun eepitch-irb () (interactive) (eepitch-ansiterm "irb" "irb"))
diff --git a/eev-testblocks.el b/eev-testblocks.el
index 90319a5ff2..19596bf449 100644
--- a/eev-testblocks.el
+++ b/eev-testblocks.el
@@ -1,6 +1,6 @@
 ;;; eev-testblocks.el - create "test blocks" using multiline comments.  -*- 
lexical-binding: nil; -*-
 
-;; Copyright (C) 2019-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2023 Free Software Foundation, Inc.
 ;;
 ;; This file is part of GNU eev.
 ;;
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20221101
+;; Version:20230121
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-testblocks.el>
@@ -309,6 +309,22 @@ exec(open(\"%s\").read(), globals())
 |#
 " (buffer-name)
 
+(defun ee-insert-test-raku-mode ()
+  (interactive)
+  (let ((libname
+(replace-regexp-in-string
+ "\\.rakumod$" "" (buffer-name
+(insert (ee-adjust-red-stars (format "
+#`(
+ (eepitch-raku)
+ (eepitch-kill)
+ (eepitch-raku)
+use lib '.'
+use %s
+
+)
+" libname)
+
 (defun ee-insert-test-ruby-mode ()
   (interactive)
   (insert (ee-adjust-red-stars (format "



[elpa] externals/compat a300320bae 5/5: compat-tests: Use should-equal

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit a300320bae8cf84443094c8316cf1bf3b8056ff1
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-tests: Use should-equal
---
 compat-tests.el | 161 ++--
 1 file changed, 74 insertions(+), 87 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 68451f7e87..14f8c79a20 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -954,12 +954,12 @@
 (let ((state (buffer-local-set-state compat-tests--global 10
  compat-tests--local 20
  compat-tests--unexist 30)))
-  (should (= compat-tests--global 10))
-  (should (= compat-tests--local 20))
-  (should (= compat-tests--unexist 30))
+  (should-equal compat-tests--global 10)
+  (should-equal compat-tests--local 20)
+  (should-equal compat-tests--unexist 30)
   (buffer-local-restore-state state)
-  (should (= compat-tests--global 1))
-  (should (= compat-tests--local 2))
+  (should-equal compat-tests--global 1)
+  (should-equal compat-tests--local 2)
   (should-not (boundp 'compat-tests--unexist)
 
 (ert-deftest gensym ()
@@ -1071,7 +1071,7 @@
   (with-temp-buffer
 (insert "def")
 (insert-into-buffer other))
-  (should (string= (buffer-string) "abcdef"
+  (should-equal (buffer-string) "abcdef")))
   ;; With one optional argument
   (with-temp-buffer
 (let ((other (current-buffer)))
@@ -1079,7 +1079,7 @@
   (with-temp-buffer
 (insert "def")
 (insert-into-buffer other 2))
-  (should (string= (buffer-string) "abcef"
+  (should-equal (buffer-string) "abcef")))
   ;; With two optional arguments
   (with-temp-buffer
 (let ((other (current-buffer)))
@@ -1087,7 +1087,7 @@
   (with-temp-buffer
 (insert "def")
 (insert-into-buffer other 2 3))
-  (should (string= (buffer-string) "abce")
+  (should-equal (buffer-string) "abce"
 
 (ert-deftest bool-vector ()
   (should-equal (bool-vector) (bool-vector-not (bool-vector)))
@@ -1690,14 +1690,12 @@
 (ert-deftest replace-string-in-region ()
   (with-temp-buffer
 (insert "foo bar zot foobar")
-(should (= (replace-string-in-region "foo" "new" (point-min) (point-max))
-   2))
+(should-equal (replace-string-in-region "foo" "new" (point-min) 
(point-max)) 2)
 (should-equal (buffer-string) "new bar zot newbar"))
 
   (with-temp-buffer
 (insert "foo bar zot foobar")
-(should (= (replace-string-in-region "foo" "new" (point-min) 14)
-   1))
+(should-equal (replace-string-in-region "foo" "new" (point-min) 14) 1)
 (should-equal (buffer-string) "new bar zot foobar"))
 
   (with-temp-buffer
@@ -1706,8 +1704,7 @@
 
   (with-temp-buffer
 (insert "Foo bar zot foobar")
-(should (= (replace-string-in-region "Foo" "new" (point-min))
-   1))
+(should-equal (replace-string-in-region "Foo" "new" (point-min)) 1)
 (should-equal (buffer-string) "new bar zot foobar"))
 
   ;; There was a bug in the Emacs 28 implementation
@@ -1715,29 +1712,24 @@
   (unless (= emacs-major-version 28)
 (with-temp-buffer
   (insert "foo bar baz")
-  (should (= (replace-string-in-region "ba" "quux corge grault" 
(point-min))
- 2))
+  (should-equal (replace-string-in-region "ba" "quux corge grault" 
(point-min)) 2)
   (should-equal (buffer-string)
  "foo quux corge graultr quux corge graultz"))
 
 (with-temp-buffer
   (insert "foo bar bar")
-  (should (= (replace-string-in-region " bar" "" (point-min) 8)
- 1))
-  (should-equal (buffer-string)
- "foo bar"
+  (should-equal (replace-string-in-region " bar" "" (point-min) 8) 1)
+  (should-equal (buffer-string) "foo bar"
 
 (ert-deftest replace-regexp-in-region ()
   (with-temp-buffer
 (insert "foo bar zot foobar")
-(should (= (replace-regexp-in-region "fo+" "new" (point-min) (point-max))
-   2))
+(should-equal (replace-regexp-in-region "fo+" "new" (point-min) 
(point-max)) 2)
 (should-equal (buffer-string) "new bar zot newbar"))
 
   (with-temp-buffer
 (insert "foo bar zot foobar")
-(should (= (replace-regexp-in-region "fo+" "new" (point-min) 14)
-   1))
+(should-equal (replace-regexp-in-region "fo+" "new" (point-min) 14) 1)
 (should-equal (buffer-string) "new bar zot foobar"))
 
   (with-temp-buffer
@@ -1746,8 +1738,7 @@
 
   (with-temp-buffer
 (insert "Foo bar zot foobar")
-(should (= (replace-regexp-in-region "Fo+" "new" (point-min))
-   1))
+(should-equal (replace-regexp-in-region "Fo+" "new" (point-min)) 1)
 (should-equal (buffer-string) "new bar zot foobar"))
 
   ;; There was a bug in the Emacs 28 implementation
@@ -1755,17 +1746,13 @@
   (unless (= emacs-major-version 28)
 (with-temp-buffer
   

[elpa] externals/compat bd37a3dcd6 4/5: compat-26: Optimize assoc

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit bd37a3dcd67af8e0c96d05f59af2afd95c46f9c1
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-26: Optimize assoc
---
 compat-26.el | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index 1a370c20cc..9c209dce13 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -92,12 +92,17 @@ If you just want to check `major-mode', use 
`derived-mode-p'."
 (compat-defun assoc (key alist  testfn) ;; 
   "Handle the optional TESTFN."
   :extended t
-  (if testfn
-  (catch 'found
-(dolist (ent alist)
-  (when (funcall testfn (car ent) key)
-(throw 'found ent
-(assoc key alist)))
+  (cond
+   ((or (eq testfn #'eq)
+(and (not testfn) (or (symbolp key) (integerp key ;; 
eq_comparable_value
+(assq key alist))
+   ((or (eq testfn #'equal) (not testfn))
+(assoc key alist))
+   (t
+(catch 'found
+  (dolist (ent alist)
+(when (funcall testfn (car ent) key)
+  (throw 'found ent)))
 
 (compat-defun alist-get (key alist  default remove testfn) ;; 

   "Handle optional argument TESTFN."



[elpa] externals/compat 965fff2db0 2/5: Add :extended version check

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 965fff2db0d15ddd074ede8efa030f9032d4f4eb
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add :extended version check
---
 compat-macs.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/compat-macs.el b/compat-macs.el
index b46a4108bb..4ba7cc1d57 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -97,6 +97,9 @@ REST are attributes and the function BODY."
 :body t)
 (lambda (extended obsolete body)
   (when (stringp extended)
+(compat-macs--assert
+ (and (version< extended compat-macs--version) (version< "24.4" 
extended))
+ "Invalid :extended version %s for %s %s" extended type name)
 (setq extended (version<= extended emacs-version)))
   (compat-macs--strict (eq extended (fboundp name))
   "Wrong :extended flag for %s %s" type name)



[elpa] externals/compat 3bd6304770 3/5: compat-macs: Formatting

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 3bd63047706cf7c65eb31daa1f005de8cc0ddbe5
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-macs: Formatting
---
 compat-macs.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index 4ba7cc1d57..0e81eab110 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -92,9 +92,9 @@ a plist of predicates for arguments which are passed to FUN."
 (defun compat-macs--defun (type name arglist docstring rest)
   "Define function NAME of TYPE with ARGLIST and DOCSTRING.
 REST are attributes and the function BODY."
-  (compat-macs--guard rest `(:extended ,(lambda (x) (or (booleanp x) 
(version-to-list x)))
-:obsolete ,(lambda (x) (or (booleanp x) (stringp x)))
-:body t)
+  (compat-macs--guard rest (list :extended (lambda (x) (or (booleanp x) 
(version-to-list x)))
+ :obsolete (lambda (x) (or (booleanp x) 
(stringp x)))
+ :body t)
 (lambda (extended obsolete body)
   (when (stringp extended)
 (compat-macs--assert
@@ -225,9 +225,9 @@ definition is generated.
 - :feature :: See `compat-guard'."
   (declare (debug (name form stringp [ keywordp sexp]))
(doc-string 3) (indent 2))
-  (compat-macs--guard attrs `(:constant booleanp
- :local ,(lambda (x) (memq x '(nil t permanent)))
- :obsolete ,(lambda (x) (or (booleanp x) (stringp x
+  (compat-macs--guard attrs (list :constant #'booleanp
+  :local (lambda (x) (memq x '(nil t 
permanent)))
+  :obsolete (lambda (x) (or (booleanp x) 
(stringp x
 (lambda (constant local obsolete)
   (compat-macs--strict (not (boundp name)) "%s already defined" name)
   (compat-macs--assert (not (and constant local)) "Both :constant and 
:local")



[nongnu] elpa/inf-ruby 0ce7f4049e 2/2: Merge pull request #169 from pritambaral/support-tramp

2023-01-21 Thread ELPA Syncer
branch: elpa/inf-ruby
commit 0ce7f4049edcae188b4643b3163e5301f9ef09cc
Merge: 997b3c5f9d 7337255b0b
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #169 from pritambaral/support-tramp

Add support for TRAMP to ruby-send-* and ruby-load-file
---
 inf-ruby.el | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index d7ec4d809c..c65129db51 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -484,6 +484,14 @@ Must not contain ruby meta characters.")
 
 (defconst ruby-eval-separator "")
 
+(defun inf-ruby-file-local-name (filename)
+  "Convert FILENAME so that it can be passed to an inferior Ruby
+process running over TRAMP, by removing the remote part of it."
+  ;; TODO: Replace this implementation with (file-local-name ...) when the
+  ;; oldest supported Emacs version is bumped to 26.1
+  (or (file-remote-p filename 'localname)
+  filename))
+
 (defun ruby-send-region (start end  print prefix suffix line-adjust)
   "Send the current region to the inferior Ruby process."
   (interactive "r\nP")
@@ -508,7 +516,8 @@ Must not contain ruby meta characters.")
(setq line (+ line line-adjust)))
 (comint-send-string (inf-ruby-proc) (format "eval <<'%s', %s, %S, %d\n"
 term inf-ruby-eval-binding
-file line))
+(inf-ruby-file-local-name file)
+line))
 (if prefix
(comint-send-string (inf-ruby-proc) prefix))
 (comint-send-region (inf-ruby-proc) start end)
@@ -797,7 +806,7 @@ Then switch to the process buffer."
   (setq ruby-prev-l/c-dir/file (cons (file-name-directoryfile-name)
  (file-name-nondirectory file-name)))
   (comint-send-string (inf-ruby-proc) (concat "(load \""
-  file-name
+  (inf-ruby-file-local-name 
file-name)
   "\"\)\n")))
 
 (defun ruby-load-current-file ()



[nongnu] elpa/inf-ruby 7337255b0b 1/2: Add support for TRAMP

2023-01-21 Thread ELPA Syncer
branch: elpa/inf-ruby
commit 7337255b0b720a35c2c6e3267f2ee040f8d7fee7
Author: Pritam Baral 
Commit: Pritam Baral 

Add support for TRAMP

We already support running inferior ruby processes over remote
connections via TRAMP. But the ruby-send-* functions use the full file
name when sending code over, which includes the remote path. This
renders ruby's code introspection useless because source locations use
filenames that ruby cannot understand.

For example, if sending code from a file /tmp/example.rb on TRAMP remote
/ssh:remote:, the ruby source locations end up as
'/ssh:remote:/tmp/example.rb'.

This change makes inf-ruby strip the remote path when sending filenames
to the inferior ruby process. For compatibility with Emacs versions
older than 26.1, it avoids using (file-local-name).
---
 inf-ruby.el | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index d7ec4d809c..c65129db51 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -484,6 +484,14 @@ Must not contain ruby meta characters.")
 
 (defconst ruby-eval-separator "")
 
+(defun inf-ruby-file-local-name (filename)
+  "Convert FILENAME so that it can be passed to an inferior Ruby
+process running over TRAMP, by removing the remote part of it."
+  ;; TODO: Replace this implementation with (file-local-name ...) when the
+  ;; oldest supported Emacs version is bumped to 26.1
+  (or (file-remote-p filename 'localname)
+  filename))
+
 (defun ruby-send-region (start end  print prefix suffix line-adjust)
   "Send the current region to the inferior Ruby process."
   (interactive "r\nP")
@@ -508,7 +516,8 @@ Must not contain ruby meta characters.")
(setq line (+ line line-adjust)))
 (comint-send-string (inf-ruby-proc) (format "eval <<'%s', %s, %S, %d\n"
 term inf-ruby-eval-binding
-file line))
+(inf-ruby-file-local-name file)
+line))
 (if prefix
(comint-send-string (inf-ruby-proc) prefix))
 (comint-send-region (inf-ruby-proc) start end)
@@ -797,7 +806,7 @@ Then switch to the process buffer."
   (setq ruby-prev-l/c-dir/file (cons (file-name-directoryfile-name)
  (file-name-nondirectory file-name)))
   (comint-send-string (inf-ruby-proc) (concat "(load \""
-  file-name
+  (inf-ruby-file-local-name 
file-name)
   "\"\)\n")))
 
 (defun ruby-load-current-file ()



[elpa] externals/poke e2011339b4: use set-process-coding-system instead of the deprecated set-process-filter-multibyte

2023-01-21 Thread ELPA Syncer
branch: externals/poke
commit e2011339b44f7a254763c890aea0e6a45f4d4b53
Author: Jose E. Marchesi 
Commit: Jose E. Marchesi 

use set-process-coding-system instead of the deprecated 
set-process-filter-multibyte
---
 poke.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/poke.el b/poke.el
index 11866d40fa..b610cf5e76 100644
--- a/poke.el
+++ b/poke.el
@@ -222,7 +222,7 @@ following attributes in its alist:
  (process-put proc 'pokelet-msg-handler msg-handler)
  (set-process-query-on-exit-flag proc nil)
  (set-process-filter proc #'poke-pokelet-filter)
- (set-process-filter-multibyte proc nil)
+ (set-process-coding-system proc 'binary 'binary)
  (process-send-string proc ctrl)
  proc))
 



[elpa] externals/compat 0570e869bc 2/2: compat: Improve docstrings

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 0570e869bc67d44636364b0db3767e1ded2eae72
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat: Improve docstrings
---
 compat.el | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/compat.el b/compat.el
index ffdd379650..a7f628a18b 100644
--- a/compat.el
+++ b/compat.el
@@ -59,22 +59,24 @@ version.  For example Compat 29.1 will provide compatibility
 functions which implement the behavior and calling convention of
 Emacs 29.1.
 
-An example is the function `plist-get' which was extended with an
-additional predicate argument in Emacs 29.  The compatibility
-function, which supports this additional argument can be obtained
-via (compat-function plist-get) and called with the additional
-predicate argument via (compat-call plist-get plist prop
-predicate).  It is not possible to directly evaluate (plist-get
-plist prop predicate), since the original `plist-get' function
-does not yet support the predicate argument on older Emacs
-versions.  Note that Compat library never overrides existing
-functions."
+See also `compat-call' to directly call compatibility functions."
   (let ((compat (intern (format "compat--%s" fun
 `#',(if (fboundp compat) compat fun)))
 
 (defmacro compat-call (fun  args)
   "Call compatibility function or macro FUN with ARGS.
-See `compat-function' for details."
+
+A good example function is `plist-get' which was extended with an
+additional predicate argument in Emacs 29.1.  The compatibility
+function, which supports this additional argument, can be
+obtained via (compat-function plist-get) and called
+via (compat-call plist-get plist prop predicate).  It is not
+possible to directly call (plist-get plist prop predicate) on
+Emacs older than 29.1, since the original `plist-get' function
+does not yet support the predicate argument.  Note that the
+Compat library never overrides existing functions.
+
+See also `compat-function' to lookup compatibility functions."
   (let ((compat (intern (format "compat--%s" fun
 `(,(if (fboundp compat) compat fun) ,@args)))
 



[elpa] externals/compat updated (191c333905 -> 0570e869bc)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  191c333905 compat-27: Add read-char-from-minibuffer
   new  816d415dc2 compat-guard: Remove currently unused attribute :when
   new  0570e869bc compat: Improve docstrings


Summary of changes:
 compat-macs.el | 24 +++-
 compat.el  | 24 +---
 2 files changed, 20 insertions(+), 28 deletions(-)



[elpa] externals/compat 816d415dc2 1/2: compat-guard: Remove currently unused attribute :when

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 816d415dc21a55f332a215213535473cdad5c8ab
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-guard: Remove currently unused attribute :when
---
 compat-macs.el | 24 +++-
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index f8bf80b2a9..113add2169 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -71,21 +71,16 @@ The version constraints specified by ATTRS are checked.  
PREDS is
 a plist of predicates for arguments which are passed to FUN."
   (declare (indent 2))
   (let* ((body (compat--check-attributes
-attrs `(,@preds :when t :feature symbolp)))
+attrs `(,@preds :feature symbolp)))
  (feature (plist-get attrs :feature))
  (attrs `(:body ,body ,@attrs))
- (when (plist-get attrs :when))
  args)
 ;; Require feature at compile time
 (when feature
   (compat--assert (not (eq feature 'subr-x)) "Invalid feature subr-x")
   (require feature))
-(when (if when
-  ;; If a condition is specified, no version check is performed.
-  (eval when t)
-;; The current Emacs must be older than the current declared Compat
-;; version, see `compat-declare-version'.
-(version< emacs-version compat--version))
+;; The current Emacs must be older than the currently declared version.
+(when (version< emacs-version compat--version)
   (while preds
 (push (plist-get attrs (car preds)) args)
 (setq preds (cddr preds)))
@@ -145,12 +140,7 @@ body.  The attributes specify the conditions under which 
the
 definition is generated.
 
 - :feature :: Wrap the definition with `with-eval-after-load' for
-  the given feature.
-
-- :when :: Install the definition if :when evaluates to non-nil.
-  The usual version check is not performed.  If you still want to
-  check against the current Emacs version, the comparison must be
-  part of the :when expression."
+  the given feature."
   (declare (debug ([ keywordp sexp] def-body))
(indent 1))
   (compat--guard rest '(:body t)
@@ -167,7 +157,7 @@ under which the definition is generated.
 
 - :obsolete :: Mark the alias as obsolete if t.
 
-- :feature and :when :: See `compat-guard'."
+- :feature :: See `compat-guard'."
   (declare (debug (name symbolp [ keywordp sexp])))
   (compat--guard attrs '(:obsolete booleanp)
 (lambda (obsolete)
@@ -199,7 +189,7 @@ specify the conditions under which the definition is 
generated.
 - :obsolete :: Mark the function as obsolete if t, can be a
   string describing the obsoletion.
 
-- :feature and :when :: See `compat-guard'."
+- :feature :: See `compat-guard'."
   (declare (debug ( name ( symbolp)
stringp
[ keywordp sexp]
@@ -229,7 +219,7 @@ definition is generated.
 - :obsolete :: Mark the variable as obsolete if t, can be a
   string describing the obsoletion.
 
-- :feature and :when :: See `compat-guard'."
+- :feature :: See `compat-guard'."
   (declare (debug (name form stringp [ keywordp sexp]))
(doc-string 3) (indent 2))
   (compat--guard attrs `(:constant booleanp



[elpa] externals/compat 191c333905: compat-27: Add read-char-from-minibuffer

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 191c333905e8e39d3957049e08c45c97633d593e
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-27: Add read-char-from-minibuffer
---
 NEWS.org|  1 +
 compat-27.el| 92 +
 compat-tests.el | 10 +++
 compat.texi | 15 --
 4 files changed, 116 insertions(+), 2 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 2054ca669c..ca8b6dfde3 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -13,6 +13,7 @@
 - compat-27: Add ~major-mode-suspend~ and ~major-mode-restore~.
 - compat-27: Add ~make-decoded-time~.
 - compat-27: Add ~minibuffer-history-value~.
+- compat-27: Add ~read-char-from-minibuffer~.
 - compat-27: Add ~ring-resize~.
 - compat-28: Add ~color-dark-p~.
 - compat-28: Add ~directory-files-and-attributes~ with COUNT argument.
diff --git a/compat-27.el b/compat-27.el
index 233577877d..102abf1f1c 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -255,6 +255,98 @@ though trying to avoid AVOIDED-MODES."
  alist)))
   (normal-mode
 
+(compat-defun read-char-from-minibuffer-insert-char () ;; 

+  "Insert the character you type into the minibuffer and exit minibuffer.
+Discard all previous input before inserting and exiting the minibuffer."
+  (interactive)
+  (when (minibufferp)
+(delete-minibuffer-contents)
+(insert last-command-event)
+(exit-minibuffer)))
+
+(compat-defun read-char-from-minibuffer-insert-other () ;; 

+  "Reject a disallowed character typed into the minibuffer.
+This command is intended to be bound to keys that users are not
+allowed to type into the minibuffer.  When the user types any
+such key, this command discard all minibuffer input and displays
+an error message."
+  (interactive)
+  (when (minibufferp)
+(delete-minibuffer-contents)
+(ding)
+(discard-input)
+(minibuffer-message "Wrong answer")
+(sit-for 2)))
+
+(compat-defvar read-char-history nil ;; 

+  "The default history for the `read-char-from-minibuffer' function.")
+
+(compat-defvar read-char-from-minibuffer-map ;; 

+  (let ((map (make-sparse-keymap)))
+(set-keymap-parent map minibuffer-local-map)
+(define-key map [remap self-insert-command] 
#'read-char-from-minibuffer-insert-char)
+(define-key map [remap exit-minibuffer] 
#'read-char-from-minibuffer-insert-other)
+map)
+  "Keymap for the `read-char-from-minibuffer' function.")
+
+(compat-defvar read-char-from-minibuffer-map-hash  ;; 

+  (make-hash-table :test 'equal)
+  "Hash table of keymaps used by `read-char-from-minibuffer'."
+  :constant t)
+
+(compat-defun read-char-from-minibuffer (prompt  chars history) ;; 

+  "Read a character from the minibuffer, prompting for it with PROMPT.
+Like `read-char', but uses the minibuffer to read and return a character.
+Optional argument CHARS, if non-nil, should be a list of characters;
+the function will ignore any input that is not one of CHARS.
+Optional argument HISTORY, if non-nil, should be a symbol that
+specifies the history list variable to use for navigating in input
+history using \\`M-p' and \\`M-n', with \\`RET' to select a character from
+history.
+If you bind the variable `help-form' to a non-nil value
+while calling this function, then pressing `help-char'
+causes it to evaluate `help-form' and display the result.
+There is no need to explicitly add `help-char' to CHARS;
+`help-char' is bound automatically to `help-form-show'."
+  (let* ((map (if (consp chars)
+  (or (gethash (list help-form (cons help-char chars))
+   read-char-from-minibuffer-map-hash)
+  (let ((map (make-sparse-keymap))
+(msg help-form))
+(set-keymap-parent map read-char-from-minibuffer-map)
+;; If we have a dynamically bound `help-form'
+;; here, then the `C-h' (i.e., `help-char')
+;; character should output that instead of
+;; being a command char.
+(when help-form
+  (define-key map (vector help-char)
+(lambda ()
+  (interactive)
+  (let ((help-form msg)) ; lexically bound msg
+(help-form-show)
+(dolist (char chars)
+  (define-key map (vector char)
+#'read-char-from-minibuffer-insert-char))
+(define-key map [remap self-insert-command]
+  #'read-char-from-minibuffer-insert-other)
+(puthash (list help-form (cons help-char chars))
+ map read-char-from-minibuffer-map-hash)
+map))
+read-char-from-minibuffer-map))
+ ;; Protect this-command when called from pre-command-hook 

[elpa] externals/compat 625444b2b6 1/5: compat-27: Add file-size-human-readable-iec

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 625444b2b69724c71f6e4563b3d1d20d00c90dfb
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-27: Add file-size-human-readable-iec
---
 NEWS.org| 1 +
 compat-27.el| 4 
 compat-tests.el | 6 +-
 compat.texi | 5 +
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index ed6425d2a2..2e8bdd9386 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -13,6 +13,7 @@
 - compat-27: Add ~make-decoded-time~.
 - compat-27: Add ~minibuffer-history-value~.
 - compat-27: Add ~ring-resize~.
+- compat-27: Add ~file-size-human-readable-iec~.
 - compat-28: Add ~color-dark-p~.
 - compat-28: Add ~directory-files-and-attributes~ with COUNT argument.
 - compat-28: Add ~text-quoting-style~.
diff --git a/compat-27.el b/compat-27.el
index eebd951fb0..de551642b0 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -375,6 +375,10 @@ in all cases, since that is the standard symbol for byte."
   (if (string= prefixed-unit "") "" (or space ""))
   prefixed-unit
 
+(compat-defun file-size-human-readable-iec (size) ;; 

+  "Human-readable string for SIZE bytes, using IEC prefixes."
+  (compat--file-size-human-readable size 'iec " "))
+
 (compat-defun exec-path () ;; 
   "Return list of directories to search programs to run in remote subprocesses.
 The remote host is identified by `default-directory'.  For remote
diff --git a/compat-tests.el b/compat-tests.el
index 58aa635dfa..5684aeb5ba 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1515,6 +1515,10 @@
 (should-equal (file-attribute-collect attrs 'group-id 'user-id) '(g u))
 (should-equal (file-attribute-collect attrs 'size 'inode-number 'type) '(S 
i t
 
+(ert-deftest file-size-human-readable-iec ()
+  (should-equal "1 KiB" (file-size-human-readable-iec 1024))
+  (should-equal "2.1 MiB" (file-size-human-readable-iec 2223456)))
+
 (ert-deftest file-size-human-readable ()
   (should-equal "1000" (compat-call file-size-human-readable 1000))
   (should-equal "1k" (compat-call file-size-human-readable 1024))
@@ -1523,7 +1527,7 @@
   (should-equal "1T" (compat-call file-size-human-readable (expt 1024 4)))
   (should-equal "1k" (compat-call file-size-human-readable 1000 'si))
   (should-equal "1KiB" (compat-call file-size-human-readable 1024 'iec))
-  (should-equal "1KiB" (compat-call file-size-human-readable 1024 'iec))
+  (should-equal "1__KiB" (compat-call file-size-human-readable 1024 'iec "__"))
   (should-equal "1 KiB" (compat-call file-size-human-readable 1024 'iec " "))
   (should-equal "1KiA" (compat-call file-size-human-readable 1024 'iec nil 
"A"))
   (should-equal "1 KiA" (compat-call file-size-human-readable 1024 'iec " " 
"A"))
diff --git a/compat.texi b/compat.texi
index c944df6708..33876d7e62 100644
--- a/compat.texi
+++ b/compat.texi
@@ -1288,6 +1288,11 @@ This function returns non-@code{nil} if @var{mode} is 
derived from any
 of the major modes given by the symbols @var{modes}.
 @end defun
 
+@c based on lisp/files.texi
+@defun file-size-human-readable-iec size
+Human-readable string for @var{size} bytes, using IEC prefixes.
+@end defun
+
 @c based on lispref/files.texi
 @defun make-empty-file filename  parents
 This function creates an empty file named @var{filename}.  As



[elpa] externals/compat 2fbda2a086 2/5: Update news

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 2fbda2a0867e7bc62c35843d7e16418a4d6b3631
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update news
---
 NEWS.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index 2e8bdd9386..2054ca669c 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -9,11 +9,11 @@
 - compat-26: Add ~read-answer~.
 - compat-26: Add ~region-bounds~.
 - compat-27: Add ~date-ordinal-to-time~.
+- compat-27: Add ~file-size-human-readable-iec~.
 - compat-27: Add ~major-mode-suspend~ and ~major-mode-restore~.
 - compat-27: Add ~make-decoded-time~.
 - compat-27: Add ~minibuffer-history-value~.
 - compat-27: Add ~ring-resize~.
-- compat-27: Add ~file-size-human-readable-iec~.
 - compat-28: Add ~color-dark-p~.
 - compat-28: Add ~directory-files-and-attributes~ with COUNT argument.
 - compat-28: Add ~text-quoting-style~.



[elpa] externals/compat 9d8bdef2a5 3/5: compat-macs: Reorder definitions

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 9d8bdef2a55a395e5de6547aecd9d48c6661f39e
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-macs: Reorder definitions
---
 compat-macs.el | 31 +++
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index 40c4f7c740..bfdc5da705 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -39,14 +39,7 @@
   "Assert COND, otherwise fail with ERROR."
   `(unless ,cond (error ,@error)))
 
-(defmacro compat-declare-version (version)
-  "Set the Emacs version that is currently being handled to VERSION."
-  (setq compat--version version)
-  (let ((before (1- (car (version-to-list version)
-(when (and (< 24 before) (< emacs-major-version before))
-  `(require ',(intern (format "compat-%d" before))
-
-(defun compat--format-docstring (type name docstring)
+(defun compat--docstring (type name docstring)
   "Format DOCSTRING for NAME of TYPE.
 Prepend compatibility notice to the actual documentation string."
   (with-temp-buffer
@@ -97,10 +90,9 @@ a plist of predicates for arguments which are passed to FUN."
 (push (plist-get attrs (car preds)) args)
 (setq preds (cddr preds)))
   (setq body (apply fun (nreverse args)))
-  (when body
-(if feature
-`(with-eval-after-load ',feature ,@body)
-  (macroexp-progn body))
+  (if (and feature body)
+  `(with-eval-after-load ',feature ,@body)
+(macroexp-progn body)
 
 (defun compat--guard-defun (type name arglist docstring rest)
   "Define function NAME of TYPE with ARGLIST and DOCSTRING.
@@ -128,7 +120,7 @@ REST are attributes and the function BODY."
  (if (eq type 'macro) 'cl-defmacro 'cl-defun)
(if (eq type 'macro) 'defmacro 'defun))
 ,defname ,arglist
-,(compat--format-docstring type name docstring)
+,(compat--docstring type name docstring)
 ,@body)))
 `(,@(if (eq defname name)
 ;; An additional fboundp check is performed at runtime to make
@@ -185,8 +177,8 @@ under which the definition is generated.
   ;; version.
   `((unless (fboundp ',name)
   (defalias ',name ',def
-,(compat--format-docstring 'function name
-   (get name 'function-documentation)))
+,(compat--docstring 'function name
+(get name 'function-documentation)))
   ,@(when obsolete
   `((make-obsolete ',name ',def ,compat--version
 
@@ -252,7 +244,7 @@ definition is generated.
   `((unless (boundp ',name)
   (,(if constant 'defconst 'defvar)
,name ,initval
-   ,(compat--format-docstring 'variable name docstring))
+   ,(compat--docstring 'variable name docstring))
   ,@(when obsolete
   `((make-obsolete-variable
  ',name ,(if (stringp obsolete) obsolete "No substitute")
@@ -260,5 +252,12 @@ definition is generated.
 ,@(and local `((make-variable-buffer-local ',name)))
 ,@(and (eq local 'permanent) `((put ',name 'permanent-local t)))
 
+(defmacro compat-declare-version (version)
+  "Set the Emacs version that is currently being handled to VERSION."
+  (setq compat--version version)
+  (let ((before (1- (car (version-to-list version)
+(when (and (< 24 before) (< emacs-major-version before))
+  `(require ',(intern (format "compat-%d" before))
+
 (provide 'compat-macs)
 ;;; compat-macs.el ends here



[elpa] externals/compat b69d8c1920 4/5: Shorten docstrings of :explicit definitions

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit b69d8c192032c0570d017ffaf9bd0a94663334d3
Author: Daniel Mendler 
Commit: Daniel Mendler 

Shorten docstrings of :explicit definitions
---
 compat-25.el |  2 +-
 compat-27.el | 19 +++
 compat-28.el | 16 
 3 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/compat-25.el b/compat-25.el
index 8f216e8b16..4fa47b6898 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -42,7 +42,7 @@ usage: (bool-vector  OBJECTS)"
  Defined in fns.c
 
 (compat-defun sort (seq predicate) ;; 
-  "Extend `sort' to sort SEQ as a vector."
+  "Handle vector SEQ."
   :explicit t
   (cond
((listp seq)
diff --git a/compat-27.el b/compat-27.el
index de551642b0..6c88f424ab 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -304,8 +304,7 @@ the minibuffer was activated, and execute the forms."
  Defined in image.el
 
 (compat-defun image--set-property (image property value) ;; 

-  "Set PROPERTY in IMAGE to VALUE.
-Internal use only."
+  "Set PROPERTY in IMAGE to VALUE, internal use only."
   :explicit "26.1"
   :feature image
   (if (null value)
@@ -342,16 +341,7 @@ Internal use only."
   (concat (file-remote-p name) "/:" (file-local-name name)
 
 (compat-defun file-size-human-readable (file-size  flavor space unit) 
;; 
-  "Handle the optional arguments SPACE and UNIT.
-
-Optional third argument SPACE is a string put between the number and unit.
-It defaults to the empty string.  We recommend a single space or
-non-breaking space, unless other constraints prohibit a space in that
-position.
-
-Optional fourth argument UNIT is the unit to use.  It defaults to \"B\"
-when FLAVOR is `iec' and the empty string otherwise.  We recommend \"B\"
-in all cases, since that is the standard symbol for byte."
+  "Handle the optional arguments SPACE and UNIT."
   :explicit t
   (let ((power (if (or (null flavor) (eq flavor 'iec))
1024.0
@@ -394,10 +384,7 @@ the value of the variable `exec-path'."
   exec-path
 
 (compat-defun executable-find (command  remote) ;; 

-  "Search for COMMAND in `exec-path' and return the absolute file name.
-Return nil if COMMAND is not found anywhere in `exec-path'.  If
-REMOTE is non-nil, search on the remote host indicated by
-`default-directory' instead."
+  "Handle optional argument REMOTE."
   :explicit t
   (if (and remote (file-remote-p default-directory))
   (let ((res (locate-file
diff --git a/compat-28.el b/compat-28.el
index e1527e7d92..13685fdc7b 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -111,9 +111,7 @@ inserted before contatenating."
  Defined in characters.c
 
 (compat-defun string-width (string  from to) ;; 

-  "Handle optional arguments FROM and TO.
-Optional arguments FROM and TO specify the substring of STRING to
-consider, and are interpreted as in `substring'."
+  "Handle optional arguments FROM and TO."
   :explicit t
   (let* ((len (length string))
  (from (or from 0))
@@ -125,9 +123,7 @@ consider, and are interpreted as in `substring'."
  Defined in dired.c
 
 (compat-defun directory-files (directory  full match nosort count) ;; 

-  "Handle additional optional argument COUNT.
-If COUNT is non-nil and a natural number, the function will
- return COUNT number of file names (if so many are present)."
+  "Handle additional optional argument COUNT."
   :explicit t
   (let ((files (directory-files directory full match nosort)))
 (when (natnump count)
@@ -135,9 +131,7 @@ If COUNT is non-nil and a natural number, the function will
 files))
 
 (compat-defun directory-files-and-attributes (directory  full match 
nosort id-format count) ;; 
-  "Handle additional optional argument COUNT.
-If COUNT is non-nil and a natural number, the function will
- return COUNT number of file names (if so many are present)."
+  "Handle additional optional argument COUNT."
   :explicit t
   (let ((files (directory-files-and-attributes directory full match nosort 
id-format)))
 (when (natnump count)
@@ -691,9 +685,7 @@ the last form in BODY."
  (set-window-dedicated-p ,window-sym ,window-dedicated-sym)
 
 (compat-defun count-windows ( minibuf all-frames) ;; 

-  "Handle optional argument ALL-FRAMES.
-If ALL-FRAMES is non-nil, count the windows in all frames instead
-just the selected frame."
+  "Handle optional argument ALL-FRAMES."
   :explicit t
   (if all-frames
   (let ((sum 0))



[elpa] externals/compat updated (6d3eba3e87 -> eea73e19ce)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  6d3eba3e87 Improve manual
   new  625444b2b6 compat-27: Add file-size-human-readable-iec
   new  2fbda2a086 Update news
   new  9d8bdef2a5 compat-macs: Reorder definitions
   new  b69d8c1920 Shorten docstrings of :explicit definitions
   new  eea73e19ce Rename :explicit to :extended


Summary of changes:
 NEWS.org|  1 +
 compat-25.el|  4 ++--
 compat-26.el| 12 ++--
 compat-27.el| 45 +-
 compat-28.el| 24 ---
 compat-29.el| 10 +-
 compat-macs.el  | 61 -
 compat-tests.el |  6 +-
 compat.el   | 17 
 compat.texi | 49 -
 10 files changed, 111 insertions(+), 118 deletions(-)



[elpa] externals/compat eea73e19ce 5/5: Rename :explicit to :extended

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit eea73e19cea65b4d309724c13920ba7c184f1ab7
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename :explicit to :extended
---
 compat-25.el   |  2 +-
 compat-26.el   | 12 ++--
 compat-27.el   | 22 +++---
 compat-28.el   |  8 
 compat-29.el   | 10 +-
 compat-macs.el | 30 +++---
 compat.el  | 17 +
 compat.texi| 44 ++--
 8 files changed, 73 insertions(+), 72 deletions(-)

diff --git a/compat-25.el b/compat-25.el
index 4fa47b6898..e710f86452 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -43,7 +43,7 @@ usage: (bool-vector  OBJECTS)"
 
 (compat-defun sort (seq predicate) ;; 
   "Handle vector SEQ."
-  :explicit t
+  :extended t
   (cond
((listp seq)
 (sort seq predicate))
diff --git a/compat-26.el b/compat-26.el
index ce23d9ca80..1a370c20cc 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -51,7 +51,7 @@ SEQUENCE may be a list, a vector, a boolean vector, or a 
string."
 
 (compat-defun line-number-at-pos ( position absolute) ;; 

   "Handle optional argument ABSOLUTE."
-  :explicit t
+  :extended t
   (if absolute
   (save-restriction
 (widen)
@@ -91,7 +91,7 @@ If you just want to check `major-mode', use `derived-mode-p'."
 
 (compat-defun assoc (key alist  testfn) ;; 
   "Handle the optional TESTFN."
-  :explicit t
+  :extended t
   (if testfn
   (catch 'found
 (dolist (ent alist)
@@ -101,7 +101,7 @@ If you just want to check `major-mode', use 
`derived-mode-p'."
 
 (compat-defun alist-get (key alist  default remove testfn) ;; 

   "Handle optional argument TESTFN."
-  :explicit "25.1"
+  :extended "25.1"
   (ignore remove)
   (let ((x (if (not testfn)
(assq key alist)
@@ -142,14 +142,14 @@ If you just want to check `major-mode', use 
`derived-mode-p'."
 
 (compat-defun string-trim-left (string  regexp) ;; 

   "Handle optional argument REGEXP."
-  :explicit t
+  :extended t
   (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string)
   (substring string (match-end 0))
 string))
 
 (compat-defun string-trim-right (string  regexp) ;; 

   "Handle optional argument REGEXP."
-  :explicit t
+  :extended t
   (let ((i (string-match-p
 (concat "\\(?:" (or regexp "[ \t\n\r]+") "\\)\\'")
 string)))
@@ -157,7 +157,7 @@ If you just want to check `major-mode', use 
`derived-mode-p'."
 
 (compat-defun string-trim (string  trim-left trim-right) ;; 

   "Handle optional arguments TRIM-LEFT and TRIM-RIGHT."
-  :explicit t
+  :extended t
   (compat--string-trim-left
(compat--string-trim-right
 string
diff --git a/compat-27.el b/compat-27.el
index 6c88f424ab..233577877d 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -85,7 +85,7 @@ Letter-case is significant, but text properties are ignored."
 
 (compat-defun recenter ( arg redisplay) ;; 
   "Handle optional argument REDISPLAY."
-  :explicit t
+  :extended t
   (recenter arg)
   (when (and redisplay recenter-redisplay)
 (redisplay)))
@@ -94,7 +94,7 @@ Letter-case is significant, but text properties are ignored."
 
 (compat-defun lookup-key (keymap key  accept-default) ;; 

   "Allow for KEYMAP to be a list of keymaps."
-  :explicit t
+  :extended t
   (cond
((keymapp keymap)
 (lookup-key keymap key accept-default))
@@ -130,7 +130,7 @@ NOTE: This function is not as accurate as the actual 
`time-equal-p'."
 
 (compat-defmacro setq-local ( pairs) ;; 
   "Handle multiple assignments."
-  :explicit t
+  :extended t
   (unless (zerop (mod (length pairs) 2))
 (error "PAIRS must have an even number of variable/value members"))
   (let (body)
@@ -211,7 +211,7 @@ return nil."
 
 (compat-defun assoc-delete-all (key alist  test) ;; 

   "Handle optional argument TEST."
-  :explicit "26.2"
+  :extended "26.2"
   (unless test (setq test #'equal))
   (while (and (consp (car alist))
   (funcall test (caar alist) key))
@@ -305,7 +305,7 @@ the minibuffer was activated, and execute the forms."
 
 (compat-defun image--set-property (image property value) ;; 

   "Set PROPERTY in IMAGE to VALUE, internal use only."
-  :explicit "26.1"
+  :extended "26.1"
   :feature image
   (if (null value)
   (while (cdr image)
@@ -328,13 +328,13 @@ the minibuffer was activated, and execute the forms."
 
 (compat-defun file-name-quoted-p (name  top) ;; 

   "Handle optional argument TOP."
-  :explicit "26.1"
+  :extended "26.1"
   (let ((file-name-handler-alist (unless top file-name-handler-alist)))
 (string-prefix-p "/:" (file-local-name name
 
 (compat-defun file-name-quote (name  top) ;; 

   "Handle optional argument TOP."
-  :explicit "26.1"
+  :extended "26.1"
   (let ((file-name-handler-alist (unless top file-name-handler-alist)))
 (if (string-prefix-p "/:" (file-local-name name))
 name
@@ -342,7 +342,7 @@ the minibuffer was activated, and execute the forms."
 
 (compat-defun 

[elpa] externals/compat a1a3fed0c5 2/3: Manual: Remove duplicate

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit a1a3fed0c546a69b882b488f7039f67227eeb399
Author: Daniel Mendler 
Commit: Daniel Mendler 

Manual: Remove duplicate
---
 compat.texi | 13 ++---
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/compat.texi b/compat.texi
index 6a37fe63d6..32cabd161a 100644
--- a/compat.texi
+++ b/compat.texi
@@ -355,13 +355,12 @@ This is useful for creating private files, for example.
 @end defmac
 
 @c copied from lispref/lists.texi
-@defun alist-get key alist  default remove testfn
+@defun alist-get key alist  default remove
 This function is similar to @code{assq}.  It finds the first association
 @w{@code{(@var{key} . @var{value})}} by comparing @var{key} with
 @var{alist} elements, and, if found, returns the @var{value} of that
 association.  If no association is found, the function returns
-@var{default}.  Comparison of @var{key} against @var{alist} elements
-uses the function specified by @var{testfn}, defaulting to @code{eq}.
+@var{default}.
 
 This is a generalized variable (@pxref{Generalized Variables,,,elisp})
 that can be used to change a value with @code{setf}.  When using it to
@@ -1512,14 +1511,6 @@ region instead of the end, though.
 @xref{elisp,,,Property Search}.
 @end defun
 
-@defun text-property-search-backward prop  value predicate not-current
-This is just like @code{text-property-search-forward}, but searches
-backward instead.  Point is placed at the beginning of the matched
-region instead of the end, though.
-
-@xref{elisp,,,Property Search}.
-@end defun
-
 @subsection Missing Definitions
 Compat does not provide support for the following Lisp features
 implemented in 27.1:



[elpa] externals/compat e53184c187 1/3: compat-macs: Strict checking of :explicit

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit e53184c187631dcd2e784dbd4db541c63f028832
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-macs: Strict checking of :explicit
---
 compat-26.el| 16 +---
 compat-27.el| 18 --
 compat-macs.el  | 12 
 compat-tests.el |  6 --
 4 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index a06229d573..ce23d9ca80 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -101,7 +101,7 @@ If you just want to check `major-mode', use 
`derived-mode-p'."
 
 (compat-defun alist-get (key alist  default remove testfn) ;; 

   "Handle optional argument TESTFN."
-  :explicit t
+  :explicit "25.1"
   (ignore remove)
   (let ((x (if (not testfn)
(assq key alist)
@@ -358,20 +358,6 @@ The returned file name can be used directly as argument of
 `process-file', `start-file-process', or `shell-command'."
   (or (file-remote-p file 'localname) file))
 
-(compat-defun file-name-quoted-p (name  top) ;; 

-  "Handle optional argument TOP."
-  :explicit t
-  (let ((file-name-handler-alist (unless top file-name-handler-alist)))
-(string-prefix-p "/:" (file-local-name name
-
-(compat-defun file-name-quote (name  top) ;; 

-  "Handle optional argument TOP."
-  :explicit t
-  (let ((file-name-handler-alist (unless top file-name-handler-alist)))
-(if (string-prefix-p "/:" (file-local-name name))
-name
-  (concat (file-remote-p name) "/:" (file-local-name name)
-
 (compat-defun temporary-file-directory () ;; 

   "The directory for writing temporary files.
 In case of a remote `default-directory', this is a directory for
diff --git a/compat-27.el b/compat-27.el
index ee7f89ec79..eebd951fb0 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -211,7 +211,7 @@ return nil."
 
 (compat-defun assoc-delete-all (key alist  test) ;; 

   "Handle optional argument TEST."
-  :explicit t
+  :explicit "26.2"
   (unless test (setq test #'equal))
   (while (and (consp (car alist))
   (funcall test (caar alist) key))
@@ -306,7 +306,7 @@ the minibuffer was activated, and execute the forms."
 (compat-defun image--set-property (image property value) ;; 

   "Set PROPERTY in IMAGE to VALUE.
 Internal use only."
-  :explicit t
+  :explicit "26.1"
   :feature image
   (if (null value)
   (while (cdr image)
@@ -327,6 +327,20 @@ Internal use only."
 
  Defined in files.el
 
+(compat-defun file-name-quoted-p (name  top) ;; 

+  "Handle optional argument TOP."
+  :explicit "26.1"
+  (let ((file-name-handler-alist (unless top file-name-handler-alist)))
+(string-prefix-p "/:" (file-local-name name
+
+(compat-defun file-name-quote (name  top) ;; 

+  "Handle optional argument TOP."
+  :explicit "26.1"
+  (let ((file-name-handler-alist (unless top file-name-handler-alist)))
+(if (string-prefix-p "/:" (file-local-name name))
+name
+  (concat (file-remote-p name) "/:" (file-local-name name)
+
 (compat-defun file-size-human-readable (file-size  flavor space unit) 
;; 
   "Handle the optional arguments SPACE and UNIT.
 
diff --git a/compat-macs.el b/compat-macs.el
index bf836cd54d..40c4f7c740 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -105,12 +105,14 @@ a plist of predicates for arguments which are passed to 
FUN."
 (defun compat--guard-defun (type name arglist docstring rest)
   "Define function NAME of TYPE with ARGLIST and DOCSTRING.
 REST are attributes and the function BODY."
-  (compat--guard rest `(:explicit booleanp
+  (compat--guard rest `(:explicit ,(lambda (x) (or (booleanp x) 
(version-to-list x)))
 :obsolete ,(lambda (x) (or (booleanp x) (stringp x)))
 :body t)
 (lambda (explicit obsolete body)
-  (compat--strict (or explicit (not (fboundp name)))
-  "Non-explicit %s %s already defined" type name)
+  (when (stringp explicit)
+(setq explicit (version<= explicit emacs-version)))
+  (compat--strict (eq explicit (fboundp name))
+  "Wrong :explicit flag for %s %s" type name)
   ;; Remove unsupported declares.  It might be possible to set these
   ;; properties otherwise.  That should be looked into and implemented
   ;; if it is the case.
@@ -198,7 +200,9 @@ specify the conditions under which the definition is 
generated.
   invocation via `compat-call'.  :explicit should be used for
   functions which extend already existing functions, e.g.,
   functions which changed their calling convention or their
-  behavior.
+  behavior.  The value can also be a version string, which
+  specifies for which Emacs version and newer an explicit
+  definition will be created.
 
 - :obsolete :: Mark the function as obsolete if t, can be a
   string describing the obsoletion.
diff --git a/compat-tests.el b/compat-tests.el
index 74e5beca28..58aa635dfa 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1564,7 +1564,8 @@
   (should-equal 

[elpa] externals/compat updated (5910cb9672 -> 6d3eba3e87)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  5910cb9672 Simplify alist-get compatibility
   new  e53184c187 compat-macs: Strict checking of :explicit
   new  a1a3fed0c5 Manual: Remove duplicate
   new  6d3eba3e87 Improve manual


Summary of changes:
 compat-26.el| 16 +---
 compat-27.el| 18 --
 compat-macs.el  | 12 
 compat-tests.el |  6 --
 compat.texi | 31 ++-
 5 files changed, 43 insertions(+), 40 deletions(-)



[elpa] externals/compat 74250577e6 3/5: Fix file-name-quoted-p and file-name-quote

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 74250577e643779a3afc2fe7be2465833c7fa134
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix file-name-quoted-p and file-name-quote
---
 compat-tests.el | 36 +++--
 compat.texi | 72 +
 2 files changed, 56 insertions(+), 52 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 4e8a0d6f5b..17b59f8a30 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1564,28 +1564,30 @@
   (should-equal ":/bar/foo" (file-local-name "/ssh:::/bar/foo")))
 
 (ert-deftest file-name-quoted-p ()
-  (should-not (compat-call file-name-quoted-p ""))
-  (should (compat-call file-name-quoted-p "/:"))
-  (should-not (compat-call file-name-quoted-p "//:"))
-  (should (compat-call file-name-quoted-p "/::"))
-  (should-not (compat-call file-name-quoted-p "/ssh::"))
-  (should-not (compat-call file-name-quoted-p "/ssh::a"))
-  (should (compat-call file-name-quoted-p "/ssh::/:a"))
+  ;; TODO test TOP argument
+  (should-not (file-name-quoted-p ""))
+  (should (file-name-quoted-p "/:"))
+  (should-not (file-name-quoted-p "//:"))
+  (should (file-name-quoted-p "/::"))
+  (should-not (file-name-quoted-p "/ssh::"))
+  (should-not (file-name-quoted-p "/ssh::a"))
+  (should (file-name-quoted-p "/ssh::/:a"))
   ;; NOTE: These tests fails prior to Emacs 26, because /ssh:foo was a valid
   ;; TRAMP path back then.
   (when (>= emacs-major-version 26)
-(should-not (compat-call file-name-quoted-p "/ssh:/:a"
+(should-not (file-name-quoted-p "/ssh:/:a"
 
 (ert-deftest file-name-quote ()
-  (should-equal "/:" (compat-call file-name-quote ""))
-  (should-equal "/::"(compat-call file-name-quote  ":"))
-  (should-equal "/:/" (compat-call file-name-quote "/"))
-  (should-equal "/:" (compat-call file-name-quote "/:"))
-  (should-equal "/:a" (compat-call file-name-quote "a"))
-  (should-equal "/::a" (compat-call file-name-quote ":a"))
-  (should-equal "/:/a" (compat-call file-name-quote "/a"))
-  (should-equal "/:a" (compat-call file-name-quote "/:a"))
-  (should-equal (concat "/ssh:" (system-name) ":/:a") (compat-call 
file-name-quote "/ssh::a")))
+  ;; TODO test TOP argument
+  (should-equal "/:" (file-name-quote ""))
+  (should-equal "/::"(file-name-quote  ":"))
+  (should-equal "/:/" (file-name-quote "/"))
+  (should-equal "/:" (file-name-quote "/:"))
+  (should-equal "/:a" (file-name-quote "a"))
+  (should-equal "/::a" (file-name-quote ":a"))
+  (should-equal "/:/a" (file-name-quote "/a"))
+  (should-equal "/:a" (file-name-quote "/:a"))
+  (should-equal (concat "/ssh:" (system-name) ":/:a") (file-name-quote 
"/ssh::a")))
 
 (ert-deftest file-name-concat ()
   (should-equal (file-name-concat "foo" "bar") "foo/bar")
diff --git a/compat.texi b/compat.texi
index 1d5a4ffc7f..37e9d5202c 100644
--- a/compat.texi
+++ b/compat.texi
@@ -652,6 +652,41 @@ It should be somewhat more efficient on larger buffers than
 @c according to what we find useful.
 @end defun
 
+@c copied from lispref/files.texi
+@defun file-name-quoted-p name
+This macro returns non-@code{nil}, when @var{name} is quoted with the
+prefix @samp{/:}.  If @var{name} is a remote file name, the local part
+of @var{name} is checked.
+
+@xref{File Name Expansion,,,elisp}.
+@end defun
+
+@c copied from lispref/files.texi
+@defun file-name-quote name
+This macro adds the quotation prefix @samp{/:} to the file @var{name}.
+For a local file @var{name}, it prefixes @var{name} with @samp{/:}.  If
+@var{name} is a remote file name, the local part of @var{name}
+(@pxref{Magic File Names,,,elisp}) is quoted.  If @var{name} is already
+a quoted file name, @var{name} is returned unchanged.
+
+@example
+@group
+(substitute-in-file-name (compat-call file-name-quote "bar/~/foo")) @result{}
+ "/:bar/~/foo"
+@end group
+
+@group
+(substitute-in-file-name (compat-call file-name-quote "/ssh:host:bar/~/foo"))
+ @result{} "/ssh:host:/:bar/~/foo"
+@end group
+@end example
+
+The macro cannot be used to suppress file name handlers from magic file
+names (@pxref{Magic File Names,,,elisp}).
+
+@xref{File Name Expansion,,,elisp}.
+@end defun
+
 @c copied from lispref/files.texi
 @defun make-nearby-temp-file prefix  dir-flag suffix
 This function is similar to @code{make-temp-file}, but it creates a
@@ -922,47 +957,14 @@ The compatibility version handles the optional arguments 
@var{trim-left}
 and @var{trim-right}.
 @end defun
 
-@c copied from lispref/files.texi
-@defun compat-call@ file-name-quoted-p name
-This macro returns non-@code{nil}, when @var{name} is quoted with the
-prefix @samp{/:}.  If @var{name} is a remote file name, the local part
-of @var{name} is checked.
-
-@xref{File Name Expansion,,,elisp}.
-@end defun
-
-@c copied from lispref/files.texi
-@defun compat-call@ file-name-quote name
-This macro adds the quotation prefix @samp{/:} to the file @var{name}.
-For a local file @var{name}, it prefixes @var{name} with @samp{/:}.  If
-@var{name} is a remote 

[elpa] externals/compat 9223dff243 4/5: Improve assoc-delete-all tests

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 9223dff2430165cc74ef10b3b183fee8e478b8b2
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve assoc-delete-all tests
---
 compat-tests.el | 30 +++---
 compat.texi |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 17b59f8a30..74e5beca28 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1116,23 +1116,23 @@
 #'string-match-p)))
 
 (ert-deftest assoc-delete-all ()
-  (should-equal (list) (compat-call assoc-delete-all 0 (list)))
+  (should-equal (list) (assoc-delete-all 0 (list)))
   ;; Test `eq'
-  (should-equal '((1 . one)) (compat-call assoc-delete-all 0 (list (cons 1 
'one
-  (should-equal '((1 . one) a) (compat-call assoc-delete-all 0 (list (cons 1 
'one) 'a)))
-  (should-equal '((1 . one)) (compat-call assoc-delete-all 0 (list (cons 0 
'zero) (cons 1 'one
-  (should-equal '((1 . one)) (compat-call assoc-delete-all 0 (list (cons 0 
'zero) (cons 0 'zero) (cons 1 'one
-  (should-equal '((1 . one)) (compat-call assoc-delete-all 0 (list (cons 0 
'zero) (cons 1 'one) (cons 0 'zero
-  (should-equal '((1 . one) a) (compat-call assoc-delete-all 0 (list (cons 0 
'zero) (cons 1 'one) 'a  (cons 0 'zero
-  (should-equal '(a (1 . one)) (compat-call assoc-delete-all 0 (list 'a (cons 
0 'zero) (cons 1 'one) (cons 0 'zero
+  (should-equal '((1 . one)) (assoc-delete-all 0 (list (cons 1 'one
+  (should-equal '((1 . one) a) (assoc-delete-all 0 (list (cons 1 'one) 'a)))
+  (should-equal '((1 . one)) (assoc-delete-all 0 (list (cons 0 'zero) (cons 1 
'one
+  (should-equal '((1 . one)) (assoc-delete-all 0 (list (cons 0 'zero) (cons 0 
'zero) (cons 1 'one
+  (should-equal '((1 . one)) (assoc-delete-all 0 (list (cons 0 'zero) (cons 1 
'one) (cons 0 'zero
+  (should-equal '((1 . one) a) (assoc-delete-all 0 (list (cons 0 'zero) (cons 
1 'one) 'a  (cons 0 'zero
+  (should-equal '(a (1 . one)) (assoc-delete-all 0 (list 'a (cons 0 'zero) 
(cons 1 'one) (cons 0 'zero
   ;; Test `equal'
-  (should-equal '(("one" . one)) (compat-call assoc-delete-all "zero" (list 
(cons "one" 'one
-  (should-equal '(("one" . one) a) (compat-call assoc-delete-all "zero" (list 
(cons "one" 'one) 'a)))
-  (should-equal '(("one" . one)) (compat-call assoc-delete-all "zero" (list 
(cons "zero" 'zero) (cons "one" 'one
-  (should-equal '(("one" . one)) (compat-call assoc-delete-all "zero" (list 
(cons "zero" 'zero) (cons "zero" 'zero) (cons "one" 'one
-  (should-equal '(("one" . one)) (compat-call assoc-delete-all "zero" (list 
(cons "zero" 'zero) (cons "one" 'one) (cons "zero" 'zero
-  (should-equal '(("one" . one) a) (compat-call assoc-delete-all "zero" (list 
(cons "zero" 'zero) (cons "one" 'one) 'a  (cons "zero" 'zero
-  (should-equal '(a ("one" . one)) (compat-call assoc-delete-all "zero" (list 
'a (cons "zero" 'zero) (cons "one" 'one) (cons "zero" 'zero
+  (should-equal '(("one" . one)) (assoc-delete-all "zero" (list (cons "one" 
'one
+  (should-equal '(("one" . one) a) (assoc-delete-all "zero" (list (cons "one" 
'one) 'a)))
+  (should-equal '(("one" . one)) (assoc-delete-all "zero" (list (cons "zero" 
'zero) (cons "one" 'one
+  (should-equal '(("one" . one)) (assoc-delete-all "zero" (list (cons "zero" 
'zero) (cons "zero" 'zero) (cons "one" 'one
+  (should-equal '(("one" . one)) (assoc-delete-all "zero" (list (cons "zero" 
'zero) (cons "one" 'one) (cons "zero" 'zero
+  (should-equal '(("one" . one) a) (assoc-delete-all "zero" (list (cons "zero" 
'zero) (cons "one" 'one) 'a  (cons "zero" 'zero
+  (should-equal '(a ("one" . one)) (assoc-delete-all "zero" (list 'a (cons 
"zero" 'zero) (cons "one" 'one) (cons "zero" 'zero
   ;; Test custom predicate
   (should-equal '() (compat-call assoc-delete-all 0 (list (cons 1 'one)) #'/=))
   (should-equal '(a) (compat-call assoc-delete-all 0 (list (cons 1 'one) 'a) 
#'/=))
diff --git a/compat.texi b/compat.texi
index 37e9d5202c..6a37fe63d6 100644
--- a/compat.texi
+++ b/compat.texi
@@ -1382,7 +1382,7 @@ unless @var{flavor} is @code{iec}, in which case it will 
be @code{B}.
 @end defun
 
 @c copied from lispref/lists.texi
-@defun compat-call@ assoc-delete-all
+@defun compat-call@ assoc-delete-all key alist  test
 This function is like @code{assq-delete-all} except that it accepts
 an optional argument @var{test}, a predicate function to compare the
 keys in @var{alist}.  If omitted or @code{nil}, @var{test} defaults to



[elpa] externals/compat 690ba439c7 1/5: compat-macs: Add strict checks

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 690ba439c70325aaedc0f87c794ee73c172ba2e2
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-macs: Add strict checks
---
 Makefile   |  2 +-
 compat-macs.el | 26 ++
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 04cf8ea01d..f56bfa4eee 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ $(BYTEC): compat-macs.el
 .el.elc:
@echo "Compiling $<"
@$(EMACS) -Q --batch -L . \
-   --eval '(setq byte-compile-error-on-warn (< emacs-major-version 
30))' \
+   --eval '(setq compat-strict t byte-compile-error-on-warn (< 
emacs-major-version 30))' \
-f batch-byte-compile $<
 
 compat.info: compat.texi
diff --git a/compat-macs.el b/compat-macs.el
index ca5c800214..a68a40840d 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -30,6 +30,15 @@
 (defvar compat--version nil
   "Version of the currently defined compatibility definitions.")
 
+(defmacro compat--strict (cond  error)
+  "Assert strict COND, otherwise fail with ERROR."
+  (when (bound-and-true-p compat-strict)
+`(compat--assert ,cond ,@error)))
+
+(defmacro compat--assert (cond  error)
+  "Assert COND, otherwise fail with ERROR."
+  `(unless ,cond (error ,@error)))
+
 (defmacro compat-declare-version (version)
   "Set the Emacs version that is currently being handled to VERSION."
   (setq compat--version version)
@@ -56,11 +65,10 @@ If this is not documented on yourself system, you can check 
\
 (defun compat--check-attributes (attrs preds)
   "Check ATTRS given PREDS predicate plist and return rest."
   (while (keywordp (car attrs))
-(unless (cdr attrs)
-  (error "Odd number of element in attribute list"))
+(compat--assert (cdr attrs) "Attribute list length is odd")
 (let ((pred (plist-get preds (car attrs
-  (unless (and pred (or (eq pred t) (funcall pred (cadr attrs
-(error "Invalid attribute %s" (car attrs
+  (compat--assert (and pred (or (eq pred t) (funcall pred (cadr attrs
+  "Invalid attribute %s" (car attrs)))
 (setq attrs (cddr attrs)))
   attrs)
 
@@ -77,8 +85,7 @@ a plist of predicates for arguments which are passed to FUN."
  args)
 ;; Require feature at compile time
 (when feature
-  (when (eq feature 'subr-x)
-(error "Feature subr-x must not be specified"))
+  (compat--assert (not (eq feature 'subr-x)) "Invalid feature subr-x")
   (require feature))
 (when (if when
   ;; If a condition is specified, no version check is performed.
@@ -102,6 +109,8 @@ REST are attributes and the function BODY."
 :obsolete ,(lambda (x) (or (booleanp x) (stringp x)))
 :body t)
 (lambda (explicit obsolete body)
+  (compat--strict (or explicit (not (fboundp name)))
+  "Non-explicit %s %s already defined" type name)
   ;; Remove unsupported declares.  It might be possible to set these
   ;; properties otherwise.  That should be looked into and implemented
   ;; if it is the case.
@@ -167,6 +176,7 @@ under which the definition is generated.
   (declare (debug (name symbolp [ keywordp sexp])))
   (compat--guard attrs '(:obsolete booleanp)
 (lambda (obsolete)
+  (compat--strict (not (fboundp name)) "%s already defined" name)
   ;; The fboundp check is performed at runtime to make sure that we never
   ;; redefine an existing definition if Compat is loaded on a newer Emacs
   ;; version.
@@ -229,8 +239,8 @@ definition is generated.
  :local ,(lambda (x) (memq x '(nil t permanent)))
  :obsolete ,(lambda (x) (or (booleanp x) (stringp x
 (lambda (constant local obsolete)
-  (when (and constant local)
-(error ":constant and :local cannot be specified together"))
+  (compat--strict (not (boundp name)) "%s already defined" name)
+  (compat--assert (not (and constant local)) "Both :constant and :local")
   ;; The boundp check is performed at runtime to make sure that we never
   ;; redefine an existing definition if Compat is loaded on a newer Emacs
   ;; version.



[elpa] externals/compat updated (2b69a34a62 -> 5910cb9672)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  2b69a34a62 Drop unneeded tests
   new  690ba439c7 compat-macs: Add strict checks
   new  7d61400bc9 compat-guard: Add strict compile time check
   new  74250577e6 Fix file-name-quoted-p and file-name-quote
   new  9223dff243 Improve assoc-delete-all tests
   new  5910cb9672 Simplify alist-get compatibility


Summary of changes:
 Makefile|  2 +-
 compat-25.el| 10 
 compat-26.el| 38 -
 compat-macs.el  | 27 ++---
 compat-tests.el | 66 +-
 compat.texi | 74 +
 6 files changed, 107 insertions(+), 110 deletions(-)



[elpa] externals/compat 9b984aeb08 2/3: Drop unneeded definitions

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 9b984aeb088901fc8b238a5e52ae343ea1dac527
Author: Daniel Mendler 
Commit: Daniel Mendler 

Drop unneeded definitions
---
 compat-25.el|  4 
 compat-26.el| 16 
 compat-27.el| 55 ---
 compat-28.el|  5 +
 compat-29.el|  3 ---
 compat-tests.el |  2 +-
 compat.texi | 38 --
 7 files changed, 22 insertions(+), 101 deletions(-)

diff --git a/compat-25.el b/compat-25.el
index 8414ada65d..305f94f4db 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -276,9 +276,5 @@ itself or not."
 form
(t form)))
 
- Defined in byte-run.el
-
-(compat-defalias function-put put) ;; 
-
 (provide 'compat-25)
 ;;; compat-25.el ends here
diff --git a/compat-26.el b/compat-26.el
index bdfb6e91dc..ad080f5f84 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -83,6 +83,22 @@ see `region-noncontiguous-p' and `extract-rectangle-bounds'."
 
  Defined in subr.el
 
+(compat-defun provided-mode-derived-p (mode  modes) ;; 

+  "Non-nil if MODE is derived from one of MODES.
+Uses the `derived-mode-parent' property of the symbol to trace backwards.
+If you just want to check `major-mode', use `derived-mode-p'."
+  ;; If MODE is an alias, then look up the real mode function first.
+  (let ((alias (symbol-function mode)))
+(when (and alias (symbolp alias))
+  (setq mode alias)))
+  (while
+  (and
+   (not (memq mode modes))
+   (let* ((parent (get mode 'derived-mode-parent))
+  (parentfn (symbol-function parent)))
+ (setq mode (if (and parentfn (symbolp parentfn)) parentfn parent)
+  mode)
+
 (compat-defun alist-get (key alist  default remove testfn) ;; 

   "Handle optional argument TESTFN."
   :explicit t
diff --git a/compat-27.el b/compat-27.el
index 8c06a5aabb..ee7f89ec79 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -123,40 +123,6 @@ NOTE: This function is not as accurate as the actual 
`time-equal-p'."
 (< (abs (- (float-time t1) (float-time t2)))
(if (and t1 t2) 1e-6 1e-5)
 
- Defined in fileio.c
-
-(compat-defun file-name-absolute-p (filename) ;; 

-  "Return t if FILENAME is an absolute file name.
-On Unix, absolute file names start with `/'.  In Emacs, an absolute
-file name can also start with an initial `~' or `~USER' component,
-where USER is a valid login name."
-  ;; See definitions in filename.h
-  (let ((drive
- (eval-when-compile
-   (cond
-((memq system-type '(windows-nt ms-dos))
- "\\`[A-Za-z]:[\\/]")
-((eq system-type 'cygwin)
- "\\`\\([\\/]\\|[A-Za-z]:\\)")
-("\\`/"
-(home
- (eval-when-compile
-   (if (memq system-type '(cygwin windows-nt ms-dos))
-   "\\`~[\\/]" "\\`~/")))
-(user-home
- (eval-when-compile
-   (format "\\`\\(~.*?\\)\\(%s.*\\)?$"
-   (if (memq system-type '(cygwin windows-nt ms-dos))
-   "[\\/]" "/")
-(or (and (string-match-p drive filename) t)
-(and (string-match-p home filename) t)
-(save-excursion
-  (when (string-match user-home filename)
-(let ((init (match-string 1 filename)))
-  (not (string=
-(file-name-base (expand-file-name init))
-init
-
  Defined in subr.el
 
 (compat-defalias fixnump integerp) ;; 
@@ -177,27 +143,6 @@ where USER is a valid login name."
   body)))
 (cons 'progn (nreverse body
 
-(compat-defun provided-mode-derived-p (mode  modes) ;; 

-  "Non-nil if MODE is derived from one of MODES.
-Uses the `derived-mode-parent' property of the symbol to trace backwards.
-If you just want to check `major-mode', use `derived-mode-p'."
-  ;; If MODE is an alias, then look up the real mode function first.
-  (let ((alias (symbol-function mode)))
-(when (and alias (symbolp alias))
-  (setq mode alias)))
-  (while
-  (and
-   (not (memq mode modes))
-   (let* ((parent (get mode 'derived-mode-parent))
-  (parentfn (symbol-function parent)))
- (setq mode (if (and parentfn (symbolp parentfn)) parentfn parent)
-  mode)
-
-(compat-defun derived-mode-p ( modes) ;; 
-  "Non-nil if the current major mode is derived from one of MODES.
-Uses the `derived-mode-parent' property of the symbol to trace backwards."
-  (apply #'provided-mode-derived-p major-mode modes))
-
 (compat-defmacro ignore-error (condition  body) ;; 

   "Execute BODY; if the error CONDITION occurs, return nil.
 Otherwise, return result of last form in BODY.
diff --git a/compat-28.el b/compat-28.el
index 2c56c786b6..e1527e7d92 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -799,5 +799,10 @@ function will never return nil."
((not text-quoting-style) 'grave)
(t 'curve)))
 
+ Defined in button.el
+
+;; Obsolete Alias since 29

[elpa] externals/compat updated (d1dba3e1a0 -> 2b69a34a62)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  d1dba3e1a0 Update manual
   new  a18351d539 compat-26: Add read-answer
   new  9b984aeb08 Drop unneeded definitions
   new  2b69a34a62 Drop unneeded tests


Summary of changes:
 NEWS.org|   1 +
 compat-25.el|   4 --
 compat-26.el|  16 
 compat-27.el| 111 
 compat-28.el|   5 +++
 compat-29.el|   3 --
 compat-tests.el |  41 ++---
 compat.texi |  83 ++
 8 files changed, 141 insertions(+), 123 deletions(-)



[elpa] externals/compat a18351d539 1/3: compat-26: Add read-answer

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit a18351d539ac85ae31cd71520afff650ee5856b9
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-26: Add read-answer
---
 NEWS.org|  1 +
 compat-27.el| 56 
 compat-tests.el | 19 +++
 compat.texi | 45 +++--
 4 files changed, 119 insertions(+), 2 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index f1d75124ec..ed6425d2a2 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -6,6 +6,7 @@
 - compat-25: Add ~macroexp-parse-body~ and ~macroexp-quote~.
 - compat-25: Add ~region-noncontiguous-p~.
 - compat-25: Add ~save-mark-and-excursion~.
+- compat-26: Add ~read-answer~.
 - compat-26: Add ~region-bounds~.
 - compat-27: Add ~date-ordinal-to-time~.
 - compat-27: Add ~major-mode-suspend~ and ~major-mode-restore~.
diff --git a/compat-27.el b/compat-27.el
index 0fad7943a7..8c06a5aabb 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -775,5 +775,61 @@ discarded."
 (aset new-vec j (aref old-vec (mod (+ copy-hd j) old-size
   (setcar ring 0))
 
+ Defined in map-ynp.el
+
+(compat-declare-version "26.2")
+
+(compat-defvar read-answer-short 'auto ;; 
+  "If non-nil, the `read-answer' function accepts single-character answers.
+If t, accept short (single key-press) answers to the question.
+If nil, require long answers.  If `auto', accept short answers if
+`use-short-answers' is non-nil, or the function cell of `yes-or-no-p'
+is set to `y-or-n-p'.
+
+Note that this variable does not affect calls to the more
+commonly-used `yes-or-no-p' function; it only affects calls to
+the `read-answer' function.  To control whether `yes-or-no-p'
+requires a long or a short answer, see the `use-short-answers'
+variable.")
+
+(compat-defun read-answer (question answers) ;; 
+  "Read an answer either as a complete word or its character abbreviation.
+Ask user a question and accept an answer from the list of possible answers.
+
+QUESTION should end in a space; this function adds a list of answers to it.
+
+ANSWERS is an alist with elements in the following format:
+  (LONG-ANSWER SHORT-ANSWER HELP-MESSAGE)
+where
+  LONG-ANSWER is a complete answer,
+  SHORT-ANSWER is an abbreviated one-character answer,
+  HELP-MESSAGE is a string describing the meaning of the answer.
+
+SHORT-ANSWER is not necessarily a single character answer.  It can be
+also a function key like F1, a character event such as C-M-h, or
+a control character like C-h.
+
+Example:
+  \\='((\"yes\"  ?y \"perform the action\")
+(\"no\"   ?n \"skip to the next\")
+(\"all\"  ?! \"accept all remaining without more questions\")
+(\"help\" ?h \"show help\")
+(\"quit\" ?q \"exit\"))
+
+When `read-answer-short' is non-nil, accept short answers.
+
+Return a long answer even in case of accepting short ones.
+
+When `use-dialog-box' is t, pop up a dialog window to get user input."
+  ;; NOTE: For simplicity we provide a primitive implementation based on
+  ;; `read-multiple-choice', which does neither support long answers nor the 
the
+  ;; gui dialog box.
+  (cadr (read-multiple-choice
+ (string-trim-right question)
+ (delq nil
+   (mapcar (lambda (x) (unless (equal "help" (car x))
+ (list (cadr x) (car x) (caddr x
+   answers)
+
 (provide 'compat-27)
 ;;; compat-27.el ends here
diff --git a/compat-tests.el b/compat-tests.el
index bb22dbc0ad..431a7ffcc8 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -325,6 +325,25 @@
 (setf (image-property image :width) nil)
 (should-equal image '(image
 
+(ert-deftest read-answer ()
+  (let ((orig-re (symbol-function #'read-event))
+(orig-rc (symbol-function #'read-char))
+(orig-rm (symbol-function #'read-from-minibuffer)))
+(unwind-protect
+(dolist (test '(("Choose "
+ ("first" ?a "first description")
+ ("second" ?b "second description")
+ ("third" ?c))
+("Do it? " ("yes" ?y) ("no" ?n
+  (dolist (choice (cdr test))
+(fset #'read-char (lambda ( _) (cadr choice)))
+(fset #'read-event (lambda ( _) (cadr choice)))
+(fset #'read-from-minibuffer (lambda ( _) (car choice)))
+(should-equal (car choice) (read-answer (car test) (cdr test)
+  (fset #'read-event orig-re)
+  (fset #'read-char orig-rc)
+  (fset #'read-from-minibuffer orig-rm
+
 (ert-deftest read-multiple-choice ()
   (let ((orig-re (symbol-function #'read-event))
 (orig-rc (symbol-function #'read-char))
diff --git a/compat.texi b/compat.texi
index 04b8d25788..60528cc3e5 100644
--- a/compat.texi
+++ b/compat.texi
@@ -556,6 +556,49 @@ The following functions and macros are implemented in Emacs
 26.1. These functions are made available by Compat on Emacs versions
 older than 26.1.
 
+@c 

[elpa] externals/compat d1dba3e1a0: Update manual

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit d1dba3e1a0690286de0f7b9dfa106eb6cfdf183d
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update manual
---
 compat.texi | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/compat.texi b/compat.texi
index 61a164ebfd..04b8d25788 100644
--- a/compat.texi
+++ b/compat.texi
@@ -197,10 +197,11 @@ of Compat and for technical reasons.  These might include:
 
 @itemize
 @item
-The additional functionality is a user-facing mode or command.  Compat
-is limited to functionality on the ``library level''.  Generally
-functions provided by Compat are non-interactive, such that the user
-interface (M-x) is unaffected by the presence of Compat.
+The additional functionality is a command or a user-facing minor or
+major mode.  Compat is limited to functionality on the ``library
+level''.  Generally functions provided by Compat are non-interactive,
+such that the user interface (M-x) is unaffected by the presence of
+Compat.
 
 @item
 An existing function or macro was extended by some new functionality.
@@ -919,6 +920,8 @@ implemented in 26.1:
 
 @itemize
 @item
+The function @code{read-answer}.
+@item
 The function @code{func-arity}.
 @item
 The function @code{secure-hash-algorithms}.
@@ -1501,8 +1504,6 @@ The macro @code{benchmark-progn}.
 @item
 The function @code{read-char-from-minibuffer}.
 @item
-The minor mode @code{reveal-mode}.
-@item
 The macro @code{with-suppressed-warnings}.
 @item
 Support for @code{condition-case} to handle t.



[elpa] externals/compat 2332c30c3d 3/4: Update manual

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 2332c30c3d4f3f37ecf8aba4f5446cb8dd7d4dae
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update manual
---
 compat.texi | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/compat.texi b/compat.texi
index 4391294694..61a164ebfd 100644
--- a/compat.texi
+++ b/compat.texi
@@ -161,6 +161,14 @@ This macro returns the compatibility function symbol for 
FUN.  See
 compatibility functions.
 @end defmac
 
+This design has been chosen since Compat does not advise or override
+existing functions.  Generally Compat is written in defensive style
+which is supposed to reduce potential breakage, and to increase the
+chances of staying binary compatible across releases.  The extensive
+test coverage ensures that we can maintain high quality, which is
+crucial for Compat which is not restricted to a namespace like usual
+libraries.
+
 If you intend to use a compatibility function in your code it is
 recommended that you take a look at the test suite
 @file{compat-tests.el}.  There you can see the supported calling
@@ -198,7 +206,7 @@ interface (M-x) is unaffected by the presence of Compat.
 An existing function or macro was extended by some new functionality.
 To support these cases, the function or macro would have to be
 advised. Since this is invasive and adds significant overhead, even
-when the new feature is not used, Compat does not use advices. As a
+when the new feature is not used, Compat does not use advices.  As a
 compromise, compatibility functions and macros with a changed calling
 convention or behavior can be accessed via the @code{compat-function}
 and @code{compat-call} macros.



[elpa] externals/compat f663fdbdb2 2/4: Add missing test marker, update manual

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit f663fdbdb268cdc91bb0b490fdf5fc432b30009f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add missing test marker, update manual
---
 compat-29.el | 2 +-
 compat.texi  | 9 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/compat-29.el b/compat-29.el
index ed9e3f936c..2ad2dca448 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -171,7 +171,7 @@ This function does not move point.  Also see 
`line-end-position'."
 
  Defined in subr.el
 
-(compat-defun readablep (object)
+(compat-defun readablep (object) ;; 
   "Say whether OBJECT has a readable syntax.
 This means that OBJECT can be printed out and then read back
 again by the Lisp reader.  This function returns nil if OBJECT is
diff --git a/compat.texi b/compat.texi
index 95b92a1042..4391294694 100644
--- a/compat.texi
+++ b/compat.texi
@@ -163,15 +163,16 @@ compatibility functions.
 
 If you intend to use a compatibility function in your code it is
 recommended that you take a look at the test suite
-@file{compat-tests.el}. There you can see the supported calling
+@file{compat-tests.el}.  There you can see the supported calling
 conventions, which are guaranteed to work on the supported Emacs
-versions. We ensure this using continuous integration. All functions
-provided by Compat are covered by the test suite.
+versions. We ensure this using continuous integration.  All functions
+provided by Compat are covered by the test suite.  There is a link to
+the corresponding test on the first line of each definition.
 
 You may want to subscribe to the
 @uref{https://lists.sr.ht/~pkal/compat-announce, compat-announce}
 mailing list to be notified when new versions are released or relevant
-changes are made. We also provide a
+changes are made.  We also provide a
 @uref{https://lists.sr.ht/~pkal/compat-devel, development mailing
 list} (@email{~pkal/compat-devel@@lists.sr.ht,
 ~pkal/compat-devel@@lists.sr.ht}).



[elpa] externals/compat updated (2f3813bf78 -> f040277c38)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  2f3813bf78 compat-27: Add major-mode-suspend and major-mode-restore
   new  6254608c2e compat-macs: Improve error checking
   new  f663fdbdb2 Add missing test marker, update manual
   new  2332c30c3d Update manual
   new  f040277c38 Improve commentary


Summary of changes:
 compat-25.el|  5 ++---
 compat-26.el|  5 ++---
 compat-27.el|  5 ++---
 compat-28.el|  5 ++---
 compat-29.el|  7 +++---
 compat-macs.el  | 67 +++--
 compat-tests.el | 10 ++---
 compat.el   |  7 +++---
 compat.texi | 19 +++-
 9 files changed, 72 insertions(+), 58 deletions(-)



[elpa] externals/compat f040277c38 4/4: Improve commentary

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit f040277c38adec0b7c0c712c53e427d64b2a1537
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve commentary
---
 compat-25.el | 5 ++---
 compat-26.el | 5 ++---
 compat-27.el | 5 ++---
 compat-28.el | 5 ++---
 compat-29.el | 5 ++---
 compat.el| 7 ---
 6 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/compat-25.el b/compat-25.el
index 6186ace9dc..8414ada65d 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -1,4 +1,4 @@
-;;; compat-25.el --- Compatibility Layer for Emacs 25.1  -*- lexical-binding: 
t; -*-
+;;; compat-25.el --- Functionality added in Emacs 25.1 -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
 
@@ -17,8 +17,7 @@
 
 ;;; Commentary:
 
-;; Find here the functionality added in Emacs 25.1, needed by older
-;; versions.
+;; Functionality added in Emacs 25.1, needed by older Emacs versions.
 
 ;;; Code:
 
diff --git a/compat-26.el b/compat-26.el
index 4340113dab..bdfb6e91dc 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -1,4 +1,4 @@
-;;; compat-26.el --- Compatibility Layer for Emacs 26.1  -*- lexical-binding: 
t; -*-
+;;; compat-26.el --- Functionality added in Emacs 26.1 -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
 
@@ -17,8 +17,7 @@
 
 ;;; Commentary:
 
-;; Find here the functionality added in Emacs 26.1, needed by older
-;; versions.
+;; Functionality added in Emacs 26.1, needed by older Emacs versions.
 
 ;;; Code:
 
diff --git a/compat-27.el b/compat-27.el
index 6f940ce9ac..0fad7943a7 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -1,4 +1,4 @@
-;;; compat-27.el --- Compatibility Layer for Emacs 27.1  -*- lexical-binding: 
t; -*-
+;;; compat-27.el --- Functionality added in Emacs 27.1 -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
 
@@ -17,8 +17,7 @@
 
 ;;; Commentary:
 
-;; Find here the functionality added in Emacs 27.1, needed by older
-;; versions.
+;; Functionality added in Emacs 27.1, needed by older Emacs versions.
 
 ;;; Code:
 
diff --git a/compat-28.el b/compat-28.el
index 7dcb4ed374..2c56c786b6 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -1,4 +1,4 @@
-;;; compat-28.el --- Compatibility Layer for Emacs 28.1  -*- lexical-binding: 
t; -*-
+;;; compat-28.el --- Functionality added in Emacs 28.1 -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
 
@@ -17,8 +17,7 @@
 
 ;;; Commentary:
 
-;; Find here the functionality added in Emacs 28.1, needed by older
-;; versions.
+;; Functionality added in Emacs 28.1, needed by older Emacs versions.
 
 ;;; Code:
 
diff --git a/compat-29.el b/compat-29.el
index 2ad2dca448..1988df636f 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -1,4 +1,4 @@
-;;; compat-29.el --- Compatibility Layer for Emacs 29.1  -*- lexical-binding: 
t; -*-
+;;; compat-29.el --- Functionality added in Emacs 29.1 -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
 
@@ -17,8 +17,7 @@
 
 ;;; Commentary:
 
-;; Find here the functionality added in Emacs 29.1, needed by older
-;; versions.
+;; Functionality added in Emacs 29.1, needed by older Emacs versions.
 
 ;;; Code:
 
diff --git a/compat.el b/compat.el
index 730604c870..bc573b5ebf 100644
--- a/compat.el
+++ b/compat.el
@@ -36,9 +36,10 @@
 ;; Not every function provided in newer versions of Emacs is provided
 ;; here.  Some depend on new features from the core, others cannot be
 ;; implemented to a meaningful degree.  Please consult the Compat
-;; manual for details.  The main audience for this library are not
-;; regular users, but package maintainers.  Therefore commands and
-;; user options are usually not implemented here.
+;; manual for details regarding the usage of the Compat library and
+;; the provided functionality.  The main audience for this library are
+;; not regular users, but package maintainers.  Therefore no commands,
+;; user-facing modes or user options are implemented here.
 
 ;;; Code:
 



[elpa] externals/compat 6254608c2e 1/4: compat-macs: Improve error checking

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 6254608c2e2da008deab6aabf69b23e66fb52433
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-macs: Improve error checking
---
 compat-29.el|  2 +-
 compat-macs.el  | 67 +++--
 compat-tests.el | 10 ++---
 3 files changed, 44 insertions(+), 35 deletions(-)

diff --git a/compat-29.el b/compat-29.el
index 495ede7e90..ed9e3f936c 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -171,7 +171,7 @@ This function does not move point.  Also see 
`line-end-position'."
 
  Defined in subr.el
 
-(defun readablep (object)
+(compat-defun readablep (object)
   "Say whether OBJECT has a readable syntax.
 This means that OBJECT can be printed out and then read back
 again by the Lisp reader.  This function returns nil if OBJECT is
diff --git a/compat-macs.el b/compat-macs.el
index addef5ecd1..ca5c800214 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -53,25 +53,28 @@ If this is not documented on yourself system, you can check 
\
   (fill-region (point-min) (point-max)))
 (buffer-string)))
 
-(defun compat--check-attributes (attrs allowed)
-  "Check ATTRS for ALLOWED keys and return rest."
+(defun compat--check-attributes (attrs preds)
+  "Check ATTRS given PREDS predicate plist and return rest."
   (while (keywordp (car attrs))
-(unless (memq (car attrs) allowed)
-  (error "Invalid attribute %s" (car attrs)))
 (unless (cdr attrs)
   (error "Odd number of element in attribute list"))
+(let ((pred (plist-get preds (car attrs
+  (unless (and pred (or (eq pred t) (funcall pred (cadr attrs
+(error "Invalid attribute %s" (car attrs
 (setq attrs (cddr attrs)))
   attrs)
 
-(defun compat--guard (attrs args fun)
+(defun compat--guard (attrs preds fun)
   "Guard compatibility definition generation.
-The version constraints specified by ATTRS are checked.
-ARGS is a list of keywords which are looked up and passed to FUN."
+The version constraints specified by ATTRS are checked.  PREDS is
+a plist of predicates for arguments which are passed to FUN."
   (declare (indent 2))
-  (let* ((body (compat--check-attributes attrs `(,@args :when :feature)))
+  (let* ((body (compat--check-attributes
+attrs `(,@preds :when t :feature symbolp)))
  (feature (plist-get attrs :feature))
  (attrs `(:body ,body ,@attrs))
- (when (plist-get attrs :when)))
+ (when (plist-get attrs :when))
+ args)
 ;; Require feature at compile time
 (when feature
   (when (eq feature 'subr-x)
@@ -83,7 +86,10 @@ ARGS is a list of keywords which are looked up and passed to 
FUN."
 ;; The current Emacs must be older than the current declared Compat
 ;; version, see `compat-declare-version'.
 (version< emacs-version compat--version))
-  (setq body (apply fun (mapcar (lambda (x) (plist-get attrs x)) args)))
+  (while preds
+(push (plist-get attrs (car preds)) args)
+(setq preds (cddr preds)))
+  (setq body (apply fun (nreverse args)))
   (when body
 (if feature
 `(with-eval-after-load ',feature ,@body)
@@ -92,7 +98,9 @@ ARGS is a list of keywords which are looked up and passed to 
FUN."
 (defun compat--guard-defun (type name arglist docstring rest)
   "Define function NAME of TYPE with ARGLIST and DOCSTRING.
 REST are attributes and the function BODY."
-  (compat--guard rest '(:explicit :obsolete :body)
+  (compat--guard rest `(:explicit booleanp
+:obsolete ,(lambda (x) (or (booleanp x) (stringp x)))
+:body t)
 (lambda (explicit obsolete body)
   ;; Remove unsupported declares.  It might be possible to set these
   ;; properties otherwise.  That should be looked into and implemented
@@ -142,7 +150,7 @@ definition is generated.
   part of the :when expression."
   (declare (debug ([ keywordp sexp] def-body))
(indent 1))
-  (compat--guard rest '(:body)
+  (compat--guard rest '(:body t)
 (lambda (body)
   (if (eq cond t)
   body
@@ -153,11 +161,11 @@ definition is generated.
 ATTRS is a plist of attributes, which specify the conditions
 under which the definition is generated.
 
-- :obsolete :: Mark the alias as obsolete if non-nil.
+- :obsolete :: Mark the alias as obsolete if t.
 
 - :feature and :when :: See `compat-guard'."
   (declare (debug (name symbolp [ keywordp sexp])))
-  (compat--guard attrs '(:obsolete)
+  (compat--guard attrs '(:obsolete booleanp)
 (lambda (obsolete)
   ;; The fboundp check is performed at runtime to make sure that we never
   ;; redefine an existing definition if Compat is loaded on a newer Emacs
@@ -181,7 +189,7 @@ specify the conditions under which the definition is 
generated.
   functions which changed their calling convention or their
   behavior.
 
-- :obsolete :: Mark the function as obsolete if non-nil, can be a
+- :obsolete :: 

[nongnu] elpa/zig-mode 3cf8ccb551 2/3: Replace obsolete function `point-at-eol` with equivalent.

2023-01-21 Thread ELPA Syncer
branch: elpa/zig-mode
commit 3cf8ccb55156677b77e0cafbafee8f63dcebfd49
Author: David Pathakjee 
Commit: Joachim Schmidt 

Replace obsolete function `point-at-eol` with equivalent.

Emacs 29.1+ emits a warning when code using `point-at-eol` is compiled; see
emacs/master commit b7e867. This is a trivial but safe change to get rid of 
that
warning. `point-at-eol` seems to have been the same thing as 
`line-end-position`
since 1999 (emacs/master commit 475fb2f). I've tested this briefly and the
behavior of `zig-end-of-defun` does seem to be the same with this change.
---
 zig-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zig-mode.el b/zig-mode.el
index 277668174d..064c290953 100644
--- a/zig-mode.el
+++ b/zig-mode.el
@@ -321,7 +321,7 @@ This is written mainly to be used as 
`end-of-defun-function' for Zig."
   (interactive)
 
   ;; Jump over the function parameters and paren-wrapped return, if they exist.
-  (while (re-search-forward "(" (point-at-eol) t)
+  (while (re-search-forward "(" (line-end-position) t)
 (progn
   (backward-char)
   (forward-sexp)))



[nongnu] elpa/zig-mode 9c5e41d6a0 3/3: Remove duplicate test.

2023-01-21 Thread ELPA Syncer
branch: elpa/zig-mode
commit 9c5e41d6a0a8d8e081dd2dc9b57696435eebbc30
Author: David Pathakjee 
Commit: Joachim Schmidt 

Remove duplicate test.

On emacs 29.1 (but not an earlier emacs I tested with), ./run_tests.sh 
crashes
due to this duplicate (`Error: error ("Test ‘test-imenu-enum’ redefined")` 
...).
---
 tests.el | 10 --
 1 file changed, 10 deletions(-)

diff --git a/tests.el b/tests.el
index a24c17ce9a..ef7f8e0b97 100644
--- a/tests.el
+++ b/tests.el
@@ -391,16 +391,6 @@ const FooBarError = enum {};
  "Foo"
  "FooBarError"
 
-(ert-deftest test-imenu-enum ()
-  (test-imenu
-   "
-pub const Foo = enum {};
-const FooBarError = enum {};
-"
-   '(("Enum"
- "Foo"
- "FooBarError"
-
 (ert-deftest test-imenu-all ()
   (test-imenu
"



[nongnu] elpa/zig-mode updated (24f228c950 -> 9c5e41d6a0)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch elpa/zig-mode.

  from  24f228c950 Update README with new install instructions and new CI 
badge
   new  d5b00bc335 CI: add emacs 28.1, 28.2 to testing matrix
   new  3cf8ccb551 Replace obsolete function `point-at-eol` with equivalent.
   new  9c5e41d6a0 Remove duplicate test.


Summary of changes:
 .github/workflows/main.yml |  2 ++
 tests.el   | 10 --
 zig-mode.el|  2 +-
 3 files changed, 3 insertions(+), 11 deletions(-)



[nongnu] elpa/zig-mode d5b00bc335 1/3: CI: add emacs 28.1, 28.2 to testing matrix

2023-01-21 Thread ELPA Syncer
branch: elpa/zig-mode
commit d5b00bc335aec1f1d987cc561446e5dafdb6ad3a
Author: joachimschmidt557 
Commit: Joachim Schmidt 

CI: add emacs 28.1, 28.2 to testing matrix
---
 .github/workflows/main.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d6d13509b2..2b7254a9bf 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -18,6 +18,8 @@ jobs:
   - 26.3
   - 27.1
   - 27.2
+  - 28.1
+  - 28.2
 steps:
 - uses: purcell/setup-emacs@master
   with:



[elpa] externals/compat 2f3813bf78: compat-27: Add major-mode-suspend and major-mode-restore

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 2f3813bf78ec129119b86076e7d43f0a30e4eb39
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-27: Add major-mode-suspend and major-mode-restore
---
 NEWS.org|  1 +
 compat-27.el| 31 +++
 compat-macs.el  |  7 +--
 compat-tests.el | 13 +
 compat.texi | 25 -
 5 files changed, 70 insertions(+), 7 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 0feece8f92..f1d75124ec 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -8,6 +8,7 @@
 - compat-25: Add ~save-mark-and-excursion~.
 - compat-26: Add ~region-bounds~.
 - compat-27: Add ~date-ordinal-to-time~.
+- compat-27: Add ~major-mode-suspend~ and ~major-mode-restore~.
 - compat-27: Add ~make-decoded-time~.
 - compat-27: Add ~minibuffer-history-value~.
 - compat-27: Add ~ring-resize~.
diff --git a/compat-27.el b/compat-27.el
index 01af37dee5..6f940ce9ac 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -280,6 +280,37 @@ return nil."
 (setq tail tail-cdr
   alist)
 
+(compat-defvar major-mode--suspended nil ;; 
+  "Suspended major mode."
+  :local permanent)
+
+(compat-defun major-mode-suspend () ;; 
+  "Exit current major mode, remembering it."
+  (let* ((prev-major-mode (or major-mode--suspended
+  (unless (eq major-mode 'fundamental-mode)
+major-mode
+(kill-all-local-variables)
+(setq-local major-mode--suspended prev-major-mode)))
+
+(compat-defun major-mode-restore ( avoided-modes) ;; 

+  "Restore major mode earlier suspended with `major-mode-suspend'.
+If there was no earlier suspended major mode, then fallback to `normal-mode',
+though trying to avoid AVOIDED-MODES."
+  (if major-mode--suspended
+  (funcall (prog1 major-mode--suspended
+ (kill-local-variable 'major-mode--suspended)))
+(let ((auto-mode-alist
+   (let ((alist (copy-sequence auto-mode-alist)))
+ (dolist (mode avoided-modes)
+   (setq alist (rassq-delete-all mode alist)))
+ alist))
+  (magic-fallback-mode-alist
+   (let ((alist (copy-sequence magic-fallback-mode-alist)))
+ (dolist (mode avoided-modes)
+   (setq alist (rassq-delete-all mode alist)))
+ alist)))
+  (normal-mode
+
  Defined in simple.el
 
 (compat-guard (not (fboundp 'decoded-time-second))
diff --git a/compat-macs.el b/compat-macs.el
index b3edaf6a57..addef5ecd1 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -234,8 +234,11 @@ definition is generated.
   ,@(cond
  ((eq local 'permanent)
   `((put ',name 'permanent-local t)))
- (local
-  `((make-variable-buffer-local ',name)
+ ((eq local t)
+  `((make-variable-buffer-local ',name)))
+ ((not local)
+  nil)
+ (t (error "Invalid value for :local"
 
 (provide 'compat-macs)
 ;;; compat-macs.el ends here
diff --git a/compat-tests.el b/compat-tests.el
index e221f8534f..e98d1fc94a 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -2809,5 +2809,18 @@
 (should-equal 4 (count-sentences (point-min) (point-max)))
 (should-equal 2 (count-sentences 16 50
 
+(ert-deftest major-mode-suspend ()
+  (with-temp-buffer
+(text-mode)
+(should sentence-end-double-space)
+(setq-local sentence-end-double-space nil)
+(major-mode-suspend)
+(should-not line-spacing)
+(prog-mode)
+(should-equal major-mode 'prog-mode)
+(major-mode-restore)
+(should sentence-end-double-space)
+(should-equal major-mode 'text-mode)))
+
 (provide 'compat-tests)
 ;;; compat-tests.el ends here
diff --git a/compat.texi b/compat.texi
index efc88ac306..95b92a1042 100644
--- a/compat.texi
+++ b/compat.texi
@@ -952,6 +952,25 @@ The following functions and macros are implemented in Emacs
 27.1. These functions are made available by Compat on Emacs versions
 older than 27.1.
 
+@c copied from lispref/modes.texi
+@defun major-mode-suspend
+This function works like @code{fundamental-mode}, in that it kills all
+buffer-local variables, but it also records the major mode in effect,
+so that it could subsequently be restored.  This function and
+@code{major-mode-restore} (described next) are useful when you need to
+put a buffer under some specialized mode other than the one Emacs
+chooses for it automatically, but would also like to be able to switch
+back to the original mode later.
+@end defun
+
+@c copied from lispref/modes.texi
+@defun major-mode-restore  avoided-modes
+This function restores the major mode recorded by
+@code{major-mode-suspend}.  If no major mode was recorded, this
+function calls @code{normal-mode}, but tries to force it not to choose
+any modes in @var{avoided-modes}, if that argument is non-@code{nil}.
+@end defun
+
 @c copied from lispref/sequences.texi
 @defun ring-resize ring size
 Set the size of @var{ring} 

[elpa] externals/compat d599e72102 2/3: Sort news

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit d599e721023b2ce4e849fbf488f0c72a979b2678
Author: Daniel Mendler 
Commit: Daniel Mendler 

Sort news
---
 NEWS.org | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index ade97c75a9..92f7a1a4f0 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -4,29 +4,29 @@
 
 - compat-25: Add ~hash-table-empty-p~.
 - compat-25: Add ~macroexp-parse-body~ and ~macroexp-quote~.
-- compat-25: Add ~save-mark-and-excursion~.
 - compat-25: Add ~region-noncontiguous-p~.
+- compat-25: Add ~save-mark-and-excursion~.
 - compat-26: Add ~region-bounds~.
 - compat-27: Add ~date-ordinal-to-time~.
 - compat-27: Add ~make-decoded-time~.
-- compat-27: Add ~ring-resize~.
 - compat-27: Add ~minibuffer-history-value~.
+- compat-27: Add ~ring-resize~.
 - compat-28: Add ~color-dark-p~.
-- compat-28: Add ~with-window-non-dedicated~.
 - compat-28: Add ~directory-files-and-attributes~ with COUNT argument.
 - compat-28: Add ~text-quoting-style~.
+- compat-28: Add ~with-window-non-dedicated~.
+- compat-29: Add ~buffer-local-set-state~ and ~buffer-local-restore-state~.
 - compat-29: Add ~compiled-function-p~.
-- compat-29: Add ~plist-get~ generalized variable.
-- compat-29: Add ~plistp~.
-- compat-29: Add ~list-of-strings-p~.
 - compat-29: Add ~delete-line~.
-- compat-29: Add ~with-narrowing~.
-- compat-29: Add ~buffer-local-set-state~ and ~buffer-local-restore-state~.
-- compat-29: Add ~use-region-beginning~, ~use-region-end~ and 
~use-region-noncontiguous-p~.
 - compat-29: Add ~get-scratch-buffer-create~.
-- compat-29: Add ~substitute-quotes~.
+- compat-29: Add ~list-of-strings-p~.
+- compat-29: Add ~plist-get~ generalized variable.
+- compat-29: Add ~plistp~.
 - compat-29: Add ~read-multiple-choice~ with LONG-FORM argument.
 - compat-29: Add ~readablep~.
+- compat-29: Add ~substitute-quotes~.
+- compat-29: Add ~use-region-beginning~, ~use-region-end~ and 
~use-region-noncontiguous-p~.
+- compat-29: Add ~with-narrowing~.
 
 * Release of "Compat" Version 29.1.2.0
 



[elpa] externals/compat ef2ec232b8 3/3: compat-29: Add count-sentences

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit ef2ec232b8cbaa942ab6bcdd7887fc7cf5ef429a
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-29: Add count-sentences
---
 NEWS.org|  1 +
 compat-29.el| 16 
 compat-tests.el |  6 ++
 compat.texi |  7 +--
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 92f7a1a4f0..0feece8f92 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -17,6 +17,7 @@
 - compat-28: Add ~with-window-non-dedicated~.
 - compat-29: Add ~buffer-local-set-state~ and ~buffer-local-restore-state~.
 - compat-29: Add ~compiled-function-p~.
+- compat-29: Add ~count-sentences~.
 - compat-29: Add ~delete-line~.
 - compat-29: Add ~get-scratch-buffer-create~.
 - compat-29: Add ~list-of-strings-p~.
diff --git a/compat-29.el b/compat-29.el
index 6c85933f7e..495ede7e90 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -1211,5 +1211,21 @@ Also see `buttonize'."
   (when (equal answer (cadr c))
 (throw 'found c)))
 
+ Defined in paragraphs.el
+
+(compat-defun count-sentences (start end) ;; 
+  "Count sentences in current buffer from START to END."
+  (let ((sentences 0)
+(inhibit-field-text-motion t))
+(save-excursion
+  (save-restriction
+(narrow-to-region start end)
+(goto-char (point-min))
+(while (ignore-errors (forward-sentence))
+  (setq sentences (1+ sentences)))
+(when (/= (skip-chars-backward " \t\n") 0)
+  (setq sentences (1- sentences)))
+sentences
+
 (provide 'compat-29)
 ;;; compat-29.el ends here
diff --git a/compat-tests.el b/compat-tests.el
index 5b217f6da2..e221f8534f 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -2803,5 +2803,11 @@
   (should-not (readablep (list (make-marker
   (should-not (readablep (make-marker
 
+(ert-deftest count-sentences ()
+  (with-temp-buffer
+(insert "First sentence.  Second sentence.  Third sentence.  Fourth 
sentence.")
+(should-equal 4 (count-sentences (point-min) (point-max)))
+(should-equal 2 (count-sentences 16 50
+
 (provide 'compat-tests)
 ;;; compat-tests.el ends here
diff --git a/compat.texi b/compat.texi
index da33097d39..efc88ac306 100644
--- a/compat.texi
+++ b/compat.texi
@@ -2101,6 +2101,11 @@ older than 29.1.  Note that due to upstream changes, it 
might happen
 that there will be the need for changes, so use these functions with
 care.
 
+@c based on lisp/textmodes/paragraphs.el
+@defun count-sentences start end
+Count sentences in current buffer from @var{start} to @var{end}.
+@end defun
+
 @c copied from lispref/streams.texi
 @defun readablep object
 This predicate says whether @var{object} has @dfn{readable syntax},
@@ -2838,8 +2843,6 @@ The function @code{imagep}.
 @item
 The function @code{function-documentation}.
 @item
-The function @code{count-sentences}.
-@item
 The command @code{string-edit} and @code{read-string-from-buffer}.
 @item
 The macro @code{with-undo-amalgamate}.



[elpa] externals/consult 4a7167c331: consult-goto-line: Use goto-line-history unconditionally

2023-01-21 Thread ELPA Syncer
branch: externals/consult
commit 4a7167c331d3c0c0d60b1d2d54c840f33e446683
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult-goto-line: Use goto-line-history unconditionally

This works on Emacs older than 28.
---
 consult.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/consult.el b/consult.el
index a3dbef6fd8..ce5dc640b0 100644
--- a/consult.el
+++ b/consult.el
@@ -3465,9 +3465,7 @@ narrowing and the settings `consult-goto-line-numbers' and
   (while (if-let (pos (consult--goto-line-position
(consult--prompt
 :prompt "Go to line: "
-;; goto-line-history is available on Emacs 28
-:history
-(and (boundp 'goto-line-history) 
'goto-line-history)
+:history 'goto-line-history
 :state
 (let ((preview (consult--jump-preview)))
   (lambda (action str)



[elpa] externals/compat updated (7321d20be7 -> ef2ec232b8)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  7321d20be7 compat-29: Add read-multiple-choice with LONG-FORM 
argument
   new  f8ac79f1e0 compat-29: Add readablep
   new  d599e72102 Sort news
   new  ef2ec232b8 compat-29: Add count-sentences


Summary of changes:
 NEWS.org| 22 --
 compat-29.el| 25 +
 compat-tests.el | 12 
 compat.texi | 17 +
 4 files changed, 62 insertions(+), 14 deletions(-)



[elpa] externals/compat f8ac79f1e0 1/3: compat-29: Add readablep

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit f8ac79f1e0a007ed9dcc77f017359b8a376e07cf
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-29: Add readablep
---
 NEWS.org|  1 +
 compat-29.el|  9 +
 compat-tests.el |  6 ++
 compat.texi | 10 --
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index ee51da768f..ade97c75a9 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -26,6 +26,7 @@
 - compat-29: Add ~get-scratch-buffer-create~.
 - compat-29: Add ~substitute-quotes~.
 - compat-29: Add ~read-multiple-choice~ with LONG-FORM argument.
+- compat-29: Add ~readablep~.
 
 * Release of "Compat" Version 29.1.2.0
 
diff --git a/compat-29.el b/compat-29.el
index df39dc6214..6c85933f7e 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -171,6 +171,15 @@ This function does not move point.  Also see 
`line-end-position'."
 
  Defined in subr.el
 
+(defun readablep (object)
+  "Say whether OBJECT has a readable syntax.
+This means that OBJECT can be printed out and then read back
+again by the Lisp reader.  This function returns nil if OBJECT is
+unreadable, and the printed representation (from `prin1') of
+OBJECT if it is readable."
+  (declare (side-effect-free error-free))
+  (ignore-errors (equal object (read (prin1-to-string object)
+
 (compat-defun buffer-local-restore-state (states) ;; 

   "Restore values of buffer-local variables recorded in STATES.
 STATES should be an object returned by `buffer-local-set-state'."
diff --git a/compat-tests.el b/compat-tests.el
index 7aad543243..5b217f6da2 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -2797,5 +2797,11 @@
 (should-equal (substitute-quotes "'") "'")
 (should-equal (substitute-quotes "\\`") "\\`")))
 
+(ert-deftest readablep ()
+  (should (readablep "foo"))
+  (should (readablep '("foo" 1 2.3 (a . b) [x y z] :key)))
+  (should-not (readablep (list (make-marker
+  (should-not (readablep (make-marker
+
 (provide 'compat-tests)
 ;;; compat-tests.el ends here
diff --git a/compat.texi b/compat.texi
index 4a92e6a9c0..da33097d39 100644
--- a/compat.texi
+++ b/compat.texi
@@ -2101,6 +2101,14 @@ older than 29.1.  Note that due to upstream changes, it 
might happen
 that there will be the need for changes, so use these functions with
 care.
 
+@c copied from lispref/streams.texi
+@defun readablep object
+This predicate says whether @var{object} has @dfn{readable syntax},
+i.e., it can be written out and then read back by the Emacs Lisp
+reader.  If it can't, this function returns @code{nil}; if it can,
+this function returns a printed representation (via @code{prin1}).
+@end defun
+
 @c copied from lispref/help.texi
 @defun substitute-quotes string
 This function works like @code{substitute-command-keys}, but only
@@ -2834,8 +2842,6 @@ The function @code{count-sentences}.
 @item
 The command @code{string-edit} and @code{read-string-from-buffer}.
 @item
-The function @code{readablep}.
-@item
 The macro @code{with-undo-amalgamate}.
 @item
 The macro @code{with-delayed-message} and the function



[elpa] externals/compat f74574e3e2 1/2: Minor stylistic improvements

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit f74574e3e289a42e4eac62f8b5e1e66d371e29b4
Author: Daniel Mendler 
Commit: Daniel Mendler 

Minor stylistic improvements
---
 compat-27.el | 11 +--
 compat-28.el |  7 +++
 compat-29.el |  4 ++--
 3 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/compat-27.el b/compat-27.el
index 672a1d0f8e..01af37dee5 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -102,8 +102,8 @@ Letter-case is significant, but text properties are 
ignored."
((listp keymap)
 (catch 'found
   (dolist (map keymap)
-(let ((fn (lookup-key map key accept-default)))
-  (when fn (throw 'found fn))
+(when-let ((fn (lookup-key map key accept-default)))
+  (throw 'found fn)
((signal 'wrong-type-argument (list 'keymapp keymap)
 
  Defined in timefns.c
@@ -322,10 +322,9 @@ that was current when the minibuffer was activated."
 When used in a minibuffer window, select the window selected just before
 the minibuffer was activated, and execute the forms."
   (declare (indent 0) (debug t))
-  `(let ((window (minibuffer-selected-window)))
- (when window
-   (with-selected-window window
- ,@body
+  `(when-let ((window (minibuffer-selected-window)))
+ (with-selected-window window
+   ,@body)))
 
  Defined in image.el
 
diff --git a/compat-28.el b/compat-28.el
index e630e81c8c..7dcb4ed374 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -506,10 +506,9 @@ as the new values of the bound variables in the recursive 
invocation."
 sets))
 (cons 'setq (apply #'nconc (nreverse sets)
  (`(throw ',quit ,expr))
-  (let ((tco-body (funcall tco (macroexpand-all (macroexp-progn body)
-(when tco-body
-  (setq body `((catch ',quit
- (while t (let ,rargs ,@(macroexp-unprogn 
tco-body
+  (when-let ((tco-body (funcall tco (macroexpand-all (macroexp-progn 
body)
+(setq body `((catch ',quit
+   (while t (let ,rargs ,@(macroexp-unprogn tco-body)))
   (let ((expand (macroexpand-all (macroexp-progn body) (list (cons name 
macro)
 (if total-tco
 `(let ,bindings ,expand)
diff --git a/compat-29.el b/compat-29.el
index efba43304e..5d441a93e1 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -550,7 +550,7 @@ the symbol of the calling function, for example."
   (file-attribute-modification-time fileattr
  (sym (concat (symbol-name tag) "@" file))
  (cachedattr (gethash sym file-has-changed-p--hash-table)))
-(when (not (equal attr cachedattr))
+(unless (equal attr cachedattr)
   (puthash sym attr file-has-changed-p--hash-table
 
  Defined in keymap.el
@@ -1068,7 +1068,7 @@ command exists in this specific map, but it doesn't have 
the
   (while defs
 (setq key (pop defs))
 (pop defs)
-(when (not (eq key :menu))
+(unless (eq key :menu)
   (if (member key seen-keys)
   (error "Duplicate definition for key '%s' in keymap '%s'"
  key variable-name)



[elpa] externals/compat 7321d20be7 2/2: compat-29: Add read-multiple-choice with LONG-FORM argument

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 7321d20be7a4ac2f214f149419314c075c239ec8
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-29: Add read-multiple-choice with LONG-FORM argument
---
 NEWS.org|  1 +
 compat-29.el| 19 +++
 compat-tests.el | 11 ---
 3 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 4b3ef8fb8b..ee51da768f 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -25,6 +25,7 @@
 - compat-29: Add ~use-region-beginning~, ~use-region-end~ and 
~use-region-noncontiguous-p~.
 - compat-29: Add ~get-scratch-buffer-create~.
 - compat-29: Add ~substitute-quotes~.
+- compat-29: Add ~read-multiple-choice~ with LONG-FORM argument.
 
 * Release of "Compat" Version 29.1.2.0
 
diff --git a/compat-29.el b/compat-29.el
index 5d441a93e1..df39dc6214 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -1183,5 +1183,24 @@ Also see `buttonize'."
 ;; Obsolete Alias since 29
 (compat-defalias button-buttonize buttonize :obsolete t) ;; 

 
+ Defined in rmc.el
+
+(compat-defun read-multiple-choice  ;; 
+(prompt choices  _help-str _show-help long-form)
+"Handle LONG-FORM argument."
+  :explicit t
+  (if (not long-form)
+  (read-multiple-choice prompt choices)
+(let ((answer
+   (completing-read
+(concat prompt " ("
+(mapconcat #'identity (mapcar #'cadr choices) "/")
+") ")
+(mapcar #'cadr choices) nil t)))
+  (catch 'found
+(dolist (c choices)
+  (when (equal answer (cadr c))
+(throw 'found c)))
+
 (provide 'compat-29)
 ;;; compat-29.el ends here
diff --git a/compat-tests.el b/compat-tests.el
index 92ea3f86e2..7aad543243 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -328,8 +328,7 @@
 (ert-deftest read-multiple-choice ()
   (let ((orig-re (symbol-function #'read-event))
 (orig-rc (symbol-function #'read-char))
-;;(orig-cr completing-read-function)
-)
+(orig-cr completing-read-function))
 (unwind-protect
 (dolist (test '(("Choose"
  (?a "first" "first description")
@@ -339,14 +338,12 @@
   (dolist (choice (cdr test))
 (fset #'read-char (lambda ( _) (car choice)))
 (fset #'read-event (lambda ( _) (car choice)))
-;; TODO long form support
-;;(setq completing-read-function (lambda ( _) (cadr choice)))
-;;(should-equal choice (read-multiple-choice (car test) (cdr test) 
nil nil 'long))
+(setq completing-read-function (lambda ( _) (cadr choice)))
+(should-equal choice (compat-call read-multiple-choice (car test) 
(cdr test) nil nil 'long))
 (should-equal choice (read-multiple-choice (car test) (cdr 
test)
   (fset #'read-event orig-re)
   (fset #'read-char orig-rc)
-  ;;(setq completing-read-function orig-cr)
-  )))
+  (setq completing-read-function orig-cr
 
 (ert-deftest with-environment-variables ()
   (let ((A "COMPAT_TESTS__VAR") (B "/foo/bar"))



[elpa] externals/compat updated (ffb28c7442 -> 7321d20be7)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  ffb28c7442 Update readme
   new  f74574e3e2 Minor stylistic improvements
   new  7321d20be7 compat-29: Add read-multiple-choice with LONG-FORM 
argument


Summary of changes:
 NEWS.org|  1 +
 compat-27.el| 11 +--
 compat-28.el|  7 +++
 compat-29.el| 23 +--
 compat-tests.el | 11 ---
 5 files changed, 34 insertions(+), 19 deletions(-)



[elpa] externals/ada-mode c749149421: More stuff for 8.0.4

2023-01-21 Thread Stephen Leake
branch: externals/ada-mode
commit c74914942100f71dd8e3e76c04c2e4833e614ea9
Author: Stephen Leake 
Commit: Stephen Leake 

More stuff for 8.0.4
---
 build.sh   | 3 ---
 install.sh | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/build.sh b/build.sh
index 2118dc7f22..08b8ce7094 100755
--- a/build.sh
+++ b/build.sh
@@ -14,9 +14,6 @@ if type alr; then
 # alr get --build builds dependencies with release, but top with 
development.
 alr get emacs_ada_mode~8.0.3
 cd emacs_ada_mode_*; alr build --release
-
-# WORKAROUND: this should be in alire_rules.make
-mv ada_annex_p_lr1_parse_table.txt bin
 
 elif type gprbuild; then
 echo "building ada-mode executables via gnat compiler"
diff --git a/install.sh b/install.sh
index 0ff97429d2..8645b48b4a 100755
--- a/install.sh
+++ b/install.sh
@@ -16,6 +16,8 @@ echo "installing ada-mode executables to" $PREFIX/bin
 
 # No need for gprinstall; we only need the executable 
 
+mkdir -p $PREFIX/bin
+
 if type alr; then
 cp emacs_ada_mode*/bin/* $PREFIX/bin
 



[nongnu] elpa/scad-mode e2477ebebc: defgroup: Add library link

2023-01-21 Thread ELPA Syncer
branch: elpa/scad-mode
commit e2477ebebcdd21d8c8394f2dffb551fadbfdff53
Author: Daniel Mendler 
Commit: Daniel Mendler 

defgroup: Add library link
---
 scad-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scad-mode.el b/scad-mode.el
index bfe7b474e4..e2855e28e1 100644
--- a/scad-mode.el
+++ b/scad-mode.el
@@ -42,6 +42,7 @@
 (defgroup scad nil
   "A major mode for editing OpenSCAD code."
   :link '(url-link :tag "Homepage" 
"https://github.com/openscad/emacs-scad-mode;)
+  :link '(emacs-library-link :tag "Library Source" "scad-mode.el")
   :group 'languages
   :prefix "scad-")
 



[elpa] externals/org-modern ff9acfb523: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/org-modern
commit ff9acfb5235bae269cb52a934b3d5e5cdcf2717f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 org-modern.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/org-modern.el b/org-modern.el
index f45a9a91f6..7851120c59 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -39,7 +39,8 @@
 
 (defgroup org-modern nil
   "Modern looks for Org."
-  :link '(url-link "https://github.com/minad/org-modern;)
+  :link '(url-link :tag "Homepage" "https://github.com/minad/org-modern;)
+  :link '(emacs-library-link :tag "Library Source" "org-modern.el")
   :group 'org
   :prefix "org-modern-")
 



[elpa] externals/org 005c9ae747: lisp/org-datetree.el: Allow datetrees with TODO, priority, tags

2023-01-21 Thread ELPA Syncer
branch: externals/org
commit 005c9ae7474e8652a628aee392f1bc377eeb15fa
Author: Ilya Chernyshov 
Commit: Ihor Radchenko 

lisp/org-datetree.el: Allow datetrees with TODO, priority, tags

* org-datetree.el (org-datetree--find-create): Add optional argument
MATCH-TITLE that controls whether to match REGEX-TEMPLATE against
heading title inside complex heading or to match REGEX-TEMPLATE
against the whole heading line.

* org-datetree.el (org-datetree--find-create-group,
org-datetree-find-iso-week-create): Allow finding a datetree with TODO
state, priority, tags, statistics cookies, or COMMENT keyword.

* testing/lisp/test-org-datetree.el
(test-org-datetree/find-date-create,
test-org-datetree/find-iso-week-create): Add tests for a datetree with
tags, TODO or priority keywords.

* etc/ORG-NEWS (Datetree structure headlines can now be complex):
Document the change.

* doc/org-manual.org: Update datetree definition.
---
 doc/org-manual.org|  3 ++-
 etc/ORG-NEWS  |  6 +
 lisp/org-datetree.el  | 57 +--
 testing/lisp/test-org-datetree.el | 16 +++
 4 files changed, 61 insertions(+), 21 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 5217e647d0..ce32f77408 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -22510,7 +22510,8 @@ level.
 ,*** 2022-10-08 Saturday
 #+end_example
 
-Tags are allowed in the tree structure.
+TODO state, priority, tags, statistics cookies, and COMMENT keywords
+are allowed in the tree structure.
 
 [fn:31] This is always the other, not the user.  See the variable
 ~org-link-from-user-regexp~.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 613b324088..3ef76ec1ab 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -60,6 +60,12 @@ The face ~org-agenda-calendar-daterange~ is used to show 
entries with
 a date range in the agenda.  It inherits from the default face in
 order to remain backward-compatible.
 
+** New features
+*** Datetree structure headlines can now be complex
+
+TODO state, priority, tags, statistics cookies, and COMMENT keywords
+are allowed in the tree structure.
+
 * Version 9.6
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index 035ef047a9..8a617e90cf 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -99,16 +99,15 @@ If time-period is month, then group entries by month."
  (month (calendar-extract-month d))
  (day (calendar-extract-day d)))
   (org-datetree--find-create
-   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
-\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
-   year)
+   "\\([12][0-9]\\{3\\}\\)"
+   year nil nil nil t)
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-\\([01][0-9]\\) \\w+$"
-   year month)
+   "%d-\\([01][0-9]\\) \\w+"
+   year month nil nil t)
   (when (eq time-grouping 'day)
(org-datetree--find-create
-"^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
-year month day)
+ "%d-%02d-\\([0123][0-9]\\) \\w+"
+year month day nil t)
 
 ;;;###autoload
 (defun org-datetree-find-iso-week-create (d  keep-restriction)
@@ -147,33 +146,51 @@ will be built under the headline at point."
   (week (nth 0 iso-date)))
   ;; ISO 8601 week format is %G-W%V(-%u)
   (org-datetree--find-create
-   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
-\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
-   weekyear nil nil
-   (format-time-string "%G" time))
+   "\\([12][0-9]\\{3\\}\\)"
+   weekyear nil nil (format-time-string "%G" time) t)
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-W\\([0-5][0-9]\\)$"
-   weekyear week nil
-   (format-time-string "%G-W%V" time))
+   "%d-W\\([0-5][0-9]\\)"
+   weekyear week nil (format-time-string "%G-W%V" time) t)
   ;; For the actual day we use the regular date instead of ISO week.
   (org-datetree--find-create
-   "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
-   year month day
+   "%d-%02d-\\([0123][0-9]\\) \\w+" year month day nil t
 
 (defun org-datetree--find-create
-(regex-template year  month day insert)
+(regex-template year  month day insert match-title)
   "Find the datetree matched by REGEX-TEMPLATE for YEAR, MONTH, or DAY.
 REGEX-TEMPLATE is passed to `format' with YEAR, MONTH, and DAY as
-arguments.  Match group 1 is compared against the specified date
+arguments.
+
+If MATCH-TITLE is non-nil, REGEX-TEMPLATE is matched against
+heading title and the exact regexp matched against heading line is:
+
+  (format org-complex-heading-regexp-format
+  (format regex-template year month day))
+
+If MATCH-TITLE is nil, the regexp matched against heading line is
+REGEX-TEMPLATE:
+
+  (format regex-template year month day)
+
+Match group 1 in REGEX-TEMPLATE is compared against the 

[elpa] externals/marginalia 2758f88db6: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/marginalia
commit 2758f88db6baa6a2410ec4abb193d4dd5ba61773
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 marginalia.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index 6bf93b1bc8..0fdd6d9557 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -39,9 +39,11 @@
 
 (defgroup marginalia nil
   "Enrich existing commands with completion annotations."
-  :link '(url-link "https://github.com/minad/marginalia;)
-  :link '(info-link "(marginalia)")
-  :group 'convenience
+  :link '(info-link :tag "Info Manual" "(marginalia)")
+  :link '(url-link :tag "Homepage" "https://github.com/minad/marginalia;)
+  :link '(emacs-library-link :tag "Library Source" "marginalia.el")
+  :group 'help
+  :group 'docs
   :group 'minibuffer
   :prefix "marginalia-")
 



[elpa] externals/consult 9c93e4b22b: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/consult
commit 9c93e4b22b1bc5a86d7fa2dd299266e2716395c0
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 consult.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/consult.el b/consult.el
index 9549162eb1..a3dbef6fd8 100644
--- a/consult.el
+++ b/consult.el
@@ -60,9 +60,11 @@
 
 (defgroup consult nil
   "Consulting `completing-read'."
-  :link '(url-link "https://github.com/minad/consult;)
-  :link '(info-link "(consult)")
-  :group 'convenience
+  :link '(info-link :tag "Info Manual" "(consult)")
+  :link '(url-link :tag "Homepage" "https://github.com/minad/consult;)
+  :link '(emacs-library-link :tag "Library Source" "consult.el")
+  :group 'files
+  :group 'outlines
   :group 'minibuffer
   :prefix "consult-")
 



[elpa] externals/compat 6c7a7e6067 1/5: Improve manual

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 6c7a7e6067ba94c2b539380a0167ed8e8e350b4f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve manual
---
 compat.texi | 137 
 1 file changed, 73 insertions(+), 64 deletions(-)

diff --git a/compat.texi b/compat.texi
index 9839a28f09..0c3fa512d8 100644
--- a/compat.texi
+++ b/compat.texi
@@ -92,27 +92,19 @@ Support
 
 The objective of Compat is to provide "forwards compatibility" library
 for Emacs Lisp.  That is to say by using Compat, an Elisp package does
-not have to make the decision to either use new and useful functionality
-or support old versions of Emacs.
+not have to make the decision to either use new and useful
+functionality or support old versions of Emacs.
 
 Version 24.4 is chosen as the oldest version we can support, since
-Elisp has seen significant semantic changes at that version.  On the
-library level subr-x was introduced in 24.4.  Most popular Emacs
-packages and new developments which could potentially benefit from
-Compat already require 24.4 or even newer versions of Emacs.  The long
-time support release CentOS 7, which still distributes Emacs 24.3,
-reaches end of life soon in the beginning of 2024.
-
-Note that Compat provides functions with extended functionality for
-commands that are already defined (@code{sort}, @code{assoc},
-@dots{}).  These functions must be looked up explicitly with
-@code{compat-function} or called explicitly with @code{compat-call}.
+Elisp has seen significant changes at that version.  On the library
+level subr-x was introduced in 24.4.  Most popular Emacs packages
+already require 24.4 or even newer versions of Emacs.
 
 @node Usage
 @section Usage
 
-The intended use-case for this library is for package developers to add
-as a dependency in the header:
+The intended use-case for this library is for package developers to
+add as a dependency in the header:
 
 @example
 ;; Package-Requires: ((emacs "24.4") (compat "29.1.2.0"))
@@ -120,7 +112,7 @@ as a dependency in the header:
 
 There is no need to depend on @code{emacs} 24.4 specifically.  One can
 choose to any newer version, if features not provided by Compat
-necessitate it.
+necessitate it, for example bug fixes or UI improvements.
 
 In any file where compatibility forms are used, a
 
@@ -138,10 +130,15 @@ the noerror flag should be specified.
 This will load all implicit and explicit Compat definitions.  Note
 that if Compat is installed on a recent version of Emacs, all of the
 definitions are disabled at compile time, such that no negative
-performance impact is incurred.  Functions and macros where the
-calling convention or behavior has changed can be accessed explicitly
-via @code{compat-function} and @code{compat-call}.  We call these
-definitions ``Explicit Definitions''.  In contrast, ``Implicit
+performance impact is incurred.
+
+Note that Compat provides replacement functions with extended
+functionality for functions that are already defined (@code{sort},
+@code{assoc}, @dots{}).  These functions may have changed their
+calling convention (additional optional arguments) or may have changed
+their behavior.  These functions must be looked up explicitly with
+@code{compat-function} or called explicitly with @code{compat-call}.
+We call them ``Explicit Definitions''.  In contrast, ``Implicit
 Definitions'' can be called as usual.
 
 @example
@@ -153,7 +150,7 @@ Definitions'' can be called as usual.
 This macro calls the compatibility function FUN with ARGS.  Many
 functions provided by Compat can be called directly without this
 macro.  However in the case where Compat provides an alternative
-version of an exisiting function, the function call has to go through
+version of an existing function, the function call has to go through
 @code{compat-call}.  This happens for example when the calling
 convention of a function has changed.
 @end defmac
@@ -165,16 +162,19 @@ compatibility functions.
 @end defmac
 
 If you intend to use a compatibility function in your code it is
-strongly recommended that you check the tests in
-@file{compat-tests.el} to see the supported calling conventions, which
-are guaranteed to work on the supported Emacs versions. We ensure this
-using continuous integration. All functions provided by Compat are
-covered by the testsuite.
+recommended that you take a look at the test suite
+@file{compat-tests.el}. There you can see the supported calling
+conventions, which are guaranteed to work on the supported Emacs
+versions. We ensure this using continuous integration. All functions
+provided by Compat are covered by the test suite.
 
-It is recommended to subscribe to the
+You may want to subscribe to the
 @uref{https://lists.sr.ht/~pkal/compat-announce, compat-announce}
 mailing list to be notified when new versions are released or relevant
-changes are made.
+changes are made. We also provide a
+@uref{https://lists.sr.ht/~pkal/compat-devel, development mailing

[elpa] externals/compat 3f2eed3c64 2/5: Update manual

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 3f2eed3c6407d366d76f895ae664cb10d2cc14ad
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update manual
---
 compat.texi | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/compat.texi b/compat.texi
index 0c3fa512d8..1ddcbfc4d2 100644
--- a/compat.texi
+++ b/compat.texi
@@ -183,10 +183,16 @@ The library intends to provide support back until Emacs 
24.4.  The
 intended audience are package developers that are interested in using
 newer developments, without having to break compatibility.
 
-Complete backwards compatibility cannot be provided for technical
-reasons.  These might include:
+Complete backwards compatibility cannot be provided due to the scope
+of Compat and for technical reasons.  These might include:
 
 @itemize
+@item
+The additional functionality is a user-facing mode or command.  Compat
+is limited to functionality on the ``library level''.  Generally
+functions provided by Compat are non-interactive, such that the user
+interface (M-x) is unaffected by the presence of Compat.
+
 @item
 An existing function or macro was extended by some new functionality.
 To support these cases, the function or macro would have to be



[elpa] externals/compat updated (688e2d983c -> ffb28c7442)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  688e2d983c Add missing links to tests
   new  6c7a7e6067 Improve manual
   new  3f2eed3c64 Update manual
   new  109e9edf99 Update readme
   new  e870789c5e Update readme
   new  ffb28c7442 Update readme


Summary of changes:
 README.md   |  66 -
 compat.texi | 157 ++--
 2 files changed, 119 insertions(+), 104 deletions(-)



[elpa] externals/compat ffb28c7442 5/5: Update readme

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit ffb28c74428c77a2dce2513e70b04e79d9a10605
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update readme
---
 README.md | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index f55d9774f7..32676d153d 100644
--- a/README.md
+++ b/README.md
@@ -51,10 +51,10 @@ As compat.el is distribed as part of [GNU ELPA], and 
therefore requires a
 Distribution
 
 compat.el and all other source files in this directory are distributed under 
the
-[GNU Public License 3] like Emacs itself. The manual (`compat.texi`) is
-distributed under the [GNU Free Documentation License 1.3].
+[GNU Public License 3] like Emacs itself. The manual is distributed under the
+[GNU Free Documentation License 1.3].
 
-[GNU Public License]:
+[GNU Public License 3]:
 https://www.gnu.org/licenses/gpl-3.0.en.html
-[GNU Free Documentation License]:
+[GNU Free Documentation License 1.3]:
 https://www.gnu.org/licenses/fdl-1.3.html



[elpa] externals/compat e870789c5e 4/5: Update readme

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit e870789c5e5d712c9ab70439a4e27772ca0981b8
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update readme
---
 README.md | 29 ++---
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md
index 7523adb2b9..f55d9774f7 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,12 @@
 COMPATibility Library for Emacs
 ===
-Find here the source for compat.el, a forwards-compatibility library
-for (GNU) Emacs Lisp, versions 24.4 and newer.
+Find here the source for compat.el, a forwards-compatibility library for (GNU)
+Emacs Lisp, versions 24.4 and newer. The intended audience are package
+developers that are interested in using newer developments, without having to
+break compatibility.
 
-For information on how to use Compat, please consult the [manual].
-The latest state of development can be found in the [snapshot
-version].
+For information on how to use Compat, please consult the [manual]. The latest
+state of development can be found in the [snapshot version].
 
 [manual]:
 https://elpa.gnu.org/packages/doc/compat.html
@@ -26,9 +27,9 @@ repository].
 
 Bug and patches
 ---
-Patches, bug reports and comments can be sent via [GitHub].  These may
-include issues in the compatibility code, missing definitions or
-performance issues.  We also provide a [development mailing list].
+Patches, bug reports and comments can be sent via [GitHub]. These may include
+issues in the compatibility code, missing definitions or performance issues. We
+also provide a [development mailing list].
 
 [development mailing list]:
 https://lists.sr.ht/~pkal/compat-devel
@@ -36,9 +37,8 @@ performance issues.  We also provide a [development mailing 
list].
 
 Contribute
 --
-As compat.el is distribed as part of [GNU ELPA], and therefore
-requires a [copyright assignment] to the [FSF], for all non-trivial code
-contributions.
+As compat.el is distribed as part of [GNU ELPA], and therefore requires a
+[copyright assignment] to the [FSF], for all non-trivial code contributions.
 
 [GNU ELPA]:
 http://elpa.gnu.org/packages/compat.html
@@ -50,10 +50,9 @@ contributions.
 
 Distribution
 
-compat.el and all other source files in this directory are distributed
-under the [GNU Public License], Version 3 (like Emacs itself).  The manual
-(`compat.texi`) is distributed under the [GNU Free Documentation
-License], Version 1.3.
+compat.el and all other source files in this directory are distributed under 
the
+[GNU Public License 3] like Emacs itself. The manual (`compat.texi`) is
+distributed under the [GNU Free Documentation License 1.3].
 
 [GNU Public License]:
 https://www.gnu.org/licenses/gpl-3.0.en.html



[elpa] externals/compat 109e9edf99 3/5: Update readme

2023-01-21 Thread ELPA Syncer
branch: externals/compat
commit 109e9edf9984f5e0523cfbaa2e2b392f544833bd
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update readme
---
 README.md   | 39 ++-
 compat.texi | 12 
 2 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/README.md b/README.md
index 09e2259d04..7523adb2b9 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
 COMPATibility Library for Emacs
 ===
-
 Find here the source for compat.el, a forwards-compatibility library
 for (GNU) Emacs Lisp, versions 24.4 and newer.
 
@@ -13,46 +12,44 @@ version].
 [snapshot version]:
 https://elpa.gnu.org/devel/doc/compat.html
 
-Contribute
---
-
-As compat.el is distribed as part of [GNU ELPA], and therefore
-requires a [copyright assignment] to the [FSF], for all non-trivial code
-contributions.
-
-[GNU ELPA]:
-http://elpa.gnu.org/packages/compat.html
-[copyright assignment]:
-
https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html
-[FSF]:
-https://www.fsf.org/
 
 Source code
 ---
-
-Compat is developed on [GitHub]. The code is mirrored to the [GNU ELPA 
repository].
+Compat is developed on [GitHub]. The code is mirrored to the [GNU ELPA
+repository].
 
 [GitHub]:
 https://github.com/emacs-compat/compat
 [GNU ELPA repository]:
 https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/?h=externals/compat
 
+
 Bug and patches
 ---
-
 Patches, bug reports and comments can be sent via [GitHub].  These may
 include issues in the compatibility code, missing definitions or
 performance issues.  We also provide a [development mailing list].
 
-When contributing, you are required to provide tests. We use continuous
-integration to check if patches preserve existing functionality.
-
 [development mailing list]:
 https://lists.sr.ht/~pkal/compat-devel
 
+
+Contribute
+--
+As compat.el is distribed as part of [GNU ELPA], and therefore
+requires a [copyright assignment] to the [FSF], for all non-trivial code
+contributions.
+
+[GNU ELPA]:
+http://elpa.gnu.org/packages/compat.html
+[copyright assignment]:
+
https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html
+[FSF]:
+https://www.fsf.org/
+
+
 Distribution
 
-
 compat.el and all other source files in this directory are distributed
 under the [GNU Public License], Version 3 (like Emacs itself).  The manual
 (`compat.texi`) is distributed under the [GNU Free Documentation
diff --git a/compat.texi b/compat.texi
index 1ddcbfc4d2..4a92e6a9c0 100644
--- a/compat.texi
+++ b/compat.texi
@@ -2871,11 +2871,15 @@ definitions or performance issues. We also provide a
 list} (@email{~pkal/compat-devel@@lists.sr.ht,
 ~pkal/compat-devel@@lists.sr.ht}).
 
-Please note that as a GNU ELPA package, Compat requires contributors to
-have signed the
+Please note that as a GNU ELPA package, Compat requires contributors
+to have signed the
 
@uref{https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html,
-FSF copyright assignment}, before any non-trivial contribution (roughly
-15 lines of code) can be applied.
+FSF copyright assignment}, before any non-trivial contribution
+(roughly 15 lines of code) can be applied.  It is important that you
+provide tests when you contribute new functionality.  Compat has 100%
+test coverage by the test suite.  We use continuous integration to
+check if patches preserve existing functionality.
+
 
 @node Function Index
 @appendix Function Index



[elpa] externals/cape 6e3fa266e0: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/cape
commit 6e3fa266e024e4514e7dc6b2eaab6841b3f7948c
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 cape.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cape.el b/cape.el
index f3405eb0cf..187e6c6530 100644
--- a/cape.el
+++ b/cape.el
@@ -55,9 +55,12 @@
 
 (defgroup cape nil
   "Completion At Point Extensions."
-  :link '(url-link "https://github.com/minad/cape;)
-  :link '(info-link "(cape)")
+  :link '(info-link :tag "Info Manual" "(cape)")
+  :link '(url-link :tag "Homepage" "https://github.com/minad/cape;)
+  :link '(emacs-library-link :tag "Library Source" "cape.el")
   :group 'convenience
+  :group 'tools
+  :group 'matching
   :prefix "cape-")
 
 (defcustom cape-dict-file "/usr/share/dict/words"



[nongnu] elpa/scad-mode 1be7960ea2: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: elpa/scad-mode
commit 1be7960ea2c1c016c8a2b5fa0376dede1c0d9c5a
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 scad-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scad-mode.el b/scad-mode.el
index 49cb295b55..bfe7b474e4 100644
--- a/scad-mode.el
+++ b/scad-mode.el
@@ -41,7 +41,7 @@
 
 (defgroup scad nil
   "A major mode for editing OpenSCAD code."
-  :link '(url-link "https://github.com/openscad/emacs-scad-mode;)
+  :link '(url-link :tag "Homepage" 
"https://github.com/openscad/emacs-scad-mode;)
   :group 'languages
   :prefix "scad-")
 



[elpa] externals/vertico d27e42d56b: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/vertico
commit d27e42d56b76a6d288a7f112a1f7e11f7ce7fc5a
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 vertico.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vertico.el b/vertico.el
index 2af850c8de..f88da29c83 100644
--- a/vertico.el
+++ b/vertico.el
@@ -41,8 +41,9 @@
 
 (defgroup vertico nil
   "VERTical Interactive COmpletion."
-  :link '(url-link "https://github.com/minad/vertico;)
-  :link '(info-link "(vertico)")
+  :link '(info-link :tag "Info Manual" "(vertico)")
+  :link '(url-link :tag "Homepage" "https://github.com/minad/vertico;)
+  :link '(emacs-library-link :tag "Library Source" "vertico.el")
   :group 'convenience
   :group 'minibuffer
   :prefix "vertico-")



[elpa] externals/tempel 87f996bca9: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/tempel
commit 87f996bca91e533c8a95943ca3462c3090cba386
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 tempel.el | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tempel.el b/tempel.el
index c841d8f602..926b42393c 100644
--- a/tempel.el
+++ b/tempel.el
@@ -46,9 +46,12 @@
 
 (defgroup tempel nil
   "Tempo templates/snippets with in-buffer field editing."
-  :link '(url-link "https://github.com/minad/tempel;)
-  :link '(info-link "(tempel)")
-  :group 'editing
+  :link '(info-link :tag "Info Manual" "(tempel)")
+  :link '(url-link :tag "Homepage" "https://github.com/minad/tempel;)
+  :link '(emacs-library-link :tag "Library Source" "tempel.el")
+  :group 'abbrev
+  :group 'tools
+  :group 'matching
   :prefix "tempel-")
 
 (defcustom tempel-path (expand-file-name "templates" user-emacs-directory)



[elpa] externals/org 22dea8557f 1/3: org-agenda: Apply the face `org-agenda-calendar-event'

2023-01-21 Thread ELPA Syncer
branch: externals/org
commit 22dea8557f7fd9919301cc91cf7a2d6df3c423f7
Author: Gautier Ponsinet 
Commit: Ihor Radchenko 

org-agenda: Apply the face `org-agenda-calendar-event'

* list/org-agenda.el (org-agenda-get-blocks): Apply the face
  `org-agenda-calendar-event' to entries with a time range within a
  single day.
---
 lisp/org-agenda.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index d983a09166..4f29f3eb62 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7059,8 +7059,7 @@ scheduled items with an hour specification like [h]h:mm."
 (defun org-agenda-get-blocks ()
   "Return the date-range information for agenda display."
   (with-no-warnings (defvar date))
-  (let* ((props (list 'face nil
- 'org-not-done-regexp org-not-done-regexp
+  (let* ((props (list 'org-not-done-regexp org-not-done-regexp
  'org-todo-regexp org-todo-regexp
  'org-complex-heading-regexp org-complex-heading-regexp
  'mouse-face 'highlight
@@ -7069,9 +7068,9 @@ scheduled items with an hour specification like [h]h:mm."
  (abbreviate-file-name buffer-file-name
 (regexp org-tr-regexp)
 (d0 (calendar-absolute-from-gregorian date))
-marker hdmarker ee txt d1 d2 s1 s2 category
-level todo-state tags pos head donep inherited-tags
- effort effort-minutes)
+ face marker hdmarker ee txt d1 d2 s1 s2 category level
+todo-state tags pos head donep inherited-tags effort
+effort-minutes)
 (goto-char (point-min))
 (while (re-search-forward regexp nil t)
   (catch :skip
@@ -7109,6 +7108,9 @@ scheduled items with an hour specification like [h]h:mm."
  (setq donep (member todo-state org-done-keywords))
  (when (and donep org-agenda-skip-timestamp-if-done)
(throw :skip t))
+  (setq face (if (= d1 d2)
+ 'org-agenda-calendar-event
+   nil))
  (setq marker (org-agenda-new-marker (point))
category (org-get-category))
   (setq effort (save-match-data (or (get-text-property (point) 
'effort)
@@ -7160,6 +7162,7 @@ scheduled items with an hour specification like [h]h:mm."
(concat "<" end-time ">")
 remove-re
  (org-add-props txt props
+'face face
'org-marker marker 'org-hd-marker hdmarker
'type "block" 'date date
'level level



[elpa] externals/org updated (9d58e1c781 -> f2320a2cc1)

2023-01-21 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  9d58e1c781 org: Make documentation of org-reverse-note-order true
   new  22dea8557f org-agenda: Apply the face `org-agenda-calendar-event'
   new  84ead47d3c Define the face `org-agenda-calendar-daterange'
   new  f2320a2cc1 Revert "org-agenda.el: Fix `org-agenda-get-blocks'"


Summary of changes:
 etc/ORG-NEWS   |  5 +
 lisp/org-agenda.el | 33 +++--
 lisp/org-faces.el  |  4 
 3 files changed, 24 insertions(+), 18 deletions(-)



[elpa] externals/osm f68f3060b6: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/osm
commit f68f3060b66559996fdaa565c201a4f3c880b9d0
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 osm.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/osm.el b/osm.el
index 8e10ea1d06..1c5b45bb6b 100644
--- a/osm.el
+++ b/osm.el
@@ -50,8 +50,9 @@
 
 (defgroup osm nil
   "OpenStreetMap viewer."
-  :link '(url-link "https://github.com/minad/osm;)
-  :link '(info-link "(osm)")
+  :link '(info-link :tag "Info Manual" "(osm)")
+  :link '(url-link :tag "Homepage" "https://github.com/minad/osm;)
+  :link '(emacs-library-link :tag "Library Source" "osm.el")
   :group 'web
   :prefix "osm-")
 



[elpa] externals/org 84ead47d3c 2/3: Define the face `org-agenda-calendar-daterange'

2023-01-21 Thread ELPA Syncer
branch: externals/org
commit 84ead47d3c3671f64695cfddf39d90df69fc2d23
Author: Gautier Ponsinet 
Commit: Ihor Radchenko 

Define the face `org-agenda-calendar-daterange'

* etc/ORG-NEWS: Announce the introduction of the new face
  `org-agenda-calendar-daterange'.
* lisp/org-faces.el: Define the face `org-agenda-calendar-daterange'.
* lisp/org-agenda.el (org-agenda-get-blocks): Apply the face
  `org-agenda-calendar-daterange' to entries with a date range.
---
 etc/ORG-NEWS   | 5 +
 lisp/org-agenda.el | 2 +-
 lisp/org-faces.el  | 4 
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index c5d9bdf6e1..613b324088 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -55,6 +55,11 @@ document header:
 ,#+LATEX_HEADER: 
\DefineVerbatimEnvironment{lstlisting}{Verbatim}{...whatever...}
 #+END_src
 
+*** New face: ~org-agenda-calendar-daterange~
+The face ~org-agenda-calendar-daterange~ is used to show entries with
+a date range in the agenda.  It inherits from the default face in
+order to remain backward-compatible.
+
 * Version 9.6
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 4f29f3eb62..15736e5b86 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7110,7 +7110,7 @@ scheduled items with an hour specification like [h]h:mm."
(throw :skip t))
   (setq face (if (= d1 d2)
  'org-agenda-calendar-event
-   nil))
+   'org-agenda-calendar-daterange))
  (setq marker (org-agenda-new-marker (point))
category (org-get-category))
   (setq effort (save-match-data (or (get-text-property (point) 
'effort)
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index 594c9a6e73..b3f8e419ce 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -660,6 +660,10 @@ month and 365.24 days for a year)."
   "Face used for agenda entries that come from the Emacs diary."
   :group 'org-faces)
 
+(defface org-agenda-calendar-daterange '((t :inherit default))
+  "Face used to show entries with a date range in the agenda."
+  :group 'org-faces)
+
 (defface org-agenda-calendar-event '((t :inherit default))
   "Face used to show events and appointments in the agenda."
   :group 'org-faces)



[elpa] externals/org f2320a2cc1 3/3: Revert "org-agenda.el: Fix `org-agenda-get-blocks'"

2023-01-21 Thread ELPA Syncer
branch: externals/org
commit f2320a2cc1c3e27c851880a07e801b1d82bab3f4
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Revert "org-agenda.el: Fix `org-agenda-get-blocks'"

This reverts commit cb19f5c94e3dc94da78169ec675d5bd07af34427.

The original commit broke timestamp ranges with same starting and
ending hours.

Link: https://orgmode.org/list/87edrpa15m@gnu.org
---
 lisp/org-agenda.el | 20 +++-
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 15736e5b86..d2aa8f3f22 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7147,19 +7147,13 @@ scheduled items with an hour specification like 
[h]h:mm."
'effort effort
'effort-minutes effort-minutes)
  level category tags
-(save-match-data
-  (let ((hhmm1 (and (string-match org-ts-regexp1 
s1)
-(match-string 6 s1)))
-(hhmm2 (and (string-match org-ts-regexp1 
s2)
-(match-string 6 s2
-(cond ((string= hhmm1 hhmm2)
-   (concat "<" start-time ">--<" end-time 
">"))
-  ((and (= d1 d0) (= d2 d0))
-   (concat "<" start-time ">--<" end-time 
">"))
-   ((= d1 d0)
-   (concat "<" start-time ">"))
-  ((= d2 d0)
-   (concat "<" end-time ">")
+(cond
+  ((and (= d1 d0) (= d2 d0))
+  (concat "<" start-time ">--<" end-time ">"))
+  ((= d1 d0)
+  (concat "<" start-time ">"))
+ ((= d2 d0)
+  (concat "<" end-time ">")))
 remove-re
  (org-add-props txt props
 'face face



[elpa] externals/corfu 1a9b9c364c: Improve defgroup

2023-01-21 Thread ELPA Syncer
branch: externals/corfu
commit 1a9b9c364c5bb4f9882e70e59b9458c67b8e0a9f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve defgroup
---
 corfu.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index 11c915220e..f4ebf9249c 100644
--- a/corfu.el
+++ b/corfu.el
@@ -41,9 +41,12 @@
 
 (defgroup corfu nil
   "Completion Overlay Region FUnction."
-  :link '(url-link "https://github.com/minad/corfu;)
-  :link '(info-link "(corfu)")
+  :link '(info-link :tag "Info Manual" "(corfu)")
+  :link '(url-link :tag "Homepage" "https://github.com/minad/corfu;)
+  :link '(emacs-library-link :tag "Library Source" "corfu.el")
   :group 'convenience
+  :group 'tools
+  :group 'matching
   :prefix "corfu-")
 
 (defcustom corfu-count 10