From 4e3a1b3f5a5e1d5534d94c0b5d2e6e2a5fc724da Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 13 Aug 2019 23:12:18 -0400 Subject: [PATCH] org-compat: Move proper-list-p kludge to proper section --- lisp/org-compat.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 5c30a7392..cae8a05f0 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -70,6 +70,15 @@ ;;; Emacs < 27.1 compatibility +(unless (fboundp 'proper-list-p) + ;; `proper-list-p' was added in Emacs 27.1. The function below is + ;; taken from Emacs subr.el 200195e824b^. + (defun proper-list-p (object) + "Return OBJECT's length if it is a proper list, nil otherwise. +A proper list is neither circular nor dotted (i.e., its last cdr +is nil)." + (and (listp object) (ignore-errors (length object))))) + (if (fboundp 'xor) ;; `xor' was added in Emacs 27.1. (defalias 'org-xor #'xor) @@ -629,15 +638,6 @@ attention to case differences." (eq t (compare-strings suffix nil nil string start-pos nil ignore-case)))))) -(unless (fboundp 'proper-list-p) - ;; `proper-list-p' was added in Emacs 27.1. The function below is - ;; taken from Emacs subr.el 200195e824b^. - (defun proper-list-p (object) - "Return OBJECT's length if it is a proper list, nil otherwise. -A proper list is neither circular nor dotted (i.e., its last cdr -is nil)." - (and (listp object) (ignore-errors (length object))))) - ;;; Integration with and fixes for other packages