]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoAdd `throw' to non returning functions
Andrea Corallo [Fri, 1 Jan 2021 13:13:02 +0000 (14:13 +0100)]
Add `throw' to non returning functions

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add throw.

4 years ago; * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Reindent.
Andrea Corallo [Fri, 1 Jan 2021 12:53:08 +0000 (13:53 +0100)]
; * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Reindent.

4 years ago* lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Fix.
Andrea Corallo [Fri, 1 Jan 2021 11:00:04 +0000 (12:00 +0100)]
* lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Fix.

4 years ago* Clean unreachable block using dominance tree to handle circularities
Andrea Corallo [Fri, 1 Jan 2021 10:09:00 +0000 (11:09 +0100)]
* Clean unreachable block using dominance tree to handle circularities

With this commit unreachable basic blocks are pruned automatically by
comp-ssa relying on dominance analysis.  This solves the issue of
unreachable cluster of basic blocks referencing each other.

* lisp/emacs-lisp/comp.el (comp-block-lap): New `no-ret' slot.
(comp-compute-dominator-tree): Update.
(comp-remove-unreachable-blocks): New functions.
(comp-ssa): Update to call `comp-remove-unreachable-blocks'.
(comp-clean-orphan-blocks): Delete.
(comp-rewrite-non-locals): Update and simplify.

4 years ago* src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table iteration.
Andrea Corallo [Fri, 1 Jan 2021 11:27:39 +0000 (12:27 +0100)]
* src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table iteration.

4 years agoIntroduce 'unreachable' LIMPLE operator
Andrea Corallo [Thu, 31 Dec 2020 16:37:13 +0000 (17:37 +0100)]
Introduce 'unreachable' LIMPLE operator

Introduce 'unreachable' as LIMPLE operater so we can handle correctly
in the CFG functions throwing values or signaling errors.

* src/comp.c (retrive_block): Better error diagnostic.
(emit_limple_insn): Add `unreachable'.
(compile_function): Fix block iteration.
(syms_of_comp): Define 'Qunreachable'.
* lisp/emacs-lisp/comp.el (comp-block): New variable.
(comp-block-lap): Add `non-ret-insn' slot.
(comp-branch-op-p): New predicate.
(comp-limple-lock-keywords): Color `unreachable' as red.
(comp-compute-edges): Add `unreachable'.
(comp-fwprop-call): Store non returning function call.
(comp-fwprop*): Update.
(comp-clean-orphan-blocks, comp-rewrite-non-locals): New functions.
(comp-fwprop): Call `comp-rewrite-non-locals'.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two
tests.
* test/src/comp-test-funcs.el (comp-test-non-local-1)
(comp-test-non-local-2, comp-test-non-local-3)
(comp-test-non-local-4): New functions.

4 years ago* Fix two predicates for missing negation handling
Andrea Corallo [Thu, 31 Dec 2020 14:32:51 +0000 (15:32 +0100)]
* Fix two predicates for missing negation handling

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p)
(comp-cstr-null-p): Fix missing negation handling.

4 years ago* lisp/emacs-lisp/comp.el (comp-limple-lock-keywords): Color returns as red.
Andrea Corallo [Thu, 31 Dec 2020 14:27:24 +0000 (15:27 +0100)]
* lisp/emacs-lisp/comp.el (comp-limple-lock-keywords): Color returns as red.

4 years ago* Add `comp-insert-insn'
Andrea Corallo [Thu, 31 Dec 2020 10:27:53 +0000 (11:27 +0100)]
* Add `comp-insert-insn'

* lisp/emacs-lisp/comp.el (comp-insert-insn): New inline.
(comp-emit-call-cstr): Split logic and call `comp-insert-insn'.

4 years ago* Order function types in aphabetical order
Andrea Corallo [Wed, 30 Dec 2020 12:50:23 +0000 (13:50 +0100)]
* Order function types in aphabetical order

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Reorder in
aphabetical order and comment.

4 years ago* Add more function type specifiers
Andrea Corallo [Tue, 29 Dec 2020 18:41:28 +0000 (19:41 +0100)]
* Add more function type specifiers

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add more
type specifiers.

4 years agoFix missing negation handling in a bunch of predicates
Andrea Corallo [Tue, 29 Dec 2020 16:39:15 +0000 (17:39 +0100)]
Fix missing negation handling in a bunch of predicates

* lisp/emacs-lisp/comp.el (comp-mvar-fixnum-p)
(comp-mvar-symbol-p, comp-mvar-cons-p): Consider neg slot.
* test/src/comp-tests.el (comp-test-not-cons): New test.
* test/src/comp-test-funcs.el (comp-test-not-cons-f): New
function.

4 years ago* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-value-to-cstr'.
Andrea Corallo [Tue, 29 Dec 2020 13:31:16 +0000 (14:31 +0100)]
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-value-to-cstr'.

4 years agoConstrain mvars under compare and branch with built-in predicates
Andrea Corallo [Tue, 29 Dec 2020 12:29:02 +0000 (13:29 +0100)]
Constrain mvars under compare and branch with built-in predicates

* lisp/emacs-lisp/comp.el (comp-emit-assume): Update.
(comp-known-predicate-p): New function.
(comp-add-cond-cstrs): Extend to pattern match predicate calls.
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-null-p)
(comp-pred-to-cstr): New function.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a
number of tests and fix comments.

