Skip to content

Commit 8568798

Browse files
committed
jupyter-repl-mode better handling of yank-excluded-properties
The previous fix changed the behavior so that field was always excluded. We now restore the default list for jupyter mode buffers so that field will make it through as expected. There is no way to get all text properties so we reproduce the list from simple.el
1 parent e2e2cd2 commit 8568798

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

jupyter-repl.el

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,8 +1651,15 @@ Return the buffer switched to."
16511651
(setq-local yank-handled-properties
16521652
(append '((field . jupyter-repl-yank-handle-field-property))
16531653
yank-handled-properties))
1654-
(unless (booleanp yank-excluded-properties) ; `yank-excluded-properties' can be set to t
1655-
(setq-local yank-excluded-properties (remq 'field yank-excluded-properties)))
1654+
(setq-local yank-excluded-properties
1655+
(remq 'field
1656+
(or
1657+
(and (listp yank-excluded-properties)
1658+
yank-excluded-properties)
1659+
;; if the user sets `yank-excluded-properties' to t we cannot recover
1660+
;; the default list of properties, so it is reproduced here for consistency
1661+
'(category field follow-link fontified font-lock-face help-echo
1662+
intangible invisible keymap local-map mouse-face read-only yank-handler))))
16561663
;; Initialize a buffer using the major-mode correponding to the kernel's
16571664
;; language. This will be used for indentation and to capture font lock
16581665
;; properties.

0 commit comments

Comments
 (0)