1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

146220 commits

Author SHA1 Message Date
Andrea Corallo
39b3bcd324 * Run dead code removal always before fwprop, optim bootstrap time (~20% less)
* lisp/emacs-lisp/comp.el (comp-passes): Remove `comp-dead-code'.
	(comp-fwprop): Call `comp-dead-code'.
	(comp-dead-code): Remove fake arg.
2021-01-17 22:42:19 +01:00
Andrea Corallo
339b4a754b * Introduce `comp-fwprop-max-insns-scan' as heuristic threshold
* lisp/emacs-lisp/comp.el (comp-fwprop-max-insns-scan): New
	constant.
	(comp-fwprop*): Give-up when `comp-fwprop-max-insns-scan' is
	exceeded.
2021-01-17 22:33:02 +01:00
Andrea Corallo
883d937320 Make `comp-enable-subr-trampolines' effective for advices (bug#45854)
* src/comp.c: Copyright update.
	(syms_of_comp): Update `comp-enable-subr-trampolines' doc.
	* lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Check
	for `comp-enable-subr-trampolines'.
2021-01-17 17:01:51 +01:00
Philip Brown
88100bed0a * Set `backtrace-line-length' in async worker processes
Philip Brown <pdbrown.git@gmail.com>

	* lisp/emacs-lisp/comp.el (comp-run-async-workers): Set
	backtrace-line-length in async worker processes.

