* Re: [elpa] scratch/prose-mode 9b83489: [prose-mode] Initial commit
[not found] ` <20180603020325.282612053B@vcs0.savannah.gnu.org>
@ 2018-06-03 2:33 ` Stefan Monnier
2018-06-03 4:56 ` Eric Abrahamsen
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2018-06-03 2:33 UTC (permalink / raw)
To: emacs-devel; +Cc: Eric Abrahamsen
> + (advice-add
> + 'kill-region
> + :after
> + #'prose-mode-add-yank-handler))
Hmm... could you use filter-buffer-substring-function to add the
yank-handler?
> + (start-marker (set-marker (make-marker) (car bounds)))
> + (end-marker (set-marker (make-marker) (nth 1 bounds))))
I recommend `copy-marker`.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [elpa] scratch/prose-mode 9b83489: [prose-mode] Initial commit
2018-06-03 2:33 ` [elpa] scratch/prose-mode 9b83489: [prose-mode] Initial commit Stefan Monnier
@ 2018-06-03 4:56 ` Eric Abrahamsen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Abrahamsen @ 2018-06-03 4:56 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-03 4:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180603020324.23533.23581@vcs0.savannah.gnu.org>
[not found] ` <20180603020325.282612053B@vcs0.savannah.gnu.org>
2018-06-03 2:33 ` [elpa] scratch/prose-mode 9b83489: [prose-mode] Initial commit Stefan Monnier
2018-06-03 4:56 ` Eric Abrahamsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.