[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] scratch/prose-mode 9b83489: [prose-mode] Initial commit
From: |
Eric Abrahamsen |
Subject: |
Re: [elpa] scratch/prose-mode 9b83489: [prose-mode] Initial commit |
Date: |
Sat, 02 Jun 2018 21:56:20 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> + (advice-add
>> + 'kill-region
>> + :after
>> + #'prose-mode-add-yank-handler))
>
> Hmm... could you use filter-buffer-substring-function to add the
> yank-handler?
Instead of the gross kill-ring hack? Yes, it look like this works much
more cleanly:
(add-function :filter-return
filter-buffer-substring-function
#'prose-mode-add-yank-handler)
With a matching tweak to `prose-mode-add-yank-handler'.
>> + (start-marker (set-marker (make-marker) (car bounds)))
>> + (end-marker (set-marker (make-marker) (nth 1 bounds))))
>
> I recommend `copy-marker`.
Of course! Thanks.
I'm going to dog-food this for a while (already seeing weird behavior),
then do a proper [ELPA] announcement and see if anyone has any
suggestions.
Thanks again,
Eric