[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 07b6a0e044 48/50: compat: Use org- wrapper for stri
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 07b6a0e044 48/50: compat: Use org- wrapper for string-equal-ignore-case compatibility |
Date: |
Tue, 4 Oct 2022 21:58:02 -0400 (EDT) |
branch: externals/org
commit 07b6a0e0449caafb755bebb8def2754b29487048
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>
compat: Use org- wrapper for string-equal-ignore-case compatibility
* lisp/org-compat.el (org-string-equal-ignore-case): New compatibility
function.
(org-mode-flyspell-verify):
* lisp/ob-core.el (org-babel-results-keyword):
(org-babel-insert-result):
* lisp/org-lint.el (org-lint-duplicate-custom-id):
* lisp/ox.el (org-export-resolve-radio-link):
Use org-string-equal-ignore-case.
Prefer an explicit org- wrapper to isolate the kludge and avoid any
confusion about where it is defined.
This is a follow-up to the port of Emacs's 70341cab3.
---
lisp/ob-core.el | 8 ++++----
lisp/org-compat.el | 10 +++++++---
lisp/org-lint.el | 2 +-
lisp/ox.el | 3 +--
4 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 5e821d932c..27947111ff 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -144,7 +144,7 @@ used."
:type 'string
:safe (lambda (v)
(and (stringp v)
- (string-equal-ignore-case "RESULTS" v))))
+ (org-string-equal-ignore-case "RESULTS" v))))
(defcustom org-babel-noweb-wrap-start "<<"
"String used to begin a noweb reference in a code block.
@@ -2491,7 +2491,7 @@ INFO may provide the values of these header arguments (in
the
;; Escape contents from "export" wrap. Wrap
;; inline results within an export snippet with
;; appropriate value.
- ((string-equal-ignore-case type "export")
+ ((org-string-equal-ignore-case type "export")
(let ((backend (pcase split
(`(,_) "none")
(`(,_ ,b . ,_) b))))
@@ -2502,14 +2502,14 @@ INFO may provide the values of these header arguments
(in the
backend) "@@)}}}")))
;; Escape contents from "example" wrap. Mark
;; inline results as verbatim.
- ((string-equal-ignore-case type "example")
+ ((org-string-equal-ignore-case type "example")
(funcall wrap
opening-line closing-line
nil nil
"{{{results(=" "=)}}}"))
;; Escape contents from "src" wrap. Mark
;; inline results as inline source code.
- ((string-equal-ignore-case type "src")
+ ((org-string-equal-ignore-case type "src")
(let ((inline-open
(pcase split
(`(,_)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 9032212b7f..b8ed3ddc36 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -76,6 +76,9 @@
(declare-function org-fold-show-all "org-fold" (&optional types))
(declare-function org-fold-show-children "org-fold" (&optional level))
(declare-function org-fold-show-entry "org-fold" (&optional hide-drawers))
+;; `org-string-equal-ignore-case' is in _this_ file but isn't at the
+;; top-level.
+(declare-function org-string-equal-ignore-case "org-compat" (string1 string2))
(defvar calendar-mode-map)
(defvar org-complex-heading-regexp)
@@ -116,9 +119,10 @@ the symbol of the calling function, for example."
(when (not (equal attr cachedattr))
(puthash sym attr org-file-has-changed-p--hash-table)))))
-(unless (fboundp 'string-equal-ignore-case)
+(if (fboundp 'string-equal-ignore-case)
+ (defalias 'org-string-equal-ignore-case #'string-equal-ignore-case)
;; From Emacs subr.el.
- (defun string-equal-ignore-case (string1 string2)
+ (defun org-string-equal-ignore-case (string1 string2)
"Like `string-equal', but case-insensitive.
Upper-case and lower-case letters are treated as equal.
Unibyte strings are converted to multibyte for comparison."
@@ -1358,7 +1362,7 @@ ELEMENT is the element at point."
(and log
(let ((drawer (org-element-lineage element '(drawer))))
(and drawer
- (string-equal-ignore-case
+ (org-string-equal-ignore-case
log (org-element-property :drawer-name drawer))))))
nil)
(t
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index e8511103fd..a9fe2b7e62 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -383,7 +383,7 @@ called with one argument, the key used for comparison."
ast
'node-property
(lambda (property)
- (and (string-equal-ignore-case
+ (and (org-string-equal-ignore-case
"CUSTOM_ID" (org-element-property :key property))
(org-element-property :value property)))
(lambda (property _) (org-element-property :begin property))
diff --git a/lisp/ox.el b/lisp/ox.el
index 1cb0dea06c..37cee1674c 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -82,7 +82,6 @@
(require 'org-element)
(require 'org-macro)
(require 'tabulated-list)
-(require 'subr-x)
(declare-function org-src-coderef-format "org-src" (&optional element))
(declare-function org-src-coderef-regexp "org-src" (fmt &optional label))
@@ -4457,7 +4456,7 @@ has type \"radio\"."
(let ((path (org-string-clean-whitespace (org-element-property :path link))))
(org-element-map (plist-get info :parse-tree) 'radio-target
(lambda (radio)
- (and (string-equal-ignore-case
+ (and (org-string-equal-ignore-case
(org-string-clean-whitespace (org-element-property :value radio))
path)
radio))
- [elpa] externals/org 0da6c49f75 21/50: Backport commit 4f37a3b29 from Emacs, (continued)
- [elpa] externals/org 0da6c49f75 21/50: Backport commit 4f37a3b29 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 07ca33e603 25/50: Backport commit 2a05479c2 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org e7059f7dbe 28/50: Backport commit 22a5f0223 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org e9df837d8a 30/50: Backport commit 0a6e2b3bf from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 883f87c3e7 32/50: Backport commit 4d64c39fa from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 2ac8c44f04 33/50: Backport commit b335e1a04 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 631d4eb6af 40/50: org-macs: Move org-current-text-indentation to silence byte-compiler, ELPA Syncer, 2022/10/04
- [elpa] externals/org 07c5d066aa 17/50: Backport commit 3236dedc2 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 9b62bcc9c6 39/50: Backport commit 8dacd8cd9 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 0e0fe76ae4 45/50: ox-icalendar: Fix time zone construct from recently ported commit, ELPA Syncer, 2022/10/04
- [elpa] externals/org 07b6a0e044 48/50: compat: Use org- wrapper for string-equal-ignore-case compatibility,
ELPA Syncer <=
- [elpa] externals/org 1adbaca75a 26/50: Backport commit 563bf2fae from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org aeb934b598 41/50: Merge branch 'km/from-emacs-28', ELPA Syncer, 2022/10/04
- [elpa] externals/org abc34b458f 43/50: org-mouse: Make recently ported change compatible with Emacs < 29, ELPA Syncer, 2022/10/04
- [elpa] externals/org 1f8cc85542 50/50: org-agenda: Replace 29.1 version keywords with package-version, ELPA Syncer, 2022/10/04
- [elpa] externals/org 42c418693f 42/50: Merge branch 'km/from-emacs-master', ELPA Syncer, 2022/10/04
- [elpa] externals/org 8ac9203d5c 20/50: Backport commit 979308b4c from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 4f8ea50604 18/50: Backport commit d21412df0 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org e614a763ca 27/50: Backport commit 70341cab3 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 19c3969e75 29/50: Backport commit 2682ea1b3 from Emacs, ELPA Syncer, 2022/10/04
- [elpa] externals/org 25e638f726 34/50: Backport commit 1137219c9 from Emacs, ELPA Syncer, 2022/10/04