[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode cb61f21432 08/13: Add idris-file-name-concat fu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode cb61f21432 08/13: Add idris-file-name-concat function as backward compatible |
Date: |
Thu, 5 Jan 2023 04:59:25 -0500 (EST) |
branch: elpa/idris-mode
commit cb61f21432e9a711a3598027a47c3148b981284d
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>
Add idris-file-name-concat function as backward compatible
version of file-name-concat from Emacs 28
---
idris-compat.el | 7 +++++++
idris-repl.el | 5 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/idris-compat.el b/idris-compat.el
index 2811f01bc8..d248d7f872 100644
--- a/idris-compat.el
+++ b/idris-compat.el
@@ -34,5 +34,12 @@ attention to case differences."
(unless (fboundp 'gensym)
(defalias 'gensym 'cl-gensym))
+(if (fboundp 'file-name-concat)
+ (defalias 'idris-file-name-concat 'file-name-concat)
+ (defun idris-file-name-concat (&rest components)
+ (let ((dirs (butlast components)))
+ (concat (apply 'concat (mapcar 'file-name-as-directory dirs))
+ (car (reverse components))))))
+
(provide 'idris-compat)
;;; idris-compat.el ends here
diff --git a/idris-repl.el b/idris-repl.el
index 2baba65ccd..3a0d457800 100644
--- a/idris-repl.el
+++ b/idris-repl.el
@@ -545,8 +545,9 @@ The handler will use qeuery to ask the use if the error
should be ingored."
Use `idris-repl-history-file' if set or fallback
to filepath computed from the `idris-interpreter-path'."
(or idris-repl-history-file
- ;; We should use `file-name-concat' but it is only in Emacs version 28+
- (concat "~/." (file-name-nondirectory idris-interpreter-path)
"/idris-history.eld")))
+ (idris-file-name-concat "~"
+ (concat "." (file-name-nondirectory
idris-interpreter-path))
+ "idris-history.eld")))
(defun idris-repl-read-history-filename ()
(read-file-name "Use Idris REPL history from file: "
- [nongnu] elpa/idris-mode updated (b7c50dd60f -> a060688b5c), ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode d48690a595 06/13: Move `idris-X-at-point` functions to idris-common-utils.el, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 13c750d67f 05/13: Return `user-error` instead of `error` from `idris-thing-at-point`, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode c9b2a4bee6 10/13: Add Xref backend for Idris, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 6afe9a82b8 11/13: Merge pull request #602 from keram/impro-code, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode cb61f21432 08/13: Add idris-file-name-concat function as backward compatible,
ELPA Syncer <=
- [nongnu] elpa/idris-mode 28758e0980 09/13: Ensure ibc file is deleted in `idris-test-idris-type-at-point` test, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode a060688b5c 13/13: Merge pull request #604 from keram/idris-xref-v1, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 306420713d 12/13: Merge pull request #603 from keram/impro-code3, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode dfce8b6631 01/13: Move `idris-run` from inferior-idris.el to idris-commands.el, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 9f4d497e68 02/13: Do not try delete last window when deleting idris buffer, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 66daf810c7 03/13: Ensure restart of Idris connection takes into account, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode cb71c82e13 04/13: Rename and unify `idris-pop-to-repl` and `idris-switch-to-output-buffer` in favour of, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode ac9ebf0159 07/13: Ensure that idris connection is closed in `idris-test-proof-search`, ELPA Syncer, 2023/01/05