Stefan Monnier writes: >> I changed the property name to 'term-line-wrap'. > > Thanks, > >>>>> + (let (buffer-read-only) >>>>> + (delete-char 1)))) >>> Never let-bind `buffer-read-only`: let-bind `inhibit-read-only` >>> instead. >> Done. I am curious to know why I shouldn't let-bind 'buffer-read-only' ? > > Various minor reasons: > - it also allows modifying text with `read-only` text-property. > - It allows the wrapped code to change read-only-mode if it wants/needs to, > whereas let-binding buffer-read-only means that if the wrapped code > changes read-only-mode, we'll silently undo this change at the end. > - `buffer-read-only` is a variable to *set* or *unset* rather than > to let-bind temporarily. Using inhibit-read-only clarifies that you > just want to temporarily override the read-only-ness rather than to > change the read-only-mode. > Depending on the situation, different things matter more. > Here it likely doesn't make much of a difference in practice, but the > normal style is to bind inhibit-read-only: that's what it's for. That makes sense. Thanks for the detailed answer. > >> One more question, should I deprecate 'term-suppress-hard-newline' as >> part of this changeset ? > > I think it should mark it as obsolete, yes. Awesome. I made the change and attached the latest patch. FYI, I also went removed all usages of that variable. JS