I'm a big fan of fill-paragraph, and also sentence-end-double-space being set to t so that I can easily navigate and edit via backward-sentence, forward-sentence, kill-sentence, transpose-sentences and so on.
However there is one minor flaw with this combination - if I hit M-q (i.e. fill-paragraph) on a paragraph like this:
This sentence ends with a wink ;-) And it's followed by two spaces then another sentence. then it will trim one of the two spaces after the smiley, because it does not recognise the smiley as being the end of the sentence. Is there a clean way to fix it to preserve these two spaces, whilst not breaking the existing behaviour defined by the sentence-end function? I can think of three possibilities:
- Take the regexp generated by
(sentence-end), tweak it to recognise smileys, and store it in thesentence-endvariable - but then it's a static regexp which doesn't honour changes to variables likesentence-end-without-space. - Copy the whole of the
sentence-endfunction and then hack it to cope with smileys, but then I have to maintain my own version in parallel with the upstream one. - Hack
sentence-endas in 2. and then try to get the change merged upstream, but I don't know how realistic that is.
Are there any better options?
'elisptag because options 2 and 3 involve hacking elisp - is that not a reasonable use of the tag?elispshould be for questions about the Lisp language itself, specifically Emacs Lisp, not about how to do something using it.