|
From: | Artem Yurchenko |
Subject: | Re: [PATCH] fix delete-property handling |
Date: | Tue, 09 Apr 2024 23:41:46 -0400 |
User-agent: | Zoho Mail |
Hi, Ikumi,Thank you for the review!> Thanks for your proposals. I'm now reading through the proposed codes.> They basically look good to me. I think that AUCTeX can accept them and> it requires copyright assignment. I assume that you haven't signed FSF> copyright assignment form before, so please follow this instruction if> you want to have your proposal incorporated into AUCTeX:I have signed my copyright assignment (for GNU Emacs and AUCTeX) andemailed to assign@gnu.org. They haven't responded yet though.>(This isn't a suggestion, just an impression.)>> + (put symbol 'delete-selection>> + (lambda ()>> + (unless (funcall electricp)>> + (get #'self-insert-command 'delete-selection)))))>>Good simple solution. I wasn't aware that `delete-selection' property>can return a function because of the commentary of delsel.el:>;; FUNCTION>;; For commands which need to dynamically determine this behavior.>;; FUNCTION should take no argument and return one of the above>;; values, or nil. In the latter case, FUNCTION should itself>;; do with the active region whatever is appropriate.">I took that "one of the above values" doesn't include FUCTTION itself.>However, `delete-selection-helper' is actually written to operate>recursively, which I didn't realize.>(That was the reason I wrote the current `delete-selection' property of>`LaTeX-insert-left-brace' to discriminate the cases between '(yank>supersede kill t nil) and a function.)Yes, I think the commentary at the top of delsel.el failed to expressthe intention. The docstring for delete-selection-helper says«FUNCTION should take no argument and return a value acceptable asTYPE, or nil.», which clarifies that recursive operation is allowed.I've implemented the rest of the corrections/suggestions and amattaching that as a new patch for patch-0001.I will need to rebase my patch-0002 on top, which I'll do after thereview of that one.Best,Artem
[Prev in Thread] | Current Thread | [Next in Thread] |