summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-06 10:26:01 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-06 10:26:01 +0200
commitfca0dbcc613d45265b810c81daa86913481346eb (patch)
treec3f61cfbb06783be1da6e21e532c0a84e44ebafa
parentf3d7284ebd0c6e8248f7c3c444937270402b0ba6 (diff)
downloadorg-mode-fca0dbcc613d45265b810c81daa86913481346eb.tar.gz
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'.
-rw-r--r--lisp/org.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 2c49168..6187e5e 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)