Stefan Kangas [Mon, 11 Oct 2021 13:10:26 +0000 (15:10 +0200)]
Fontify "print" and "exec" as functions in python-mode
This change was first made on master, but on closer consideration it
is better to fix this bug already in Emacs 28.1.
* lisp/progmodes/python.el (python-font-lock-keywords-level-2):
Fontify "print" and "exec" as functions, which is the case in
Python 3. (Bug#43298) Do not merge to master.
Juri Linkov [Mon, 11 Oct 2021 18:27:50 +0000 (21:27 +0300)]
Copy parent face attributes to tab-line-tab-current instead of inheriting face
* lisp/tab-line.el (tab-line-tab-current): Don't inherit face from
'tab-line-tab' to not inherit the face attribute :height from 'tab-line',
because :height of mouse-face is added to the base face.
Copy here most of the parent face attributes (bug#50798).
Paul Eggert [Sun, 10 Oct 2021 20:59:16 +0000 (13:59 -0700)]
New function num-processors
This addresses a FIXME comment in lisp/emacs-lisp/comp.el,
relating to the number of subsidiary processes used by
comp-run-async-workers in native compilation.
* admin/merge-gnulib (GNULIB_MODULES): Add nproc.
* doc/lispref/processes.texi (Process Information), etc/NEWS:
Document num-processors.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/nproc.c, lib/nproc.h, m4/nproc.m4:
New files, copied from Gnulib by admin/merge-gnulib.
* lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl.
(comp-effective-async-max-jobs): Use num-processors.
* src/process.c: Include nproc.h.
(Fnum_processors): New function.
(syms_of_process): Define ‘all’, ‘current’, ‘num-processors’.
* src/w32proc.c (Fw32_get_nproc): Add FIXME comment.
* test/src/process-tests.el (process-num-processors): New test.
Juri Linkov [Sun, 10 Oct 2021 17:38:12 +0000 (20:38 +0300)]
Add symbol property 'save-some-buffers-function' (bug#46374)
* lisp/files.el (save-some-buffers-root): Put non-nil
symbol property 'save-some-buffers-function'.
(save-some-buffers): Check pred for the
symbol property 'save-some-buffers-function'.
(save-some-buffers-default-predicate): Mention
symbol property 'save-some-buffers-function'.
Juri Linkov [Sun, 10 Oct 2021 17:31:15 +0000 (20:31 +0300)]
Keep reading when typed RET in read-char-from-minibuffer and y-or-n-p
* lisp/subr.el (read-char-from-minibuffer-map):
Remap exit-minibuffer to read-char-from-minibuffer-insert-other.
(y-or-n-p-map): Remap 'exit' to y-or-n-p-insert-other.
(y-or-n-p): Don't mention RET in docstring. (Bug#51101)
João Távora [Wed, 6 Oct 2021 10:30:29 +0000 (11:30 +0100)]
Complete shorthands to longhands for symbol-completing tables
Shorthands aren't symbols, they're text forms that 'read' into
symbols. As such, shorthands aren't candidates in these tables of
symbols. But in some situations, if no other candidates match the
pattern, we can e.g. complete "x-foo" to "xavier-foo" if the shorthand
* lisp/minibuffer.el (completion-styles-alist): New 'shorthand'
style.
(completion-category-defaults): Link 'symbol-help' category with
'shorthand' style.
(minibuffer--original-buffer): New variable.
(completing-read-default): Setup minibuffer--original-buffer.
(completion-shorthand-try-completion)
(completion-shorthand-all-completions): New helpers.
Dmitry Gutov [Sun, 10 Oct 2021 01:14:35 +0000 (04:14 +0300)]
Avoid mapping file names through 'substring'
* lisp/progmodes/project.el (project--files-in-directory):
Avoid mapping file names through 'substring'. Reducing the amount
of garbage generated. Better perf by up to 20%.
Bump the package version.
Stephen Gildea [Sat, 9 Oct 2021 18:36:03 +0000 (11:36 -0700)]
Expanded testing of MH-E with multiple MH variants
* test/lisp/mh-e/mh-utils-tests.el: Environment variable TEST_MH_PATH
controls which installed MH variant to test with. Moved the commentary
about testing with different MH variants from above 'with-mh-test-env'
definition to "Commentary" section at the top of the file.
* test/lisp/mh-e/test-all-mh-variants.sh: New script to test all
installed MH variants.
Eli Zaretskii [Thu, 7 Oct 2021 15:53:25 +0000 (18:53 +0300)]
Include the refcards in the release tarball
* make-dist (possibly_non_vc_files): Include *.pdf files, to
include the produced refcards in the tarball. This was lost when
'make-dist' was rewritten for Emacs 27.
* lisp/erc/erc.el: Don't error if 'erc-loaddefs' does not exist.
That autoload file is created as part of the Emacs compilation
process, however we would like ERC to be usable if used outside
emacs.git (e.g. if installed from GNU ELPA).
Amin Bandali [Thu, 7 Oct 2021 02:49:59 +0000 (22:49 -0400)]
Add 'erc-bug' command for reporting ERC bugs
* etc/ERC-NEWS: Announce the new command, and mention it at the top of
the file along with 'report-emacs-bug'.
* lisp/erc/erc.el (erc-bug): New command for reporting ERC bugs. It
prompts for a subject, and passes it on to 'report-emacs-bug' along
with the current ERC version, with the ERC mailing list in Cc.
Amin Bandali [Thu, 7 Oct 2021 01:50:56 +0000 (21:50 -0400)]
Add 'erc-version' and use it to display ERC version consistently
* lisp/erc/erc.el (erc-version): New constant holding the current ERC
version, now used in the function with the same name to produce a
version string for use across ERC for consistency. Also, add another
optional argument, 'bold-erc', which when non-nil, marks the "ERC"
portion of the string with the control character for bold display.
(erc-quit/part-reason-default): Use the 'erc-version' function for a
consistent version string.
(erc-cmd-SV): Mention the ERC version number from the 'erc-version'
constant.
(erc-ctcp-query-VERSION): Use the 'erc-version' function for a
consistent version string.
Amin Bandali [Thu, 7 Oct 2021 01:35:43 +0000 (21:35 -0400)]
Small tweaks and improvements to etc/ERC-NEWS
* etc/ERC-NEWS: Small tweaks inspired by etc/NEWS, namely to add a
descriptive blurb at the top of the file to explain what it is about
and how to report ERC bugs, add a form feed before the section for
every release, and set the same Local Variables that etc/NEWS does.
Amin Bandali [Thu, 7 Oct 2021 01:17:33 +0000 (21:17 -0400)]
Add NEWS items for changes to ERC since 5.3 to etc/ERC-NEWS
* etc/ERC-NEWS: copy ERC NEWS items from etc/NEWS, etc/NEWS.27,
etc/NEWS.26, etc/NEWS.25, and etc/NEWS.24 to here. Future ERC NEWS
are also to be added here. This is in motivated by preparation for
addition of ERC to GNU ELPA, along with the ERC manual and NEWS.
* etc/NEWS: remove ERC-related entries, and refer the reader to
ERC-NEWS instead.
Stephen Gildea [Wed, 6 Oct 2021 03:32:59 +0000 (20:32 -0700)]
Refactor mh-utils-tests macro 'with-mh-test-env'
* test/lisp/mh-e/mh-utils-tests.el (with-mh-test-env): Refactor to
reduce the size of the expanded macro.
(mh-test-utils-setup): New helper function.
(mh-ensure-native-trampolines): Absorbed by mh-test-utils-setup.
Dmitry Gutov [Tue, 5 Oct 2021 02:45:09 +0000 (05:45 +0300)]
Retain compatibility with older project.el projects
* lisp/progmodes/xref.el (xref--analyze):
Retain compatibility with older project.el and its compatible
project definitions (for standalone Xref from ELPA).
Stephen Gildea [Tue, 5 Oct 2021 16:15:57 +0000 (09:15 -0700)]
native-comp-available-p is the definitive test
* doc/lispref/compile.texi (Native Compilation): Document
native-comp-available-p as the way to test for native compilation.
* lisp/emacs-lisp/package.el (package--native-compile-async):
* test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines):
Test for native compilation with native-comp-available-p.
Thank you to Andrea Corallo for reviewing this patch.
Paul Eggert [Tue, 5 Oct 2021 16:08:02 +0000 (09:08 -0700)]
Fix md5 issue in recent Gnulib merge
When configured --with-native-compilation, Emacs needs md5_stream.
Problem reported by Andy Moreton (Bug#50985#23).
* admin/merge-gnulib (GNULIB_MODULES): Add crypto/md5,
needed for --with-native-compilation.
(AVOIDED_MODULES): Avoid crypto/af_alg, since Emacs doesn’t
need to bother with kernel-supported cryptography algorithms.
* lib/gnulib.mk.in, m4/gnulib-comp.m4:
Regenerate by running admin/merge-gnulib.
* lib/md5-stream.c: New file, copied from Gnulib.
Eli Zaretskii [Tue, 5 Oct 2021 14:12:49 +0000 (17:12 +0300)]
Backward compatibility option for 'nobreak-char-display'
* src/xdisp.c (syms_of_xdisp) <nobreak-char-ascii-display>: New
variable.
(get_next_display_element): If 'nobreak-char-ascii-display' is
non-nil, display non-ASCII space and hyphen characters as their
ASCII equivalents. (Bug#50983)
Michael Albinus [Tue, 5 Oct 2021 09:27:48 +0000 (11:27 +0200)]
Check, whether an FUSE mount has been broken in Tramp
* lisp/net/tramp-fuse.el (tramp-fuse-mount-timeout): New defconst.
(tramp-fuse-mounted-p): Use it. Check for a file property instead
of a connection property.
(tramp-fuse-unmount): Dito.
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
Do not trust existence of a process, whether the volume is mounted.
Daniel Martín [Tue, 5 Oct 2021 07:37:56 +0000 (09:37 +0200)]
Update documentation of search-whitespace-regexp
* doc/emacs/search.texi (Lax Search): Update the documentation about
the default value of search-whitespace-regexp, as it is now
independent of the major mode's syntax table (bug#51020).
Paul Eggert [Mon, 4 Oct 2021 19:11:39 +0000 (12:11 -0700)]
Port recent Gnulib changes to MS-Windows
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_free-posix)
(OMIT_GNULIB_MODULE_malloc-posix)
(OMIT_GNULIB_MODULE_realloc-gnu)
(OMIT_GNULIB_MODULE_realloc-posix):
New macros, since we don’t want these modules on MS-Windows.
* src/w32heap.c (heap_alloc, heap_realloc): New functions.
(malloc_after_dump, realloc_after_dump, realloc_before_dump):
Use them.
Paul Eggert [Mon, 4 Oct 2021 19:11:39 +0000 (12:11 -0700)]
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
Andrea Corallo [Mon, 4 Oct 2021 20:47:30 +0000 (22:47 +0200)]
* Fix mh tests for native comp builds (bug#50975)
* test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines):
New function.
(mh-test-utils-setup-with-mocks)
(mh-test-utils-setup-with-variant): Use it.
Andrea Corallo [Mon, 4 Oct 2021 19:15:02 +0000 (21:15 +0200)]
* Fix `batch-native-compile' not to spawn a subprocess
* lisp/emacs-lisp/comp.el (comp-running-batch-compilation): New var.
(comp-final): Use it.
(batch-native-compile): Bind `comp-running-batch-compilation' it.
Robert Pluim [Mon, 4 Oct 2021 17:11:15 +0000 (19:11 +0200)]
Remove U+FE0F from script-representative-chars
* lisp/international/fontset.el (script-representative-chars): Remove
U+FE0F / VS-16 from the 'emoji' entry. It could cause us to skip
fonts that don't have a glyph for it, even though we don't actually
need one.