summaryrefslogtreecommitdiff
path: root/lisp/mouse-sel.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mouse-sel.el')
-rw-r--r--lisp/mouse-sel.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index 57c131d43c1..f9b90fbfc6a 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -265,6 +265,8 @@ primary selection and region."
(remove-hook 'x-lost-selection-hooks 'mouse-sel-lost-selection-hook)
(dolist (binding mouse-sel-original-bindings)
(global-set-key (car binding) (cdr binding)))
+ ;; Restore the old values of these variables,
+ ;; only if they were actually saved previously.
(if mouse-sel-has-been-enabled
(setq interprogram-cut-function
mouse-sel-original-interprogram-cut-function