4 years ago* Define `cl-satisfies-deftype' mapping predicate -> type
Andrea Corallo [Tue, 29 Dec 2020 10:39:26 +0000 (11:39 +0100)]
* Define `cl-satisfies-deftype' mapping predicate -> type

* lisp/emacs-lisp/cl-macs.el (cl-satisfies-deftype): Define symbol
property as reverse of `cl-deftype-satisfies'.

4 years ago* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'.
Andrea Corallo [Tue, 29 Dec 2020 10:39:04 +0000 (11:39 +0100)]
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'.

4 years agoStore function type and expose it with `subr-type'
Andrea Corallo [Mon, 28 Dec 2020 12:41:38 +0000 (13:41 +0100)]
Store function type and expose it with `subr-type'

* src/lisp.h (struct Lisp_Subr): Add 'type' field.
(SUBR_TYPE): New inline accessor.
* src/pdumper.c (dump_subr): Update for 'type' field.
* src/data.c (Fsubr_type): New primitive.
(syms_of_data): Update.
* src/comp.c (ABI_VERSION): Bump new ABI version.
(make_subr): Set type.
(Fcomp__register_lambda, Fcomp__register_subr)
(Fcomp__late_register_subr): Receive and pass subr type to
'make_subr'.
* src/alloc.c (mark_object): Mark subr type.
* lisp/emacs-lisp/comp.el (comp-func): Change slot type into mvar.
(comp-emit-for-top-level, comp-emit-lambda-for-top-level): Pass
type mvar to subr register functions.
(comp-compute-function-type): Fix-up subr type mvars.
* test/src/comp-tests.el (comp-tests-check-ret-type-spec): Use
`subr-type'.

4 years agoReorder subr register function arguments to make some room
Andrea Corallo [Mon, 28 Dec 2020 11:59:12 +0000 (12:59 +0100)]
Reorder subr register function arguments to make some room

* src/comp.c (Fcomp__register_lambda, Fcomp__register_subr)
(Fcomp__late_register_subr): Use a rest arg to pass 'doc_idx' and
'intspec' parameters.
* lisp/emacs-lisp/comp.el (comp-emit-for-top-level)
(comp-emit-lambda-for-top-level): Update.

4 years agoPropagate function calls also when hiddend under funcall
Andrea Corallo [Mon, 28 Dec 2020 10:54:34 +0000 (11:54 +0100)]
Propagate function calls also when hiddend under funcall

* lisp/emacs-lisp/comp.el (comp-fwprop-call): Propagate functions
also when called under `funcall'.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.

4 years agoCompute function type for native compiled functions
Andrea Corallo [Mon, 28 Dec 2020 10:25:39 +0000 (11:25 +0100)]
Compute function type for native compiled functions

* lisp/emacs-lisp/comp.el (comp-func): `type' rename from
`ret-type-specifier'.
(comp-args-to-lambda-list): New function.
(comp-compute-function-type): New function from
`comp-ret-type-spec'.
(comp-final): Update.
* test/src/comp-tests.el (comp-tests-check-ret-type-spec): Update.

4 years ago; lisp/emacs-lisp/comp.el (comp-emit-narg-prologue): Nit.
Andrea Corallo [Mon, 28 Dec 2020 10:22:20 +0000 (11:22 +0100)]
; lisp/emacs-lisp/comp.el (comp-emit-narg-prologue): Nit.

4 years ago* Improve some slot type into comp.el
Andrea Corallo [Mon, 28 Dec 2020 09:48:05 +0000 (10:48 +0100)]
* Improve some slot type into comp.el

* lisp/emacs-lisp/comp.el (comp-args-base, comp-args)
(comp-nargs, comp-func): Fix the type of some slots.

4 years agoAdd 1+ 1- integer range propagation support
Andrea Corallo [Sun, 27 Dec 2020 20:33:07 +0000 (21:33 +0100)]
Add 1+ 1- integer range propagation support

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-one): New special var.
* lisp/emacs-lisp/comp.el (comp-fwprop-call): Propagate integer
ranges on +1 -1.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two tests.

4 years agoAdd sum/subtraction integer range propagation support
Andrea Corallo [Sun, 27 Dec 2020 13:07:08 +0000 (14:07 +0100)]
Add sum/subtraction integer range propagation support

* lisp/emacs-lisp/comp-cstr.el (comp-range-+, comp-range--): New
functions.
(comp-cstr-set-range-for-arithm): New macro.
(comp-cstr-add-2, comp-cstr-sub-2, comp-cstr-add, comp-cstr-sub):
New function.
* lisp/emacs-lisp/comp.el (comp-fwprop-call): Wire-up + - integer
range propagation.

4 years ago* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range): Improve.
Andrea Corallo [Sun, 27 Dec 2020 14:51:57 +0000 (15:51 +0100)]
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range): Improve.

4 years ago* Add comp-cstr-greatest-in-range comp-cstr-smallest-in-range
Andrea Corallo [Sun, 27 Dec 2020 09:58:29 +0000 (10:58 +0100)]
* Add comp-cstr-greatest-in-range comp-cstr-smallest-in-range

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-smallest-in-range)
(comp-cstr-greatest-in-range): New function.
(comp-cstr->, comp-cstr->=, comp-cstr-<, comp-cstr-<=): Make use of.

