summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add a helper binary to create a basic Secure Computing filter.scratch/seccomp-no-gnulibPhilipp Stephani2021-01-177-0/+402
| | | | | | | | | | | | | | | | | | | | | | The binary uses the 'seccomp' helper library. The library isn't needed to load the generated Secure Computing filter. * configure.ac: Check for 'seccomp' header and library. * lib-src/seccomp-filter.c: New helper binary to generate a generic Secure Computing filter for GNU/Linux. * lib-src/Makefile.in (DONT_INSTALL): Add 'seccomp-filter' helper binary if possible. (all): Add Secure Computing filter file if possible. (seccomp-filter$(EXEEXT)): Compile helper binary. (seccomp-filter.bpf seccomp-filter.pfc): Generate filter files. * test/src/emacs-tests.el (emacs-tests/seccomp/allows-stdout) (emacs-tests/seccomp/forbids-subprocess): New unit tests. * test/Makefile.in (src/emacs-tests.log): Add dependency on the helper binary.
* Add support for --seccomp command-line option.Philipp Stephani2021-01-175-4/+307
| | | | | | | | | | | | | | | | | | | | | | | When passing this option on GNU/Linux, Emacs installs a Secure Computing kernel system call filter. See Bug#45198. * configure.ac: Check for seccomp header. * src/emacs.c (usage_message): Document --seccomp option. (emacs_seccomp): New wrapper for 'seccomp' syscall. (load_seccomp, maybe_load_seccomp): New helper functions. (main): Potentially load seccomp filters during startup. (standard_args): Add --seccomp option. * lisp/startup.el (command-line): Detect and ignore --seccomp option. * test/src/emacs-tests.el (emacs-tests/seccomp/absent-file) (emacs-tests/seccomp/empty-file) (emacs-tests/seccomp/file-too-large) (emacs-tests/seccomp/invalid-file-size): New unit tests. (emacs-tests--with-temp-file): New helper macro. * etc/NEWS: Document new --seccomp option.
* Ensure that sentinels are called during 'accept-process-output'.Philipp Stephani2021-01-172-0/+62
| | | | | | | | | | | | When we're trying to notify a process about a status change, we need to ignore the SIGCHLD pipe temporarily, otherwise the code would likely not run into the timeout case that's necessary for a status change to happen. * src/process.c (wait_reading_process_output): Ignore the SIGCHLD pipe when notifying a process about a status change. * test/src/process-tests.el (process-tests/sentinel-called) (process-tests/sentinel-with-multiple-processes): New unit tests.
* Add new targets to test/MakefileMichael Albinus2021-01-173-14/+19
| | | | | | | | | | * test/Makefile.in (SUBDIRS): New variable. (subdir_template): New template. (top) Create new check-<dirname> targets. * test/README: Document them. * test/infra/gitlab-ci.yml (test-lisp-net-inotify): Rename.
* Add a bit more clarification around standard error processes.Philipp Stephani2021-01-171-1/+26
| | | | | | | * doc/lispref/processes.texi (Asynchronous Processes): Document how to obtain the standard error process that Emacs creates. (Accepting Output): Add an example how to wait for standard error in case Emacs has created a standard error process.
* * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Use pcaseStefan Monnier2021-01-161-176/+175
|
* * lisp/emacs-lisp/pcase.el: Add support for `not` to `pred`Stefan Monnier2021-01-166-16/+56
| | | | | | | | | | | | | (pcase--split-pred, pcase--funcall): Adjust for `not`. (pcase--get-macroexpander): New function. (pcase--edebug-match-macro, pcase--make-docstring) (pcase--macroexpand): Use it. * lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Use it! * doc/lispref/control.texi (The @code{pcase} macro): Document it. * lisp/emacs-lisp/ert.el (ert--explain-equal-rec): Remove redundant test.
* Don't crash if no asynchronous process has been created yet.Philipp Stephani2021-01-161-2/+2
| | | | | * src/process.c (wait_reading_process_output): Allow child_signal_read_fd < 0.
* Fix deadlock when receiving SIGCHLD during 'pselect'.Philipp Stephani2021-01-162-6/+93
| | | | | | | | | | | | | | | | | | | | | | If we receive and handle a SIGCHLD signal for a process while waiting for that process, 'pselect' might never return. Instead, we have to explicitly 'pselect' that the process status has changed. We do this by writing to a pipe in the SIGCHLD handler and having 'wait_reading_process_output' select on it. * src/process.c (child_signal_init): New helper function to create a pipe for SIGCHLD notifications. (child_signal_read, child_signal_notify): New helper functions to read from/write to the child signal pipe. (create_process): Initialize the child signal pipe on first use. (handle_child_signal): Notify waiters that a process status has changed. (wait_reading_process_output): Make sure that we also catch SIGCHLD/process status changes. * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process): Remove workaround, which is no longer needed.
* Fix Rmail summary for more than 99,999 messagesEli Zaretskii2021-01-161-3/+3
| | | | | | * lisp/mail/rmailsum.el (rmail-summary-font-lock-keywords): Don't assume there will be less than 100,000 messages in an mbox file. (Bug#45912)
* Fix two testsEli Zaretskii2021-01-162-3/+15
| | | | | | | | | | * test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-test-run): Make sure file names can be compared as strings, by running them through 'file-truename'. Reported by Vin Shelton <acs@alumni.princeton.edu>. * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-obsolete-hook.el") ("warn-obsolete-variable.el"): Use [^z-a] to match a newline as well. Reported by Vin Shelton <acs@alumni.princeton.edu>.
* test/infra/gitlab-ci.yml: run only for tags and some branchesTed Zlatanov2021-01-161-0/+9
|
* Improve support for Cham scriptEli Zaretskii2021-01-162-1/+8
| | | | | | * lisp/language/cham.el ("Cham"): Expand the entry. * etc/HELLO: Add entry for Cham.
* EMBA container build improvements for Emacs build testing.Ted Zlatanov2021-01-163-140/+212
| | | | | | | | | | | * test/infra/gitlab-ci.yml: Moved from .gitlab-ci.yml. Use the EMBA container registry with a different login token storage file for each commit. Split test stages into prep, build, fast tests, normal tests, platform tests, and slow (everything) and use templates where possible. * .gitlab-ci.yml: Include test/infra/gitlab-ci.yml and move all content there.
* Fix last changeEli Zaretskii2021-01-161-4/+4
| | | | | | * src/frame.c (Fset_mouse_position, Fset_mouse_pixel_position): Don't compile the FRAME_MSDOS_P case on platforms other than MSDOS, as that will never happen there.
* Make mouse-related calls be more consistent on all frame typesJared Finder2021-01-164-29/+39
| | | | | | | | | | | | * src/frame.c (Fset_mouse_position, Fset_mouse_pixel_position): Call Fselect_frame and appropriate mouse_moveto function on all non-GUI frame types, independent of #ifdef's. * src/term.c (init_tty): Initialize mouse_face_window for all non-GUI frame types. (term_mouse_moveto) [HAVE_GPM]: Make available even if HAVE_WINDOW_SYSTEM is defined. * src/xdisp.c (try_window_id): Call gui_clear_window_mouse_face in all cases.
* * lisp/frame.el Don't activate `blink-cursor-idle-timer` needlessly.Stefan Monnier2021-01-151-4/+4
| | | | | | (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.
* Change default-directory before prompting in project-compileKévin Le Gouguec2021-01-161-14/+5
| | | | | | | | 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.
* * src/dispnew.c (sit_for): Return nil when interrupted by process outputStefan Monnier2021-01-151-4/+12
| | | | | | | | | | | | | | | | Before adbb4eacc2a984c0fc0b65ec761368fd9067d6c5, `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.
* ; Remove recent spurious addition in window.elBasil L. Contovounesios2021-01-151-1/+0
| | | | | | * 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).
* Remove support for 32 bit buildPhillip Lord2021-01-155-199/+103
| | | | | | | | | * 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
* Update dependency capturePhillip Lord2021-01-152-52/+76
| | | | | * admin/nt/dist-build/build-dep-zips.py: Use ntldd to directly determine DLL dependencies
* * .gitignore: add src/fingerprint.cStephen Leake2021-01-152-1/+2
| | | | | * lisp/dired-x.el (dired-file-name-at-point): Fix spelling in obsolete message.
* Fix 'window-text-pixel-size' when there are leading/trailing spacesAaron Jensen2021-01-152-2/+36
| | | | | | | | | | | | | | | 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.
* Make libraries works with xterm-mouse-mode.Jared Finder2021-01-1513-36/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Some Tramp adaptions, mainly direct async processesMichael Albinus2021-01-157-89/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* * lisp/emacs-lisp/seq.el (seq-concatenate): Unautoload (merge fix).Glenn Morris2021-01-151-3/+0
| | | | gitmerge-skip-regexp does not handle line breaks.
* Fix 'kill-visual-line'Eli Zaretskii2021-01-151-8/+26
| | | | | | | | | * 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)
* * lisp/startup.el (command-line): Remove redundant set of no-blinking-cursorStefan Monnier2021-01-141-9/+0
| | | | | | | 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.
* * lisp/startup.el (command-line): Remove redundant set of no-blinking-cursorStefan Monnier2021-01-141-2/+1
| | | | | | | 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`.
* Fix marking "delayed-initialization" vars as dynamically scopedStefan Monnier2021-01-142-14/+13
| | | | | | | | | | | | | 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`.
* * lisp/info.el (Info-search): Don't deactivate mark when landed in same nodeJuri Linkov2021-01-141-1/+1
| | | | (bug#45839)
* Merge from origin/emacs-27Glenn Morris2021-01-145-15/+21
|\ | | | | | | | | | | | | | | 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
| * Remove one of recently added warnings abound binding keys in Isearch mapsJuri Linkov2021-01-131-4/+0
| | | | | | | | | | | | | | * 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
| * Fix assertion failure in window_box_height (Bug#45737)Martin Rudalics2021-01-101-3/+5
| | | | | | | | | | | | * lisp/window.el (window-sizable): Don't try to grow a mini window when the root window's minimum height is already larger than its actual height (Bug#45737).
| * Fix cl-concatenate inliningEli Zaretskii2021-01-091-0/+3
| | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-concatenate): Auto-load it. Do not merge to master. (Bug#45610)
| * Fix infloop in 'pixel-scroll-mode'Tak Kunihiro2021-01-091-4/+8
| | | | | | | | | | * lisp/pixel-scroll.el (pixel-scroll-up, pixel-scroll-down): Avoid inflooping when 'vertical-motion' doesn't move. (Bug#45628)
| * Fix inhibiting the default.el loading in user init fileEli Zaretskii2021-01-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | * lisp/startup.el (startup--load-user-init-file): Test the value of 'inhibit-default-init', not just the LOAD-DEFAULTS argument, because loading the user's init file could have set the value of the former. (command-line): Call 'startup--load-user-init-file' with last arg t: there's no longer any need to test the value of 'inhibit-default-init' here, as it will be tested by the called function. (Bug#45708)
* | ; Merge from origin/emacs-27Glenn Morris2021-01-140-0/+0
|\ \ | |/ | | | | | | | | The following commit was skipped: 5d76288660 Fix problem with 8bit content-transfer-encoding in nndoc m...
| * Fix problem with 8bit content-transfer-encoding in nndoc mbox filesLars Ingebrigtsen2021-01-071-0/+1
| | | | | | | | | | | | | | | | | | * lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): If we're reading an mbox file, it may contain messages that use content-transfer-encoding 8bit, which means that we have to treat the file as a sequence of byte (bug#42951). This avoids double-decoding -- once by Emacs when inserting the mbox into the buffer, and once by Gnus when displaying the articles.
* | Merge from origin/emacs-27Glenn Morris2021-01-143-2/+7
|\ \ | |/ | | | | | | | | | | 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
| * * doc/misc/tramp.texi (Quick Start Guide): Fix thinko.Michael Albinus2021-01-051-1/+1
| |
| * Tell people how to remove fontconfig customizationsRobert Pluim2021-01-051-0/+5
| |
| * ; * doc/lispref/modes.texi (SMIE Indentation Example): Fix previous commitSimen Heggestøyl2021-01-051-2/+2
| |
| * Remove extraneous closing parenSimen Heggestøyl2021-01-041-1/+1
| | | | | | | | | | * doc/lispref/modes.texi (SMIE Indentation Example): Remove extraneous closing paren.
* | EMBA infrastructure improvements for Emacs build testing.Ted Zlatanov2021-01-145-72/+212
| | | | | | | | | | | | | | | | | | | | | | | | * .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.
* | * lisp/isearch.el: C-s C-u M-y reads a string from the kill-ring minibufferJuri Linkov2021-01-131-23/+32
| | | | | | | | | | | | | | | | | | * 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
* | Lift {global,local}-key-binding to LispStefan Kangas2021-01-133-35/+35
| | | | | | | | | | | | | | | | * 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.
* | Prefer skip-unless in more testsStefan Kangas2021-01-133-19/+19
| | | | | | | | | | | | * 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.
* | Fix 'visual-line-mode' when 'word-wrap-by-category' is in effectEli Zaretskii2021-01-131-3/+2
| | | | | | | | | | | | | | * 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)