Skip to content

Commit 54bd323

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 318712e commit 54bd323

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
@@ -1698,8 +1698,15 @@ Return the buffer switched to."
16981698
(setq-local yank-handled-properties
16991699
(append '((field . jupyter-repl-yank-handle-field-property))
17001700
yank-handled-properties))
1701-
(unless (booleanp yank-excluded-properties) ; `yank-excluded-properties' can be set to t
1702-
(setq-local yank-excluded-properties (remq 'field yank-excluded-properties)))
1701+
(setq-local yank-excluded-properties
1702+
(remq 'field
1703+
(or
1704+
(and (listp yank-excluded-properties)
1705+
yank-excluded-properties)
1706+
;; if the user sets `yank-excluded-properties' to t we cannot recover
1707+
;; the default list of properties, so it is reproduced here for consistency
1708+
'(category field follow-link fontified font-lock-face help-echo
1709+
intangible invisible keymap local-map mouse-face read-only yank-handler))))
17031710
;; Initialize a buffer using the major-mode correponding to the kernel's
17041711
;; language. This will be used for indentation and to capture font lock
17051712
;; properties.

0 commit comments

Comments
 (0)