forked from mirrors/org-mode
org-compat: Define org-xor as alias for xor if available
* lisp/org-macs.el (org-xor): Move to ...
* lisp/org-compat.el (org-xor): ... here, making it an alias for xor
on Emacs 27.
This is an alternative to porting Emacs's
c676444a43e4634c1f98ec286b5bd9e46b23216b, which targets the code prior
to 45a1918ef
(Move `org-xor' into "org-macs.el", 2017-10-17).
This commit is contained in:
parent
218e694964
commit
531f4be256
|
@ -70,6 +70,13 @@
|
|||
|
||||
;;; Emacs < 27.1 compatibility
|
||||
|
||||
(if (fboundp 'xor)
|
||||
;; `xor' was added in Emacs 27.1.
|
||||
(defalias 'org-xor #'xor)
|
||||
(defsubst org-xor (a b)
|
||||
"Exclusive `or'."
|
||||
(if a (not b) b)))
|
||||
|
||||
(unless (fboundp 'pcomplete-uniquify-list)
|
||||
;; The misspelled variant was made obsolete in Emacs 27.1
|
||||
(defalias 'pcomplete-uniquify-list 'pcomplete-uniqify-list))
|
||||
|
|
|
@ -596,15 +596,6 @@ Optional argument REGEXP selects variables to clone."
|
|||
(or (null regexp) (string-match-p regexp (symbol-name name))))
|
||||
(ignore-errors (set (make-local-variable name) value)))))))
|
||||
|
||||
|
||||
|
||||
;;; Logic
|
||||
|
||||
(defsubst org-xor (a b)
|
||||
"Exclusive `or'."
|
||||
(if a (not b) b))
|
||||
|
||||
|
||||
|
||||
;;; Miscellaneous
|
||||
|
||||
|
|
Loading…
Reference in a new issue