[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 25bda86c48 032/166: Use load-file-path instead
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 25bda86c48 032/166: Use load-file-path instead of custom hack |
Date: |
Fri, 30 Sep 2022 04:59:23 -0400 (EDT) |
branch: elpa/sweeprolog
commit 25bda86c48731f463e2c71d305148d9e48ced7b6
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Use load-file-path instead of custom hack
---
Makefile | 2 +-
sweep.c | 2 +-
sweep.el | 11 ++++-------
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index 6544f4ecb7..f5758a24be 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ CMAKE_OPTIONS += -DSWIPL_INSTALL_IN_LIB=ON
.PHONY: clean all swipl check
-all: $(TARGET) $(BASENAME).info
+all: $(TARGET)
$(OBJECT): $(SOURCE) lib/libswipl.$(SOEXT)
$(CC) $(CFLAGS) -o $@ -c $(SOURCE)
diff --git a/sweep.c b/sweep.c
index bbb3f99b71..df14b49db1 100644
--- a/sweep.c
+++ b/sweep.c
@@ -495,7 +495,7 @@ ARG1 is a string denoting the context module for the
query.\n\
ARG2 and ARG3 are strings designating the module and predicate name of the
Prolog predicate to invoke, which must be of arity 2.\n\
ARG4 is any object that can be converted to a Prolog term, and will be passed
as the first argument of the invoked predicate.\n\
The second argument of the predicate is left unbound and is assumed to treated
by the invoked predicate as an output variable.\n\
-If ARG5 is non-nil, reverse the order of the predicate arguments such that the
first argument is the output variable and the second argument is the input term
derived from ARG4.
+If ARG5 is non-nil, reverse the order of the predicate arguments such that the
first argument is the output variable and the second argument is the input term
derived from ARG4.\n\
Further instantiations of the output variable can be examined via
`sweep-next-solution'.",
NULL);
emacs_value args_open_query[] = {symbol_open_query, func_open_query};
diff --git a/sweep.el b/sweep.el
index 4b21eb130f..0ba1589161 100644
--- a/sweep.el
+++ b/sweep.el
@@ -26,10 +26,6 @@
;;; Code:
-(defun sweep-home-directory ()
- "Return the installation directory of `sweep'."
- (file-name-directory (locate-library "sweep.el" t)))
-
(defgroup sweep nil
"SWI-Prolog Embedded in Emacs."
:group 'prolog)
@@ -63,7 +59,7 @@
(defcustom sweep-init-args (list (expand-file-name
"sweep.pl"
- (sweep-home-directory)))
+ (file-name-directory load-file-name)))
"List of strings used as initialization arguments for Prolog."
:package-version '((sweep "0.1.0"))
:type '(list string)
@@ -74,7 +70,7 @@
"Compile sweep-module."
(interactive)
(let* ((sweep-directory
- (shell-quote-argument (sweep-home-directory)))
+ (shell-quote-argument (file-name-directory load-file-name)))
(make-commands
(concat
"cd " sweep-directory "; make; cd -"))
@@ -96,7 +92,8 @@
(defun sweep-init ()
(apply #'sweep-initialize
- (cons (expand-file-name "bin/swipl" (sweep-home-directory))
+ (cons (expand-file-name "bin/swipl" (file-name-directory
+ load-file-name))
(cons "-q" sweep-init-args))))
(defun sweep-predicates-collection ()
- [nongnu] elpa/sweeprolog 85af4010e8 158/166: Use a public mailing list in the Maintainer package header, (continued)
- [nongnu] elpa/sweeprolog 85af4010e8 158/166: Use a public mailing list in the Maintainer package header, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 353ef846fb 035/166: ENHANCED: Pass keystrokes to the top-level directly when appropriate, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 72cc4d516b 014/166: PORT: detect linux vs macOS shared object extension in Makefile, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog e029eb3e3c 016/166: update .build.yml, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 0aa0a46631 017/166: PORT: don't use clang's -fdiagnostics-absolute-paths, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d4a501e9af 020/166: PORT: use rpath linker option, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b75179cc6e 022/166: Revert rpath tweaks, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 2f5dd9f13c 024/166: FIXED: Use more robust Prolog to C string conversion, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5f0f223318 023/166: Use LD_PRELOAD for testing, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ea04f467b9 027/166: ADDED: sweep-pack-install for interactively installing packs, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 25bda86c48 032/166: Use load-file-path instead of custom hack,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog c5b1504ca8 033/166: ADDED: sweep-top-level command and appropriate mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a06906287f 036/166: ADDED: sweep_funcall/2, 3 for calling Elisp functions from Prolog, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5b23e9819b 038/166: DOC: Add Prolog initialization section to the manual, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4e4d8508cd 039/166: ENHANCED: Allow using swipl compiled with GMP, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 4b4b28f15a 007/166: Add module descriptions to sweep-find-module annotation function, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 0078ef8ff0 060/166: ENHANCED: syntax errors coloring, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog e38825d0e2 066/166: ENHANCED: use a distinct face for structured comments, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 84e6182685 077/166: FIXED: detect "|:" prompt in the top-level, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 6e5c822fc8 116/166: ADDED: sweep-colourise-buffer-on-idle user option, on by default, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog a7ce69558e 111/166: Makefile: Use "--batch" instead of "-batch" for consistency, ELPA Syncer, 2022/09/30