4 years ago* Don't require trailing backslashes in `comp-eln-load-path' (bug#45462)
Andrea Corallo [Sun, 27 Dec 2020 16:50:05 +0000 (17:50 +0100)]
* Don't require trailing backslashes in `comp-eln-load-path' (bug#45462)

* src/comp.c (Fcomp_el_to_eln_filename): Don't require
trailing backslashes in comp-eln-load-path.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sun, 27 Dec 2020 16:54:57 +0000 (17:54 +0100)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years ago; Fix recent shortdoc.el and fns.c additions
Basil L. Contovounesios [Sun, 27 Dec 2020 13:14:30 +0000 (13:14 +0000)]
; Fix recent shortdoc.el and fns.c additions

* lisp/emacs-lisp/shortdoc.el (list): Fix typos.
* src/fns.c (Flength_equal): Fix docstring.

4 years ago; Fix the recent `length' doc string addition
Štěpán Němec [Sun, 27 Dec 2020 10:43:19 +0000 (11:43 +0100)]
; Fix the recent `length' doc string addition

4 years agoFix up length_internal with degenerate length inputs
Lars Ingebrigtsen [Sun, 27 Dec 2020 08:22:02 +0000 (09:22 +0100)]
Fix up length_internal with degenerate length inputs

* src/fns.c (length_internal): Protect against edge conditions.

4 years agoImprove "find definition" in *Help* buffers
Daniel Martín [Sun, 27 Dec 2020 08:04:56 +0000 (09:04 +0100)]
Improve "find definition" in *Help* buffers

* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol): If
our regexp algorithm could not find a location for the symbol
definition, resort to find-function--search-by-expanding-macros.
* test/lisp/emacs-lisp/find-func-tests.el: Add a automatic test for a
function and variable generated by a macro.
* etc/NEWS: Advertise the improved functionality (bug#45443).

4 years agoAdd new predicates for sequence lengths
Lars Ingebrigtsen [Sun, 27 Dec 2020 08:00:23 +0000 (09:00 +0100)]
Add new predicates for sequence lengths

* doc/lispref/sequences.texi (Sequence Functions): Document them.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark them as
side-effect-free.

* lisp/emacs-lisp/shortdoc.el (list): Mention them.

* src/fns.c (Flength): Mention them in the doc string.
(length_internal): New function.
(Flength_less, Flength_greater, Flength_equal): New defuns.
(syms_of_fns): Sym them.

4 years agoImprove the edebug-form-data doc string
Lars Ingebrigtsen [Sat, 26 Dec 2020 22:13:29 +0000 (23:13 +0100)]
Improve the edebug-form-data doc string

* lisp/emacs-lisp/edebug.el (edebug-form-data): Doc string
clarification (bug#42776).

4 years ago* Fix `byte-compile-file' for native compilation (bug#45442)
Andrea Corallo [Sat, 26 Dec 2020 19:16:26 +0000 (20:16 +0100)]
* Fix `byte-compile-file' for native compilation (bug#45442)

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Fix logic for
native compilation.

4 years agoFix missing float handling into `comp-cstr-set-cmp-range'
Andrea Corallo [Sat, 26 Dec 2020 12:09:24 +0000 (13:09 +0100)]
Fix missing float handling into `comp-cstr-set-cmp-range'

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range): Add
float handling.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Update results.

4 years ago* lisp/forms.el (forms--run-functions): New function
Stefan Monnier [Sat, 26 Dec 2020 17:21:17 +0000 (12:21 -0500)]
* lisp/forms.el (forms--run-functions): New function

(forms--intuit-from-file, forms-save-buffer): Use it.
(forms-mode): Use it to fix regression.
Remove always-true test.  Fix incorrect uses of `fboundp`.
(forms--iif-hook): Use `add-hook`.
(forms--iif-post-command-hook): Use `remove-hook` and fix typo.
(forms--debug): Use `mapconcat`.

4 years agoFix test/src/process-tests on MS-Windows
Eli Zaretskii [Sat, 26 Dec 2020 13:01:52 +0000 (15:01 +0200)]
Fix test/src/process-tests on MS-Windows

* src/process.c (network_lookup_address_info_1) [WINDOWSNT]:
Initialize winsock.

4 years agoRename Tramp method "media" to "mtp" (Bug#45402)
Michael Albinus [Sat, 26 Dec 2020 11:39:10 +0000 (12:39 +0100)]
Rename Tramp method "media" to "mtp" (Bug#45402)

* doc/misc/tramp.texi (Quick Start Guide, GVFS-based methods):
Rename "media" to "mtp".  (Bug#45402)

* etc/NEWS: Rename Tramp method "media" to "mtp".  Fix typos.

* lisp/net/tramp-gvfs.el (tramp-gvfs-methods, tramp-media-methods)
(tramp-gvfs-activation-uri)
(tramp-gvfs-handler-volumeadded-volumeremoved)
(tramp-get-media-devices, top): Rename "media" to "mtp".  (Bug#45402)

4 years ago* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two more test.
Andrea Corallo [Sat, 26 Dec 2020 11:34:58 +0000 (12:34 +0100)]
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add two more test.

4 years ago* Remove unnecessary lhs rename in `comp-ssa-rename-insn'
Andrea Corallo [Sat, 26 Dec 2020 11:23:27 +0000 (12:23 +0100)]
* Remove unnecessary lhs rename in `comp-ssa-rename-insn'

* lisp/emacs-lisp/comp.el (comp-ssa-rename-insn): No point to
rename lhs as it's being replaced.

4 years ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add two functions.
Andrea Corallo [Sat, 26 Dec 2020 11:22:21 +0000 (12:22 +0100)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add two functions.

4 years agoEnable integer range narrowing under compare and branch
Andrea Corallo [Fri, 25 Dec 2020 09:57:02 +0000 (10:57 +0100)]
Enable integer range narrowing under compare and branch

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range)
(comp-cstr->, comp-cstr->=, comp-cstr-<, comp-cstr-<=): New
functions.
* lisp/emacs-lisp/comp.el (comp-equality-fun-p)
(comp-range-cmp-fun-p): New functions.
(comp-collect-rhs): Use `comp-assign-op-p' in place of
`comp-set-op-p'.
(comp-negate-range-cmp-fun, comp-reverse-cmp-fun): New functions.
(comp-emit-assume): Rework to be able to emit also comparision
assumption.
(comp-add-cond-cstrs-simple): Update for new `comp-emit-assume'.
(comp-add-cond-cstrs-simple): Update to emit range assumption.
(comp-fwprop-insn): Execute range assumptions.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add tests.

4 years agoAvoid missing email messages due to rmail-spam-filter
emacs-f [Tue, 8 Dec 2020 23:22:30 +0000 (18:22 -0500)]
Avoid missing email messages due to rmail-spam-filter

* lisp/mail/rmail-spam-filter.el (rsf--rmail-last-seen-message):
New function.
(rmail-spam-filter, rmail-get-new-mail-filter-spam): Call
'rsf--rmail-last-seen-message' instead of
'rmail-first-unseen-message'.  (Bug#45128)

Copyright-paperwork-exempt: yes

4 years agoImprovements for `:base-uri' svg image property
Zajcev Evgeny [Wed, 16 Dec 2020 22:04:09 +0000 (01:04 +0300)]
Improvements for `:base-uri' svg image property

* src/image.c (svg_load): Use ENCODE_FILE for `:base-uri'

* doc/lispref/display.texi (SVG Images): Add more documentation for
  `:base-uri'

4 years agoFix messages with plural forms in todo-mode.el
Eli Zaretskii [Sat, 26 Dec 2020 08:23:04 +0000 (10:23 +0200)]
Fix messages with plural forms in todo-mode.el

* lisp/calendar/todo-mode.el (todo-move-item, todo-item-undone)
(todo-category-completions): Use 'ngettext' instead of hard-coding
plural forms by hand.

4 years agoFix issues with lib/malloc out-of-dir builds
Paul Eggert [Sat, 26 Dec 2020 03:16:27 +0000 (19:16 -0800)]
Fix issues with lib/malloc out-of-dir builds

Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2020-12/msg01626.html
* configure.ac: If the scratch_buffer module is enabled, create
lib/malloc and (if doing dependencies) lib/deps/malloc.
* lib/Makefile.in (DEPFLAGS) [AUTO_DEPEND]: No longer any need to
squash lib dependencies into a single directory.
(clean): Also remove */*.o and $(DEPDIR)/*/*.d, to clean out
malloc/*.o and deps/malloc/*.d.  Just remove *.d files in
dependencies so that rm does not complain about not being able to
remove deps/malloc.
(extraclean): Also remove malloc, if it is empty.

4 years agoKill the scdaemon after doing the mml-sec tests
Lars Ingebrigtsen [Sat, 26 Dec 2020 02:59:35 +0000 (03:59 +0100)]
Kill the scdaemon after doing the mml-sec tests

* test/lisp/gnus/mml-sec-tests.el (mml-sec-test--kill-gpg-agent):
Kill the scdaemon, too (bug#43358).

4 years agoFix infloop in memory-report
Lars Ingebrigtsen [Fri, 25 Dec 2020 23:57:01 +0000 (00:57 +0100)]
Fix infloop in memory-report

* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1):
Fix infloop on circular lists.

4 years agoFix package reloading problems on systems with symlinks
Lars Ingebrigtsen [Fri, 25 Dec 2020 21:44:56 +0000 (22:44 +0100)]
Fix package reloading problems on systems with symlinks

* lisp/emacs-lisp/package.el (package--files-load-history): We're
comparing the truenames, so ensure that we've using that
everywhere.  This fixes problems when there's symlinks in the paths.

4 years agoRefactor package--list-loaded-files for easier debuggability
Lars Ingebrigtsen [Fri, 25 Dec 2020 21:29:42 +0000 (22:29 +0100)]
Refactor package--list-loaded-files for easier debuggability

* lisp/emacs-lisp/package.el (package--files-load-history)
(package--list-of-conflicts): Factor out from...
(package--list-loaded-files): ... this function for easier
debuggability.

4 years agoDisable some semantic tests on systems without g++
Lars Ingebrigtsen [Fri, 25 Dec 2020 20:19:37 +0000 (21:19 +0100)]
Disable some semantic tests on systems without g++

* test/lisp/cedet/semantic-utest-ia.el: Disable g++ tests on
systems without g++.

4 years agoSkip some mml tests that rely on CMS if that's not installed
Lars Ingebrigtsen [Fri, 25 Dec 2020 20:09:31 +0000 (21:09 +0100)]
Skip some mml tests that rely on CMS if that's not installed

4 years agoFix gpg-agent killing in mml-sec-tests
Lars Ingebrigtsen [Fri, 25 Dec 2020 19:56:22 +0000 (20:56 +0100)]
Fix gpg-agent killing in mml-sec-tests

* test/lisp/gnus/mml-sec-tests.el (mml-sec-test--kill-gpg-agent):
Identify the gpg-agent more successfully after the resource dir
makeover.

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 25 Dec 2020 18:36:48 +0000 (10:36 -0800)]
Merge from origin/emacs-27

b242bbb073 (origin/emacs-27) ; lisp/org/org.el: Fix Version header.
e0fc939c5f Add more details to the "word processor" section
fda9b3e83a * src/Makefile.in (DO_CODESIGN): Fix expected architecture...

4 years ago; Merge from origin/emacs-27
Glenn Morris [Fri, 25 Dec 2020 18:36:48 +0000 (10:36 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

6bf22c933d Codesign the executable on recene MacOS systems

4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 25 Dec 2020 18:36:48 +0000 (10:36 -0800)]
Merge from origin/emacs-27

5d46593568 Support build of Emacs on ARM Macos machines
7f8793e5f1 Update to Org 9.4.4
7b3367a0b5 * lisp/so-long.el: Decrease use of passive voice.
a90836c638 * doc/misc/efaq.texi (New in Emacs 27): Add section.
711fe70dd8 * doc/misc/efaq.texi (Latest version of Emacs): Bump version.
52b30834fb * lisp/face-remap.el (face-remap-set-base): Doc fix.  (Bug...
b3fe0ac62e Correct argument order in comment

4 years ago; lisp/org/org.el: Fix Version header.
Glenn Morris [Fri, 25 Dec 2020 18:36:25 +0000 (10:36 -0800)]
; lisp/org/org.el: Fix Version header.

This is flagged by the single org test that exists in Emacs.

4 years agoTag another Tramp test :unstable on emba
Michael Albinus [Fri, 25 Dec 2020 17:45:29 +0000 (18:45 +0100)]
Tag another Tramp test :unstable on emba

* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process)
(tramp-test43-asynchronous-requests): Tag them :unstable on emba.

4 years agoTag Tramp test :unstable
Michael Albinus [Fri, 25 Dec 2020 16:05:36 +0000 (17:05 +0100)]
Tag Tramp test :unstable

* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process):
Tag it :unstable on emba.

4 years ago; * etc/NEWS: Announce the last change.
Eli Zaretskii [Fri, 25 Dec 2020 14:11:49 +0000 (16:11 +0200)]
; * etc/NEWS: Announce the last change.

4 years agoFix last change
Eli Zaretskii [Fri, 25 Dec 2020 13:58:15 +0000 (15:58 +0200)]
Fix last change

* lisp/international/mule-conf.el (ebcdic-int1, cp256, cp273)
(ebcdic-be, cp274, ebcdic-br, cp275, ebcdic-cp-dk, ebcdic-cp-no)
(cp277, ebcdic-cp-fi, ebcdic-cp-se, cp278, ebcdic-cp-it, cp280)
(ebcdic-jp-e, cp281, ebcdic-cp-es, cp284, ebcdic-cp-gb, cp285)
(ebcdic-jp-kana, cp290, ebcdic-cp-fr, cp297): Remove charset
aliases, they are not really needed.

* lisp/language/english.el (ibm275): Move from here...
* lisp/language/european.el (ibm275): ...to here.

4 years agoAdd support for more EBCDIC code pages IBM2XX
Timo Myyrä [Thu, 24 Dec 2020 15:29:49 +0000 (17:29 +0200)]
Add support for more EBCDIC code pages IBM2XX

There was already charset file present in etc/charsets for IBM2XX
character sets but there wasn't definitions for them in Emacs.
Add character set and coding system definitions for them.
* lisp/language/japanese.el (ibm281, ibm290):
* lisp/language/european.el (ibm256, ibm273, ibm274, ibm277)
(ibm278, ibm280, ibm284, ibm285, ibm297):
* lisp/language/english.el (ibm275): New coding systems.
* lisp/international/mule-conf.el (ibm256, ibm273, ibm274)
(ibm275, ibm277, ibm278, ibm280, ibm281, ibm284, ibm285, ibm290)
(ibm297): New charsets.

4 years agoDon't compile Gnulib's 'free' on MinGW
Eli Zaretskii [Fri, 25 Dec 2020 13:17:19 +0000 (15:17 +0200)]
Don't compile Gnulib's 'free' on MinGW

* nt/mingw-cfg.site (gl_cv_func_free_preserves_errno): Set to
"yes" to avoid compiling Gnulib's free.c in the MinGW build.

4 years agoRevert "Import posix_spawn from Gnulib."
Eli Zaretskii [Fri, 25 Dec 2020 12:51:20 +0000 (14:51 +0200)]
Revert "Import posix_spawn from Gnulib."

This reverts commit 3ba34141da77a24c251ee6530f3f72a366fe556e.
It breaks the MinGW build and should be first tested on a
branch.

4 years agoRevert "Use posix_spawn if possible."
Eli Zaretskii [Fri, 25 Dec 2020 12:50:25 +0000 (14:50 +0200)]
Revert "Use posix_spawn if possible."

This reverts commit 2c79a8f9210db01c86b0e5f236adeb0509519d30.
It breaks the MinGW build in too many ways, and should be
first tested on a branch.

4 years agoUse posix_spawn if possible.
Philipp Stephani [Fri, 25 Dec 2020 10:39:09 +0000 (11:39 +0100)]
Use posix_spawn if possible.

posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux.  Use
it if we don't need to configure a pseudoterminal.

* src/Makefile.in (LIB_POSIX_SPAWN): New variable.
(LIBES): Use it.

* src/callproc.c (emacs_spawn): Use posix_spawn on Unix-like system if
we don't need to set up a pseudoterminal.

4 years agoImport posix_spawn from Gnulib.
Philipp Stephani [Fri, 25 Dec 2020 10:33:02 +0000 (11:33 +0100)]
Import posix_spawn from Gnulib.

posix_spawn is less error-prone than vfork + exec, and can make use of
system-specific optimizations like `clone' on Linux.  Import Gnulib
replacement so that we can use recent additions like
`posix_spawn_file_actions_addchdir'.

The only manual change are to admin/merge-gnulib and .gitignore.  All
other changes are due to rerunning merge-gnulib.

* admin/merge-gnulib (GNULIB_MODULES): Add posix_spawn-related
modules.
* .gitignore: Add new generated files.

4 years agoUpdate Gnulib.
Paul Eggert [Fri, 25 Dec 2020 10:33:29 +0000 (02:33 -0800)]
Update Gnulib.

All changes in this commit are autogenerated by running
admin/merge-gnulib.

4 years agoAdjust test_module to recent Gnulib changes
Paul Eggert [Fri, 25 Dec 2020 10:15:45 +0000 (02:15 -0800)]
Adjust test_module to recent Gnulib changes

* test/Makefile.in ($(test_module)): Also compile lib/free.c
if it is needed to define rpl_free.

4 years agoAdjust to recent Gnulib changes
Paul Eggert [Fri, 25 Dec 2020 09:38:31 +0000 (01:38 -0800)]
Adjust to recent Gnulib changes

The latest Gnulib merge brought in free-posix, which causes 'free'
to preserve errno.  This lets us simplify some Emacs code that
calls 'free'.
* admin/merge-gnulib (GNULIB_MODULES): Add free-posix.
This module is pulled in by canonicalize-lgpl anyway,
so we might as well rely on it.
* lib-src/emacsclient.c (get_current_dir_name):
Sync better with src/sysdep.c.
* lib-src/etags.c (process_file_name, etags_mktmp):
* lib-src/update-game-score.c (unlock_file):
* src/fileio.c (file_accessible_directory_p):
* src/sysdep.c (get_current_dir_name_or_unreachable):
Simplify by assuming that 'free' preserves errno.
* src/alloc.c (malloc_unblock_input):
Preserve errno, so that xfree preserves errno.
* src/sysdep.c (get_current_dir_name_or_unreachable):
Simplify by using strdup instead of malloc+memcpy.
No need for realloc (and the old code leaked memory anyway on
failure); just use free+malloc.

4 years agoPacify gcc 10.2 -Wanalyzer-null-argument in gtkutil.c
Paul Eggert [Fri, 25 Dec 2020 08:27:37 +0000 (00:27 -0800)]
Pacify gcc 10.2 -Wanalyzer-null-argument in gtkutil.c

* src/gtkutil.c (xg_item_label_same_p): Simplify.  Without this
simplification, GCC (Ubuntu 10.2.0-13ubuntu1)
-Wanalyzer-null-argument complains about use of NULL where
non-null expected as argument of strcmp.

4 years ago* Don't emit byte op-code annotations in LIMPLE to optimize for compile-time
Andrea Corallo [Fri, 25 Dec 2020 08:39:22 +0000 (09:39 +0100)]
* Don't emit byte op-code annotations in LIMPLE to optimize for compile-time

Saves 10~15% in bootstrap time.

* lisp/emacs-lisp/comp.el (comp-op-case): Don't emit op-code
annotaitons.
(comp-limplify-lap-inst, comp-add-cond-cstrs-simple)
(comp-add-cond-cstrs, comp-tco-func): Update accordingly.

4 years agoAdd more details to the "word processor" section
Eli Zaretskii [Fri, 25 Dec 2020 08:30:02 +0000 (10:30 +0200)]
Add more details to the "word processor" section

* etc/TODO (Emacs as word processor): Add more details based on
recent discussions.

4 years agocperl-mode: Correctly syntax highlight index/value array slices
E. Choroba [Fri, 25 Dec 2020 06:02:01 +0000 (07:02 +0100)]
cperl-mode: Correctly syntax highlight index/value array slices

* lisp/progmodes/cperl-mode.el (cperl-init-faces): %array[0, 1]
should use the array face, not the hash one (bug#45373).

Copyright-paperwork-exempt: yes

4 years agoMake `remove-hook' interactive
Thibault Polge [Fri, 25 Dec 2020 05:44:40 +0000 (06:44 +0100)]
Make `remove-hook' interactive

* lisp/subr.el (remove-hook): Make `remove-hook' interactive
(bug#45393).

4 years agoAllow `string-limit' to work on encoded strings
Lars Ingebrigtsen [Fri, 25 Dec 2020 04:58:09 +0000 (05:58 +0100)]
Allow `string-limit' to work on encoded strings

* doc/lispref/strings.texi (Creating Strings): Document it.

* lisp/emacs-lisp/subr-x.el (string-limit): Allow limiting on
encoded strings.

4 years agoRemove `string-slice' -- it's not very well defined
Lars Ingebrigtsen [Fri, 25 Dec 2020 04:16:46 +0000 (05:16 +0100)]
Remove `string-slice' -- it's not very well defined

* doc/lispref/strings.texi (Creating Strings): Ditto.

* lisp/emacs-lisp/subr-x.el (string-slice): Remove.

4 years agoUnbreak the build on *BSD and Macos after previous gnulib merge
Lars Ingebrigtsen [Thu, 24 Dec 2020 17:42:27 +0000 (18:42 +0100)]
Unbreak the build on *BSD and Macos after previous gnulib merge

* lib/Makefile.in (DEPFLAGS): Unbreak build on BSD derivatives by
writing all deps files into a single directory (instead of
deps/malloc/*.c).

4 years ago; * src/callproc.c (emacs_spawn) [!WINDOWSNT]: Fix last change.
Eli Zaretskii [Thu, 24 Dec 2020 16:32:54 +0000 (18:32 +0200)]
; * src/callproc.c (emacs_spawn) [!WINDOWSNT]: Fix last change.

4 years agoFix the MinGW build broken by Gnulib update
Eli Zaretskii [Thu, 24 Dec 2020 16:17:57 +0000 (18:17 +0200)]
Fix the MinGW build broken by Gnulib update

* nt/mingw-cfg.site (gl_cv_func_readlink_trailing_slash)
(gl_cv_func_readlink_truncate): Define to "yes" to avoid compiling
readlink.c.

4 years agoUnbreak the MinGW build broken by recent changes in callproc.c
Eli Zaretskii [Thu, 24 Dec 2020 15:58:51 +0000 (17:58 +0200)]
Unbreak the MinGW build broken by recent changes in callproc.c

* src/w32.h (set_process_dir):
* src/w32proc.c (set_process_dir): Change the argument to 'const
char *'.
* src/lisp.h (make_environment_block):
* src/callproc.c (make_environment_block): Now returns 'char **'.
(exec_failed) [DOS_NT]: Remove unused function.
* src/callproc.c (child_setup): NEW_ARGV and ENV are now 'char **'.
Making them 'const' breaks the MinGW build and is not needed for
other platforms.
* src/callproc.c (emacs_spawn): ARGV and ENVP arguments are now
'char *', for the same reason.
* src/process.c (create_process): Adapt to above changes.

4 years agoUpdate Gnulib.
Philipp Stephani [Thu, 24 Dec 2020 15:48:40 +0000 (16:48 +0100)]
Update Gnulib.

All changes in this commit are autogenerated by running
admin/merge-gnulib.

4 years agoEnsure that Gnulib objects in subdirectories are built correctly.
Philipp Stephani [Thu, 24 Dec 2020 15:30:53 +0000 (16:30 +0100)]
Ensure that Gnulib objects in subdirectories are built correctly.

* lib/Makefile.in (.c.o): Add missing -o option.

4 years ago* Memoize `comp-subtype-p'
Andrea Corallo [Thu, 24 Dec 2020 12:05:30 +0000 (13:05 +0100)]
* Memoize `comp-subtype-p'

* lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): Memoize.
(comp-cstr-ctxt): Add `subtype-p-mem' slot.

4 years ago* Constrain only mvars that are actually used
Andrea Corallo [Thu, 24 Dec 2020 08:14:28 +0000 (09:14 +0100)]
* Constrain only mvars that are actually used

* lisp/emacs-lisp/comp.el (comp-mvar-used-p, comp-collect-mvars)
(comp-collect-rhs): New functions.
(comp-add-cond-cstrs-simple, comp-add-cond-cstrs): Update logic.
(comp-add-cstrs): Call `comp-collect-rhs' before doing anything
else.

4 years ago* Use `comp-assign-op-p' into dead code elimination pass
Andrea Corallo [Thu, 24 Dec 2020 07:52:56 +0000 (08:52 +0100)]
* Use `comp-assign-op-p' into dead code elimination pass

* lisp/emacs-lisp/comp.el (comp-dead-assignments-func): Use
`comp-assign-op-p' in place of `comp-set-op-p'.

4 years ago* Fix logic for constraining block with multiple predecessors
Andrea Corallo [Tue, 22 Dec 2020 21:53:05 +0000 (22:53 +0100)]
* Fix logic for constraining block with multiple predecessors

* lisp/emacs-lisp/comp.el (comp-limple-lock-keywords)
(comp-add-cond-cstrs-target-block): Logic update.

4 years agoSymplify (not t) => nil and (not nil) => t
Andrea Corallo [Tue, 22 Dec 2020 19:39:24 +0000 (20:39 +0100)]
Symplify (not t) => nil and (not nil) => t

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-negation): Symplify (not
t) => nil and (not nil) => t.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add two tests.

4 years agoExtend cstrs pass to match `unless' like code
Andrea Corallo [Tue, 22 Dec 2020 14:00:44 +0000 (15:00 +0100)]
Extend cstrs pass to match `unless' like code

* lisp/emacs-lisp/comp.el (comp-emit-assume): Add assertion.
(comp-add-new-block-between): Fix two typos.
(comp-add-cond-cstrs-target-block): Fix typo.
(comp-add-cond-cstrs-simple): Logic update.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.

4 years ago* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Opencode byte-not.
Andrea Corallo [Tue, 22 Dec 2020 12:04:02 +0000 (13:04 +0100)]
* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Opencode byte-not.

4 years agoExtend cstrs pass to match `when' like code
Andrea Corallo [Tue, 22 Dec 2020 09:29:48 +0000 (10:29 +0100)]
Extend cstrs pass to match `when' like code

* lisp/emacs-lisp/comp.el (comp-emit-assume): Better parameter names.
(comp-add-cond-cstrs-simple): New function.
(comp-add-cond-cstrs): Rename assume-target -> block-target.
(comp-add-cstrs): Call `comp-add-cond-cstrs-simple'.
* test/src/comp-tests.el (comp-tests-type-spec-tests): Add test.

4 years agoCentralize subprocess creation in a single function.
Philipp Stephani [Thu, 24 Dec 2020 14:27:45 +0000 (15:27 +0100)]
Centralize subprocess creation in a single function.

Getting the vfork + execve combination right isn't easy, and the code
was partially duplicated between callproc.c and process.c.  Centralize
the spawn operation in a single function that deals with the nasty
details.  Going forward, we should be able to use posix_spawn from
either libc or Gnulib (or CreateProcessW on Windows) in the non-pty
case.

* src/callproc.c (emacs_spawn): New function to start an asynchronous
subprocess.  Merge code from 'call_process' and 'create_process' into
this function.
(call_process): Use new 'emacs_spawn' function.
(child_setup): Make static, since there are no users outside this
compilation unit left.
(CHILD_SETUP_TYPE): Move from header file, since there are no users
outside this compilation unit left.

* src/process.c (create_process): Use new 'emacs_spawn' function.

4 years agoInvert basic block argument order in LIMPLE cond-jump
Andrea Corallo [Tue, 22 Dec 2020 08:57:51 +0000 (09:57 +0100)]
Invert basic block argument order in LIMPLE cond-jump

* lisp/emacs-lisp/comp.el (comp-emit-cond-jump)
(comp-emit-switch, comp-emit-narg-prologue, comp-add-cond-cstrs):
Invert basic block argument order in LIMPLE cond-jump.
* src/comp.c (emit_limple_insn): Likewise.

4 years agoCC Mode: introduce a new cache for brace structures. This fixes bug #45248
Alan Mackenzie [Thu, 24 Dec 2020 11:29:27 +0000 (11:29 +0000)]
CC Mode: introduce a new cache for brace structures.  This fixes bug #45248

Also fix three infinite loops.  The new cache accelerates backward searches
for struct beginnings in c-looking-at-or-maybe-in-bracelist.

* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): In the final loop
over unary operators, add a check (> (point) lim) to avoid certain infinite
loops.
(c-beginning-of-decl-1): In the first loop add a similar check on point and
lim.
(c-laomib-loop): New function extracted from
c-looking-at-or-maybe-in-bracelist.
(c-laomib-cache): New buffer local variable.
(c-laomib-get-cache, c-laomib-put-cache, c-laomib-fix-elt)
(c-laomib-invalidate-cache): New functions which implement the cache.
(c-looking-at-or-maybe-in-bracelist): Replace two invocations of
c-go-up-list-backwards with calls to c-parse-state.  Extract the new function
c-laomib-loop.  Insert code which calls c-laomib-loop minimally, with the help
of the new cache.

* lisp/progmodes/cc-mode.el (c-basic-common-init): Initialise the new cach
(at mode start).
(c-before-change): Invalidate the new cache.
(c-fl-decl-start): Add an extra check (> (point) bod-lim) to prevent looping.
Determine the enclosing brace to pass as arguments to
c-looking-at-or-maybe-in-bracelist.

4 years ago* src/dispnew.c (sit_for): Fix bug#45292
Stefan Monnier [Wed, 23 Dec 2020 23:31:28 +0000 (18:31 -0500)]
* src/dispnew.c (sit_for): Fix bug#45292

When reading, prefer staying in the selected-window over preserving
the current-buffer.

4 years ago* lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Stop at the right heading
Stefan Monnier [Mon, 21 Dec 2020 04:21:51 +0000 (23:21 -0500)]
* lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Stop at the right heading

`lisp-outline-level` assumes the match-data is that set by
`outline-regexp`.

4 years agoauthinfo-mode: add option to not hide any elements (and add font-lock)
TEC [Wed, 23 Dec 2020 21:34:35 +0000 (22:34 +0100)]
authinfo-mode: add option to not hide any elements (and add font-lock)

* lisp/auth-source.el (authinfo-hide-elements): New user option.
(authinfo--keywords): New variable.
(authinfo-mode): Use it.
(authinfo--hide-passwords): Use doc-face instead of warning for
the passwords.
(authinfo--toggle-display): Ditto.

4 years ago* lisp/tab-line.el: New options, faces, and functions
Adam Porter [Sun, 13 Dec 2020 05:54:28 +0000 (05:54 +0000)]
* lisp/tab-line.el: New options, faces, and functions

* lisp/tab-line.el:
(tab-line-tab-face-functions): New option.
(tab-line-tab-inactive-alternate): New face.
(tab-line-tab-special): New face.
(tab-line-tab-face-inactive-alternating): New function.
(tab-line-tab-face-special): New function.
(tab-line-format-template): Use them.

* etc/NEWS: Update.

With thanks to Juri Linkov and Eli Zaretskii for their guidance.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Wed, 23 Dec 2020 18:49:58 +0000 (19:49 +0100)]
Merge remote-tracking branch 'savannah/master' into HEAD