From: Eshel Yaron Date: Sat, 26 Nov 2022 13:51:25 +0000 (+0200) Subject: * README.org: ("Managing Dependencies"): new section. X-Git-Tag: V9.1.0-sweep-0.9.2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a22ccea7ae1bd071bb22bf2c3f2f7f0d697e9725;p=sweep.git * README.org: ("Managing Dependencies"): new section. --- diff --git a/README.org b/README.org index 2b5acd2..2e29bec 100644 --- a/README.org +++ b/README.org @@ -1111,10 +1111,9 @@ Emacs manual]]). :DESCRIPTION: Commands that facilitate writing Prolog unit tests :END: -#+FINDEX: sweeprolog-plunit-testset-skeleton~ +#+FINDEX: sweeprolog-plunit-testset-skeleton #+CINDEX: plunit #+CINDEX: testing - SWI-Prolog includes the =PlUnit= unit testing framework[fn:3], in which unit tests are written in special blocks of Prolog code enclosed within the directives ~begin_tests/1~ and ~end_tests/1~. To insert a new @@ -1139,6 +1138,24 @@ type ~C-M-m~ or ~M-RET~ to invoke ~sweeprolog-insert-term-dwim~ (see [fn:3] See [[https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/plunit.html%27)][Prolog Unit Tests in the SWI-Prolog manual]]. +** Managing Dependencies +:PROPERTIES: +:CUSTOM_ID: managing-dependencies +:DESCRIPTION: Commands for managing dependencies of Prolog source files on each other +:END: + +#+FINDEX: sweeprolog-update-dependencies +#+KINDEX: C-c C-u +#+CINDEX: dependencies +#+CINDEX: autoload +It is considered good practice for SWI-Prolog source files to +explicitly list their dependencies on predicates defined in other +files by using ~autoload/2~ and ~use_module/2~ directives. To find all +implicitly autoloaded predicates in the current ~sweeprolog-mode~ buffer +and make the dependencies on them explicit, use the command ~M-x +sweeprolog-update-dependencies~ bound to ~C-c C-u~. This command +analyzes the current buffer and adds or updates ~autoload/2~ and +~use_module/2~ as needed. * Prolog Help :PROPERTIES: