[elpa] externals/compat 34463680d5 6/6: Add runtime version check

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 34463680d51316441c54920e90e7ac010c18b50e
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add runtime version check

We must make sure that we don't load Compat in an incompatible Emacs 
version.
---
 NEWS.org   | 2 ++
 compat-macs.el | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index 66e0bd5fab..51912c1e5a 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -7,6 +7,8 @@
   compatibility aliases, functions, macros and variables are installed.
 - Remove deprecated, prefixed compatibility functions.
 - Remove deprecated features ~compat-help~, ~compat-font-lock~ and ~compat-24~.
+- Compat will check that the Emacs version which was used to compile Compat
+  equals the Emacs version at runtime.
 
 * Release of "Compat" Version 29.1.0.1
 
diff --git a/compat-macs.el b/compat-macs.el
index 4c9eda4f74..0d9a8b4f92 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -31,7 +31,9 @@
 (defmacro compat-declare-version (version)
   "Set the Emacs version that is currently being handled to VERSION."
   (setq compat--current-version version)
-  nil)
+  `(unless (equal emacs-version ,emacs-version)
+ (error ,(format "Compat was compiled with Emacs %s, you are running %%s" 
emacs-version)
+emacs-version)))
 
 (defun compat--format-docstring (type name docstring)
   "Format DOCSTRING for NAME of TYPE.



[elpa] externals/compat 220d1446fb 3/6: Remove deprecated features

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 220d1446fbe82ce969d08dce6b7e96a5ca46368f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Remove deprecated features
---
 NEWS.org|  1 +
 compat-24.el| 25 -
 compat-font-lock.el | 24 
 compat-help.el  | 24 
 4 files changed, 1 insertion(+), 73 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index b7cc305bf0..b49e01d646 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -3,6 +3,7 @@
 * Development of "Compat" Version 29.1.1.0
 
 - Remove deprecated, prefixed compatibility functions.
+- Remove deprecated features ~compat-help~, ~compat-font-lock~ and ~compat-24~.
 
 * Release of "Compat" Version 29.1.0.1
 
diff --git a/compat-24.el b/compat-24.el
deleted file mode 100644
index 691b5ccabd..00
--- a/compat-24.el
+++ /dev/null
@@ -1,25 +0,0 @@
-;;; compat-24.el --- Obsolete package -*- lexical-binding: t; no-byte-compile: 
t; -*-
-
-;; Copyright (C) 2021-2023  Free Software Foundation, Inc.
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see .
-
-;;; Commentary:
-;;; Code:
-
-;; Use message instead of warn since it is less aggressive.
-(message "compat-24 has been deprecated")
-
-(provide 'compat-24)
-;;; compat-24.el ends here
diff --git a/compat-font-lock.el b/compat-font-lock.el
deleted file mode 100644
index 2d1555a16a..00
--- a/compat-font-lock.el
+++ /dev/null
@@ -1,24 +0,0 @@
-;;; compat-font-lock.el --- Obsolete package -*- lexical-binding: t; 
no-byte-compile: t; -*-
-
-;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see .
-
-;;; Commentary:
-;;; Code:
-
-(warn "compat-font-lock has been deprecated")
-
-(provide 'compat-font-lock)
-;;; compat-font-lock.el ends here
diff --git a/compat-help.el b/compat-help.el
deleted file mode 100644
index 6c850507b4..00
--- a/compat-help.el
+++ /dev/null
@@ -1,24 +0,0 @@
-;;; compat-help.el --- Obsolete package -*- lexical-binding: t; 
no-byte-compile: t; -*-
-
-;; Copyright (C) 2021-2023  Free Software Foundation, Inc.
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see .
-
-;;; Commentary:
-;;; Code:
-
-(warn "compat-help has been deprecated")
-
-(provide 'compat-help)
-;;; compat-help.el ends here



[elpa] externals/compat updated (8a32564247 -> 34463680d5)

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

  from  8a32564247 Version 29.1.0.1
   new  0ffcc8bf3f Set new development version 29.1.1.0-git
   new  8ebc304b3f Remove deprecated prefixed compatibility functions
   new  220d1446fb Remove deprecated features
   new  cfe0394b98 Rework the macros in compat-macs
   new  9fe496cee1 Use basic alist-get definition in 25
   new  34463680d5 Add runtime version check


Summary of changes:
 NEWS.org|  12 +-
 compat-24.el|  25 
 compat-25.el|  23 +--
 compat-26.el|  13 +-
 compat-font-lock.el |  24 ---
 compat-help.el  |  24 ---
 compat-macs.el  | 418 +++-
 compat-tests.el |  13 --
 compat.el   |   2 +-
 compat.texi |   6 +-
 10 files changed, 217 insertions(+), 343 deletions(-)
 delete mode 100644 compat-24.el
 delete mode 100644 compat-font-lock.el
 delete mode 100644 compat-help.el



[elpa] externals/compat 9fe496cee1 5/6: Use basic alist-get definition in 25

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

Use basic alist-get definition in 25

In compat-26 we provide the alist-get variant with the additional TESTFN
argument.
---
 compat-25.el | 23 +++
 compat-26.el | 13 -
 2 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/compat-25.el b/compat-25.el
index 3febccb3f6..157fc31048 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -88,24 +88,15 @@ MODES is as for `set-default-file-modes'."
  ,@body)
  (set-default-file-modes ,umask)
 
