branch: elpa/slime
commit abf66f3708e7fde1dd66aeabd446f014c739ea41
Author: Stas Boukarev <[email protected]>
Commit: Stas Boukarev <[email protected]>
Clear presentations on yank into other buffers
---
contrib/slime-presentations.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/contrib/slime-presentations.el b/contrib/slime-presentations.el
index 6d92e743a1c..4580fafc942 100644
--- a/contrib/slime-presentations.el
+++ b/contrib/slime-presentations.el
@@ -14,7 +14,9 @@
;; Respect the syntax text properties of presentation.
(set (make-local-variable 'parse-sexp-lookup-properties) t)
(add-hook 'after-change-functions
- 'slime-after-change-function 'append t)))
+ 'slime-after-change-function 'append t)
+ (add-to-list 'yank-handled-properties
+ '(slime-repl-presentation .
slime-yank-presentations-handler))))
(add-hook 'slime-event-hooks 'slime-dispatch-presentation-event)
(setq slime-write-string-function 'slime-presentation-write)
(add-hook 'slime-connected-hook 'slime-presentations-on-connected)
@@ -55,6 +57,12 @@
(cl-pushnew '(slime-repl-result-face . t) text-property-default-nonsticky
:test 'equal))
+(defun slime-yank-presentations-handler (category start end)
+ (unless (eq major-mode 'slime-repl-mode)
+ (let ((inhibit-modification-hooks t))
+ (set-text-properties start end nil))
+ t))
+
(make-variable-buffer-local
(defvar slime-presentation-start-to-point (make-hash-table)))