[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org bc52c4d 03/29: Fix compatibility for older Emacs ve
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org bc52c4d 03/29: Fix compatibility for older Emacs versions |
Date: |
Sun, 17 Oct 2021 02:57:25 -0400 (EDT) |
branch: externals/org
commit bc52c4d9ab886c722b6fa0ca7f02823bf916aec4
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
Fix compatibility for older Emacs versions
* lisp/org-compat.el (org-length>, org-file-name-concat): Add backward
compatibility for `length>' and `org-file-name-concat'.
---
lisp/org-compat.el | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 6ac0b62..0950ff7 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -74,6 +74,33 @@
;;; Emacs < 28.1 compatibility
+(if (fboundp 'length>)
+ (defalias 'org-length> #'length>)
+ (defun org-length> (sequence length)
+ "Return non-nil if SEQUENCE is longer than LENGTH."
+ (> (length sequence) length)))
+
+(if (fboundp 'file-name-concat)
+ (defalias 'org-file-name-concat #'file-name-concat)
+ (defun org-file-name-concat (directory &rest components)
+ "Append COMPONENTS to DIRECTORY and return the resulting string.
+
+Elements in COMPONENTS must be a string or nil.
+DIRECTORY or the non-final elements in COMPONENTS may or may not end
+with a slash -- if they don't end with a slash, a slash will be
+inserted before contatenating."
+ (save-match-data
+ (mapconcat
+ #'identity
+ (delq nil
+ (mapcar
+ (lambda (str)
+ (when (and str (not (string-empty-p str))
+ (string-match "\\(.+\\)/?" str))
+ (match-string 1 str)))
+ (cons directory components)))
+ "/"))))
+
(if (fboundp 'directory-empty-p)
(defalias 'org-directory-empty-p #'directory-empty-p)
(defun org-directory-empty-p (dir)
- [elpa] externals/org updated (9475993 -> f4bcc0c), ELPA Syncer, 2021/10/17
- [elpa] externals/org 6933c1a 01/29: lisp/org-persist.el: New library to store data across sessions, ELPA Syncer, 2021/10/17
- [elpa] externals/org fc80d05 02/29: Re-implement org-element-cache and add headline support, ELPA Syncer, 2021/10/17
- [elpa] externals/org bc52c4d 03/29: Fix compatibility for older Emacs versions,
ELPA Syncer <=
- [elpa] externals/org 68a44ea 04/29: org.el/org-narrow-to-subtree: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 7159ec0 05/29: org.el/org-at-planning-p: Add cache support, ELPA Syncer, 2021/10/17
- [elpa] externals/org 38b632d 06/29: org.el/org--get-local-tags: Add cache support, ELPA Syncer, 2021/10/17
- [elpa] externals/org 78abbcd 07/29: org.el/org-get-tags: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 5bf5fdb 09/29: org.el/org-entry-get-with-inheritance: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 5d162b7 10/29: org.el/org-back-to-heading: Handle inlinetasks correctly, ELPA Syncer, 2021/10/17
- [elpa] externals/org f4bcc0c 29/29: Merge branch 'main' into feature/org-element-cache-new, ELPA Syncer, 2021/10/17
- [elpa] externals/org fede258 15/29: org.el/org-in-archived-heading-p: Support cache and passing element arg, ELPA Syncer, 2021/10/17
- [elpa] externals/org 07ca988 24/29: Fix compatibility with Emacs 27, ELPA Syncer, 2021/10/17
- [elpa] externals/org eeb0450 26/29: Use XDG cache dir as default dir for cache persistance, ELPA Syncer, 2021/10/17