-(compat-defun alist-get (key alist &optional default remove testfn) ;; 
-  "Find the first element of ALIST whose `car' equals KEY and return its `cdr'.
+(compat-defun alist-get (key alist &optional default remove) ;; 
+  "Return the value associated with KEY in ALIST, using `assq'.
 If KEY is not found in ALIST, return DEFAULT.
-Equality with KEY is tested by TESTFN, defaulting to `eq'."
-  :realname compat--alist-get-full-elisp
+This is a generalized variable suitable for use with `setf'.
+When using it to set a value, optional argument REMOVE non-nil
+means to remove KEY from ALIST if the new value is `eql' to DEFAULT."
   (ignore remove)
-  (let (entry)
-(cond
- ((or (null testfn) (eq testfn 'eq))
-  (setq entry (assq key alist)))
- ((eq testfn 'equal)
-  (setq entry (assoc key alist)))
- ((catch 'found
-(dolist (ent alist)
-  (when (and (consp ent) (funcall testfn (car ent) key))
-(throw 'found (setq entry ent
-default)))
-(if entry (cdr entry) default)))
+  (let ((x (assq key alist)))
+(if x (cdr x) default)))
 
 (compat-defmacro if-let (spec then &rest else) ;; 
   "Bind variables according to SPEC and evaluate THEN or ELSE.
diff --git a/compat-26.el b/compat-26.el
index 54a3254732..bde9e8b8a6 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -69,7 +69,18 @@ from the absolute start of the buffer, disregarding the 
narrowing."
   "Handle TESTFN manually."
   :explicit t
   (if testfn
-  (compat--alist-get-full-elisp key alist default remove testfn)
+  (let (entry)
+(cond
+ ((eq testfn 'eq)
+  (setq entry (assq key alist)))
+ ((eq testfn 'equal)
+  (setq entry (assoc key alist)))
+ ((catch 'found
+(dolist (ent alist)
+  (when (and (consp ent) (funcall testfn (car ent) key))
+(throw 'found (setq entry ent
+default)))
+(if entry (cdr entry) default))
 (alist-get key alist default remove)))
 
 (gv-define-expander compat--alist-get



[elpa] externals/compat 0ffcc8bf3f 1/6: Set new development version 29.1.1.0-git

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 0ffcc8bf3f2f654d60c724e5bed30552e55fc45d
Author: Daniel Mendler 
Commit: Daniel Mendler 

Set new development version 29.1.1.0-git
---
 NEWS.org| 4 +++-
 compat.el   | 2 +-
 compat.texi | 6 +++---
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 46a24cd154..73a333cc6b 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -1,5 +1,7 @@
 #+title: compat.el - Changelog
 
+* Development of "Compat" Version 29.1.1.0
+
 * Release of "Compat" Version 29.1.0.1
 
 - Add multiple new tests for existing APIs.
@@ -14,7 +16,7 @@
   define separate compatibility function definitions for functions which 
changed
   their calling convention or behavior. These compatibility definitions can be
   looked up using ~compat-function~ and called with ~compat-call~. For example 
~assoc~
-  can be called with a ~TESTFN~ since Emacs 29. In Emacs 28 and older the 
calling
+  can be called with a ~TESTFN~ since Emacs 26. In Emacs 25 and older the 
calling
   convention was ~(assoc KEY ALIST)~. In order to use the new calling 
convention
   you can use ~(compat-call assoc KEY ALIST TESTFN)~.
 - Deprecate all ~compat-*~ prefixed functions. Instead use the aforementioned
diff --git a/compat.el b/compat.el
index 764e035c60..f54a5c3c39 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.0.1
+;; Version: 29.1.1.0-git
 ;; URL: https://github.com/emacs-compat/compat
 ;; Package-Requires: ((emacs "24.4"))
 ;; Keywords: lisp
diff --git a/compat.texi b/compat.texi
index f46a2f46d3..7c005bb27b 100644
--- a/compat.texi
+++ b/compat.texi
@@ -31,7 +31,7 @@ modify this GNU manual.”
 @finalout
 @titlepage
 @title "Compat" Manual
-@subtitle For version 29.1.0.0
+@subtitle For version 29.1.1.0
 @author Philip Kaludercic, Daniel Mendler
 @page
 @vskip 0pt plus 1filll
@@ -46,7 +46,7 @@ modify this GNU manual.”
 
 This manual documents the usage of the "Compat" Emacs lisp library,
 the forward-compatibility library for Emacs Lisp, corresponding to
-version 29.1.0.0.
+version 29.1.1.0.
 
 @insertcopying
 @end ifnottex
@@ -115,7 +115,7 @@ 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.0.0"))
+;; Package-Requires: ((emacs "24.4") (compat "29.1.1.0"))
 @end example
 
 There is no need to depend on @code{emacs} 24.4 specifically.  One can



[elpa] externals/compat cfe0394b98 4/6: Rework the macros in compat-macs

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

Rework the macros in compat-macs

- New macro compat--guarded-definition, which handles the generic feature 
and
  version checks (:feature, :min-version, :max-version).
- compat--function-definition: Use compat--guarded-definition.
- compat-defun, compat-defmacro: Use compat--function-definition.
- compat-defvar: Use compat--guarded-definition.
- compat-defalias: Use compat--guarded-definition.
- compat--format-docstring: New helper function to format the compatibility
  docstring. Used by compat-defvar and compat-defun.
- compat--condition-satisfied: New helper function which performs the 
version
  constraint checks. Used by compat--guarded-definition.
- compat--check-attributes: New helper function which checks the attribute
  plists for validity. Used by compat--guarded-definition.
---
 NEWS.org   |   3 +
 compat-macs.el | 403 +
 2 files changed, 182 insertions(+), 224 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index b49e01d646..66e0bd5fab 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -2,6 +2,9 @@
 
 * Development of "Compat" Version 29.1.1.0
 
+- The macros in ~compat-macs.el~ have been rewritten and greatly simplified. 
This
+  change makes it possible to further refine the criteria under which
+  compatibility aliases, functions, macros and variables are installed.
 - Remove deprecated, prefixed compatibility functions.
 - Remove deprecated features ~compat-help~, ~compat-font-lock~ and ~compat-24~.
 
diff --git a/compat-macs.el b/compat-macs.el
index f62659e082..4c9eda4f74 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -1,4 +1,4 @@
-;;; compat-macs.el --- Compatibility Macros   -*- lexical-binding: t; 
no-byte-compile: t; -*-
+;;; compat-macs.el --- Compatibility Macros -*- lexical-binding: t; 
no-byte-compile: t; -*-
 
 ;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
 
@@ -33,241 +33,196 @@
   (setq compat--current-version version)
   nil)
 
-(defun compat--with-feature (feature &rest body)
-  "Protect BODY with `with-eval-after-load' if FEATURE is non-nil."
-  (declare (indent 1))
-  (if feature
-  `(with-eval-after-load ',feature ,@body)
-(macroexp-progn body)))
-
-(defun compat--generate (name def-fn install-fn check-fn attr)
-  "Function used to generate compatibility code.
-The function must take six arguments: NAME, DEF-FN, INSTALL-FN,
-CHECK-FN and ATTR.  The resulting body is constructed by invoking
-the functions DEF-FN (passed the \"realname\" and the version
-number, returning the compatibility definition), the
-INSTALL-FN (passed the \"realname\" and returning the
-installation code), CHECK-FN (passed the \"realname\" and
-returning a check to see if the compatibility definition should
-be installed).  ATTR is a plist used to modify the generated
-code.  The following attributes are handled, all others are
-ignored:
-
-- :min-version :: Do not install the compatibility definition
-  if Emacs version older than indicated.
-
-- :max-version :: Do not install the compatibility definition
-  if Emacs version newer or equal than indicated.
-
-- :feature :: The library the code is supposed to be loaded
-  with (via `eval-after-load').
-
-- :cond :: Only install the compatibility code, iff the value
-  evaluates to non-nil.
-
-  For prefixed functions, this can be interpreted as a test to
-  `defalias' an existing definition or not.
-
-- :realname :: Manual specification of a \"realname\" to use for
-  the compatibility definition (symbol).
-
-- :explicit :: Add a `compat-' prefix to the name, and define the
-  compatibility code unconditionally."
-  (let* ((min-version (plist-get attr :min-version))
- (max-version (plist-get attr :max-version))
- (feature (plist-get attr :feature))
- (cond (plist-get attr :cond))
- (check))
-(unless compat--current-version
-  (error "No compat version declared"))
-(when (and (plist-get attr :realname)
-   (string= name (plist-get attr :realname)))
-  (error "%S: Name is equal to realname" name))
-;; subr-x is available at compile time.
-(when (eq feature 'subr-x)
-  (error "Feature subr-x is forbidden"))
-(when feature
-  (unless (require feature nil t)
-(setq feature nil)))
-(setq check
-  (cond
-   ((or (and min-version
- (version< emacs-version min-version))
-(and max-version
- (version<= max-version emacs-version)))
-nil)
-   ((plist-get attr :explicit)
-t)
-   ((and (version<= compat--current-version emacs-version) (not cond))
-nil)
-   ((and (if cond (eval cond t) t)
- (funcall check-fn)
-(cond
- ((and (plist-get attr :explicit)
-   (

[elpa] externals/compat 8ebc304b3f 2/6: Remove deprecated prefixed compatibility functions

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 8ebc304b3f90d4e3b888651be5b8f39d76725d61
Author: Daniel Mendler 
Commit: Daniel Mendler 

Remove deprecated prefixed compatibility functions

These functions are only used by exactly two packages: Consult 0.30 
(released)
and Magit 3.4.0 (unreleased development version). Both packages have been
updated to use compat-call.
---
 NEWS.org|  2 ++
 compat-macs.el  | 17 -
 compat-tests.el | 13 -
 3 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 73a333cc6b..b7cc305bf0 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -2,6 +2,8 @@
 
 * Development of "Compat" Version 29.1.1.0
 
+- Remove deprecated, prefixed compatibility functions.
+
 * Release of "Compat" Version 29.1.0.1
 
 - Add multiple new tests for existing APIs.
diff --git a/compat-macs.el b/compat-macs.el
index 8172ec995e..f62659e082 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -176,27 +176,18 @@ If this is not documented on yourself system, you can 
check \
   (buffer-string))
,@body)
   ,@(and (plist-get rest :explicit)
- (if (string= realname name)
- `((defalias ',name ',(intern (format "compat--%s" 
oldname)))
-   (make-obsolete
-',name
-"Use `compat-call' or `compat-function' instead"
-"29.1.0.0"))
-   `((defalias ',realname #',(intern (format "compat--%s" 
oldname
+ (not (string= realname name))
+ `((defalias ',realname #',(intern (format "compat--%s" 
oldname)))
  (lambda (realname)
`(progn
   ;; Functions and macros are installed by aliasing the name of the
   ;; compatible function to the name of the compatibility function.
-  (defalias ',name #',realname)
   ,@(when (and (plist-get rest :realname)
(not (string= (plist-get rest :realname) name))
(not (string= (plist-get rest :realname) realname)))
   `((defalias ',(plist-get rest :realname) #',realname)))
-  ,@(when (and (plist-get rest :explicit) (string= realname oldname))
-  `((make-obsolete
- ',name
- "Use `compat-call' or `compat-function' instead"
- "29.1.0.0")
+  ,@(unless (and (plist-get rest :explicit) (string= realname oldname))
+  `((defalias ',name #',realname)
  (lambda ()
`(not (fboundp ',name)))
  rest)))
diff --git a/compat-tests.el b/compat-tests.el
index f7e4f00160..66505e9124 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1017,7 +1017,6 @@
   (should-equal 1 (string-distance "a" "あ")))
 
 (ert-deftest string-width ()
-  (should-equal 0 (compat-string-width "")) ;; Obsolete
   (should-equal 0 (compat-call string-width ""))
   (should-equal 3 (compat-call string-width "abc")) ;; no 
argument
   (should-equal 5 (compat-call string-width "abcあ"))
@@ -1033,7 +1032,6 @@
   (should-equal 0 (compat-call string-width "a " 1 1)))
 
 (ert-deftest string-trim-left ()
-  (should-equal "a" (compat-string-trim-left " a")) ;; Obsolete
   (should-equal "a" (compat-call string-trim-left "---a" "-+")) ;; Additional 
regexp
   (should-equal "" (compat-call string-trim-left ""))  
;empty string
   (should-equal "a" (compat-call string-trim-left "a"))
;"full" string
@@ -1056,7 +1054,6 @@
   (should-equal "a  \n" (compat-call string-trim-left "\n  \ta  \n")))
 
 (ert-deftest string-trim-right ()
-  (should-equal "a" (compat-string-trim-right "a")) ;; Obsolete
   (should-equal "a" (compat-call string-trim-right "a---" "-+")) ;; Additional 
regexp
   (should-equal "" (compat-call string-trim-right "")) 
 ;empty string
   (should-equal "a" (compat-call string-trim-right "a"))   
 ;"full" string
@@ -1079,7 +1076,6 @@
   (should-equal "\n  \ta" (compat-call string-trim-right "\n  \ta  \n")))
 
 (ert-deftest string-trim ()
-  (should-equal "aaa" (compat-string-trim " aaa  ")) ;; Obsolete
   (should-equal "aaa" (compat-call string-trim "--aaa__" "-+" "_+")) ;; 
Additional regexp
   (should-equal "" (compat-call string-trim ""))  
;empty string
   (should-equal "a" (compat-call string-trim "a"))
;"full" string
@@ -1416,15 +1412,6 @@
 (should-equal alist-1 '((1 . "eins") (3 . "three")))
 (setf (compat-call alist-get "one" alist-2 nil nil #'string=) "eins")
 (should-equal (compat-call alist-get "one" alist-2 nil nil #'string=)
-   "eins")
-
-;; Obsolete compat-alist-get
-(setf (compat-alist-get 1 alist-1) "eins")
-(should-equal (compat-alist-get 1 alist-1) "eins")
-(setf (compat-alist-get 2 alist-1 nil 'remove) nil)
-(shoul

[elpa] externals/compat 92a52ddf6e: compat-tests: Use uniform naming convention

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 92a52ddf6e333d1946be95efdf0d97169e90311f
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-tests: Use uniform naming convention
---
 compat-tests.el | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 66505e9124..fc0c5cd02f 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -104,24 +104,24 @@
 (should-equal 2 (compat-call line-number-at-pos (point-min) 'abs))
 (should-equal 3 (compat-call line-number-at-pos (1+ (point-min)) 'abs
 
-(defvar compat-test-map-1
+(defvar compat-tests--map-1
   (let ((map (make-sparse-keymap)))
 (define-key map (kbd "C-x C-f") #'find-file)
 (define-key map (kbd "SPC") #'minibuffer-complete-word)
 (define-key map (kbd "C-c") mode-specific-map)
 map))
-(defvar-keymap compat-test-map-2
+(defvar-keymap compat-tests--map-2
   "C-x C-f" #'find-file
   "SPC" #'minibuffer-complete-word
   "C-c" mode-specific-map)
-(defvar compat-test-map-3
+(defvar compat-tests--map-3
   (define-keymap
 "C-x C-f" #'find-file
 "SPC" #'minibuffer-complete-word
 "C-c" mode-specific-map))
 (ert-deftest defvar-keymap ()
-  (should-equal compat-test-map-1 compat-test-map-2)
-  (should-equal compat-test-map-1 compat-test-map-3))
+  (should-equal compat-tests--map-1 compat-tests--map-2)
+  (should-equal compat-tests--map-1 compat-tests--map-3))
 
 (ert-deftest key-valid-p ()
   (should-not (key-valid-p ""))
@@ -241,10 +241,10 @@
   (should-not (key-valid-p "M-xx"))
   (should-not (key-valid-p "M-x")))
 
-(defun compat-function-put-test ())
+(defun compat-tests--function-put ())
 (ert-deftest function-put ()
-  (function-put #'compat-function-put-test 'compat-test 42)
-  (should-equal 42 (function-get #'compat-function-put-test 'compat-test)))
+  (function-put #'compat-tests--function-put 'compat-test 42)
+  (should-equal 42 (function-get #'compat-tests--function-put 'compat-test)))
 
 (ert-deftest ignore-error ()
   (should-equal (ignore-error (end-of-file)
@@ -299,25 +299,25 @@
 (ert-deftest format-message ()
   (should-equal (format-message "a=%s b=%s" 1 2) "a=1 b=2"))
 
-(defvar test-boundp)
-(defvar test-global-boundp)
+(defvar compat-tests--boundp)
+(defvar compat-tests--global-boundp)
 (ert-deftest buffer-local-boundp ()
   (let ((buf (generate-new-buffer "boundp")))
 (with-current-buffer buf
-  (setq-local test-boundp t))
-(setq test-global-boundp t)
-(should (buffer-local-boundp 'test-boundp buf))
+  (setq-local compat-tests--boundp t))
+(setq compat-tests--global-boundp t)
+(should (buffer-local-boundp 'compat-tests--boundp buf))
 (should-not (buffer-local-boundp 'test-not-boundp buf))
-(should (buffer-local-boundp 'test-global-boundp buf
+(should (buffer-local-boundp 'compat-tests--global-boundp buf
 
-(defvar compat-local-a nil)
-(defvar compat-local-b nil)
-(defvar compat-local-c nil)
+(defvar compat-tests--local-a nil)
+(defvar compat-tests--local-b nil)
+(defvar compat-tests--local-c nil)
 (ert-deftest setq-local ()
-  (compat-call setq-local compat-local-a 1 compat-local-b 2 compat-local-c 3)
-  (should-equal compat-local-a 1)
-  (should-equal compat-local-b 2)
-  (should-equal compat-local-c 3))
+  (compat-call setq-local compat-tests--local-a 1 compat-tests--local-b 2 
compat-tests--local-c 3)
+  (should-equal compat-tests--local-a 1)
+  (should-equal compat-tests--local-b 2)
+  (should-equal compat-tests--local-c 3))
 
 (ert-deftest gensym ()
   (should (symbolp (gensym "compat")))



[nongnu] elpa/idris-mode 253e2ad909 5/5: Merge pull request #605 from keram/print-def

2023-01-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 253e2ad90985c83c5cb06bae0b1cb931c88a6c89
Merge: a060688b5c 7697b8b95e
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #605 from keram/print-def

Add support for printing definitions of functions in Idris 2
---
 idris-commands.el | 32 ++--
 idris-common-utils.el |  2 +-
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 88f5c590ab..4cfe3489eb 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -283,9 +283,9 @@ This sets the load position to point, if there is one."
 
 
 
-(defun idris-info-for-name (what name)
-  "Display the type for a NAME."
-  (let* ((ty (idris-eval (list what name)))
+(defun idris-info-for-name (command name)
+  "Pass to Idris compiler COMMAND with NAME as argument and display the 
result."
+  (let* ((ty (idris-eval (list command name)))
  (result (car ty))
  (formatting (cdr ty)))
   (idris-show-info (format "%s" result) formatting)))
@@ -301,13 +301,25 @@ This sets the load position to point, if there is one."
 (when name
   (idris-info-for-name :type-of name
 
-(defun idris-print-definition-of-name (thing)
-  "Display the definition of the function or type of the THING at point."
+(defun idris--print-definition-of-name (name)
+  "Fetch from the Idris compiler and display the definition of the NAME."
+  (if (>=-protocol-version 2 1)
+  (idris-info-for-name :interpret (concat ":printdef " name))
+(idris-info-for-name :print-definition name)))
+
+(defun idris-print-definition-of-name-at-point (name)
+  "Display the definition of the function or type of the NAME at point.
+
+Idris 2 as of 05/01/2023 does not yet fully support
+printing definition of a type at point."
   (interactive "P")
-  (let ((name (if thing (read-string "Print definition: ")
-(idris-name-at-point
-(when name
-  (idris-info-for-name :print-definition name
+  (let ((name* (if name
+   (read-string "Print definition: ")
+ (idris-name-at-point
+(when name*
+  (idris--print-definition-of-name name*
+
+(define-obsolete-function-alias 'idris-print-definition-of-name 
'idris-print-definition-of-name-at-point "2023-01-05")
 
 (defun idris-who-calls-name (name)
   "Show the callers of NAME in a tree."
@@ -1319,7 +1331,7 @@ of the term to replace."
(list "Get definition"
  (lambda ()
(interactive)
-   (idris-info-for-name :print-definition ref)))
+   (idris--print-definition-of-name ref)))
(list "Who calls?"
  (lambda ()
(interactive)
diff --git a/idris-common-utils.el b/idris-common-utils.el
index 3b18bbfc32..e80c31c638 100644
--- a/idris-common-utils.el
+++ b/idris-common-utils.el
@@ -293,7 +293,7 @@ inserted text (that is, relative to point prior to 
insertion)."
 (if term
 (list 'idris-tt-term (cadr term))
   ())
-(if key
+(if (and key (not (string-empty-p (cadr key
 (list 'idris-name-key (concat "{" (cadr key) "}"))
   ())
 (if idris-err



[nongnu] elpa/idris-mode 3e7cbb331f 3/5: Idris2: Use `:interpret .. :printdef` command to fetch symbol definition

2023-01-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 3e7cbb331fb28256b1a3964113c1ebd7d04f0161
Author: Marek L 
Commit: Marek L 

Idris2: Use `:interpret .. :printdef` command to fetch symbol definition

Why:
Because `:print-definition` command is not yet implemented in Idris2
while the `:interpret xx` provides the expected result already.
---
 idris-commands.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/idris-commands.el b/idris-commands.el
index dba49f034b..5f07be25a9 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -307,7 +307,9 @@ This sets the load position to point, if there is one."
   (let ((name (if thing (read-string "Print definition: ")
 (idris-name-at-point
 (when name
-  (idris-info-for-name :print-definition name
+  (if (>=-protocol-version 2 1)
+  (idris-info-for-name :interpret (concat ":printdef " name))
+(idris-info-for-name :print-definition name)
 
 (defun idris-who-calls-name (name)
   "Show the callers of NAME in a tree."



[nongnu] elpa/idris-mode 7697b8b95e 4/5: Mark `idris-print-definition-of-name` as obsolete in favour of

2023-01-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 7697b8b95e3861e8cadf51e6d62d0ccc091c8d38
Author: Marek L 
Commit: Marek L 

Mark `idris-print-definition-of-name` as obsolete in favour of

`idris-print-definition-of-name-at-point` and define new "internal"
function `idris--print-definition-of-name` to be used by the new 
`idris-print-definition-of-name-at-point`
and also from interactive context menu.

Why:
This allow us to have custom behaviour for "printing definitions" for Idris 
1 and 2
in one place.
---
 idris-commands.el | 28 +++-
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 5f07be25a9..4cfe3489eb 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -301,15 +301,25 @@ This sets the load position to point, if there is one."
 (when name
   (idris-info-for-name :type-of name
 
-(defun idris-print-definition-of-name (thing)
-  "Display the definition of the function or type of the THING at point."
+(defun idris--print-definition-of-name (name)
+  "Fetch from the Idris compiler and display the definition of the NAME."
+  (if (>=-protocol-version 2 1)
+  (idris-info-for-name :interpret (concat ":printdef " name))
+(idris-info-for-name :print-definition name)))
+
+(defun idris-print-definition-of-name-at-point (name)
+  "Display the definition of the function or type of the NAME at point.
+
+Idris 2 as of 05/01/2023 does not yet fully support
+printing definition of a type at point."
   (interactive "P")
-  (let ((name (if thing (read-string "Print definition: ")
-(idris-name-at-point
-(when name
-  (if (>=-protocol-version 2 1)
-  (idris-info-for-name :interpret (concat ":printdef " name))
-(idris-info-for-name :print-definition name)
+  (let ((name* (if name
+   (read-string "Print definition: ")
+ (idris-name-at-point
+(when name*
+  (idris--print-definition-of-name name*
+
+(define-obsolete-function-alias 'idris-print-definition-of-name 
'idris-print-definition-of-name-at-point "2023-01-05")
 
 (defun idris-who-calls-name (name)
   "Show the callers of NAME in a tree."
@@ -1321,7 +1331,7 @@ of the term to replace."
(list "Get definition"
  (lambda ()
(interactive)
-   (idris-info-for-name :print-definition ref)))
+   (idris--print-definition-of-name ref)))
(list "Who calls?"
  (lambda ()
(interactive)



[nongnu] elpa/idris-mode updated (a060688b5c -> 253e2ad909)

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

  from  a060688b5c Merge pull request #604 from keram/idris-xref-v1
   new  1b30ca6334 Improve documentation for `idris-info-for-name`
   new  a47811be8b Check for semantic property `key` having non empty 
string value
   new  3e7cbb331f Idris2: Use `:interpret .. :printdef` command to fetch 
symbol definition
   new  7697b8b95e Mark `idris-print-definition-of-name` as obsolete in 
favour of
   new  253e2ad909 Merge pull request #605 from keram/print-def


Summary of changes:
 idris-commands.el | 32 ++--
 idris-common-utils.el |  2 +-
 2 files changed, 23 insertions(+), 11 deletions(-)



[nongnu] elpa/idris-mode 1b30ca6334 1/5: Improve documentation for `idris-info-for-name`

2023-01-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 1b30ca6334ba6a5f7b2e159a4f12c3ddac29ee83
Author: Marek L 
Commit: Marek L 

Improve documentation for `idris-info-for-name`
---
 idris-commands.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 88f5c590ab..dba49f034b 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -283,9 +283,9 @@ This sets the load position to point, if there is one."
 
 
 
-(defun idris-info-for-name (what name)
-  "Display the type for a NAME."
-  (let* ((ty (idris-eval (list what name)))
+(defun idris-info-for-name (command name)
+  "Pass to Idris compiler COMMAND with NAME as argument and display the 
result."
+  (let* ((ty (idris-eval (list command name)))
  (result (car ty))
  (formatting (cdr ty)))
   (idris-show-info (format "%s" result) formatting)))



[nongnu] elpa/idris-mode a47811be8b 2/5: Check for semantic property `key` having non empty string value

2023-01-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit a47811be8b1c6fab8a6cb46041395d04d2ea20f5
Author: Marek L 
Commit: Marek L 

Check for semantic property `key` having non empty string value

before assigning the value to `idris-name-key` text property.

Why:
Previously the value was wrapped with `{ VAL }` even if it was 
empty but
later we check for presence of the value as it is non empty we use the value
stored in the idris-name-key property.
```
idris-context-menu-items
...
ref (or (plist-get plist `idris-name-key) (plist-get plist `idris-ref)
```
not using the fallback `idris-ref property value.
---
 idris-common-utils.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/idris-common-utils.el b/idris-common-utils.el
index 3b18bbfc32..e80c31c638 100644
--- a/idris-common-utils.el
+++ b/idris-common-utils.el
@@ -293,7 +293,7 @@ inserted text (that is, relative to point prior to 
insertion)."
 (if term
 (list 'idris-tt-term (cadr term))
   ())
-(if key
+(if (and key (not (string-empty-p (cadr key
 (list 'idris-name-key (concat "{" (cadr key) "}"))
   ())
 (if idris-err



[nongnu] elpa/sweeprolog updated (42d2f4d301 -> c6ae233d03)

2023-01-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/sweeprolog.

  from  42d2f4d301 Announce recent changes in NEWS.org and bump version to 
0.11.0
   new  a16ea87e11 ENHANCED: Support refining term searches with arbitrary 
goals
   new  c6ae233d03 Announce recent changes in NEWS.org and bump version to 
0.11.1


Summary of changes:
 NEWS.org  |  14 +++
 README.org|  13 ---
 sweep.pl  |  56 +++-
 sweeprolog.el | 117 ++
 4 files changed, 147 insertions(+), 53 deletions(-)



[nongnu] elpa/sweeprolog a16ea87e11 1/2: ENHANCED: Support refining term searches with arbitrary goals

2023-01-06 Thread ELPA Syncer
branch: elpa/sweeprolog
commit a16ea87e1197208896b49f185032828bce818b85
Author: Eshel Yaron 
Commit: Eshel Yaron 

ENHANCED: Support refining term searches with arbitrary goals

* sweep.pl (sweep_term_search/2): extend with an extra goal argument.
* sweeprolog.el (sweeprolog-read-term): new function, similar to
read--expression but for Prolog terms rather than Elisp expressions.
(sweeprolog-term-search): use it, and prompt for goal with prefix arg.
---
 README.org|  13 ---
 sweep.pl  |  56 +++-
 sweeprolog.el | 115 +++---
 3 files changed, 132 insertions(+), 52 deletions(-)

diff --git a/README.org b/README.org
index b66ceb3011..713a150154 100644
--- a/README.org
+++ b/README.org
@@ -1337,16 +1337,19 @@ You can search for Prolog terms matching a given search 
term with the
 command ~M-x sweeprolog-term-search~.  This command, bound by default to
 ~C-c C-s~ in ~sweeprolog-mode~ buffers, prompts for a Prolog term to
 search for and finds terms in the current buffer that the search term
-subsumes.  For example, to find if-then-else constructs in the current
-buffer do ~C-c C-s _ -> _ ; _ RET~.
+subsumes.  It highlights all matching terms in the buffer and moves
+the cursor to the beginning of the next match after point.  For
+example, to find if-then-else constructs in the current buffer do ~C-c
+C-s _ -> _ ; _ RET~.  You can further refine the search with an
+arbitrary Prolog goal that variables in the search term should satisfy
+by invoking ~sweeprolog-term-search~ with a prefix argument (i.e. typing
+~C-u C-c C-c~).
 
 #+FINDEX: sweeprolog-term-search-repeat-forward
 #+FINDEX: sweeprolog-term-search-repeat-backward
 #+KINDEX: C-s (sweeprolog-term-search-map)
 #+KINDEX: C-r (sweeprolog-term-search-map)
-All matching terms in the buffer are highlighted and the cursor moves
-to the beginning of the next match after point.  Typing ~C-s~
-immediately after a successful search invokes the command
+Typing ~C-s~ immediately after a successful search invokes the command
 ~sweeprolog-term-search-repeat-forward~ which moves forward to the next
 match.  Likewise, typing ~C-r~ after a successful term search invokes
 the command ~sweeprolog-term-search-repeat-backward~ which moves
diff --git a/sweep.pl b/sweep.pl
index c9fdf80312..9e80898476 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -980,53 +980,59 @@ sweep_current_functors(A0, Col) :-
 ),
 Col).
 
-sweep_term_search([Path0|String], Res) :-
-term_string(Term, String),
+sweep_term_search([Path0,TermString,GoalString], Res) :-
+term_string(Term, TermString, [variable_names(TermVarNames)]),
+term_string(Goal, GoalString, [variable_names(GoalVarNames)]),
+maplist({GoalVarNames}/[TermVarName]>>ignore(memberchk(TermVarName, 
GoalVarNames)),
+TermVarNames),
 atom_string(Path, Path0),
 setup_call_cleanup(prolog_open_source(Path, Stream),
-   sweep_search_stream(Stream, Term, Res),
+   sweep_search_stream(Stream, Term, Goal, Res),
prolog_close_source(Stream)).
 
-sweep_search_stream(Stream, Term, Res) :-
+sweep_search_stream(Stream, Term, Goal, Res) :-
 prolog_read_source_term(Stream, Term0, _, [subterm_positions(TermPos)]),
-sweep_search_stream_(Term0, TermPos, Stream, Term, Res).
+sweep_search_stream_(Term0, TermPos, Stream, Term, Goal, Res).
 
-sweep_search_stream_(end_of_file, _, _, _, []) :-
+sweep_search_stream_(end_of_file, _, _, _, _, []) :-
 !.
-sweep_search_stream_(Term0, TermPos, Stream, Term, Res) :-
+sweep_search_stream_(Term0, TermPos, Stream, Term, Goal, Res) :-
 findall([HS|HE],
-sweep_match_term(TermPos, Term0, Term, HS, HE),
+sweep_match_term(TermPos, Term0, Term, Goal, HS, HE),
 Res,
 Tail),
-sweep_search_stream(Stream, Term, Tail).
+sweep_search_stream(Stream, Term, Goal, Tail).
 
-sweep_match_term(Pos, Term0, Term, From, To) :-
+sweep_match_term(Pos, Term0, Term, Goal, From, To) :-
 compound(Pos),
 Pos \= parentheses_term_position(_, _, _),
 arg(1, Pos, From),
 arg(2, Pos, To),
-subsumes_term(Term, Term0).
-sweep_match_term(brace_term_position(_, _, Arg), {Term0}, Term, From, To) :-
-sweep_match_term(Arg, Term0, Term, From, To).
-sweep_match_term(list_position(_, _, Elms, _), Term0, Term, From, To) :-
+subsumes_term(Term, Term0),
+\+ \+ (   Term = Term0,
+  Goal
+  ).
+sweep_match_term(brace_term_position(_, _, Arg), {Term0}, Term, Goal, From, 
To) :-
+sweep_match_term(Arg, Term0, Term, Goal, From, To).
+sweep_match_term(list_position(_, _, Elms, _), Term0, Term, Goal, From, To) :-
 nth0(I, Elms, Elm),
 nth0(I, Term0, Term1),
-sweep_match_term(Elm, Term1, Term, From, To).
-sweep_match_term(list_position(_, _, _, Tail), Term0, Term, From, To) :-
+sweep_match_term(Elm, Term1, Term, Goa

[nongnu] elpa/sweeprolog c6ae233d03 2/2: Announce recent changes in NEWS.org and bump version to 0.11.1

2023-01-06 Thread ELPA Syncer
branch: elpa/sweeprolog
commit c6ae233d03c98f2fc4fb23d4f7e3ce15e10706d9
Author: Eshel Yaron 
Commit: Eshel Yaron 

Announce recent changes in NEWS.org and bump version to 0.11.1
---
 NEWS.org  | 14 ++
 sweeprolog.el |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index 7bf7a2f7d8..0d33147330 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -11,6 +11,20 @@ SWI-Prolog in Emacs.
 For further details, please consult the manual:
 .
 
+* Version 0.11.1 on 2023-01-06
+
+** Term Search improvements
+
+Invoking ~sweeprolog-term-search~ with a prefix argument (i.e. typing
+~C-u C-c C-s~) now prompts for an arbitrary Prolog goal that variables
+in the search term should satisfy.
+
+We also use a new function ~sweeprolog-read-term~ for reading the search
+term, which checks that the minibuffer contains a valid Prolog term
+before exiting.  If the term is invalid this function refuses to exit
+the minibuffer and moves point to the position of the syntax error in
+the given term.
+
 * Version 0.11.0 on 2023-01-05
 
 ** New command ~sweeprolog-term-search~
diff --git a/sweeprolog.el b/sweeprolog.el
index 500725427c..5b4784bf12 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Eshel Yaron <~eshel/d...@lists.sr.ht>
 ;; Keywords: prolog languages extensions
 ;; URL: https://git.sr.ht/~eshel/sweep
-;; Package-Version: 0.11.0
+;; Package-Version: 0.11.1
 ;; Package-Requires: ((emacs "28.1"))
 
 ;; This file is NOT part of GNU Emacs.



[elpa] externals/compat eaada8921b 2/2: compat--function-definition: Add declare-function

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

compat--function-definition: Add declare-function

The functions are declared in order to avoid bytecompiler warnings
about missing definitions at runtime. These warnings may be generated
due to the dynamic unless fboundp check, which ensures that existing
functions are not overridden.
---
 compat-macs.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/compat-macs.el b/compat-macs.el
index e9e3712cce..be3fefd9a4 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -134,7 +134,12 @@ REST are attributes and the function BODY."
 ;; is loaded on a newer Emacs version.
 `(,@(when def
   (if (eq defname name)
-  `((unless (fboundp ',name) ,def))
+  ;; Declare the function in a non-existing compat-declare
+  ;; feature, such that the byte compiler does not complain
+  ;; about possibly missing functions at runtime. The warnings
+  ;; are generated due to the unless fboundp check.
+  `((declare-function ,name "ext:compat-declare")
+(unless (fboundp ',name) ,def))
 (list def)))
   ,@(when realname
   `((defalias ',realname #',(or defname name)



[elpa] externals/compat updated (92a52ddf6e -> eaada8921b)

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

  from  92a52ddf6e compat-tests: Use uniform naming convention
   new  4658ba6ea8 compat-macs: Restore runtime checks
   new  eaada8921b compat--function-definition: Add declare-function


Summary of changes:
 NEWS.org   |  5 +++--
 compat-macs.el | 58 +-
 2 files changed, 40 insertions(+), 23 deletions(-)



[elpa] externals/compat 4658ba6ea8 1/2: compat-macs: Restore runtime checks

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 4658ba6ea854af1e1e6154397c996c05c057d1b5
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-macs: Restore runtime checks

Compat uses runtime checks (boundp, fboundp) to ensure that existing
definitions are never overridden, when Compat is loaded on a newer
Emacs than it was compiled on.
---
 NEWS.org   |  5 +++--
 compat-macs.el | 53 -
 2 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 51912c1e5a..861c14b5e9 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -7,8 +7,9 @@
   compatibility aliases, functions, macros and variables are installed.
 - Remove deprecated, prefixed compatibility functions.
 - Remove deprecated features ~compat-help~, ~compat-font-lock~ and ~compat-24~.
-- Compat will check that the Emacs version which was used to compile Compat
-  equals the Emacs version at runtime.
+- Compat uses runtime checks (boundp, fboundp) to ensure that existing
+  definitions are never overridden, when Compat is loaded on a newer Emacs than
+  it was compiled on.
 
 * Release of "Compat" Version 29.1.0.1
 
diff --git a/compat-macs.el b/compat-macs.el
index 0d9a8b4f92..e9e3712cce 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -31,9 +31,7 @@
 (defmacro compat-declare-version (version)
   "Set the Emacs version that is currently being handled to VERSION."
   (setq compat--current-version version)
-  `(unless (equal emacs-version ,emacs-version)
- (error ,(format "Compat was compiled with Emacs %s, you are running %%s" 
emacs-version)
-emacs-version)))
+  nil)
 
 (defun compat--format-docstring (type name docstring)
   "Format DOCSTRING for NAME of TYPE.
@@ -118,21 +116,28 @@ REST are attributes and the function BODY."
  (not (string-prefix-p
"compat--" (symbol-name realname)
 (error "%s: Invalid :realname name" realname))
-  (let ((def-name ;; Name of the definition. May be nil -> no definition.
- (if (not (fboundp name)) ;; If not bound, `name' should be bound.
- name
-   ;; Use `:explicit' name if the function is already defined,
-   ;; and if version constraint is satisfied.
-   (and explicit
-(version< emacs-version compat--current-version)
-(intern (format "compat--%s" name))
-`(,@(when def-name
-  `((,(if (eq type 'macro) 'defmacro 'defun)
- ,def-name ,arglist
- ,(compat--format-docstring type name docstring)
- ,@body)))
+  (let* ((defname ;; Name of the definition. May be nil -> no definition.
+  (if (not (fboundp name)) ;; If not bound, `name' should be bound.
+  name
+;; Use `:explicit' name if the function is already defined,
+;; and if version constraint is satisfied.
+(and explicit
+ (version< emacs-version compat--current-version)
+ (intern (format "compat--%s" name)
+ (def (and defname
+   `(,(if (eq type 'macro) 'defmacro 'defun)
+ ,defname ,arglist
+ ,(compat--format-docstring type name docstring)
+ ,@body
+;; An additional 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.
+`(,@(when def
+  (if (eq defname name)
+  `((unless (fboundp ',name) ,def))
+(list def)))
   ,@(when realname
-  `((defalias ',realname #',(or def-name name)
+  `((defalias ',realname #',(or defname name)
 
 (defmacro compat-defalias (name def &rest attrs)
   "Define compatibility alias NAME as DEF.
@@ -151,8 +156,11 @@ under which the definition is generated.
   non-nil."
   (compat--guarded-definition attrs ()
 (lambda ()
-  (unless (fboundp name)
-`((defalias ',name ',def))
+  ;; 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.
+  `((unless (fboundp ',name)
+  (defalias ',name ',def))
 
 (defmacro compat-defun (name arglist docstring &rest rest)
   "Define compatibility function NAME with arguments ARGLIST.
@@ -216,8 +224,11 @@ definition is generated.
(doc-string 3) (indent 2))
   (compat--guarded-definition attrs '(:local :constant)
 (lambda (local constant)
-  (unless (boundp name)
-`((,(if constant 'defconst 'defvar)
+  ;; 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 3ee71d20de: compat-defalias: Add missing debug declare

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

compat-defalias: Add missing debug declare
---
 compat-macs.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compat-macs.el b/compat-macs.el
index be3fefd9a4..b1a7cb9890 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -159,6 +159,7 @@ under which the definition is generated.
 
 - :cond :: Only install the definition if :cond evaluates to
   non-nil."
+  (declare (debug (name symbolp [&rest keywordp sexp])))
   (compat--guarded-definition attrs ()
 (lambda ()
   ;; The fboundp check is performed at runtime to make sure that we never



[elpa] externals/org a08c37603f: Merge branch 'bugfix'

2023-01-06 Thread ELPA Syncer
branch: externals/org
commit a08c37603fab8bb2685ab9320843ccc9898810e2
Merge: a3815a169a 28a9664844
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Merge branch 'bugfix'
---
 doc/org-manual.org | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index f3b77ebad9..4466af8e4c 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -1253,11 +1253,12 @@ After the drawer.
 #+findex: org-insert-drawer
 You can interactively insert a drawer at point by calling
 ~org-insert-drawer~, which is bound to {{{kbd(C-c C-x d)}}}.  With an
-active region, this command puts the region inside the drawer.  With
-a prefix argument, this command calls ~org-insert-property-drawer~,
-which creates a =PROPERTIES= drawer right below the current headline.
-Org mode uses this special drawer for storing properties (see
-[[*Properties and Columns]]).  You cannot use it for anything else.
+active region, this command puts the region inside the drawer.  With a
+prefix argument, this command calls non-interactive function
+~org-insert-property-drawer~, which creates a =PROPERTIES= drawer
+right below the current headline.  Org mode uses this special drawer
+for storing properties (see [[*Properties and Columns]]).  You cannot use
+it for anything else.
 
 Completion over drawer keywords is also possible using
 {{{kbd(M-TAB)}}}[fn:6].



[elpa] externals-release/org 28a9664844: org-manual.org: Clarify that `org-insert-property-drawer' is not a command

2023-01-06 Thread ELPA Syncer
branch: externals-release/org
commit 28a9664844f09c626a46dc1a1d12ec73eaf7904a
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-manual.org: Clarify that `org-insert-property-drawer' is not a command

* doc/org-manual.org (Drawers): Emphasize that
`org-insert-property-drawer' is not interactive command, but a
function.

Reported-by: alain.coch...@unistra.fr
Link: https://orgmode.org/list/tp3pbi$dk$1...@ciao.gmane.io
---
 doc/org-manual.org | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 8444024b2b..cc822bfb70 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -1249,11 +1249,12 @@ After the drawer.
 #+findex: org-insert-drawer
 You can interactively insert a drawer at point by calling
 ~org-insert-drawer~, which is bound to {{{kbd(C-c C-x d)}}}.  With an
-active region, this command puts the region inside the drawer.  With
-a prefix argument, this command calls ~org-insert-property-drawer~,
-which creates a =PROPERTIES= drawer right below the current headline.
-Org mode uses this special drawer for storing properties (see
-[[*Properties and Columns]]).  You cannot use it for anything else.
+active region, this command puts the region inside the drawer.  With a
+prefix argument, this command calls non-interactive function
+~org-insert-property-drawer~, which creates a =PROPERTIES= drawer
+right below the current headline.  Org mode uses this special drawer
+for storing properties (see [[*Properties and Columns]]).  You cannot use
+it for anything else.
 
 Completion over drawer keywords is also possible using
 {{{kbd(M-TAB)}}}[fn:6].



[elpa] externals/org updated (a3815a169a -> a08c37603f)

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

  from  a3815a169a org-cycle-level: Do nothing at inlinetasks
   new  28a9664844 org-manual.org: Clarify that 
`org-insert-property-drawer' is not a command
   new  a08c37603f Merge branch 'bugfix'


Summary of changes:
 doc/org-manual.org | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)



[elpa] externals/compat e375885957 2/4: compat-tests: Suppress warning for `string-to-multibyte' on 26

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

compat-tests: Suppress warning for `string-to-multibyte' on 26
---
 compat-tests.el | 39 +++
 1 file changed, 23 insertions(+), 16 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index fc0c5cd02f..5c76084bea 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1097,6 +1097,13 @@
   (should-equal "t\ta" (compat-call string-trim "t\ta\t\n"))
   (should-equal "a" (compat-call string-trim "\n  \ta  \n")))
 
+(defmacro compat-tests--string-to-multibyte (str)
+  ;; On Emacs 26 `string-to-multibyte' was declared obsolete.
+  ;; This obsoletion was reverted on Emacs 27.
+  (if (= emacs-major-version 26)
+  `(with-no-warnings (string-to-multibyte ,str))
+`(string-to-multibyte ,str)))
+
 (ert-deftest string-search ()
   ;; Find needle at the beginning of a haystack:
   (should-equal 0 (string-search "a" "abb"))
@@ -1165,8 +1172,8 @@
   (should-not (string-search "\270" "aøb"))
   (should-not (string-search "ø" "\303\270"))
   (should-not (string-search "ø" (make-string 32 ?a)))
-  (should-not (string-search "ø" (string-to-multibyte (make-string 32 ?a
-  (should-equal 14 (string-search "o" (string-to-multibyte
+  (should-not (string-search "ø" (compat-tests--string-to-multibyte 
(make-string 32 ?a
+  (should-equal 14 (string-search "o" (compat-tests--string-to-multibyte
 (apply #'string (number-sequence ?a 
?z)
   (should-equal 2 (string-search "a\U00010f98z" "a\U00010f98a\U00010f98z"))
   (should-error (string-search "a" "abc" -1) :type '(args-out-of-range -1))
@@ -1185,30 +1192,30 @@
   (should-not (string-search "ø" "foo\303\270"))
   (should-not (string-search "\303\270" "ø"))
   (should-not (string-search "\370" "ø"))
-  (should-not (string-search (string-to-multibyte "\370") "ø"))
+  (should-not (string-search (compat-tests--string-to-multibyte "\370") "ø"))
   (should-not (string-search "ø" "\370"))
-  (should-not (string-search "ø" (string-to-multibyte "\370")))
+  (should-not (string-search "ø" (compat-tests--string-to-multibyte "\370")))
   (should-not (string-search "\303\270" "\370"))
-  (should-not (string-search (string-to-multibyte "\303\270") "\370"))
-  (should-not (string-search "\303\270" (string-to-multibyte "\370")))
+  (should-not (string-search (compat-tests--string-to-multibyte "\303\270") 
"\370"))
+  (should-not (string-search "\303\270" (compat-tests--string-to-multibyte 
"\370")))
   (should-not
-  (string-search (string-to-multibyte "\303\270")
- (string-to-multibyte "\370")))
+  (string-search (compat-tests--string-to-multibyte "\303\270")
+ (compat-tests--string-to-multibyte "\370")))
   (should-not (string-search "\370" "\303\270"))
-  (should-not (string-search (string-to-multibyte "\370") "\303\270"))
-  (should-not (string-search "\370" (string-to-multibyte "\303\270")))
+  (should-not (string-search (compat-tests--string-to-multibyte "\370") 
"\303\270"))
+  (should-not (string-search "\370" (compat-tests--string-to-multibyte 
"\303\270")))
   (should-not
- (string-search (string-to-multibyte "\370")
-(string-to-multibyte "\303\270")))
+ (string-search (compat-tests--string-to-multibyte "\370")
+(compat-tests--string-to-multibyte 
"\303\270")))
   (should-equal 3 (string-search "\303\270" "foo\303\270"))
   (when (version<= "27" emacs-version)
 ;; FIXME The commit a1f76adfb03c23bb4242928e8efe6193c301f0c1 in
 ;; emacs.git fixes the behaviour of regular expressions matching
 ;; raw bytes.  The compatibility functions should updated to
 ;; backport this behaviour.
-(should-equal 2 (string-search (string-to-multibyte "\377") "ab\377c"))
+(should-equal 2 (string-search (compat-tests--string-to-multibyte "\377") 
"ab\377c"))
 (should-equal 2
-(string-search (string-to-multibyte "o\303\270")
+(string-search (compat-tests--string-to-multibyte 
"o\303\270")
"foo\303\270"
 
 (ert-deftest string-replace ()
@@ -1233,8 +1240,8 @@
 ;; expressions matching raw bytes.  The compatibility
 ;; functions should updated to backport this
 ;; behaviour.
-(should-equal "axb" (string-replace (string-to-multibyte "\377") "x" 
"a\377b"))
-(should-equal "axø" (string-replace (string-to-multibyte "\377") "x" 
"a\377ø")))
+(should-equal "axb" (string-replace (compat-tests--string-to-multibyte 
"\377") "x" "a\377b"))
+(should-equal "axø" (string-replace (compat-tests--string-to-multibyte 
"\377") "x" "a\377ø")))
   (should-equal "ANAnas" (string-replace "ana" "ANA" "ananas"))
   (should-equal "" (string-replace "a" "" ""))
   (should-equal "" (string-replace

[elpa] externals/compat updated (3ee71d20de -> 7821117bec)

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

  from  3ee71d20de compat-defalias: Add missing debug declare
   new  cbd908e642 compat--function-definition: Do not use hashed symbol
   new  e375885957 compat-tests: Suppress warning for `string-to-multibyte' 
on 26
   new  265ecb9aac Treat byte compilation warnings as errors
   new  7821117bec compat-26: Only define gv expanders if needed


Summary of changes:
 Makefile|  5 -
 NEWS.org|  2 ++
 compat-26.el| 62 ++---
 compat-macs.el  | 28 --
 compat-tests.el | 39 +---
 5 files changed, 75 insertions(+), 61 deletions(-)



[elpa] externals/compat 7821117bec 4/4: compat-26: Only define gv expanders if needed

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 7821117bec2f6353cece59c27494a98dc3640d71
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-26: Only define gv expanders if needed

compat--alist-get is only defined on Emacs < 26.
---
 compat-26.el | 62 
 1 file changed, 33 insertions(+), 29 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index bde9e8b8a6..bffee6473b 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -83,34 +83,36 @@ from the absolute start of the buffer, disregarding the 
narrowing."
 (if entry (cdr entry) default))
 (alist-get key alist default remove)))
 
-(gv-define-expander compat--alist-get
-  (lambda (do key alist &optional default remove testfn)
-(macroexp-let2 macroexp-copyable-p k key
-  (gv-letplace (getter setter) alist
-(macroexp-let2 nil p `(compat--internal-assoc ,k ,getter ,testfn)
-  (funcall do (if (null default) `(cdr ,p)
-`(if ,p (cdr ,p) ,default))
-   (lambda (v)
- (macroexp-let2 nil v v
-   (let ((set-exp
-  `(if ,p (setcdr ,p ,v)
- ,(funcall setter
-   `(cons (setq ,p (cons ,k ,v))
-  ,getter)
- `(progn
-,(cond
-  ((null remove) set-exp)
-  ((or (eql v default)
-   (and (eq (car-safe v) 'quote)
-(eq (car-safe default) 'quote)
-(eql (cadr v) (cadr default
-   `(if ,p ,(funcall setter `(delq ,p ,getter
-  (t
-   `(cond
- ((not (eql ,default ,v)) ,set-exp)
- (,p ,(funcall setter
-   `(delq ,p ,getter))
-,v))
+;; NOTE: Define gv expander only if `compat--alist-get' is defined.
+(when (version< emacs-version "26.1")
+  (gv-define-expander compat--alist-get
+(lambda (do key alist &optional default remove testfn)
+  (macroexp-let2 macroexp-copyable-p k key
+(gv-letplace (getter setter) alist
+  (macroexp-let2 nil p `(compat--internal-assoc ,k ,getter ,testfn)
+(funcall do (if (null default) `(cdr ,p)
+  `(if ,p (cdr ,p) ,default))
+ (lambda (v)
+   (macroexp-let2 nil v v
+ (let ((set-exp
+`(if ,p (setcdr ,p ,v)
+   ,(funcall setter
+ `(cons (setq ,p (cons ,k ,v))
+,getter)
+   `(progn
+  ,(cond
+((null remove) set-exp)
+((or (eql v default)
+ (and (eq (car-safe v) 'quote)
+  (eq (car-safe default) 'quote)
+  (eql (cadr v) (cadr default
+ `(if ,p ,(funcall setter `(delq ,p ,getter
+(t
+ `(cond
+   ((not (eql ,default ,v)) ,set-exp)
+   (,p ,(funcall setter
+ `(delq ,p ,getter))
+  ,v)))
 
 (compat-defun string-trim-left (string &optional regexp) ;; 
   "Trim STRING of leading string matching REGEXP.
@@ -503,7 +505,9 @@ If VALUE is nil, PROPERTY is removed from IMAGE."
   ;; :feature image
   (plist-get (cdr image) property))
 
-(unless (get 'image-property 'gv-expander)
+(unless (eval-when-compile
+  (require 'image)
+  (get 'image-property 'gv-expander))
   (gv-define-setter image-property (image property value)
 (let ((image* (make-symbol "image"))
   (property* (make-symbol "property"))



[elpa] externals/compat 265ecb9aac 3/4: Treat byte compilation warnings as errors

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 265ecb9aacdfcfb30ae712a6d8c0dad6833a1cda
Author: Daniel Mendler 
Commit: Daniel Mendler 

Treat byte compilation warnings as errors

Except on the snapshot version since new warnings may get introduced
there. As soon as a new Emacs version is released, it will also
checked for warnings.
---
 Makefile | 5 -
 NEWS.org | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index e205f12393..df59a40629 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,10 @@ clean:
 $(BYTEC): compat-macs.el
 
 .el.elc:
-   $(EMACS) -Q --batch -L . -f batch-byte-compile $<
+   @echo "Compiling $<"
+   @$(EMACS) -Q --batch -L . \
+   --eval '(setq byte-compile-error-on-warn (< emacs-major-version 
29))' \
+   -f batch-byte-compile $<
 
 compat.info: compat.texi
$(MAKEINFO) $<
diff --git a/NEWS.org b/NEWS.org
index 861c14b5e9..42a6d60138 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -10,6 +10,8 @@
 - Compat uses runtime checks (boundp, fboundp) to ensure that existing
   definitions are never overridden, when Compat is loaded on a newer Emacs than
   it was compiled on.
+- Compat compiles without byte compilation warnings on all supported Emacs
+  versions. Warnings are treated as errors in the test suite.
 
 * Release of "Compat" Version 29.1.0.1
 



[elpa] externals/compat cbd908e642 1/4: compat--function-definition: Do not use hashed symbol

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

compat--function-definition: Do not use hashed symbol

The hashed symbol leads to a bytecompiler warning (false positive).
---
 compat-macs.el | 28 +---
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index b1a7cb9890..880f71cd7a 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -124,25 +124,23 @@ REST are attributes and the function BODY."
 (and explicit
  (version< emacs-version compat--current-version)
  (intern (format "compat--%s" name)
- (def (and defname
-   `(,(if (eq type 'macro) 'defmacro 'defun)
- ,defname ,arglist
- ,(compat--format-docstring type name docstring)
- ,@body
+ (def `(,(if (eq type 'macro) 'defmacro 'defun)
+,defname ,arglist
+,(compat--format-docstring type name docstring)
+,@body)))
 ;; An additional 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.
-`(,@(when def
-  (if (eq defname name)
-  ;; Declare the function in a non-existing compat-declare
-  ;; feature, such that the byte compiler does not complain
-  ;; about possibly missing functions at runtime. The warnings
-  ;; are generated due to the unless fboundp check.
-  `((declare-function ,name "ext:compat-declare")
-(unless (fboundp ',name) ,def))
-(list def)))
+`(,@(if (eq defname name)
+;; Declare the function in a non-existing compat-declare
+;; feature, such that the byte compiler does not complain
+;; about possibly missing functions at runtime. The warnings
+;; are generated due to the unless fboundp check.
+`((declare-function ,name "ext:compat-declare")
+  (unless (fboundp ',name) ,def))
+  (and defname (list def)))
   ,@(when realname
-  `((defalias ',realname #',(or defname name)
+  `((defalias ',realname ',(or defname name)
 
 (defmacro compat-defalias (name def &rest attrs)
   "Define compatibility alias NAME as DEF.



[elpa] externals/topspace 88604ffb6d 2/2: Rm linum development dependency breaking CI

2023-01-06 Thread ELPA Syncer
branch: externals/topspace
commit 88604ffb6d0eed3f0153e95a79beb885966d3165
Author: Trevor Pogue 
Commit: Trevor Pogue 

Rm linum development dependency breaking CI
---
 Cask  | 3 +--
 test/topspace-test.el | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/Cask b/Cask
index d0748fb1bf..841656189c 100644
--- a/Cask
+++ b/Cask
@@ -4,7 +4,6 @@
 (development
  (depends-on "undercover")
  (depends-on "buttercup")
- (depends-on "smooth-scrolling")
- (depends-on "linum"))
+ (depends-on "smooth-scrolling"))
 
 (package-file "topspace.el")
diff --git a/test/topspace-test.el b/test/topspace-test.el
index 850b95ff9a..33888df24e 100644
--- a/test/topspace-test.el
+++ b/test/topspace-test.el
@@ -83,12 +83,10 @@
  (describe
   "topspace--after-scroll"
   (it "is needed when first scrolling above the top line"
-  (linum-mode 1)
   (goto-char 1)
   (topspace-set-height 0)
   (scroll-up-line)
   (scroll-down 2)
-  (linum-mode -1)
   (goto-char 1)
   (topspace-set-height 0)
   (scroll-up-line)



[elpa] externals/topspace 25853c035d 1/2: Add ELPA badge to README

2023-01-06 Thread ELPA Syncer
branch: externals/topspace
commit 25853c035dafc2d0be3ee433928613a0883263fe
Author: Trevor Pogue 
Commit: GitHub 

Add ELPA badge to README
---
 README.md | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index b402ed262e..edb3debb97 100644
--- a/README.md
+++ b/README.md
@@ -7,8 +7,8 @@
https://github.com/trevorpogue/topspace/actions/workflows/ci.yml/";>https://github.com/trevorpogue/topspace/actions/workflows/ci.yml/badge.svg";
 height="20"/>
   
   https://github.com/trevorpogue/topspace/blob/main/.github/workflows/ci.yml";>https://img.shields.io/badge/Emacs-25.1+-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=whit";
 height="20"/>
+  https://elpa.gnu.org/packages/topspace.html";>https://elpa.gnu.org/packages/topspace.svg"; height="20"/>
   http://melpa.org/#/topspace";>http://melpa.org/packages/topspace-badge.svg"; height="20"/>
-  http://stable.melpa.org/#/topspace";>http://stable.melpa.org/packages/topspace-badge.svg"; height="20"/>
 
 
 
@@ -31,15 +31,11 @@ as you recenter and scroll it down.
 * **Easy to use**: No new keybindings are required, keep using all your 
previous scrolling & recentering commands, except now you can also scroll down 
the first line. It also integrates seamlessly with  [centered-cursor-mode][1] 
to keep the cursor centered all the way to the first line.
 
 # Installation
+Run the following command in Emacs
 
-TopSpace is available on [MELPA](http://melpa.org).
-After [installing MELPA](https://melpa.org/#/getting-started) you can install 
TopSpace with the following command:
+ M-x `package-install` [RET] 
`topspace` [RET],
 
- M-x `package-install` [RET] 
`topspace` [RET]
-
-If `topspace` did not appear here in `package-install` try running 
M-x `package-refresh-contents` and repeating the above step.
-
-Then enable TopSpace locally with
+then enable TopSpace locally with
 
  M-x `topspace-mode`,
 
@@ -47,7 +43,7 @@ or globally with
 
  M-x `global-topspace-mode`.
 
-To enable `topspace-mode` globally on startup, add the following to your Emacs 
config:
+To enable `topspace-mode` globally on startup, add the following to your Emacs 
config
 ```
 (global-topspace-mode 1)
 ```



[elpa] externals/topspace updated (4f09052017 -> 88604ffb6d)

2023-01-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/topspace.

  from  4f09052017 Update news.yml
   new  25853c035d Add ELPA badge to README
   new  88604ffb6d Rm linum development dependency breaking CI


Summary of changes:
 Cask  |  3 +--
 README.md | 14 +-
 test/topspace-test.el |  2 --
 3 files changed, 6 insertions(+), 13 deletions(-)



[elpa] externals/compat updated (7821117bec -> bb928cabe6)

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

  from  7821117bec compat-26: Only define gv expanders if needed
   new  51417c4b96 Remove :realname
   new  62da11929a compat--alist-get gv expander: Evaluate check at compile 
time
   new  bb928cabe6 Only require Compat libraries which are needed


Summary of changes:
 NEWS.org   |  2 ++
 compat-26.el   | 15 ---
 compat-27.el   |  1 -
 compat-28.el   |  1 -
 compat-29.el   |  4 +---
 compat-macs.el | 59 +++---
 compat.el  |  2 +-
 7 files changed, 31 insertions(+), 53 deletions(-)



[elpa] externals/compat bb928cabe6 3/3: Only require Compat libraries which are needed

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

Only require Compat libraries which are needed
---
 NEWS.org   | 2 ++
 compat-26.el   | 1 -
 compat-27.el   | 1 -
 compat-28.el   | 1 -
 compat-29.el   | 1 -
 compat-macs.el | 6 --
 compat.el  | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 42a6d60138..59aa56e948 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -12,6 +12,8 @@
   it was compiled on.
 - Compat compiles without byte compilation warnings on all supported Emacs
   versions. Warnings are treated as errors in the test suite.
+- Compat takes great care to remove unneeded definitions at compile time. On
+  recent Emacs 29 the byte compiled files are empty and not loaded.
 
 * Release of "Compat" Version 29.1.0.1
 
diff --git a/compat-26.el b/compat-26.el
index 3cbe19f492..266bc56b48 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -22,7 +22,6 @@
 
 ;;; Code:
 
-(require 'compat-25)
 (eval-when-compile (load "compat-macs.el" nil t t))
 (compat-declare-version "26.1")
 
diff --git a/compat-27.el b/compat-27.el
index bac6f21f63..ef609a24e4 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -22,7 +22,6 @@
 
 ;;; Code:
 
-(require 'compat-26)
 (eval-when-compile (load "compat-macs.el" nil t t))
 (compat-declare-version "27.1")
 
diff --git a/compat-28.el b/compat-28.el
index 419c19de91..a3e2e4a58e 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -22,7 +22,6 @@
 
 ;;; Code:
 
-(require 'compat-27)
 (eval-when-compile (load "compat-macs.el" nil t t))
 (compat-declare-version "28.1")
 
diff --git a/compat-29.el b/compat-29.el
index 7bb0a6f25a..6220bc769d 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -22,7 +22,6 @@
 
 ;;; Code:
 
-(require 'compat-28)
 (eval-when-compile (load "compat-macs.el" nil t t))
 ;; TODO Update to 29.1 as soon as the Emacs emacs-29 branch version bumped
 (compat-declare-version "29.0")
diff --git a/compat-macs.el b/compat-macs.el
index ff623887c5..cf3239e529 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -26,12 +26,14 @@
 (require 'subr-x)
 
 (defvar compat--current-version nil
-  "Default version to use when no explicit version was given.")
+  "Version of the currently defined compatibility definitions.")
 
 (defmacro compat-declare-version (version)
   "Set the Emacs version that is currently being handled to VERSION."
   (setq compat--current-version version)
-  nil)
+  (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)
   "Format DOCSTRING for NAME of TYPE.
diff --git a/compat.el b/compat.el
index f54a5c3c39..7e37e143f0 100644
--- a/compat.el
+++ b/compat.el
@@ -42,7 +42,7 @@
 
 ;;; Code:
 
-(require 'compat-29)
+(when (< emacs-major-version 29) (require 'compat-29))
 
 (defmacro compat-function (fun)
   "Return compatibility function symbol for FUN.



[elpa] externals/compat 62da11929a 2/3: compat--alist-get gv expander: Evaluate check at compile time

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 62da11929abbdbb8083ce16771125a7f49637ccf
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat--alist-get gv expander: Evaluate check at compile time
---
 compat-26.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compat-26.el b/compat-26.el
index c0b6e42aa7..3cbe19f492 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -83,7 +83,7 @@ from the absolute start of the buffer, disregarding the 
narrowing."
 (alist-get key alist default remove)))
 
 ;; NOTE: Define gv expander only if `compat--alist-get' is defined.
-(when (version< emacs-version "26.1")
+(when (eval-when-compile (version< emacs-version "26.1"))
   (gv-define-expander compat--alist-get
 (lambda (do key alist &optional default remove testfn)
   (macroexp-let2 macroexp-copyable-p k key



[elpa] externals/compat 51417c4b96 1/3: Remove :realname

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 51417c4b968ba30d9633c389d425eeb4715698cf
Author: Daniel Mendler 
Commit: Daniel Mendler 

Remove :realname
---
 compat-26.el   | 12 +++-
 compat-29.el   |  3 +--
 compat-macs.el | 53 +++--
 3 files changed, 23 insertions(+), 45 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index bffee6473b..c0b6e42aa7 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -35,7 +35,6 @@ Equality is defined by the function TESTFN, defaulting to
 element and KEY.  With no optional argument, the function behaves
 just like `assoc'."
   :explicit t
-  :realname compat--internal-assoc
   (if testfn
   (catch 'found
 (dolist (ent alist)
@@ -89,7 +88,7 @@ from the absolute start of the buffer, disregarding the 
narrowing."
 (lambda (do key alist &optional default remove testfn)
   (macroexp-let2 macroexp-copyable-p k key
 (gv-letplace (getter setter) alist
-  (macroexp-let2 nil p `(compat--internal-assoc ,k ,getter ,testfn)
+  (macroexp-let2 nil p `(compat--assoc ,k ,getter ,testfn)
 (funcall do (if (null default) `(cdr ,p)
   `(if ,p (cdr ,p) ,default))
  (lambda (v)
@@ -118,7 +117,6 @@ from the absolute start of the buffer, disregarding the 
narrowing."
   "Trim STRING of leading string matching REGEXP.
 
 REGEXP defaults to \"[ \\t\\n\\r]+\"."
-  :realname compat--internal-string-trim-left
   :explicit t
   (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string)
   (substring string (match-end 0))
@@ -128,7 +126,6 @@ REGEXP defaults to \"[ \\t\\n\\r]+\"."
   "Trim STRING of trailing string matching REGEXP.
 
 REGEXP defaults to  \"[ \\t\\n\\r]+\"."
-  :realname compat--internal-string-trim-right
   :explicit t
   (let ((i (string-match-p
 (concat "\\(?:" (or regexp "[ \t\n\r]+") "\\)\\'")
@@ -140,11 +137,8 @@ REGEXP defaults to  \"[ \\t\\n\\r]+\"."
 
 TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
   :explicit t
-  ;; `string-trim-left' and `string-trim-right' were moved from subr-x
-  ;; to subr in Emacs 27, so to avoid loading subr-x we use the
-  ;; compatibility function here:
-  (compat--internal-string-trim-left
-   (compat--internal-string-trim-right
+  (compat--string-trim-left
+   (compat--string-trim-right
 string
 trim-right)
trim-left))
diff --git a/compat-29.el b/compat-29.el
index 0d3b5b5cae..7bb0a6f25a 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -211,7 +211,6 @@ the parent, and with a nil DEF, the lookups will return nil.
 If KEYMAP is a sparse keymap with a binding for KEY, the existing
 binding is altered.  If there is no binding for KEY, the new pair
 binding KEY to DEF is added at the front of KEYMAP."
-  :realname compat--define-key-with-remove
   :explicit t
   (if remove
   (let ((prev (lookup-key keymap key))
@@ -759,7 +758,7 @@ parent keymap.  Removing the binding will allow the key in 
the
 parent keymap to be used."
   (unless (key-valid-p key)
 (error "%S is not a valid key definition; see `key-valid-p'" key))
-  (compat--define-key-with-remove keymap (key-parse key) nil remove))
+  (compat--define-key keymap (key-parse key) nil remove))
 
 (compat-defun keymap-global-set (key command) ;; 
   "Give KEY a global binding as COMMAND.
diff --git a/compat-macs.el b/compat-macs.el
index 880f71cd7a..ff623887c5 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -63,16 +63,17 @@ If this is not documented on yourself system, you can check 
\
   "Check that version constraints specified by ATTRS are satisfied."
   (let ((min-version (plist-get attrs :min-version))
 (max-version (plist-get attrs :max-version))
-(cond (plist-get attrs :cond))
-(realname (plist-get attrs :realname)))
+(cond (plist-get attrs :cond)))
+;; Min/max version bounds must be satisfied.
 (and
  ;; Min/max version bounds must be satisfied.
  (or (not min-version) (version<= min-version emacs-version))
  (or (not max-version) (version< emacs-version max-version))
  ;; If a condition is specified, it must be satisfied.
  (or (not cond) (eval cond t))
- ;; :realname specified or version constraint satisfied.
- (or realname (version< emacs-version compat--current-version)
+ ;; The current Emacs must be older than the current declared Compat
+ ;; version, see `compat-declare-version'.
+ (version< emacs-version compat--current-version
 
 (defun compat--guarded-definition (attrs args fun)
   "Guard compatibility definition generation.
@@ -100,8 +101,8 @@ ARGS is a list of keywords which are looked up and passed 
to FUN."
 (defun compat--function-definition (type name arglist docstring rest)
   "Define function NAME of TYPE with ARGLIST and DOCSTRING.
 REST are attributes and the function BODY."
-  (compat--guarded-definition rest '(:explicit :realname :body)
-(lambda (explicit realname body)
+  (c

[elpa] externals-release/org 41ebc2e40c: test-ob-octave.el: wrap get-buffer in buffer-live-p

2023-01-06 Thread ELPA Syncer
branch: externals-release/org
commit 41ebc2e40c33080a47cebb2507f038058b862655
Author: Leo Butler 
Commit: Ihor Radchenko 

test-ob-octave.el: wrap get-buffer in buffer-live-p

* testing/lisp/test-ob-octave.el (ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Wrap GET-BUFFER in BUFFER-LIVE-P.
This ensures that a killed buffer does not cause an incorrect failure
of a test.

Link: https://orgmode.org/list/87bknh5nva.fsf@localhost
---
 testing/lisp/test-ob-octave.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el
index 4e9fea97b4..0b8ecea3bf 100644
--- a/testing/lisp/test-ob-octave.el
+++ b/testing/lisp/test-ob-octave.el
@@ -79,7 +79,7 @@ sombrero;
   (org-babel-execute-src-block)
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (when (get-buffer "*Org-Babel Error Output*")
@@ -99,7 +99,7 @@ sombrero;
   (should (get-buffer "*Inferior Octave*"))
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (let (kill-buffer-query-functions kill-buffer-hook)
@@ -119,7 +119,7 @@ sombrero;
   (org-babel-execute-src-block)
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (when (get-buffer "*Org-Babel Error Output*")



[elpa] externals/org updated (a08c37603f -> b58fbaf834)

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

  from  a08c37603f Merge branch 'bugfix'
   new  41ebc2e40c test-ob-octave.el: wrap get-buffer in buffer-live-p
   new  b58fbaf834 Merge branch 'bugfix'


Summary of changes:
 testing/lisp/test-ob-octave.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



[elpa] externals/org b58fbaf834: Merge branch 'bugfix'

2023-01-06 Thread ELPA Syncer
branch: externals/org
commit b58fbaf834dfa0e87898b9e59c8c650599223201
Merge: a08c37603f 41ebc2e40c
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Merge branch 'bugfix'
---
 testing/lisp/test-ob-octave.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el
index 4e9fea97b4..0b8ecea3bf 100644
--- a/testing/lisp/test-ob-octave.el
+++ b/testing/lisp/test-ob-octave.el
@@ -79,7 +79,7 @@ sombrero;
   (org-babel-execute-src-block)
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (when (get-buffer "*Org-Babel Error Output*")
@@ -99,7 +99,7 @@ sombrero;
   (should (get-buffer "*Inferior Octave*"))
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (let (kill-buffer-query-functions kill-buffer-hook)
@@ -119,7 +119,7 @@ sombrero;
   (org-babel-execute-src-block)
   (should (search-forward (format "[[file:%s]]" file) nil nil))
   (should (file-readable-p file))
-  (should-not (get-buffer "*Org-Babel Error Output*")))
+  (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"
   ;; clean-up
   (delete-file file)
   (when (get-buffer "*Org-Babel Error Output*")



[elpa] externals/compat dca7636e62: Add UNTESTED labels

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

Add UNTESTED labels
---
 compat-26.el | 4 ++--
 compat-27.el | 2 +-
 compat-29.el | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index 266bc56b48..504d14bdc6 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -262,7 +262,7 @@ TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
   (declare (pure t))
   (cdr (cdr (cdr (cdr x)
 
-(compat-defvar gensym-counter 0
+(compat-defvar gensym-counter 0 ;; 
   "Number used to construct the name of the next symbol created by `gensym'.")
 
 (compat-defun gensym (&optional prefix) ;; 
@@ -330,7 +330,7 @@ are non-nil, then the result is non-nil."
 
  Defined in files.el
 
-(compat-defvar mounted-file-systems
+(compat-defvar mounted-file-systems ;; 
 (eval-when-compile
   (if (memq system-type '(windows-nt cygwin))
   "^//[^/]+/"
diff --git a/compat-27.el b/compat-27.el
index ef609a24e4..37af8fa08e 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -456,7 +456,7 @@ return nil."
   (cond ((not cond1) cond2)
 ((not cond2) cond1)))
 
-(compat-defvar regexp-unmatchable "\\`a\\`"
+(compat-defvar regexp-unmatchable "\\`a\\`" ;; 
   "Standard regexp guaranteed not to match any string at all."
   :constant t)
 
diff --git a/compat-29.el b/compat-29.el
index 6220bc769d..15d8b8c4c2 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -536,7 +536,8 @@ to `default-directory', and the result will also be 
relative."
  (t
   parent
 
-(compat-defvar file-has-changed-p--hash-table (make-hash-table :test #'equal)
+(compat-defvar file-has-changed-p--hash-table ;; 
+   (make-hash-table :test #'equal)
   "Internal variable used by `file-has-changed-p'.")
 
 (compat-defun file-has-changed-p (file &optional tag) ;; 



[elpa] externals/consult 8dde94ad1b: Use defvar-keymap (provided by Compat 29.1)

2023-01-06 Thread ELPA Syncer
branch: externals/consult
commit 8dde94ad1b4a50c4f97846d68175d65d3b697d1d
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use defvar-keymap (provided by Compat 29.1)
---
 consult.el | 42 ++
 1 file changed, 18 insertions(+), 24 deletions(-)

diff --git a/consult.el b/consult.el
index ab3e71f8e2..dbb21fbdc8 100644
--- a/consult.el
+++ b/consult.el
@@ -2184,24 +2184,20 @@ argument list :command and a highlighting function 
:highlight."
 
  Special keymaps
 
-(defvar consult-async-map
-  (let ((map (make-sparse-keymap)))
-;; Async keys overwriting some unusable defaults for the default completion
-(define-key map [remap minibuffer-complete-word] #'self-insert-command)
-;; Remap Emacs 29 history and default completion for now.
-;; See https://github.com/minad/consult/issues/613
-(define-key map [remap minibuffer-complete-defaults] #'ignore)
-(define-key map [remap minibuffer-complete-history] #'consult-history)
-map)
-  "Keymap added for commands with asynchronous candidates.")
-
-(defvar consult-narrow-map
-  (let ((map (make-sparse-keymap)))
-(define-key map " " consult--narrow-space)
-(define-key map "\d" consult--narrow-delete)
-map)
-  "Narrowing keymap which is added to the local minibuffer map.
-Note that `consult-narrow-key' and `consult-widen-key' are bound dynamically.")
+(defvar-keymap consult-async-map
+  :doc "Keymap added for commands with asynchronous candidates."
+  ;; Async keys overwriting some unusable defaults for the default completion
+  " " #'self-insert-command
+  ;; Remap Emacs 29 history and default completion for now.
+  ;; See https://github.com/minad/consult/issues/613
+  " " #'ignore
+  " " #'consult-history)
+
+(defvar-keymap consult-narrow-map
+  :doc "Narrowing keymap which is added to the local minibuffer map.
+Note that `consult-narrow-key' and `consult-widen-key' are bound dynamically."
+  "SPC" consult--narrow-space
+  "DEL" consult--narrow-delete)
 
  Internal API: consult--read
 
@@ -3894,12 +3890,10 @@ of the prompt. See also `cape-history' from the Cape 
package."
 (put #'consult-isearch-backward 'completion-predicate #'ignore)
 (put #'consult-isearch-forward 'completion-predicate #'ignore)
 
-(defvar consult-isearch-history-map
-  (let ((map (make-sparse-keymap)))
-(define-key map [remap isearch-forward] #'consult-isearch-forward)
-(define-key map [remap isearch-backward] #'consult-isearch-backward)
-map)
-  "Additional keymap used by `consult-isearch-history'.")
+(defvar-keymap consult-isearch-history-map
+  :doc "Additional keymap used by `consult-isearch-history'."
+  " " #'consult-isearch-forward
+  " " #'consult-isearch-backward)
 
 (defun consult--isearch-history-candidates ()
   "Return isearch history candidates."



[elpa] externals/compat 02f4d3a795: compat-tests: Test that no unnecessary compat-* files are loaded

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 02f4d3a795fdfc9cf4da6086137e3bfa39747cba
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-tests: Test that no unnecessary compat-* files are loaded
---
 compat-tests.el | 7 +++
 compat.el   | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/compat-tests.el b/compat-tests.el
index 5c76084bea..79dcc85434 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -45,6 +45,13 @@
 (defmacro should-equal (a b)
   `(should (equal ,a ,b)))
 
+(ert-deftest compat-loaded-features ()
+  (let ((version 0))
+(while (< version 30)
+  (should-equal (> version emacs-major-version)
+(featurep (intern (format "compat-%s" version
+  (setq version (1+ version)
+
 (ert-deftest compat-function ()
   (let ((sym (compat-function plist-put)) list)
 (should sym)
diff --git a/compat.el b/compat.el
index 7e37e143f0..269b947920 100644
--- a/compat.el
+++ b/compat.el
@@ -42,7 +42,8 @@
 
 ;;; Code:
 
-(when (< emacs-major-version 29) (require 'compat-29))
+(when (eval-when-compile (< emacs-major-version 29))
+  (require 'compat-29))
 
 (defmacro compat-function (fun)
   "Return compatibility function symbol for FUN.



[elpa] externals/consult updated (8dde94ad1b -> 17de436c58)

2023-01-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  8dde94ad1b Use defvar-keymap (provided by Compat 29.1)
   new  2e1c45d1bd Version 0.31
   new  17de436c58 Drop obsolete commands in preparation of 1.0 release


Summary of changes:
 CHANGELOG.org | 4 
 consult.el| 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)



[elpa] externals/consult 17de436c58 2/2: Drop obsolete commands in preparation of 1.0 release

2023-01-06 Thread ELPA Syncer
branch: externals/consult
commit 17de436c58df1f0e2036b7cc590b74dcbdefd393
Author: Daniel Mendler 
Commit: Daniel Mendler 

Drop obsolete commands in preparation of 1.0 release
---
 CHANGELOG.org |  8 
 consult.el| 58 --
 2 files changed, 8 insertions(+), 58 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 8df2bdcfcb..42128befb1 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,6 +2,14 @@
 #+author: Daniel Mendler
 #+language: en
 
+* Development
+
+- Drop obsolete =consult-apropos=. Alternative: =describe-symbol= in 
combination
+  with =embark-export=.
+- Drop obsolete =consult-multi-occur=. Alternative: Built-in =multi-occur=,
+  =multi-occur-in-matching-buffers= or =consult-line-multi=.
+- Drop obsolete =consult-file-externally=. Alternative: 
=embark-open-externally=.
+
 * Version 0.31 (2023-01-06)
 
 - Version bump to update the Compat package dependency (29.1.0.1)
diff --git a/consult.el b/consult.el
index cd8d6975ef..0b2c6145d7 100644
--- a/consult.el
+++ b/consult.el
@@ -4858,64 +4858,6 @@ the asynchronous search."
 :add-history (consult--async-split-thingatpt 'symbol)
 :history '(:input consult--man-history
 
- Obsolete commands
-
-;;;###autoload
-(defun consult-apropos ()
-  "Select pattern and call `apropos'.
-
-The default value of the completion is the symbol at point. As a better
-alternative, you can run `embark-export' from commands like `M-x' and
-`describe-symbol'."
-  (interactive)
-  (let ((pattern
- (consult--read
-  obarray
-  :prompt "consult-apropos (obsolete): "
-  :predicate (lambda (x) (or (fboundp x) (boundp x) (facep x) 
(symbol-plist x)))
-  :category 'symbol
-  :default (thing-at-point 'symbol
-(when (string= pattern "")
-  (user-error "No pattern given"))
-(apropos pattern)))
-
-(make-obsolete
- 'consult-apropos
- "consult-apropos has been deprecated in favor of Embark actions:
-M-x describe-symbol  M-x embark-export
-M-x describe-symbol  M-x embark-act a"
-   "0.20")
-
-;;;###autoload
-(defun consult-file-externally (file)
-  "Open FILE externally using the default application of the system."
-  (interactive "fOpen externally: ")
-  (if (and (eq system-type 'windows-nt)
-   (fboundp 'w32-shell-execute))
-  (w32-shell-execute "open" file)
-(call-process (pcase system-type
-('darwin "open")
-('cygwin "cygstart")
-(_ "xdg-open"))
-  nil 0 nil
-  (expand-file-name file
-
-(make-obsolete 'consult-file-externally 'embark-open-externally "0.29")
-
-;;;###autoload
-(defun consult-multi-occur (bufs regexp &optional nlines)
-  "Improved version of `multi-occur' based on `completing-read-multiple'.
-
-See `multi-occur' for the meaning of the arguments BUFS, REGEXP and NLINES."
-  (interactive (cons
-(mapcar #'get-buffer
-(completing-read-multiple "Buffer: "
-  #'internal-complete-buffer))
-(occur-read-primary-args)))
-  (occur-1 regexp nlines bufs))
-
-(make-obsolete 'consult-multi-occur 'consult-line-multi "0.29")
-
  Preview at point in completions buffers
 
 (define-minor-mode consult-preview-at-point-mode



[elpa] externals/consult 2e1c45d1bd 1/2: Version 0.31

2023-01-06 Thread ELPA Syncer
branch: externals/consult
commit 2e1c45d1bda9b4c9746d2a4f107b9689218d1083
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 0.31
---
 CHANGELOG.org |  8 ++--
 consult.el| 60 ++-
 2 files changed, 61 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index bb8a212492..8df2bdcfcb 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,13 +2,9 @@
 #+author: Daniel Mendler
 #+language: en
 
-* Development
+* Version 0.31 (2023-01-06)
 
-- Drop obsolete =consult-apropos=. Alternative: =describe-symbol= in 
combination
-  with =embark-export=.
-- Drop obsolete =consult-multi-occur=. Alternative: Built-in =multi-occur=,
-  =multi-occur-in-matching-buffers= or =consult-line-multi=.
-- Drop obsolete =consult-file-externally=. Alternative: 
=embark-open-externally=.
+- Version bump to update the Compat package dependency (29.1.0.1)
 
 * Version 0.30 (2023-01-02)
 
diff --git a/consult.el b/consult.el
index dbb21fbdc8..cd8d6975ef 100644
--- a/consult.el
+++ b/consult.el
@@ -5,7 +5,7 @@
 ;; Author: Daniel Mendler and Consult contributors
 ;; Maintainer: Daniel Mendler 
 ;; Created: 2020
-;; Version: 0.30
+;; Version: 0.31
 ;; Package-Requires: ((emacs "27.1") (compat "29.1.0.1"))
 ;; Homepage: https://github.com/minad/consult
 
@@ -4858,6 +4858,64 @@ the asynchronous search."
 :add-history (consult--async-split-thingatpt 'symbol)
 :history '(:input consult--man-history
 
+ Obsolete commands
+
+;;;###autoload
+(defun consult-apropos ()
+  "Select pattern and call `apropos'.
+
+The default value of the completion is the symbol at point. As a better
+alternative, you can run `embark-export' from commands like `M-x' and
+`describe-symbol'."
+  (interactive)
+  (let ((pattern
+ (consult--read
+  obarray
+  :prompt "consult-apropos (obsolete): "
+  :predicate (lambda (x) (or (fboundp x) (boundp x) (facep x) 
(symbol-plist x)))
+  :category 'symbol
+  :default (thing-at-point 'symbol
+(when (string= pattern "")
+  (user-error "No pattern given"))
+(apropos pattern)))
+
+(make-obsolete
+ 'consult-apropos
+ "consult-apropos has been deprecated in favor of Embark actions:
+M-x describe-symbol  M-x embark-export
+M-x describe-symbol  M-x embark-act a"
+   "0.20")
+
+;;;###autoload
+(defun consult-file-externally (file)
+  "Open FILE externally using the default application of the system."
+  (interactive "fOpen externally: ")
+  (if (and (eq system-type 'windows-nt)
+   (fboundp 'w32-shell-execute))
+  (w32-shell-execute "open" file)
+(call-process (pcase system-type
+('darwin "open")
+('cygwin "cygstart")
+(_ "xdg-open"))
+  nil 0 nil
+  (expand-file-name file
+
+(make-obsolete 'consult-file-externally 'embark-open-externally "0.29")
+
+;;;###autoload
+(defun consult-multi-occur (bufs regexp &optional nlines)
+  "Improved version of `multi-occur' based on `completing-read-multiple'.
+
+See `multi-occur' for the meaning of the arguments BUFS, REGEXP and NLINES."
+  (interactive (cons
+(mapcar #'get-buffer
+(completing-read-multiple "Buffer: "
+  #'internal-complete-buffer))
+(occur-read-primary-args)))
+  (occur-1 regexp nlines bufs))
+
+(make-obsolete 'consult-multi-occur 'consult-line-multi "0.29")
+
  Preview at point in completions buffers
 
 (define-minor-mode consult-preview-at-point-mode



[nongnu] elpa/cider 485e69cf7e: [Fix #3262] Add extra keys for navigation of inspect buffer (#3301)

2023-01-06 Thread ELPA Syncer
branch: elpa/cider
commit 485e69cf7e05fb79b240c4c533bb0254429e4971
Author: gpapadok <38889721+gpapa...@users.noreply.github.com>
Commit: GitHub 

[Fix #3262] Add extra keys for navigation of inspect buffer (#3301)
---
 CHANGELOG.md| 4 
 cider-inspector.el  | 4 
 doc/modules/ROOT/pages/debugging/inspector.adoc | 5 -
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index faa8fbdbbe..17a68a673f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 ## master (unreleased)
 
+### New features
+
+- [#3262](https://github.com/clojure-emacs/cider/issues/3262) Add navigation 
functionality to `npfb` keys inside inspect buffer.
+
 ### Changes
 
 - Allow using `npx nbb` as `cider-nbb-command`.
diff --git a/cider-inspector.el b/cider-inspector.el
index fb23f06cb0..69f1ed53a2 100644
--- a/cider-inspector.el
+++ b/cider-inspector.el
@@ -108,7 +108,11 @@ by clicking or navigating to them by other means."
 (define-key map "d" #'cider-inspector-def-current-val)
 (define-key map [tab] #'cider-inspector-next-inspectable-object)
 (define-key map "\C-i" #'cider-inspector-next-inspectable-object)
+(define-key map "n" #'cider-inspector-next-inspectable-object)
 (define-key map [(shift tab)] 
#'cider-inspector-previous-inspectable-object)
+(define-key map "p" #'cider-inspector-previous-inspectable-object)
+(define-key map "f" #'forward-char)
+(define-key map "b" #'backward-char)
 ;; Emacs translates S-TAB to BACKTAB on X.
 (define-key map [backtab] #'cider-inspector-previous-inspectable-object)
 (easy-menu-define cider-inspector-mode-menu map
diff --git a/doc/modules/ROOT/pages/debugging/inspector.adoc 
b/doc/modules/ROOT/pages/debugging/inspector.adoc
index 082ac8fee8..212af3edfb 100644
--- a/doc/modules/ROOT/pages/debugging/inspector.adoc
+++ b/doc/modules/ROOT/pages/debugging/inspector.adoc
@@ -28,9 +28,12 @@ You'll have access to additional keybindings in the 
inspector buffer
 |===
 | Keyboard shortcut | Description
 
-| kbd:[Tab] and kbd:[Shift-Tab]
+| kbd:[Tab] and kbd:[Shift-Tab] / kdb:[n] and kbd:[p]
 | Navigate inspectable sub-objects
 
+| kbd:[f] and kbd:[b]
+| Navigate across characters on a line
+
 | kbd:[Return]
 | Inspect sub-objects
 



[nongnu] elpa/git-commit 74dbbe2a28 6/7: ci: Give test workflow none of the optional permissions

2023-01-06 Thread ELPA Syncer
branch: elpa/git-commit
commit 74dbbe2a28628d0d578ad899705d26f3b8567386
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

ci: Give test workflow none of the optional permissions

See 
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs.
---
 .github/workflows/test.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 9f93a1c782..0ef39346b7 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,5 +1,6 @@
 name: test
 on: [ push, pull_request ]
+permissions: {}
 env:
   BUILD_MAGIT_LIBGIT: "false"
 jobs:



[nongnu] elpa/git-commit 53660de6f8 3/7: Bump actions/checkout to version 3.

2023-01-06 Thread ELPA Syncer
branch: elpa/git-commit
commit 53660de6f89806f233b18c77455af8c392ebb116
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Commit: Jonas Bernoulli 

Bump actions/checkout to version 3.

Bumps actions/checkout (https://github.com/actions/checkout)
from version 2 to 3.
---
 .github/workflows/test.yml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d144d78d13..9f93a1c782 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -27,27 +27,27 @@ jobs:
   with:
 version: ${{ matrix.emacs_version }}
 - name: Checkout compat
-  uses: actions/checkout@v2
+  uses: actions/checkout@v3
   with:
 repository: emacs-compat/compat
 path: compat
 - name: Checkout dash
-  uses: actions/checkout@v2
+  uses: actions/checkout@v3
   with:
 repository: magnars/dash.el
 path: dash
 - name: Checkout transient
-  uses: actions/checkout@v2
+  uses: actions/checkout@v3
   with:
 repository: magit/transient
 path: transient
 - name: Checkout with-editor
-  uses: actions/checkout@v2
+  uses: actions/checkout@v3
   with:
 repository: magit/with-editor
 path: with-editor
 - name: Checkout magit
-  uses: actions/checkout@v2
+  uses: actions/checkout@v3
   with:
 repository: magit/magit
 path: magit



[nongnu] elpa/git-commit updated (b281f05d22 -> a103d11a8a)

2023-01-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/git-commit.

  from  b281f05d22 Bump compat dependency
   new  daed884873 Remove unnecessary Compat requires
   new  0fdcbfdf07 Keep GitHub Actions up-to-date with Dependabot
   new  53660de6f8 Bump actions/checkout to version 3.
   new  8d26868f41 make: Dependabot is a bot, not an author
   new  955c205913 AUTHORS.md: Update list of contributors
   new  74dbbe2a28 ci: Give test workflow none of the optional permissions
   new  a103d11a8a ci: Tell actions/checkout to not persist-credentials


Summary of changes:
 .github/dependabot.yml |  6 ++
 .github/workflows/test.yml | 16 +++-
 Makefile   |  3 ---
 docs/AUTHORS.md|  2 ++
 docs/Makefile  |  6 +-
 lisp/magit-base.el |  2 --
 lisp/magit-libgit.el   |  2 --
 lisp/magit-section.el  |  2 --
 8 files changed, 24 insertions(+), 15 deletions(-)
 create mode 100644 .github/dependabot.yml



[nongnu] elpa/git-commit 955c205913 5/7: AUTHORS.md: Update list of contributors

2023-01-06 Thread ELPA Syncer
branch: elpa/git-commit
commit 955c2059138250f8309c49b61db71bd5d17922a6
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

AUTHORS.md: Update list of contributors
---
 docs/AUTHORS.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/docs/AUTHORS.md b/docs/AUTHORS.md
index b03532b363..22e3e32da4 100644
--- a/docs/AUTHORS.md
+++ b/docs/AUTHORS.md
@@ -114,6 +114,7 @@ All Contributors
 - Daniel Kraus
 - Daniel Mai
 - Daniel Martín
+- Daniel Mendler
 - Daniel Nagy
 - Dan Kessler
 - Dan LaManna
@@ -216,6 +217,7 @@ All Contributors
 - Laverne Schrock
 - Leandro Facchinetti
 - Lele Gaifax
+- Lénaïc Huard
 - Leo Liu
 - Leonardo Etcheverry
 - Leo Vivier



[nongnu] elpa/git-commit a103d11a8a 7/7: ci: Tell actions/checkout to not persist-credentials

2023-01-06 Thread ELPA Syncer
branch: elpa/git-commit
commit a103d11a8a8b4361cf7d5f45f1ac0156c7870b43
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

ci: Tell actions/checkout to not persist-credentials

It seems this should be the default as suggested
at https://github.com/actions/checkout/pull/946.
---
 .github/workflows/test.yml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0ef39346b7..b5514c8f55 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -32,26 +32,31 @@ jobs:
   with:
 repository: emacs-compat/compat
 path: compat
+persist-credentials: false
 - name: Checkout dash
   uses: actions/checkout@v3
   with:
 repository: magnars/dash.el
 path: dash
+persist-credentials: false
 - name: Checkout transient
   uses: actions/checkout@v3
   with:
 repository: magit/transient
 path: transient
+persist-credentials: false
 - name: Checkout with-editor
   uses: actions/checkout@v3
   with:
 repository: magit/with-editor
 path: with-editor
+persist-credentials: false
 - name: Checkout magit
   uses: actions/checkout@v3
   with:
 repository: magit/magit
 path: magit
+persist-credentials: false
 - name: Build compat
   run: make -C compat compile
 - name: Build magit



[nongnu] elpa/git-commit 8d26868f41 4/7: make: Dependabot is a bot, not an author

2023-01-06 Thread ELPA Syncer
branch: elpa/git-commit
commit 8d26868f41822691248da8a352b249ec50d74d22
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

make: Dependabot is a bot, not an author
---
 Makefile  | 3 ---
 docs/Makefile | 6 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 6f7c842396..fe7ab15b52 100644
--- a/Makefile
+++ b/Makefile
@@ -151,9 +151,6 @@ texi:
 
 authors:
@$(MAKE) -C docs authors
-   @git commit --gpg-sign -m "AUTHORS.md: Update list of contributors" \
-   -o -- docs/AUTHORS.md .mailmap
-   @git show --pretty= -p HEAD
 
 publish:
@$(MAKE) -C docs publish
diff --git a/docs/Makefile b/docs/Makefile
index 811b78b438..ccffa1cc0b 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -105,9 +105,13 @@ AUTHORS.md:
@printf "Generating AUTHORS.md..."
@test -e $(TOP).git \
&& (printf "$$AUTHORS_HEADER\n" > $@ \
-   && git log --pretty=format:'- %aN' | sort -u >> $@ \
+   && git log --pretty=format:'- %aN' | sort -u | \
+   grep -v dependabot >> $@ \
&& printf "done\n" ; ) \
|| printf "FAILED (non-fatal)\n"
+   @git commit --gpg-sign -m "AUTHORS.md: Update list of contributors" \
+   -o -- $@ ../.mailmap || true
+   @git show --pretty= -p HEAD
 
 PUBLISH_PATH   ?= /manual/
 RELEASE_PATH   ?= /manual/$(VERSION)/



[nongnu] elpa/git-commit daed884873 1/7: Remove unnecessary Compat requires

2023-01-06 Thread ELPA Syncer
branch: elpa/git-commit
commit daed8848732a6be4cac35350caf25a16578ca6c0
Author: Daniel Mendler 
Commit: Daniel Mendler 

Remove unnecessary Compat requires
---
 lisp/magit-base.el| 2 --
 lisp/magit-libgit.el  | 2 --
 lisp/magit-section.el | 2 --
 3 files changed, 6 deletions(-)

diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index 68c5c8bda8..6cd2a0e726 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -37,8 +37,6 @@
 
 (require 'cl-lib)
 (require 'compat)
-(require 'compat-26)
-(require 'compat-27)
 (require 'dash)
 (require 'eieio)
 (require 'seq)
diff --git a/lisp/magit-libgit.el b/lisp/magit-libgit.el
index 40f5314032..e0c9eb72da 100644
--- a/lisp/magit-libgit.el
+++ b/lisp/magit-libgit.el
@@ -51,8 +51,6 @@
 
 (require 'cl-lib)
 (require 'compat)
-(require 'compat-26)
-(require 'compat-27)
 (require 'dash)
 (require 'eieio)
 (require 'seq)
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 064063f72b..04f7125cac 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -40,8 +40,6 @@
 
 (require 'cl-lib)
 (require 'compat)
-(require 'compat-26)
-(require 'compat-27)
 (require 'dash)
 (require 'eieio)
 (require 'format-spec)



[nongnu] elpa/git-commit 0fdcbfdf07 2/7: Keep GitHub Actions up-to-date with Dependabot

2023-01-06 Thread ELPA Syncer
branch: elpa/git-commit
commit 0fdcbfdf077f5e62dc2a0e588060297f9107dfa8
Author: Stefan Kangas 
Commit: Jonas Bernoulli 

Keep GitHub Actions up-to-date with Dependabot

Documentation at 
https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions.
---
 .github/dependabot.yml | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00..c7fc735eea
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+  - package-ecosystem: github-actions
+directory: "/"
+schedule:
+  interval: "daily"



[nongnu] elpa/magit-section updated (b281f05d22 -> a103d11a8a)

2023-01-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  b281f05d22 Bump compat dependency
  adds  daed884873 Remove unnecessary Compat requires
  adds  0fdcbfdf07 Keep GitHub Actions up-to-date with Dependabot
  adds  53660de6f8 Bump actions/checkout to version 3.
  adds  8d26868f41 make: Dependabot is a bot, not an author
  adds  955c205913 AUTHORS.md: Update list of contributors
  adds  74dbbe2a28 ci: Give test workflow none of the optional permissions
  adds  a103d11a8a ci: Tell actions/checkout to not persist-credentials

No new revisions were added by this update.

Summary of changes:
 .github/dependabot.yml |  6 ++
 .github/workflows/test.yml | 16 +++-
 Makefile   |  3 ---
 docs/AUTHORS.md|  2 ++
 docs/Makefile  |  6 +-
 lisp/magit-base.el |  2 --
 lisp/magit-libgit.el   |  2 --
 lisp/magit-section.el  |  2 --
 8 files changed, 24 insertions(+), 15 deletions(-)
 create mode 100644 .github/dependabot.yml



[nongnu] elpa/magit updated (b281f05d22 -> a103d11a8a)

2023-01-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  b281f05d22 Bump compat dependency
  adds  daed884873 Remove unnecessary Compat requires
  adds  0fdcbfdf07 Keep GitHub Actions up-to-date with Dependabot
  adds  53660de6f8 Bump actions/checkout to version 3.
  adds  8d26868f41 make: Dependabot is a bot, not an author
  adds  955c205913 AUTHORS.md: Update list of contributors
  adds  74dbbe2a28 ci: Give test workflow none of the optional permissions
  adds  a103d11a8a ci: Tell actions/checkout to not persist-credentials

No new revisions were added by this update.

Summary of changes:
 .github/dependabot.yml |  6 ++
 .github/workflows/test.yml | 16 +++-
 Makefile   |  3 ---
 docs/AUTHORS.md|  2 ++
 docs/Makefile  |  6 +-
 lisp/magit-base.el |  2 --
 lisp/magit-libgit.el   |  2 --
 lisp/magit-section.el  |  2 --
 8 files changed, 24 insertions(+), 15 deletions(-)
 create mode 100644 .github/dependabot.yml



[elpa] externals/compat updated (02f4d3a795 -> edc6830f68)

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

  from  02f4d3a795 compat-tests: Test that no unnecessary compat-* files 
are loaded
   new  d6a4ed48bc Move json functions to compat.el
   new  edc6830f68 Update news


Summary of changes:
 NEWS.org|  11 +--
 compat-27.el| 195 +
 compat-28.el|  11 ++-
 compat-macs.el  |  24 +++
 compat-tests.el |   3 +-
 compat.el   | 203 
 6 files changed, 228 insertions(+), 219 deletions(-)



[elpa] externals/compat edc6830f68 2/2: Update news

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

Update news
---
 NEWS.org | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 59aa56e948..eacb0ac60e 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -2,18 +2,19 @@
 
 * Development of "Compat" Version 29.1.1.0
 
-- The macros in ~compat-macs.el~ have been rewritten and greatly simplified. 
This
-  change makes it possible to further refine the criteria under which
-  compatibility aliases, functions, macros and variables are installed.
+- The macros in ~compat-macs.el~ have been rewritten and simplified. The
+  refactoring allows to further refine the criteria under which compatibility
+  aliases, functions, macros and variables are installed.
 - Remove deprecated, prefixed compatibility functions.
 - Remove deprecated features ~compat-help~, ~compat-font-lock~ and ~compat-24~.
-- Compat uses runtime checks (boundp, fboundp) to ensure that existing
+- Compat uses runtime checks (~boundp~, ~fboundp~) to ensure that existing
   definitions are never overridden, when Compat is loaded on a newer Emacs than
   it was compiled on.
 - Compat compiles without byte compilation warnings on all supported Emacs
   versions. Warnings are treated as errors in the test suite.
 - Compat takes great care to remove unneeded definitions at compile time. On
-  recent Emacs 29 the byte compiled files are empty and not loaded.
+  recent Emacs 29 the byte compiled files are empty and not loaded, such that
+  Compat does not any cost to the Emacs process.
 
 * Release of "Compat" Version 29.1.0.1
 



[elpa] externals/compat d6a4ed48bc 1/2: Move json functions to compat.el

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

Move json functions to compat.el

These functions are defined conditionally. Therefore they must not be
part of the versioned files. Conditionally-defined functions are a
special complicated edge case, which need more testing. Therefore the
json functions are currently marked as UNTESTED.
---
 compat-27.el| 195 +
 compat-28.el|  11 ++-
 compat-macs.el  |  24 +++
 compat-tests.el |   3 +-
 compat.el   | 203 
 5 files changed, 222 insertions(+), 214 deletions(-)

diff --git a/compat-27.el b/compat-27.el
index 37af8fa08e..f692836551 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -110,199 +110,6 @@ Letter-case is significant, but text properties are 
ignored."
   (when fn (throw 'found fn))
((signal 'wrong-type-argument (list 'keymapp keymap)
 
- Defined in json.c
-
-(declare-function json-encode "json" (object))
-(declare-function json-read-from-string "json" (string))
-(declare-function json-read "json" ())
-(defvar json-encoding-pretty-print)
-(defvar json-object-type)
-(defvar json-array-type)
-(defvar json-false)
-(defvar json-null)
-
-;; The function is declared to satisfy the byte compiler while testing
-;; if native JSON parsing is available.;
-(declare-function json-serialize nil (object &rest args))
-(compat-defun json-serialize (object &rest args) ;; 
-  "Return the JSON representation of OBJECT as a string.
-
-OBJECT must be t, a number, string, vector, hashtable, alist, plist,
-or the Lisp equivalents to the JSON null and false values, and its
-elements must recursively consist of the same kinds of values.  t will
-be converted to the JSON true value.  Vectors will be converted to
-JSON arrays, whereas hashtables, alists and plists are converted to
-JSON objects.  Hashtable keys must be strings without embedded null
-characters and must be unique within each object.  Alist and plist
-keys must be symbols; if a key is duplicate, the first instance is
-used.
-
-The Lisp equivalents to the JSON null and false values are
-configurable in the arguments ARGS, a list of keyword/argument pairs:
-
-The keyword argument `:null-object' specifies which object to use
-to represent a JSON null value.  It defaults to `:null'.
-
-The keyword argument `:false-object' specifies which object to use to
-represent a JSON false value.  It defaults to `:false'.
-
-In you specify the same value for `:null-object' and `:false-object',
-a potentially ambiguous situation, the JSON output will not contain
-any JSON false values."
-  :cond (not (condition-case nil
- (equal (json-serialize '()) "{}")
-   (:success t)
-   (void-function nil)
-   (json-unavailable nil)))
-  (unless (fboundp 'json-encode)
-(require 'json))
-  (letrec ((fix (lambda (obj)
-  (cond
-   ((hash-table-p obj)
-(let ((ht (copy-hash-table obj)))
-  (maphash
-   (lambda (key val)
- (unless (stringp key)
-   (signal
-'wrong-type-argument
-(list 'stringp key)))
- (puthash key (funcall fix val) ht))
-   obj)
-  ht))
-   ((and (listp obj) (consp (car obj))) ;alist
-(mapcar
- (lambda (ent)
-   (cons (symbol-name (car ent))
- (funcall fix (cdr ent
- obj))
-   ((listp obj) ;plist
-(let (alist)
-  (while obj
-(push (cons (cond
- ((keywordp (car obj))
-  (substring
-   (symbol-name (car obj))
-   1))
- ((symbolp (car obj))
-  (symbol-name (car obj)))
- ((signal
-   'wrong-type-argument
-   (list 'symbolp (car obj)
-(funcall fix (cadr obj)))
-  alist)
-(unless (consp (cdr obj))
-  (signal 'wrong-type-argument '(consp nil)))
-(setq obj (cddr obj)))
-  (nreverse alist)))
-   ((vectorp obj)
-(let ((vec (make-vector (length obj) nil)))
-  (dotimes (i (length obj))
-(aset vec i (funcall fix (aref obj i
-   

[nongnu] elpa/evil b73094a82e: Update project Keywords

2023-01-06 Thread ELPA Syncer
branch: elpa/evil
commit b73094a82ee31fc4a9aa7453bbbe51e37be3447f
Author: Tom Dalziel 
Commit: Tom Dalziel 

Update project Keywords
---
 evil.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/evil.el b/evil.el
index 8a8a3f35e9..599bfb4ceb 100644
--- a/evil.el
+++ b/evil.el
@@ -59,7 +59,7 @@
 ;;  mailing list (see below).
 ;; Created: 2011-03-01
 ;; Version: 1.15.0
-;; Keywords: emulation, vim
+;; Keywords: emulations
 ;; URL: https://github.com/emacs-evil/evil
 ;;  Repository: https://github.com/emacs-evil/evil.git
 ;;  EmacsWiki: http://www.emacswiki.org/emacs/Evil



[nongnu] elpa/rust-mode 53b1b5c0bf 2/2: Merge pull request #485 from VlachJosef/master

2023-01-06 Thread ELPA Syncer
branch: elpa/rust-mode
commit 53b1b5c0bf9fdfd808e2671b5635c105961f06ca
Merge: 0431b10d25 5d62d5d72e
Author: brotzeit 
Commit: GitHub 

Merge pull request #485 from VlachJosef/master

Update README.md - add default keybindings
---
 README.md | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 5d20f2d59a..88c4e7ab45 100644
--- a/README.md
+++ b/README.md
@@ -166,17 +166,18 @@ The `rust-run`, `rust-test`, `rust-compile` and 
`rust-check` functions
 shell out to Cargo to run, test, build and check your code. Under the
 hood, these use the standard Emacs `compile` function.
 
-These are not bound by default. To bind these to keyboard shortcuts,
-you can use the following in your init.el:
+By default these are bound to:
 
-``` elisp
-(define-key rust-mode-map (kbd "C-c C-c") 'rust-run)
-```
+- C-c C-c C-u `rust-compile`
+- C-c C-c C-k `rust-check`
+- C-c C-c C-t `rust-test`
+- C-c C-c C-r `rust-run`
 
 ### Clippy
 
 `rust-run-clippy` runs
-[Clippy](https://github.com/rust-lang/rust-clippy), a linter.
+[Clippy](https://github.com/rust-lang/rust-clippy), a linter. By
+default, this is bound to C-c C-c C-l.
 
 ### Easy insertion of dbg!
 



[nongnu] elpa/rust-mode 5d62d5d72e 1/2: Update README.md - add default keybindings

2023-01-06 Thread ELPA Syncer
branch: elpa/rust-mode
commit 5d62d5d72ea4f1aa3d247837088797a4abbcb6c2
Author: Josef Vlach 
Commit: Josef Vlach 

Update README.md - add default keybindings
---
 README.md | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 5d20f2d59a..88c4e7ab45 100644
--- a/README.md
+++ b/README.md
@@ -166,17 +166,18 @@ The `rust-run`, `rust-test`, `rust-compile` and 
`rust-check` functions
 shell out to Cargo to run, test, build and check your code. Under the
 hood, these use the standard Emacs `compile` function.
 
-These are not bound by default. To bind these to keyboard shortcuts,
-you can use the following in your init.el:
+By default these are bound to:
 
-``` elisp
-(define-key rust-mode-map (kbd "C-c C-c") 'rust-run)
-```
+- C-c C-c C-u `rust-compile`
+- C-c C-c C-k `rust-check`
+- C-c C-c C-t `rust-test`
+- C-c C-c C-r `rust-run`
 
 ### Clippy
 
 `rust-run-clippy` runs
-[Clippy](https://github.com/rust-lang/rust-clippy), a linter.
+[Clippy](https://github.com/rust-lang/rust-clippy), a linter. By
+default, this is bound to C-c C-c C-l.
 
 ### Easy insertion of dbg!
 



[elpa] externals/compat updated (edc6830f68 -> 32c0bdb18b)

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

  from  edc6830f68 Update news
   new  557c74f87f compat.el: Add missing compat-declare-version
   new  28494d7c79 Explicit functions: Mention reason of existence in the 
docstring
   new  32c0bdb18b compat-29: Add test for function-alias-p


Summary of changes:
 compat-26.el| 35 +++
 compat-27.el| 11 -
 compat-28.el| 20 +++-
 compat-29.el| 74 -
 compat-tests.el | 16 +
 compat.el   |  5 ++--
 6 files changed, 44 insertions(+), 117 deletions(-)



[elpa] externals/compat 557c74f87f 1/3: compat.el: Add missing compat-declare-version

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 557c74f87fe8298d186703b8b7ed46745d9bb7dd
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat.el: Add missing compat-declare-version
---
 compat.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/compat.el b/compat.el
index bb787f3cb4..f1ee239e25 100644
--- a/compat.el
+++ b/compat.el
@@ -62,7 +62,7 @@ See `compat-function' for the compatibility function 
resolution."
   (let ((compat (intern (format "compat--%s" fun
 `(,(if (fboundp compat) compat fun) ,@args)))
 
- Conditionally defined functions
+ Emacs 27 (Conditionally defined functions)
 
 ;; TODO Maybe the functions should be moved to a separate file compat-cond.el,
 ;; which will be always loaded? However this file maybe empty, so maybe the 
best
@@ -71,8 +71,9 @@ See `compat-function' for the compatibility function 
resolution."
 ;; functions are currently marked as untested.
 
 (eval-when-compile (load "compat-macs.el" nil t t))
+(compat-declare-version "27.1")
 
-; Defined in json.c as part of Emacs 27
+; Defined in json.c
 
 (declare-function json-serialize nil (object &rest args))
 (declare-function json-encode "json" (object))



[elpa] externals/compat 28494d7c79 2/3: Explicit functions: Mention reason of existence in the docstring

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 28494d7c792131064f1e1a16a37762cf4bd42dae
Author: Daniel Mendler 
Commit: Daniel Mendler 

Explicit functions: Mention reason of existence in the docstring

Replicating the docstring of the original function is not needed.
---
 compat-26.el | 35 +++--
 compat-27.el | 11 --
 compat-28.el | 20 +++--
 compat-29.el | 72 
 4 files changed, 24 insertions(+), 114 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index 504d14bdc6..4578f2a583 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -28,11 +28,7 @@
  Defined in fns.c
 
 (compat-defun assoc (key alist &optional testfn) ;; 
-  "Handle the optional argument TESTFN.
-Equality is defined by the function TESTFN, defaulting to
-`equal'.  TESTFN is called with 2 arguments: a car of an alist
-element and KEY.  With no optional argument, the function behaves
-just like `assoc'."
+  "Handle the optional TESTFN."
   :explicit t
   (if testfn
   (catch 'found
@@ -48,12 +44,7 @@ SEQUENCE may be a list, a vector, a boolean vector, or a 
string."
   (apply #'nconc (mapcar func sequence)))
 
 (compat-defun line-number-at-pos (&optional position absolute) ;; 
-  "Handle optional argument ABSOLUTE:
-
-If the buffer is narrowed, the return value by default counts the lines
-from the beginning of the accessible portion of the buffer.  But if the
-second optional argument ABSOLUTE is non-nil, the value counts the lines
-from the absolute start of the buffer, disregarding the narrowing."
+  "Handle optional argument ABSOLUTE."
   :explicit t
   (if absolute
   (save-restriction
@@ -64,7 +55,7 @@ from the absolute start of the buffer, disregarding the 
narrowing."
  Defined in subr.el
 
 (compat-defun alist-get (key alist &optional default remove testfn) ;; 
-  "Handle TESTFN manually."
+  "Handle optional argument TESTFN."
   :explicit t
   (if testfn
   (let (entry)
@@ -113,18 +104,14 @@ from the absolute start of the buffer, disregarding the 
narrowing."
   ,v)))
 
 (compat-defun string-trim-left (string &optional regexp) ;; 
-  "Trim STRING of leading string matching REGEXP.
-
-REGEXP defaults to \"[ \\t\\n\\r]+\"."
+  "Handle optional argument REGEXP."
   :explicit t
   (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string)
   (substring string (match-end 0))
 string))
 
 (compat-defun string-trim-right (string &optional regexp) ;; 
-  "Trim STRING of trailing string matching REGEXP.
-
-REGEXP defaults to  \"[ \\t\\n\\r]+\"."
+  "Handle optional argument REGEXP."
   :explicit t
   (let ((i (string-match-p
 (concat "\\(?:" (or regexp "[ \t\n\r]+") "\\)\\'")
@@ -132,9 +119,7 @@ REGEXP defaults to  \"[ \\t\\n\\r]+\"."
 (if i (substring string 0 i) string)))
 
 (compat-defun string-trim (string &optional trim-left trim-right) ;; 
-  "Trim STRING of leading with and trailing matching TRIM-LEFT and TRIM-RIGHT.
-
-TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
+  "Handle optional arguments TRIM-LEFT and TRIM-RIGHT."
   :explicit t
   (compat--string-trim-left
(compat--string-trim-right
@@ -348,17 +333,13 @@ The returned file name can be used directly as argument of
   (or (file-remote-p file 'localname) file))
 
 (compat-defun file-name-quoted-p (name &optional top) ;; 
-  "Whether NAME is quoted with prefix \"/:\".
-If NAME is a remote file name and TOP is nil, check the local part of NAME."
+  "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 &optional top) ;; 
-  "Add the quotation prefix \"/:\" to file NAME.
-If NAME is a remote file name and TOP is nil, the local part of
-NAME is quoted.  If NAME is already a quoted file name, NAME is
-returned unchanged."
+  "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))
diff --git a/compat-27.el b/compat-27.el
index f692836551..863c93df15 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -268,10 +268,7 @@ return nil."
   :constant t)
 
 (compat-defun assoc-delete-all (key alist &optional test) ;; 
-  "Delete from ALIST all elements whose car is KEY.
-Compare keys with TEST.  Defaults to `equal'.
-Return the modified alist.
-Elements of ALIST that are not conses are ignored."
+  "Handle optional argument TEST."
   :explicit t
   (unless test (setq test #'equal))
   (while (and (consp (car alist))
@@ -339,7 +336,7 @@ the number of seconds east of Greenwich."
  Defined in files.el
 
 (compat-defun file-size-human-readable (file-size &optional flavor space unit) 
;; 
-  "Handle the optional third and forth argument:
+  "Handle the optional arguments SPACE and UNIT.
 
 Optional third argument SPACE i

[elpa] externals/compat 32c0bdb18b 3/3: compat-29: Add test for function-alias-p

2023-01-06 Thread ELPA Syncer
branch: externals/compat
commit 32c0bdb18bbe3870cf996d29810bf547a2838630
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat-29: Add test for function-alias-p
---
 compat-29.el|  2 +-
 compat-tests.el | 16 
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/compat-29.el b/compat-29.el
index 6a2e10c425..300a20dc96 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -170,7 +170,7 @@ Unibyte strings are converted to multibyte for comparison."
 
 (compat-defalias string-split split-string) ;; 
 
-(compat-defun function-alias-p (func &optional noerror) ;; 
+(compat-defun function-alias-p (func &optional noerror) ;; 
   "Return nil if FUNC is not a function alias.
 If FUNC is a function alias, return the function alias chain.
 
diff --git a/compat-tests.el b/compat-tests.el
index 43b6bfce42..1712d28979 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -253,6 +253,22 @@
   (function-put #'compat-tests--function-put 'compat-test 42)
   (should-equal 42 (function-get #'compat-tests--function-put 'compat-test)))
 
+(ert-deftest function-alias-p ()
+  (defun compat-tests--alias-fun ())
+  (should-not (function-alias-p 1))
+  (should-not (function-alias-p 'compat-tests--alias-fun))
+  (defalias 'compat-tests--alias-a 'compat-tests--alias-b)
+  (defalias 'compat-tests--alias-b 'compat-tests--alias-c)
+  (should-equal (function-alias-p 'compat-tests--alias-a)
+'(compat-tests--alias-b compat-tests--alias-c))
+  (defalias 'compat-tests--alias-d 'compat-tests--alias-e)
+  (defalias 'compat-tests--alias-e 'compat-tests--alias-d)
+  (should-error (function-alias-p 'compat-tests--alias-d))
+  (should-equal (function-alias-p 'compat-tests--alias-d 'noerror)
+'(compat-tests--alias-e))
+  (should-equal (function-alias-p 'compat-tests--alias-d t)
+'(compat-tests--alias-e)))
+
 (ert-deftest ignore-error ()
   (should-equal (ignore-error (end-of-file)
   (read ""))



[nongnu] elpa/sweeprolog updated (c6ae233d03 -> e540d05a79)

2023-01-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/sweeprolog.

  from  c6ae233d03 Announce recent changes in NEWS.org and bump version to 
0.11.1
   new  72c50f216f ENHANCED: use terms at point as "future history" for 
term-search
   new  e540d05a79 Announce recent changes in NEWS.org and bump version 
0.11.1


Summary of changes:
 NEWS.org| 10 ++
 README.org  | 25 -
 sweep.pl| 54 -
 sweeprolog-tests.el | 32 ++-
 sweeprolog.el   | 46 -
 5 files changed, 151 insertions(+), 16 deletions(-)



[nongnu] elpa/sweeprolog 72c50f216f 1/2: ENHANCED: use terms at point as "future history" for term-search

2023-01-06 Thread ELPA Syncer
branch: elpa/sweeprolog
commit 72c50f216fab6c2ea36698fa5a10f292e04ef495
Author: Eshel Yaron 
Commit: Eshel Yaron 

ENHANCED: use terms at point as "future history" for term-search

* sweep.pl (sweep_terms_at_point/2): new predicate.
* sweeprolog.el (sweeprolog-terms-at-point): new function.
(sweeprolog-read-term): use it for setting the future history.
(sweeprolog-read-goal): new function.
(sweeprolog-term-search): use it for reading a goal when called with
prefix argument.
---
 README.org  | 25 -
 sweep.pl| 54 -
 sweeprolog-tests.el | 32 ++-
 sweeprolog.el   | 44 +++
 4 files changed, 140 insertions(+), 15 deletions(-)

diff --git a/README.org b/README.org
index 713a150154..ccbb0ee09a 100644
--- a/README.org
+++ b/README.org
@@ -1340,10 +1340,22 @@ search for and finds terms in the current buffer that 
the search term
 subsumes.  It highlights all matching terms in the buffer and moves
 the cursor to the beginning of the next match after point.  For
 example, to find if-then-else constructs in the current buffer do ~C-c
-C-s _ -> _ ; _ RET~.  You can further refine the search with an
-arbitrary Prolog goal that variables in the search term should satisfy
-by invoking ~sweeprolog-term-search~ with a prefix argument (i.e. typing
-~C-u C-c C-c~).
+C-s _ -> _ ; _ RET~.
+
+While prompting for a search term in the minibuffer, this command
+populates the "future history" with the Prolog terms at point, with
+the most nested term at point on top.  Typing ~M-n~ once in the
+minibuffer fills it the innermost term at point, typing ~M-n~ again
+cycles up the syntax tree at point filling the minibuffer with larger
+terms, up until the top-term at point.  For more information about
+minibuffer history commands, see [[info:emacs#Minibuffer History][Minibuffer 
History]] in the Emacs
+manual.
+
+If you invoke ~sweeprolog-term-search~ with a prefix argument, e.g. by
+typing ~C-u C-c C-c~, you can further refine the search with an
+arbitrary Prolog goal for filtering out search results that fail it.
+The given goal runs for each matching term, it may use variables from
+the search term to refer to subterms of the matching term.
 
 #+FINDEX: sweeprolog-term-search-repeat-forward
 #+FINDEX: sweeprolog-term-search-repeat-backward
@@ -1853,11 +1865,6 @@ there some further improvements that we want to pursue:
   ~help-echo~ property that says what kind of token this is, to expose
   the precise semantics of each token to the user.
 
-- Add a command for interactively inserting a new predicate :: 
~sweeprolog-mode~
-  should provide a command for interactively inserting a new predicate
-  definition, ideally with optional =PlDoc= comments (see 
[[#sweeprolog-pldoc][Documenting
-  predicates]]).
-
 - Make predicate completion aware of module-qualification :: predicate
   completion should detect when the prefix it's trying to complete
   starts with a module-qualification ~foo:ba<|>~ and restrict completion
diff --git a/sweep.pl b/sweep.pl
index 9e80898476..898df6643b 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -74,7 +74,8 @@
 sweep_format_head/2,
 sweep_format_term/2,
 sweep_current_functors/2,
-sweep_term_search/2
+sweep_term_search/2,
+sweep_terms_at_point/2
   ]).
 
 :- use_module(library(pldoc)).
@@ -1036,3 +1037,54 @@ sweep_match_term(quasi_quotation_position(_, _, 
SyntaxTerm, SyntaxPos, _), _, Te
 
 list_tail([_|T0], T) :- nonvar(T0), T0 = [_|_], !, list_tail(T0, T).
 list_tail([_|T], T).
+
+sweep_terms_at_point([String, Start, Point], Res) :-
+(   sweep_source_id(Path0),
+atom_string(Path, Path0),
+findall(Op, xref_op(Path, Op), Ops),
+(   xref_module(Path, Module)
+->  true
+;   Module = user
+)
+->  true
+;   Module = user, Ops = []
+),
+with_buffer_stream(
+Stream,
+String,
+(   ignore((   nonvar(Path),
+   set_stream(Stream, file_name(Path))
+   )),
+read_source_term_at_location(Stream, _,
+ [module(Module),
+  operators(Ops),
+  subterm_positions(SubPos)]),
+findall([Beg|End],
+sweep_terms_at_point_(SubPos, Start, Point, Beg, End),
+Res)
+)).
+
+sweep_terms_at_point_(SubPos, Start, Point, Beg, End) :-
+SubPos \= parentheses_term_position(_, _, _),
+arg(1, SubPos, Beg0),
+arg(2, SubPos, End0),
+Beg0 =< Point,
+Point =< End0,
+Beg is Beg0 + Start,
+End is End0 + Start.
+sweep_terms_at_point_(list_position(_, _, Elms, _), Start, Point, Beg, End) :-
+member(SubPos, Elms),
+sweep_terms_at_point_(SubPo

[nongnu] elpa/sweeprolog e540d05a79 2/2: Announce recent changes in NEWS.org and bump version 0.11.1

2023-01-06 Thread ELPA Syncer
branch: elpa/sweeprolog
commit e540d05a79748b8c41f021d0fd798bd863d223d3
Author: Eshel Yaron 
Commit: Eshel Yaron 

Announce recent changes in NEWS.org and bump version 0.11.1
---
 NEWS.org  | 10 ++
 sweeprolog.el |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index 0d33147330..6824b3d008 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -11,6 +11,16 @@ SWI-Prolog in Emacs.
 For further details, please consult the manual:
 .
 
+* Version 0.11.2 on 2023-01-07
+
+** Term Search now uses terms at point for "future history"
+
+When reading a search term in the minibuffer, ~sweeprolog-term-search~
+now populates the "future history" with the terms at point starting
+from the most nested term.  This means that you can type ~M-n~ in the
+minibuffer to quickly fill in the term at point in order to search for
+similar terms.
+
 * Version 0.11.1 on 2023-01-06
 
 ** Term Search improvements
diff --git a/sweeprolog.el b/sweeprolog.el
index d396dccbc6..0c196f72aa 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Eshel Yaron <~eshel/d...@lists.sr.ht>
 ;; Keywords: prolog languages extensions
 ;; URL: https://git.sr.ht/~eshel/sweep
-;; Package-Version: 0.11.1
+;; Package-Version: 0.11.2
 ;; Package-Requires: ((emacs "28.1"))
 
 ;; This file is NOT part of GNU Emacs.