Andreas Fuchs [Sat, 8 Aug 2020 20:22:43 +0000 (16:22 -0400)]
Pass driver options to libgccjit where supported
Add a customizable variable for driver options (such as linker flags)
to pass to libgccjit (Bug #42761).
* lisp/emacs-lisp/comp.el (comp-native-driver-options): New
customization variable.
* src/comp.c: Use comp-native-driver-options to set libgccjit's driver
options, if supported on the library's ABI version.
Andrea Corallo [Wed, 19 Aug 2020 13:26:42 +0000 (15:26 +0200)]
Fix native code uneffective loads after recompilation
'dlopen' can return the same handle if two shared with the same
filename are loaded in two different times (even if the first was
deleted!). To prevent this scenario the last modification time of the
source file is included in the hashing algorithm.
* src/comp.c (Fcomp_el_to_eln_filename): Update hashing algo to
include the source last modification date.
* src/lread.c (maybe_swap_for_eln): Do not check for eln newer
then elc as this is now unnecessary.
Juri Linkov [Wed, 19 Aug 2020 13:52:08 +0000 (15:52 +0200)]
Allow searching interactively over completions in `M-x'
* lisp/simple.el (read-extended-command): Allow doing interactive
searches over the completions (bug#12490). This restores the
behaviour from Emacs 23 that was lost in Emacs 24.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-check-1)
(test-byte-opt-arithmetic, bytecomp-lexbind-check-1)
(bytecomp-lexbind-explain-1):
When comparing interpreted with compiled results, don't consider all
errors to be equal; take the error type into account. (The error
arguments may differ, but there may be good reasons for that.)
* test/lisp/emacs-lisp/bytecomp-tests.el
(test-byte-comp-macro-expand-lexical-override): Remove functions
before testing so that the test can be run twice without failing.
Signal an end-of-file error upon errors when reading from stdin
* src/minibuf.c (read_minibuf_noninteractive): Signal an
`end-of-file' error when reading from stdin instead of a general
error (bug#34123). This makes it easier to write code that
recovers from this situation.
Noam Postavsky [Wed, 19 Aug 2020 10:49:11 +0000 (12:49 +0200)]
Let ido-everywhere turn on ido-mode
* lisp/ido.el (ido-everywhere): Turn on ido-mode, if it's not already
on. Otherwise, having ido-everywhere enabled messes all file and
buffer reading interactive commands (bug#34292).
* lisp/emulation/viper-util.el (viper-check-minibuffer-overlay):
* lisp/emulation/viper-cmd.el (viper-minibuffer-standard-hook)
(viper-minibuffer-real-start, viper-submit-report): No need to
check whether minibuffer-prompt-end is defined.
Stefan Kangas [Sat, 2 May 2020 14:08:33 +0000 (16:08 +0200)]
Rename 'display-time-world' to 'world-clock' (Bug#40863)
* lisp/time.el (world-clock-list, world-clock-time-format)
(world-clock-buffer-name, world-clock-timer-enable)
(world-clock-timer-second, world-clock-label, world-clock-mode)
(world-clock-display, world-clock, world-clock-update): Rename
from 'display-time-world-*' and update all uses.
(world-clock): New defgroup.
(zoneinfo-style-world-list, legacy-style-world-list): Use :group
'world-clock'.
(display-time-world-list, display-time-world-time-format)
(display-time-world-buffer-name)
(display-time-world-timer-enable)
(display-time-world-timer-second): Make into obsolete variable
aliases for the new names.
* lisp/time.el (display-time-world-mode)
(display-time-world-display, display-time-world)
(display-time-world-timer): Make into obsolete function aliases
for the new names.
Stefan Kangas [Tue, 18 Aug 2020 18:16:06 +0000 (20:16 +0200)]
Remove the "Recent message" section from the bug reports
* lisp/mail/emacsbug.el (report-emacs-bug): Don't include "Recent
messages" since it has privacy implications. Problem reported by
Lars Ingebrigtsen in:
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg01099.html
(bug#39185).
* test/lisp/cedet/srecode-utest-template.el
(srecode-utest-project): Set the current directory in the project
so that we'll find it later (bug#42533). The in-project directory
is /tmp, which is not actually what it is on many machines that
have the temporary directory somewhere else.
Pip Cet [Tue, 18 Aug 2020 16:27:05 +0000 (18:27 +0200)]
Fix minor bugs in image.c
* test/src/image-tests.el (image-test-circular-specs): New file.
* src/image.c (parse_image_spec): Return failure for circular lists.
(valid_image_p): Don't look at odd-numbered list elements expecting to
find a property name.
(image_spec_value): Handle circular lists.
(equal_lists): Introduce.
(search_image_cache): Use `equal_lists' (bug#36403).
Glenn Morris [Tue, 18 Aug 2020 14:51:08 +0000 (07:51 -0700)]
Merge from origin/emacs-27
362ca83a3b (origin/emacs-27) Let Emacs start even if curdir is inacce... dd989c0ea0 * etc/NEWS: Mention GnuPG 2.0 through 2.1.5 issue (Bug#428... 4542b750cc Fix bug with ~/Emacs file not being read at init 9b403d624e ; Fix last change 6bff65a626 ; * doc/lispref/sequences.texi (Sequence Functions): Typo ... 3c4edfd85e Prevent from frozen frame after `C-z' in Lucid builds 98e8241992 Document the 'flex' completion style 19fa8b7ca3 Note that Emacs needs systemd support if systemd is used t...
* lisp/image/gravatar.el (gravatar-automatic-caching): Made obsolete.
(gravatar-cache-ttl): Ditto.
(gravatar--cache): New variable to cache gravatars in-memory.
(gravatar-retrieve): Maintain the cache.
(gravatar--prune-cache): Remove old entries.
(gravatar-retrieved): Remove use of the old-style cache (bug#40355).
Stefan Kangas [Tue, 18 Aug 2020 10:43:16 +0000 (12:43 +0200)]
Rename new option to flyspell-use-mouse-3-for-menu
* lisp/textmodes/flyspell.el (flyspell-use-mouse-3-for-menu): Rename
from 'flyspell-correct-on-mouse-3'. The previous name did not make it
clear that it's about opening a menu. (Bug#11680)
(flyspell--set-use-mouse-3-for-menu): Rename from
'flyspell--set-correct-on-mouse-3'. Bind menu to 'down-mouse-3'
instead of 'mouse-3' to be more in line with user expectations.
(flyspell-mode): Use the above new names.
* doc/emacs/fixit.texi (Spelling):
* etc/NEWS: Update documentation to use the new name.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
Paul Eggert [Tue, 18 Aug 2020 00:54:44 +0000 (17:54 -0700)]
Fix glitch uncovered by gcc -fsanitize=undefined
* src/ccl.c (ccl_driver): Defend against signed integer
overflow (Bug#42660). Perhaps some of this is unnecessary,
but it is safe and ccl.c is low-priority these days.
Paul Eggert [Mon, 17 Aug 2020 23:21:36 +0000 (16:21 -0700)]
Let Emacs start even if curdir is inaccessible
* lisp/startup.el (normal-top-level): Also delete PWD if
file-attributes fails for either $PWD or default-directory,
instead of failing out of the top level.
This fixes a regression from Emacs 26 (Bug#42903).
Eli Zaretskii [Mon, 17 Aug 2020 16:30:02 +0000 (09:30 -0700)]
Fix assertion violation in pdumper.c
* src/pdumper.c (pdumper_find_object_type_impl): When checking
last_mark_bits, require the offset to be less than
discardable_start, not cold_start. This fixes a typo introduced in
2020-08-14T21:33:21Z!eggert@cs.ucla.edu (Bug#42832).
Andrea Corallo [Mon, 17 Aug 2020 09:54:55 +0000 (11:54 +0200)]
* Improve eln filename hashing
Make eln filename hashing logic insensitive to the installation
process.
* src/comp.c (epaths.h): New include to have PATH_DUMPLOADSEARCH,
PATH_LOADSEARCH definitions.
(loadsearch_re_list): New static var.
(Fcomp_el_to_eln_filename): Update logic to have the eln hashing
insensitive to the installation process.
(syms_of_comp): GC protect 'loadsearch_re_list'.
Andrea Corallo [Sun, 16 Aug 2020 14:40:03 +0000 (16:40 +0200)]
* Remove a false permission related error while native compiling
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Do not crash if
native compiling we have no permission to create the .elc
file. We are not creating it.
Andrea Corallo [Sun, 16 Aug 2020 12:33:25 +0000 (14:33 +0200)]
Allow for native compiling .el.gz files
This is needed for installed instances compiled with NATIVE_FAST_BOOT
* src/comp.c (maybe_defer_native_compilation): Search for .el.gz
too as a source if the .el is not found.
(Fcomp_el_to_eln_filename): Remove the .gz in case to
generate the hash.
* lisp/emacs-lisp/comp.el (comp-valid-source-re): New defconst.
(comp-run-async-workers, native-compile-async): Make use of
`comp-valid-source-re'.
Andrea Corallo [Sat, 15 Aug 2020 08:54:22 +0000 (10:54 +0200)]
* Prevent recursive load
Prevent autoload to kicks in while running `native-compile-async'.
Autoload cannot be used safely by functions serving deferred
compilation as a circular load can be triggered if the dependency is
not native compiled already.