From fca0dbcc613d45265b810c81daa86913481346eb Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 6 Aug 2017 10:26:01 +0200 Subject: [PATCH] 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'. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 2c491687c..6187e5e07 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9626,7 +9626,7 @@ Optional argument REGEXP selects variables to clone." (`(,name . ,value) ;ignore unbound variables (when (and (not (memq name org-unique-local-variables)) (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 (defun org-run-like-in-org-mode (cmd)