* lisp/term.el: Mention both forms of directory tracking in
commentary. Remove obsolete ChangeLog comments. Move more relevant
summary comments to the top.
* lisp/term.el (term-emulate-terminal): Avoid errors if the whole
decoded string is eight-bit characters. Don't attempt to save the
string for next iteration in that case.
* test/lisp/term-tests.el (term-decode-partial)
(term-undecodable-input): New tests.
* lisp/window.el (window-adjust-process-window-size): Use
window-screen-lines instead of window-body-height.
* lisp/term.el (term-mode): Use window-screen-lines to set the initial
window height.
The start and end lines of the scroll region must to be in the range
[0,term-height). There are few placees that incorrectly set the end
line of the scroll region to term-height which is outside the valid
range. Combined with another off-by-one error in
term-set-scroll-region's clamping logic, this would cause
term-scroll-with-delete to be unnecessarily turned on.
* lisp/term.el (term-scroll-start,term-scroll-end): Use defvar-local
to define the variables and document the valid range of values that
the variables can take.
(term--last-line): New function to calculate the 0-based index of the
last line.
(term--reset-scroll-region): New function to reset the scroll region
to the full height of the terminal.
(term-mode,term-reset-size,term-reset-terminal): Call
term--reset-scroll-region to reset the scroll region.
(term-set-scroll-region): Fix the off-by-one error in the clamping
logic which allowed term-scroll-end to have values outside the valid
range [0,term-height).
* lisp/term.el (term-unwrap-line, term-emulate-terminal): Prevent the
`term-line-wrap` property of newlines from spreading accidentally
when inserting text next to it.
Remove left-over comment from the bulk comint->term query/replace.
(term-command-function): Rename from term-command-hook.
Give it a global default value.
(term-suppress-hard-newline): Mark it as generally obsolete.
(term-mode): Don't manually make hooks buffer-local.
(term--remove-fake-newlines): Fix assert -> cl-assert.
(term-char-mode): Use add-function.
(term-send-input): Use run-hook-with-args.
(term-dynamic-complete): Use run-hook-with-args-until-success.
(term-dynamic-simple-complete): Completion tables can be plain lists.
(serial-read-name): Simplify and fix misuse of `set`.
* lisp/term.el (term-mode): Advice filter-buffer-substring-function to
remove line unwrapping from killed text.
(term-reset-size): Add or remove line unwrapping depending on the new
terminal width.
(term-suppress-hard-newline): Mark obsolete.
(term-unwrap-line): Use text properties to be able to find the
newlines later.
f64c277 (origin/emacs-26) Let bookmark-jump override window-point (Bu...
1208aaa Omit keymap from subword-mode docstring (Bug#32212)
2b70b54 Prevent line-mode term from showing user passwords
5de4441 Check for special filenames in eshell (Bug#30724)
1b4b965 Fix indent-sexp of #s(...) (Bug#31984)
59e8533 Add save-match-data to abbreviate-file-name (Bug#32201)
47f75b1 Fix last change in editfns.c
671dc5a Fix calls to buffer modification hooks from replace-buffer-co...
cc4ceed ; etc/NEWS: Remove unnecessary reference to a bug number.
e0f33ea Fix Bug#32226
7308fa0 Improve doc strings of several variables in keyboard.c
For buffers whose mode derive from comint-mode, the user password is
read from the minibuffer and it's hidden. A buffer in term-mode and
line submode, instead shows the passwords. Make buffers in line
term-mode to hide passwords too (Bug#30190).
* lisp/term.el (term-send-invisible): Prefer the more robust
`read-passwd' instead of `term-read-noecho'.
(term-watch-for-password-prompt): New function.
(term-emulate-terminal): Call it each time we receive non-escape
sequence output.
Co-authored-by: Noam Postavsky <npostavs@gmail.com>
(Backport from master.)
(Thanks to Stefan Monnier for improvements to this patch.)
* lisp/term.el (term--bash-needs-EMACS-status): New var.
(term--bash-needs-EMACSp): New function.
(term-exec-1): Use it instead of always setting EMACS.
* lisp/term.el (term-handle-ansi-terminal-messages): Use an explicit
tramp method when constructing the tramp path for a non-local host,
as this is now mandatory. "-" is a pseudo-method for the user's
`tramp-default-method'. (Bug#31355)
Specify the remote username explicitly in all cases, as
`tramp-default-user' and `tramp-default-user-alist' could cause the
previous logic to fail.
Minor related improvements to the commentary.
(Thanks to Stefan Monnier for improvements to this patch.)
* lisp/term.el (term--bash-needs-EMACS-status): New var.
(term--bash-needs-EMACSp): New function.
(term-exec-1): Use it instead of always setting EMACS.
Before this patch, after the terminal process dies the command
hooks added in term-mode's char mode would produce errors.
This fix removes these hooks when the process dies.
* lisp/term.el (term-handle-exit): Remove pre-command-hook and
post-command-hook because the process is dead. (Bug#31236)
Copyright-paperwork-exempt: yes
5de608f (origin/emacs-26) Update the documentation of 'perform-replace'
06245b6 * etc/NEWS: Another fix for the last change (noted by Juri Li...
8f6293c Fix use of @key in Texinfo manuals
f4c9894 Improve documentation of actual arglist
ce0e253 ; * etc/NEWS: Improve last change as proposed by Phil Sainty
b89ff0e Don't assume term-current-row cache is valid (Bug#31193)
326a296 ; * etc/NEWS: Mention 'display-buffer-in-major-side-window' c...
3bdc9a1 Fix flyspell-auto-correct-previous-word broken by recent change
a539eb5 * test/src/lread-tests.el (lread-test-bug-31186): New test.
3fa472b Fix undefined behaviour while looking for lexical-binding fil...
4341aac Minor wording improvement in "Bookmarks"
Conflicts:
test/src/lread-tests.el
* lisp/term.el (term-down): Call `term-current-row' instead of
directly accessing the variable `term-current-row. Following a resize
of the terminal's window, `term-current-row' is reset to nil, so it is
not safe to assume it is a number.
* lisp/term.el (term-emulate-terminal): Leave line-wrapping state if
point was moved after we entered it.
* test/lisp/term-tests.el (term-line-wrapping-then-motion): New test.
f2caf08ca6 ; Spelling fixes
f0e5f220b6 * lisp/progmodes/grep.el (zrgrep):
a0f71260f8 Minor copyedits in doc/emacs/text.texi
adfe2f580f Remove outdated comment in syntax.el
b80e15b6a6 Prevent Flyspell from changing unrelated words
e385599457 Avoid errors in flymake in builds --without-x
d691e30cb0 More improvements of the Emacs manual
22922c7 (origin/emacs-26) * doc/emacs/entering.texi (Entering Emacs):...
59657c4 Document 'window-at-side-p' in the Elisp manual
2b35ed0 Document external-debugging-output in the Elisp Manual (Bug#2...
db6564c Fix scroll-margin docstring (Bug#13791)
732d1b9 Clarify that `ansi-term' is almost the same as `term' (Bug#18...
f706c59 Update manual description of locate-file (Bug#23650)
1602262 Clarify effect of print-gensym (Bug#27776)
53e9fa2 * lisp/custom.el (defcustom): Fix docstring (Bug#27891).
607cc4e Define cl-type-definition button type as needed (Bug#28899)
9e6889c Emphasize that GPG passphrase caching is temporary (Bug#29907)
4b5711b Fix @examples in cc-mode.info, where lines were getting glued...
71961f1 Minor change in "Mode Line" section of Emacs manual
55a2b76 More fixes in the Emacs manual
1fc98ed073 ; Spelling fix
bb396a369c Update Org to v9.1.6
fa582153f7 Use text-pixels values only when saving framesets (Bug#30141)
6b01b9475d Minor improvement in section "Pages" of the usere manual
e8c8bd3de2 Minor improvements in user manual
26b8b92e63 Improve the "Mark" chapter of the user manual
759569fe40 Improve the "Buffers" chapter of the user manual
c2e6d121ff * lisp/term.el (term-send-input): Fix text duplication in ...
854a1c0a61 Improve "Buffers" in the user manual
# Conflicts:
# etc/NEWS
cfc94fd (origin/emacs-26) Don't mention 'vc-stay-local' in the user m...
8ce430b Fix a typo in calendar.texi
bb748b3 Minor improvement in wording of the Emacs manual
b603aff Revert "Fix tempfile creation when byte compiling"
4fd446e Fix tempfile creation when byte compiling
7f48a11 Improve the Emacs manual as suggested in emacs-manual-bugs
728ded0 * lisp/emacs-lisp/bytecomp.el: Tweak last change
c6c05e2 Unbreak building Emacs on FreeBSD
a41ad3d Don't unnecessarily use non-ASCII characters in C sources
c28d4b6 Portability fixes in emacs-module-tests
1d50c18 Add tests for term.el
* lisp/term.el (term-terminal-state): Remove.
(term-do-line-wrapping): New variable, equivalent to state 1.
(term-terminal-previous-parameter, term-terminal-parameter)
(term-terminal-more-parameters)
(term-terminal-previous-parameter-2)
(term-terminal-previous-parameter-3)
(term-terminal-previous-parameter-4): Remove.
(term-move-to-column): New function, for absolute column movement.
(term-control-seq-regexp, term-control-seq-prefix-regexp): New
constants.
(term-emulate-terminal, term-pager-discard): Use them via string-match
instead of implementing a state machine in elisp. Handle all
unprocessed input via term-terminal-undecoded-bytes (this solves
Bug#17231).
(term-handle-ansi-escape): Take a list of escape sequence parameters
as an argument, rather than via dynamic variables.
(term-erase-in-display): Consult the argument, not the dynamically
bound term-terminal-parameter (which happened to be the same as the
argument up until now).
* lisp/term.el (term-mode): Add `name' attribute to
window-adjust-process-window-size-function value, so that it can be
removed easily by tests.
* test/lisp/term-tests.el: New tests.
Check to see if there is an incomplete command at the end of
term-emulate-terminal's input string, and, if so, save it so the whole
command can be processed when the next string arrives.
* lisp/term.el (term-partial-ansi-terminal-message): New variable.
(term-mode): Make it buffer local.
(term-handle-ansi-terminal-messages): Prepend it to the received
message, and set it if a partial message was received.
Copyright-paperwork-exempt: yes
Do not merge to master, it will be solved differently there, see
"Switch term.el to lexical binding, and clean up code a bit".
* lisp/term.el (term-mode, term-char-mode, term-line-mode)
(term-emulate-terminal): Make buffer read-only in 'term-char-mode',
except for the process filter's output. Use 'read-only-mode-hook' to
track and restore the user-set state of 'buffer-read-only' for
'term-line-mode'. (Bug#24837)
(term-char-mode-buffer-read-only): New user option.
(term-line-mode-buffer-read-only): New buffer-local variable.
(term-line-mode-buffer-read-only-update): New function.
(term-char-mode, term-line-mode): Use 'term-set-goto-process-mark'
in pre-command-hook, and 'term-goto-process-mark-maybe' in
post-command-hook to counter-act unexpected changes to point when
using 'term-char-mode'.
(term-char-mode-point-at-process-mark): New user option.
(term-goto-process-mark): New buffer-local variable.
(term-set-goto-process-mark): New function.
(term-goto-process-mark-maybe): New function.
(term-process-mark): New function.
* etc/NEWS: Mention the new behavior and user options.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.