Function: org-clone-local-variables
org-clone-local-variables is a byte-compiled function defined in
org-macs.el.
Signature
(org-clone-local-variables FROM-BUFFER &optional REGEXP)
Documentation
Clone local variables from FROM-BUFFER.
Optional argument REGEXP selects variables to clone.
Source Code
;; Defined in ~/.emacs.d/elpa/org-9.8.2/org-macs.el
(defun org-clone-local-variables (from-buffer &optional regexp)
"Clone local variables from FROM-BUFFER.
Optional argument REGEXP selects variables to clone."
(dolist (pair (buffer-local-variables from-buffer))
(pcase pair
(`(,name . ,value) ;ignore unbound variables
(when (and (not (memq name org-unique-local-variables))
(or (null regexp) (string-match-p regexp (symbol-name name))))
(ignore-errors (set (make-local-variable name) value)))))))