Fix `org-clone-local-variables'

* lisp/org.el (org-clone-local-variables): Prevent errors that could
  happen when trying to set local variables that cannot be set,
  e.g. `enable-multibyte-characters'.
This commit is contained in:
Nicolas Goaziou 2017-08-06 10:26:01 +02:00
parent f3d7284ebd
commit fca0dbcc61
1 changed files with 1 additions and 1 deletions

View File

@ -9626,7 +9626,7 @@ Optional argument REGEXP selects variables to clone."
(`(,name . ,value) ;ignore unbound variables (`(,name . ,value) ;ignore unbound variables
(when (and (not (memq name org-unique-local-variables)) (when (and (not (memq name org-unique-local-variables))
(or (null regexp) (string-match-p regexp (symbol-name name)))) (or (null regexp) (string-match-p regexp (symbol-name name))))
(set (make-local-variable name) value)))))) (ignore-errors (set (make-local-variable name) value)))))))
;;;###autoload ;;;###autoload
(defun org-run-like-in-org-mode (cmd) (defun org-run-like-in-org-mode (cmd)