From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Few enhancements to ansi-term
Date: Tue, 30 Apr 2019 14:34:48 -0400 [thread overview]
Message-ID: <jwva7g7pdb0.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 87v9yvz9sn.fsf@gmail.com
> * lisp/term.el (term-set-scroll-region): Do not set
> term-scroll-with-delete when the region is set to the height of the
> terminal.
> * lisp/term.el (term-reset-terminal): Reset term-scroll-with-delete.
Better write these as:
> * lisp/term.el (term-set-scroll-region): Do not set
> term-scroll-with-delete when the region is set to the height of the
> terminal.
> (term-reset-terminal): Reset term-scroll-with-delete.
[ I read the first entry and thought the next was about another file so
I didn't even look at it. ]
The patch also changes term-reset-size but the ChangeLog doesn't explain
what this change does.
> @@ -3439,7 +3440,7 @@ term-set-scroll-region
> (setq term-scroll-with-delete
> (or (term-using-alternate-sub-buffer)
> (not (and (= term-scroll-start 0)
> - (= term-scroll-end term-height)))))
> + (= term-scroll-end (1- term-height))))))
The code just above does:
(setq term-scroll-end
(if (or (<= bottom term-scroll-start) (> bottom term-height))
term-height
bottom))
Should this also be changed to (1- term-height)?
And/or should the test use <= as in:
(not (and (<= term-scroll-start 0)
(>= term-scroll-end (1- term-height))))))
?
> * lisp/term.el (term-unwrap-line, term-emulate-terminal): Add
> rear-nonsticky text property to the newlines used for line wrapping.
The diff basically say that already, so I'd rather write it as "Prevent
the `term-line-wrap` property of newlines from spreading accidentally
when inserting text next to it" or something like that.
As for the code, it looks good to me.
Stefan
next prev parent reply other threads:[~2019-04-30 18:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 17:21 Few enhancements to ansi-term John Shahid
2019-04-30 17:23 ` John Shahid
2019-04-30 18:34 ` Stefan Monnier [this message]
2019-04-30 21:50 ` John Shahid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwva7g7pdb0.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.