Copyright-paperwork-exempt: yes
2021-01-16 13:32:04 +01:00
Andrea Corallo
0a7ac0b550 Merge remote-tracking branch 'savannah/master' into native-comp 2021-01-16 13:26:10 +01:00
Stefan Monnier
0732fc3193 * lisp/frame.el Don't activate blink-cursor-idle-timer needlessly.
(blink-cursor-mode): Use `blink-cursor-check` rather than
`blink-cursor--start-idle-timer` so we check for the presence of
a frame where the cursor can be blinked before activating the idle timer.
2021-01-15 23:18:08 -05:00
Kévin Le Gouguec
1513ee37a4 Change default-directory before prompting in project-compile
This causes command completion to work from the project root, letting
users complete top-level folders, make targets, etc (bug#45765).

* lisp/progmodes/project.el (project-compile): Simplify using
call-interactively, as done with project(-async)-shell-command.
2021-01-16 06:00:22 +02:00
Stefan Monnier
5d6817086d * src/dispnew.c (sit_for): Return nil when interrupted by process output
Before adbb4eacc2,
`read_and_dispose_of_process_output` called
`record_asynch_buffer_change` which added "artificial" input events
(in the form of BUFFER_SWITCH_EVENTs), causing sit_for to return
Qnil when interrupted by process output.  Without those BUFFER_SWITCH_EVENTs,
sit_for now tends to return Qt when interrupted by process output
making `read_char` believe that we've waited the whole timeout,
As consequence incoming process output tended to cause premature
auto-saving of files (sometimes right after almost every key press).

This patch recovers the previous behavior, which is not ideal
(incoming process output can delay auto-save indefinitely), but has
been good enough for many years.
2021-01-15 22:38:52 -05:00
Basil L. Contovounesios
f45be48ddb
; Remove recent spurious addition in window.el
* lisp/window.el (display-buffer-use-some-window): Remove spurious
message included in 2021-01-11 "Support using auth-source for
NickServ passwords in ERC" (bug#45340#44).
2021-01-15 21:46:54 +00:00
Phillip Lord
667f2e097c Remove support for 32 bit build
* admin/nt/dist-build/README-scripts: Update
* admin/nt/dist-build/README-windows-binaries: Update
* admin/nt/dist-build/build-zips.sh: Remove 32 bit and fix paths
* admin/nt/dist-build/build-dep-zips.py: Remove 32 bit and update
  paths
* admin/nt/dist-build/emacs.nsi: Remove 32 bit and fix paths
2021-01-15 21:37:25 +00:00
Phillip Lord
f95c1b3230 Update dependency capture
* admin/nt/dist-build/build-dep-zips.py: Use ntldd to directly
  determine DLL dependencies
2021-01-15 21:37:25 +00:00
Stephen Leake
2644353cbc * .gitignore: add src/fingerprint.c
* lisp/dired-x.el (dired-file-name-at-point): Fix spelling in obsolete
message.
2021-01-15 10:03:06 -08:00
Aaron Jensen
4dc72dd9de Fix 'window-text-pixel-size' when there are leading/trailing spaces
First, scan to find the first non-whitespace character and then
backtrack to find the beginning of the line.  The previous
algorithm always started on the non-whitespace character during
the backtrack, causing it to stop immediately and not actually
find the beginning of the line.  The same applies to the end of
line calculation.
* src/xdisp.c: (Fwindow_text_pixel_size): Fix off by one error.
(Bug#45748)

* test/src/xdisp-tests.el (xdisp-tests--window-text-pixel-size)
(xdisp-tests--window-text-pixel-size-leading-space)
(xdisp-tests--window-text-pixel-size-trailing-space): New tests.
2021-01-15 14:04:25 +02:00
Jared Finder
66ac17289a Make libraries works with xterm-mouse-mode.
Change calls from 'read-event' to 'read-key' in libraries expecting
mouse events.  Do this only when 'xterm-mouse-mode' is enabled.  That
way those libraries read decoded mouse events instead of the
underlying escape sequence.  Add a parameter to 'read-key' that avoids
running any of the unbound fallbacks in 'read-key-sequence' so the
libraries can read mouse button-down events.

For backward compatibility purposes, the above logic is contained in a
new internal-only function: 'read--potential-mouse-event'.

* doc/lispref/commands.texi (Reading One Event): Document new
parameter to 'read-key'.  Mention that non-character events on
terminals need 'read-key'.
* lisp/subr.el (read-key-full-map): Add new keymap used by 'read-key'.
(read-key): Add new parameter 'fallbacks-disabled' to prevent running
any of the unbound fallbacks normally run by 'read-key-sequence'.
(read--potential-mouse-event): Add new function that calls 'read-key'
or 'read-event' depending on if 'xterm-mouse-mode' is set.
* lisp/foldout.el (foldout-mouse-swallow-events):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/mouse-drag.el (mouse-drag-throw, mouse-drag-drag):
* lisp/mouse.el (mouse-drag-secondary):
* lisp/ruler-mode.el (ruler-mode-mouse-grab-any-column)
(ruler-mode-mouse-drag-any-column-iteration):
* lisp/strokes.el (strokes-read-stroke, strokes-read-complex-stroke):
* lisp/textmodes/artist.el (artist-mouse-draw-continously)
(artist-mouse-draw-poly, artist-mouse-draw-2points):
* lisp/vc/ediff-wind.el (ediff-get-window-by-clicking):
* lisp/wid-edit.el (widget-button--check-and-call-button)
(widget-button-click): Call 'read--potential-mouse-event' instead of
'read-event'.
* lisp/wid-edit.el (widget-key-sequence-read-event): Call 'read-key'
with 'fallbacks-disabled' set instead of 'read-event'.  Unlike above
changes, this is unconditionally applied so it works for function
keys too.  Apply 'local-function-key-map' instead of
'function-key-map' as that contains the full terminal translations.
* lisp/vc/ediff.el (ediff-windows): Use 'display-mouse-p' to check if
a mouse is available.
* src/lread.c (Fread_event): Recommend 'read-key' in docstring for
'read-event' for non-character events.
2021-01-15 13:50:07 +02:00
Michael Albinus
138486cddb Some Tramp adaptions, mainly direct async processes
* doc/misc/tramp.texi (Firewalls, Remote processes)
(Frequently Asked Questions): Add @vindex.
(Predefined connection information): Precise precondition or direct
async processes.
(Remote shell setup): Ban ssh RemoteCommand option.
(Frequently Asked Questions): Adapt quoting.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.1-pre".

* lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async'
parameter.
(tramp-adb-handle-make-process): Adapt docstring.

* lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>:
Add `tramp-direct-async' parameter.
(tramp-sh-handle-insert-directory): Simplify merkers.
(tramp-sh-handle-make-process): Adapt docstring.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-debug-message): Suppress lockfiles.
(tramp-test-message): New defun.
(tramp-direct-async-process-p): Check also for `tramp-direct-async'.
(tramp-handle-make-process): Do not check for `tramp-direct-async-args'.

* test/lisp/net/tramp-tests.el (all): Replace `string-match' by
`string-match-p'.
(dired-copy-dereference): Declare.
(tramp-test-temporary-file-directory):
Remove `tramp-direct-async-args` for mock method.
(tramp-test15-copy-directory, tramp-test40-special-characters)
(tramp-test40-special-characters-with-stat)
(tramp-test40-special-characters-with-perl)
(tramp-test40-special-characters-with-ls, tramp-test41-utf8)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Skip for tramp-rclone.el.
(tramp--test--deftest-direct-async-process): Do not skip for mock
method.
(tramp-test32-shell-command): Adapt test for direct async processes.
(tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p):
Use `tramp-test-vec'.
2021-01-15 11:32:12 +01:00
Glenn Morris
0a26f47915 * lisp/emacs-lisp/seq.el (seq-concatenate): Unautoload (merge fix).
gitmerge-skip-regexp does not handle line breaks.
2021-01-15 09:38:20 +00:00
Eli Zaretskii
b4b98a044b Fix 'kill-visual-line'
* lisp/simple.el (kill-whole-line): Mention in the doc string that
this option affects 'kill-visual-line' as well.
(kill-visual-line): Improve the doc string.  Delete the character
at which the line was wrapped under 'visual-line-mode'.  Don't
indiscriminately delete whitespace following the wrap point.
(Bug#45837)
2021-01-15 10:12:09 +02:00
Stefan Monnier
65d22bf188 * lisp/startup.el (command-line): Remove redundant set of no-blinking-cursor
This is redundant because this was set based on "X" resources under
(memq window-system '(x w32 ns)) but the exact same resources and
values are tested in `x-apply-session-resources` which is also used for
those 3 window systems.
2021-01-14 17:37:57 -05:00
Stefan Monnier
9422ff4565 * lisp/startup.el (command-line): Remove redundant set of no-blinking-cursor
This was set when (or noninteractive emacs-basic-display), but
the code that sets `emacs-basic-display` also sets `no-blinking-cursor`
and `blink-cursor-mode`s value already tests `noninteractive`
alongside `no-blinking-cursor`.
2021-01-14 17:21:56 -05:00
Stefan Monnier
5039f79340 Fix marking "delayed-initialization" vars as dynamically scoped
We used to mark those vars as dynbound in `custom-reevaluate-setting`
which forced us to bind `current-load-list` around it to avoid having
the vars be associated with the wrong file.  Move this marking to
`custom-initialize-delay` so we don't need this workaround.

* lisp/custom.el (custom-initialize-delay): Mark the var as dynamic.
(custom-reevaluate-setting): Don't use `defvar` here.

* lisp/startup.el (command-line): Don't let-bind `current-load-list`
around calls to `custom-reevaluate-setting`.
2021-01-14 16:45:40 -05:00
Andrea Corallo
f1efac1f9e * Normalize `comp-eln-load-path' entries for trampoline comp (bug#43475)
* lisp/emacs-lisp/comp.el (comp-eln-load-path-eff): New function.
	(comp-trampoline-search, comp-trampoline-compile)
	(comp-clean-up-stale-eln): Update to use normalized
	`comp-eln-load-path-eff'.
2021-01-14 22:38:55 +01:00
Andrea Corallo
00101a8d4c * Introduce native compilation time reports
* lisp/emacs-lisp/comp.el (comp-log-time-report): New special
	variable.
	(comp--native-compile): Rework to log time reports.
2021-01-14 22:07:12 +01:00
Juri Linkov
53514e77a5 * lisp/info.el (Info-search): Don't deactivate mark when landed in same node
(bug#45839)
2021-01-14 21:08:46 +02:00
Glenn Morris
c83590b121 Merge from origin/emacs-27
488204cdc6 (origin/emacs-27) Remove one of recently added warnings ab...
55bc1560ac Fix assertion failure in window_box_height (Bug#45737)
27743e9e70 Fix cl-concatenate inlining
32a3758c84 Fix infloop in 'pixel-scroll-mode'
74d18957b8 Fix inhibiting the default.el loading in user init file
2021-01-14 07:50:28 -08:00
Glenn Morris
4ad332d844 ; Merge from origin/emacs-27
The following commit was skipped:

5d76288660 Fix problem with 8bit content-transfer-encoding in nndoc m...
2021-01-14 07:50:28 -08:00
Glenn Morris
84372a710b Merge from origin/emacs-27
149d64bbb2 * doc/misc/tramp.texi (Quick Start Guide): Fix thinko.
97747e6fb9 Tell people how to remove fontconfig customizations
33d0c603c6 ; * doc/lispref/modes.texi (SMIE Indentation Example): Fix...
03080b5545 Remove extraneous closing paren
2021-01-14 07:50:25 -08:00
Ted Zlatanov
707ee6afe2
EMBA infrastructure improvements for Emacs build testing.
* .gitlab-ci.yml: Use job templates and rules. Split tests into
fast/normal/slow. Make Docker images for each tested platform
(inotify, filenotify-gio, gnustep). Increase timeout.
* test/Makefile.in (check-lisp, check-net): Add new testing
targets.
* test/README: Document them.
* test/file-organization.org: Mention test/infra.
* test/infra/Dockerfile.emba: Add special Docker recipes for EMBA
testing.
2021-01-14 14:22:29 +00:00
Juri Linkov
488204cdc6 Remove one of recently added warnings abound binding keys in Isearch maps
* lisp/isearch.el (minibuffer-local-isearch-map): Remove comments
which warn against wantonly rebinding unbound keys from
irrelevant keymap.
https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00259.html
2021-01-13 20:32:36 +02:00
Juri Linkov
ebab8898ca * lisp/isearch.el: C-s C-u M-y reads a string from the kill-ring minibuffer
* lisp/isearch.el (isearch-yank-from-kill-ring): New command
with code moved from isearch-yank-pop.
(isearch-yank-pop): Use isearch-yank-from-kill-ring.
(isearch-yank-pop-only): Add optional arg, and call
isearch-yank-from-kill-ring when the prefix arg is C-u.
https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00089.html
2021-01-13 20:19:22 +02:00
Stefan Kangas
a9658cd5b0 Lift {global,local}-key-binding to Lisp
* lisp/subr.el (local-key-binding, global-key-binding): New defuns.
* src/keymap.c (Flocal_key_binding, Fglobal_key_binding): Remove DEFUNs.
(syms_of_keymap): Remove defsubrs for above DEFUNs.
* test/lisp/subr-tests.el (subr-test-local-key-binding)
(subr-test-global-key-binding): New tests.
2021-01-13 18:54:09 +01:00
Stefan Kangas
be9b7e83bc Prefer skip-unless in more tests
* test/lisp/emacs-lisp/timer-tests.el (timer-tests-debug-timer-check):
* test/src/decompress-tests.el (zlib--decompress):
* test/src/xml-tests.el (libxml-tests): Prefer skip-unless.
2021-01-13 17:39:53 +01:00
Eli Zaretskii
19b169c4e2 Fix 'visual-line-mode' when 'word-wrap-by-category' is in effect
* src/xdisp.c (move_it_in_display_line_to): Don't reset
next_may_wrap after saving a potential wrap point.  This fixes the
case where several characters in a row can serve as a wrap point.
(Bug#45837)
2021-01-13 16:45:31 +02:00
Stefan Kangas
aeb11da203 Use skip-unless instead of if+message in test
* test/lisp/cedet/semantic-utest.el (semantic-utest-Javascript):
Use skip-unless instead of if+message.
2021-01-13 15:23:31 +01:00
Stefan Kangas
118d6ef554 Remove some XEmacs compat code from tests
* test/lisp/cedet/srecode-utest-getset.el
(srecode-utest-getset-output):
* test/lisp/cedet/srecode-utest-template.el
(srecode-utest-template-output): Remove XEmacs compat code.
2021-01-13 15:18:21 +01:00
Stefan Kangas
6d467eb4d1 * lisp/calc/calc.el: Remove some XEmacs compat code. 2021-01-13 15:12:08 +01:00
Mattias Engdegård
820bd0e09a Stabilise lunar-phase-list test (bug#45818)
The test reference data was produced with accidental interference from
the system daylight saving in effect at the time.  Prevent that
from occurring again and correct the data.

* test/lisp/calendar/lunar-tests.el (with-lunar-test):
Switch to UTC and make sure daylight saving adjustment is disabled.
Use normal time presentation for maintainability.
* test/lisp/calendar/lunar-tests.el (lunar-test-phase): Adjust to UTC.
(lunar-test-phase-list): Adjust to UTC with correct times.
Enable the test by removing its :unstable mark.
2021-01-13 14:16:57 +01:00
Mattias Engdegård
c734ba6862 Fix Indian time zone test when run by Irishmen (bug#45818)
* test/lisp/calendar/solar-tests.el (solar-sunrise-sunset):
Inhibit any attempt by confused calendar code to apply daylight saving
correction when Irish time zone settings are in effect.  It's not
entirely clear why this is needed but may be related to the fact that
'IST' stands for both Irish and Indian Standard Time, and that Ireland
uses reversed daylight saving in winter.
2021-01-12 21:48:13 +01:00
Omar Polo
79b9a262ff * configure.ac: Fix native-comp OpenBSD build. 2021-01-12 21:29:29 +01:00
Arash Esbati
d93de0b412 ; Update docstring
* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Track the
latest addition of "frame" environment.
2021-01-12 20:42:03 +01:00
Robert Pluim
0f6c083251 Only run IPv6 tests if we have an IPv6 address
* test/src/process-tests.el (ipv6-is-available): New function for
checking whether we have a globally routable IPv6 prefix assigned.
(lookup-family-specification): Use 'ipv6-is-available' to check for
IPv6.  Use 'localhost' instead of 'google.com' to test
'network-lookup-address-info' API.
(lookup-google): Use 'ipv6-is-available' to check for
IPv6.

* test/lisp/net/nsm-tests.el (nsm-ipv6-is-available): Rename to
'ipv6-is-available', make identical to the one in
test/src/process-tests.el.
2021-01-12 18:53:48 +01:00
Robert Pluim
6dc4fc7d62 Fix nsm-should-check for "google.com" failure
* lisp/net/nsm.el (nsm-should-check): Extract the mask from
'network-interface-list' rather than the broadcast
address (Bug#45798).
2021-01-12 18:53:48 +01:00
Lars Ingebrigtsen
792ba7196f Add a new function 'buffer-line-statistics'
* src/fns.c (Fbuffer_line_statistics): New function.
2021-01-12 18:43:53 +01:00
Lars Ingebrigtsen
ca024b0575 Add a new variable `inhibit-interaction'
* doc/lispref/elisp.texi (Top): Add a link.
* doc/lispref/errors.texi (Standard Errors): Mention the new error.

* doc/lispref/minibuf.texi (Minibuffers): Add a link.
(Inhibiting Interaction): New node.

* src/data.c (syms_of_data): Define the `inhibited-interaction' error.

* src/lisp.h: Export the barfing function.

* src/lread.c (Fread_char, Fread_event, Fread_char_exclusive):
Barf if inhibited.

* src/minibuf.c (barf_if_interaction_inhibited): New function.
(Fread_from_minibuffer, Fread_no_blanks_input): Barf if inhibited.
(syms_of_minibuf): Define the `inhibit-interaction' variable.
2021-01-12 15:12:38 +01:00
Glenn Morris
d191f1589b Update substitute-command-keys tests, again
* test/lisp/help-tests.el (help-tests-substitute-command-keys/keymaps)
(help-tests-substitute-command-keys/keymap-change):
Update following recent minibuffer changes.
2021-01-12 05:41:13 -08:00
Brian Leung
78ef0a72fa comint-read-input-ring: Simplify last commit
* lisp/comint.el (comint-read-input-ring): It is not necessary to use
  `goto-char' again since we have already moved point to the desired
  location (bug#45797).
2021-01-12 13:29:03 +01:00
Stefan Monnier
d8936322f4 * lisp/emacs-lisp/eieio-base.el: Silence warnings in last change
(eieio-persistent-make-instance): Quote the `eieio-named` class name.
(eieio-named): Move before `eieio-persistent`.
2021-01-11 16:44:39 -05:00
Eric Ludlam
bb4399f647 cedet/ede/auto.el:
(ede-calc-fromconfig): New method.  Support functions in addition to
string matchers.
(ede-dirmatch-installed, ede-do-dirmatch):
Use `ede-calc-fromconfig' to do conversion.
Author: Eric Ludlam <zappo@gnu.org>
2021-01-11 16:20:57 -05:00
Eric Ludlam
002f9dc091 eieio-base.el:
(eieio-persistent-make-instance): Save the backward compatible 'name'
of objects saved in the file, and if the newly loaded class inherits
from 'eieio-named', restore the name of the object.
Author: Eric Ludlam <zappo@gnu.org>
2021-01-11 16:20:57 -05:00
Eric Abrahamsen
fcf8ad610d Fix possible prepending of "TEXT" to IMAP searches
* lisp/gnus/gnus-search.el (gnus-search-imap-search-keys): Add missing
keys "old", "new", "or" and "not".
(gnus-search-run-search): In addition, don't touch the query if it
starts with a parenthesis. Consider just getting rid of this
convenience altogether.
2021-01-11 09:48:50 -08:00
Stephen Leake
1aa36d968c * admin/notes/elpa: Update to match recent Gnu ELPA changes 2021-01-11 09:18:31 -08:00