[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 3664447: org-compat: Silence byte compiler for Emac
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 3664447: org-compat: Silence byte compiler for Emacsversion < 28 |
Date: |
Sun, 15 Aug 2021 05:57:15 -0400 (EDT) |
branch: externals/org
commit 3664447eb2417b38f0053674f248d2b0f1592ff0
Author: Marco Wahl <marcowahlsoft@gmail.com>
Commit: Marco Wahl <marcowahlsoft@gmail.com>
org-compat: Silence byte compiler for Emacsversion < 28
Check availablility of function directory-empty-p directly instead of
relying on Emacs version.
Thanks Maxim and Kyle for the help. See
https://orgmode.org/list/87pmun8t2o.fsf@kyleam.com/ .
---
lisp/org-compat.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 81a8cf1..68834fb 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -74,12 +74,12 @@
;;; Emacs < 28.1 compatibility
-(if (version< emacs-version "28")
- (defun org-directory-empty-p (dir)
- "Return t if DIR names an existing directory containing no other files."
- (and (file-directory-p dir)
- (null (directory-files dir nil directory-files-no-dot-files-regexp
t))))
- (defalias 'org-directory-empty-p #'directory-empty-p))
+(if (fboundp 'directory-empty-p)
+ (defalias 'org-directory-empty-p #'directory-empty-p)
+ (defun org-directory-empty-p (dir)
+ "Return t if DIR names an existing directory containing no other files."
+ (and (file-directory-p dir)
+ (null (directory-files dir nil directory-files-no-dot-files-regexp
t)))))
;;; Emacs < 27.1 compatibility
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 3664447: org-compat: Silence byte compiler for Emacsversion < 28,
ELPA Syncer <=