From ad74fa17bba74d139d7e0ffb0d514f7246abed3d Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 26 Nov 2022 16:25:41 +0200 Subject: [PATCH] Announce recent changes in NEWS.org and bump version to 0.9.2 --- NEWS.org | 14 ++++++++++++++ README.org | 4 ++-- sweeprolog.el | 6 ++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/NEWS.org b/NEWS.org index c2d11d1..ff34374 100644 --- a/NEWS.org +++ b/NEWS.org @@ -11,6 +11,20 @@ SWI-Prolog in Emacs. For further details, please consult the manual: . +* Version 0.9.2 on 2022-11-26 + +** New command ~sweeprolog-update-dependencies~ + +Bound to ~C-c C-u~ in ~sweeprolog-mode~ buffers, this command analyzes the +current buffer looking for calls to implicitly autoloaded predicates, +and adds or updates ~autoload/2~ and ~use_module/2~ directives to make the +dependencies on these predicates explicit. + +** New user option ~sweeprolog-note-implicit-autoloads~ + +Boolean flag, when non-nil ~flymake~ also reports implicitly autoloaded +predicates in ~sweeprolog-mode~ buffers. Enabled by default. + * Version 0.9.1 on 2022-11-25 ** Predicate completion adjusts candidates arity according to the context diff --git a/README.org b/README.org index c85916a..a0a09df 100644 --- a/README.org +++ b/README.org @@ -1159,8 +1159,8 @@ analyzes the current buffer and adds or updates ~autoload/2~ and #+VINDEX: sweeprolog-note-implicit-autoloads By default, when ~flymake~ integration is enabled (see [[#diagnostics][Examining -diagnostics]]), calls to implicitly autoloaded predicates are detected -and marked as note-level diagnostics. To inhibit ~flymake~ from +diagnostics]]), calls to implicitly autoloaded predicates are marked +and reported as ~flymake~ diagnostics. To inhibit ~flymake~ from diagnosing implicit autoloads, customize the user option ~sweeprolog-note-implicit-autoloads~ to nil. diff --git a/sweeprolog.el b/sweeprolog.el index b726e66..ced7f49 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -6,7 +6,7 @@ ;; Maintainer: Eshel Yaron <~eshel/dev@lists.sr.ht> ;; Keywords: prolog languages extensions ;; URL: https://git.sr.ht/~eshel/sweep -;; Package-Version: 0.9.1 +;; Package-Version: 0.9.2 ;; Package-Requires: ((emacs "28.1")) ;; This file is NOT part of GNU Emacs. @@ -2067,7 +2067,9 @@ resulting list even when found in the current clause." f a))) (`("goal" "undefined" ,f ,a) (cons :warning - (format "Undefined predicate %s/%s" f a))) + (substitute-command-keys + (format "Undefined predicate %s/%s, use \\[sweeprolog-insert-term-dwim] to define it" + f a)))) (`("goal" ("autoload" . ,file) . ,_) (when sweeprolog-note-implicit-autoloads (cons :note -- 2.39.2