Paul Eggert [Tue, 9 Mar 2021 19:22:59 +0000 (11:22 -0800)]
Port alternate signal stack to upcoming glibc 2.34
* src/sysdep.c (sigsegv_stack): Increase size to 64 KiB and align
it to max_align_t. This copies from Gnulib’s c-stack.c, and works
around a portability bug in draft glibc 2.34, which no longer
defines SIGSTKSZ when _GNU_SOURCE is defined.
* lisp/calc/calc-alg.el (calcFunc-sec, calcFunc-csc, calcFunc-cot):
Check that `math-known-sin' and `math-known-tan' succeeded before
using their value in arithmetic.
* test/lisp/calc/calc-tests.el (calc-test-trig): Add regression tests.
Backport from master.
Fix linear equation system solving in Calc (bug#35374)
* lisp/calc/calcalg2.el (math-try-solve-for):
To solve Ax^n=0 where A is a nonzero constant and x the variable to
solve for, solve x^n=0 instead of solving A=0 (which obviously fails)
or something equally stupid.
* test/lisp/calc/calc-tests.el (calc-test-solve-linear-system): New.
See https://lists.gnu.org/archive/html/emacs-devel/2019-09/msg00364.html
* lisp/replace.el(perform-replace): Rename variable
to next-replacement-replaced.
Noam Postavsky [Fri, 23 Aug 2019 00:48:19 +0000 (20:48 -0400)]
Fix non-deterministic process test
* test/src/process-tests.el (set-process-filter-t): Don't assume
subprocess output will come in a single chunk, keep waiting for more
data until next "prompt" is read from subprocess.
Alan Mackenzie [Sat, 31 Aug 2019 14:32:13 +0000 (14:32 +0000)]
Clarify the use of left/right-margin-width in determining current margin width
* doc/lispref/display.texi (Display-Margins): Clarify that
left/right-margin-width can not be used to determine the current margin width,
and that window-margins must be used instead.
* doc/lispref/processes.texi (Asynchronous Processes): Note that input
may read when sending data as well.
(Output from Processes): Note that functions which send data may also
trigger reading from processes.
(Input to Processes, Filter Functions): Note that filter functions may
be called recursively.
Tino Calancha [Mon, 19 Aug 2019 15:32:09 +0000 (17:32 +0200)]
Fix query-replace-regexp undo feature
Ensure that non-regexp strings used with `looking-at' are quoted.
* lisp/replace.el (perform-replace): Quote regexp (Bug#37073).
* test/lisp/replace-tests.el (replace-tests-perform-replace-regexp-flag):
New variable.
(replace-tests-with-undo): Use it.
(query-replace-undo-bug37073): Add tests.
Eli Zaretskii [Sun, 18 Aug 2019 16:36:31 +0000 (19:36 +0300)]
Support the new Japanese era name
* admin/unidata/NormalizationTest.txt:
* admin/unidata/UnicodeData.txt: Add U+32FF SQUARE ERA NAME REIWA.
Do not merge to master.
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update. Do not
merge to master.
Noam Postavsky [Fri, 16 Aug 2019 11:26:40 +0000 (07:26 -0400)]
Fix lisp indent infloop on unfinished strings (Bug#37045)
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-calc-next): Stop trying to
skip over strings if we've hit the end of buffer.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-unfinished-string): New test.
Eli Zaretskii [Sat, 10 Aug 2019 09:48:03 +0000 (12:48 +0300)]
Improve documentation of features that use the fringes
* doc/emacs/display.texi (Fringes): Add cross-reference to
where indicate-empty-lines is described.
(Useless Whitespace): Add an @anchor for a more accurate
cross-reference in "Fringes".
Mauro Aranda [Tue, 6 Aug 2019 15:45:28 +0000 (12:45 -0300)]
Fix octave-mode ElDoc support
* lisp/progmodes/octave.el (octave-eldoc-function-signatures): Fix the
regexp used, so no match happens when there is no defined function FN.
Also, tweak the regexp to support GNU Octave 4.2.x and newer. (Bug#36459)
Eli Zaretskii [Thu, 8 Aug 2019 13:17:51 +0000 (16:17 +0300)]
Avoid Groff hanging on MS-Windows when invoked by "M-x man"
* lisp/man.el (Man-build-man-command): On MS-Windows, redirect
stdin of 'man' to the null device, to make sure Groff exits
immediately after formatting the man page.
Eli Zaretskii [Sat, 3 Aug 2019 09:41:35 +0000 (12:41 +0300)]
Improve documentation of debugging Lisp syntax error
* doc/lispref/debugging.texi (Syntax Errors, Excess Open)
(Excess Close): Name the commands invoked by the key
sequences. Add cross-references to appropriate sections of
the Emacs manual. (Bug#21385)
* doc/emacs/programs.texi (Left Margin Paren): Add index for "\( in
strings".
* doc/lispref/positions.texi (List Motion): Add index, and cross
reference.
Not all the kill commands save the text in the kill ring
by default (e.g. `kill-rectangle').
It is more precise to just say that the kill commands save
the text and do not change the buffer (Bug#36741).
* lisp/view.el (view-mode): Update docstring.
Fix subproc listening when setting filter to non-t (Bug#36591)
* src/process.c (Fset_process_filter): Call add_process_read_fd
according to the state of process filter before it's updated. This
restores the correct functioning as it was before 2016-02-16 "Allow
setting the filter masks later". Inline the set_process_filter_masks
call instead of fixing it that function, because it is also called
from connect_network_socket, and we don't want to change the behavior
of that function so close to release.
* test/src/process-tests.el (set-process-filter-t): New test.
Mention term.el's \032 dir tracking in commentary (Bug#19524)
* lisp/term.el: Mention both forms of directory tracking in
commentary. Remove obsolete ChangeLog comments. Move more relevant
summary comments to the top.
Stefan Kangas [Sun, 14 Jul 2019 03:59:46 +0000 (05:59 +0200)]
Remove upload functionality of package-x from the elisp manual
Suggested by Stefan Monnier.
Ref: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19537#8
* doc/lispref/package.texi (Package Archives): Don't document
package-x upload functions in the elisp manual, since they are not
very commonly used. (Bug#19537)
* lisp/emacs-lisp/package-x.el (package-archive-upload-base)
(package-upload-buffer, package-upload-file): Add to the doc strings
any details removed from the elisp manual that would otherwise be
missing.
Handle completely undecoded input in term (Bug#29918)
* 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.
* src/macfont.m (macfont_supports_charset_and_languages_p)
(macfont_has_char): Don't pass integers outside the Unicode codespace to
CFCharacterSetIsLongCharacterMember. Do not merge to master.
* doc/lispref/internals.texi (Writing Emacs Primitives): Update some
of the sample code listings, fixing argument lists and parentheses.
Replace ... with @dots{}. Describe UNEVALLED special forms as
taking a single argument. (bug#36392)
Eli Zaretskii [Wed, 26 Jun 2019 15:02:26 +0000 (18:02 +0300)]
Clarify a subtle issue in the Internals chapter of lispref
* doc/lispref/internals.texi (Writing Emacs Primitives):
Clarify the issue with relocation of buffer or string text as
side effect of Lisp evaluation. (Bug#36392)
Noam Postavsky [Mon, 24 Jun 2019 01:27:43 +0000 (21:27 -0400)]
Fix sgml-mode handling of quotes within parens (Bug#36347)
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Use
syntax-ppss-table if set. This is only needed on the release branch,
on master the caller (syntax-propertize) already does this.
(sgml-mode): Set syntax-ppss-table to sgml-tag-syntax-table. This
correctly classifies parens as punctuation, so they won't confuse the
parser.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New test copied from master, with two cases added for this bug.
Robert Pluim [Wed, 19 Jun 2019 06:52:50 +0000 (08:52 +0200)]
Check that length of data returned by sysctl is non-zero
The length of the data returned by sysctl can be zero, which was not
checked for. This could cause crashes, e.g. when querying
non-existent processes. (Bug#36279)
* src/sysdep.c (list_system_processes) [DARWIN_OS || __FreeBSD__]:
(system_process_attributes) [__FreeBSD__]:
(system_process_attributes) [DARWIN_OS]:
* src/filelock.c (get_boot_time) [CTL_KERN && KERN_BOOTTIME]: Check
for zero length data returned by sysctl.
* test/lisp/progmodes/python-tests.el (python-virt-bin): New function.
(python-shell-calculate-exec-path-2)
(python-shell-calculate-exec-path-3)
(python-shell-calculate-exec-path-4)
(python-shell-with-environment-1, python-shell-with-environment-2):
Use it.
* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Expect a failed result if remote file access is not enabled,
as it happens while doing the test on Windows.
Eli Zaretskii [Fri, 14 Jun 2019 06:40:40 +0000 (09:40 +0300)]
Remove failing test erroneously added in backport
* test/src/thread-tests.el (threads-test-bug33073): Remove
test which cannot work on the emacs-26 branch. Do not merge
to master. Reported by Juanma Barranquero <lekktu@gmail.com>.