1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

168973 Commits

Author SHA1 Message Date
Po Lu
024432e583 Enlarge dumped_data
* src/w32heap.c (DUMPED_HEAP_SIZE): Increase to 24 MiB, the bare
minimum necessary to build a 32-bit Emacs.
2023-09-23 14:20:58 +08:00
Po Lu
5bd6f963f6 Correct comparisons between size_t and ssize_t
* src/sfnt.c (sfnt_read_table_directory, sfnt_read_cmap_format_0)
(sfnt_read_cmap_format_2, sfnt_read_cmap_format_4)
(sfnt_read_cmap_format_6, sfnt_read_cmap_format_8)
(sfnt_read_cmap_format_12, sfnt_read_cmap_format_14)
(sfnt_read_cmap_table_1, sfnt_read_cmap_table)
(sfnt_read_head_table, sfnt_read_hhea_table, sfnt_read_maxp_table)
(sfnt_read_glyf_table, sfnt_read_hmtx_table, sfnt_read_name_table)
(sfnt_read_meta_table, sfnt_read_ttc_header)
(sfnt_read_default_uvs_table, sfnt_read_nondefault_uvs_table)
(sfnt_read_fvar_table, sfnt_read_gvar_table, sfnt_read_avar_table)
(sfnt_read_cvar_table, sfnt_read_OS_2_table):

* src/sfntfont.c (sfnt_enum_font): Revise code written with only
signed `long' in mind to properly compare size_t values with
ssize_t.
2023-09-23 10:07:38 +08:00
Po Lu
3a1e65bd8e Properly apply XY offsets to compound component glyphs
* src/sfnt.c (sfnt_decompose_compound_glyph): Avoid overwriting
X and Y if defer_offsets is false.
2023-09-23 09:31:17 +08:00
Po Lu
d2f024af61 Display background dialogs using the correct style
* java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Wrap
CONTEXT within EmacsStyle such that dialogs are displayed in the
same style used by activities.
2023-09-23 08:31:45 +08:00
Philip Kaludercic
d1d444c2b7 File-expand DIRECTORY argument to vc-clone
* lisp/vc/vc.el (vc-clone): Expand directory to avoid issues when
invoking the subprocess.  (Bug#66115)
2023-09-22 12:48:53 +02:00
Po Lu
d71b9673a0 Enable opening mailto URLs under Android
* doc/emacs/android.texi (Android Startup): Mention how mailto
URLs are treated by the emacsclient wrapper.

* java/AndroidManifest.xml.in: Register `mailto' scheme filters
for EmacsOpenActivity.

* java/org/gnu/emacs/EmacsOpenActivity.java (startEmacsClient):
Extract code that starts Emacs when it isn't already running,
and take a list of arguments rather than a single file name.
(onCreate): If the scheme is `mailto', escape the URI and call
`message-mailto'.
2023-09-22 09:36:40 +08:00
João Távora
9db3fbd369 Flymake: new 'short' option for flymake-show-diagnostics-at-end-of-line
bug#66041

* lisp/progmodes/flymake.el (Version): Bump to 1.3.6
(flymake-eol-information-face): New face.
(flymake-show-diagnostics-at-end-of-line): Support new value short.
(flymake--eol-overlay-summary): Rework.
(flymake--highlight-line):
2023-09-21 22:35:31 +01:00
Manphiz
a45d33d8aa ; Handle authentication properly when reconnecting to IRC
* lisp/net/rcirc.el (rcirc-reconnect): Set 'rcirc-user-authenticated'
to nil before reconnecting.  (Bug#65882)
2023-09-21 18:28:30 +02:00
Philip Kaludercic
842411f09b package-tests.el: Add test Bug#65475
* test/lisp/emacs-lisp/package-tests.el (with-package-test): Bind
package-selected-packages.
(package-test-bug65475): Add test.
2023-09-21 18:28:30 +02:00
Philip Kaludercic
24b8d13fc1 ; Handle edge-case when deleting the last package
* lisp/emacs-lisp/package.el (package-delete): Rebind 'package-alist'
while calling 'package--used-elsewhere-p'.  (bug#65475)
2023-09-21 18:28:30 +02:00
Stefan Monnier
cc9bfcafb9 * src/regex-emacs.c (mutually_exclusive_aux) [ENABLE_CHECKING]: Fix if 2023-09-21 11:58:44 -04:00
Stefan Monnier
424b35fa24 regex-emacs.c (mutually_exclusive_aux): Rework again
Rework the way we handle loops.  This new code does not really work
better than the previous one, but it has the advantage of being "fail
safe" and also that we can dynamically check if our assumptions about
the shape of the bytecode are satisfied or not.

* src/regex-emacs.c (mutually_exclusive_aux): Replace `done_beg` and
`done_end` with `loop_beg` and `loop_end`.
(mutually_exclusive_p): Adjust accordingly.
(analyze_first): Fix incorrect assertion.
2023-09-21 11:47:31 -04:00
João Távora
57c6c067d3 Flymake: fix bug in end-of-line overlay updates
* lisp/progmodes/flymake.el (flymake--update-eol-overlays): Rename
from flymake--eol-overlay-update and fix.
(flymake--handle-report): Call flymake--update-eol-overlays.
2023-09-21 14:03:13 +01:00
Gerd Möllmann
d0b1e3647f macOS: only cp emacs.pdmp when installing (bug#66022)
* Makefile.in (install-arch-dep): install emacs.pdmp here for
self-contained build
* nextstep/Makefile.in (${ns_applibexecdir}/Emacs.pdmp): Don't cp
emacs.pdmp if self-contained build.
2023-09-21 07:09:53 +02:00
Po Lu
dad3afb7eb ; * src/android.c (android_damage_window): Remove unused variable. 2023-09-21 09:26:00 +08:00
Po Lu
19857b51b0 Update Android port
* src/android.c (android_query_tree, android_get_geometry)
(android_translate_coordinates, android_wc_lookup_string)
(android_get_keysym_name, android_browse_url)
(android_query_battery):

* src/androidmenu.c (android_dismiss_menu, android_menu_show):
Circumvent JNI dynamic method dispatch overhead.
2023-09-21 09:13:09 +08:00
João Távora
ef8458558d Flymake: fix eol overlay flicker due to untimely overlay deletion
This commit helps in ensuring that `flymake--eol-overlay-update' is
only called once per cycle.

* lisp/progmodes/flymake.el (flymake--delete-overlay): Don't
delete eol overlay here.
(flymake--eol-overlay-summary): Rework again.
(flymake--eol-overlay-update): Delete eol overlay here.
(flymake-start): Make sure to set all backends reported-p to nil.
2023-09-21 01:14:00 +01:00
João Távora
f35818f2e7 Flymake: more fixes to the end-of-line overlays
bug#66041

* lisp/progmodes/flymake.el (flymake--eol-overlay-summary): Rework.
(flymake--eol-overlay-update): Rework.
(flymake--highlight-line): Simplify.
2023-09-21 00:28:34 +01:00
João Távora
4da3ff1f0c Flymake: do use condition-case-unless-debug
The reasons previously highlighted in the FIXME either don't apply
anymore or don't outweigh the advantages of using this macro.

* lisp/progmodes/flymake.el (flymake--run-backend): Do use
condition-case-unless-debug.
2023-09-21 00:05:07 +01:00
João Távora
8b1947ffdd Flymake: more fixes to flymake--highlight-line
Make it robust to diagonstics with invalid bounds.

* lisp/progmodes/flymake.el (flymake--highlight-line): Robustify.
2023-09-21 00:03:32 +01:00
João Távora
e0ce4409b2 Flymake: Fix bug in flymake-diagnostics
* lisp/progmodes/flymake.el (flymake-diagnostics): Fix bug.
2023-09-20 22:49:17 +01:00
Jim Porter
d989d14e13 Flymake: use 'compilation-info' as basis for "note" faces
bug#66041

* lisp/progmodes/flymake.el (flymake-note-echo)
(flymake-note-echo-at-eol): Inherit from 'compilation-info'.
2023-09-20 22:48:44 +01:00
Alan Mackenzie
f931cebce7 Insert symbol `debug' into two condition-case handlers
This fixes bug#65622.  Also correct a mismatch between a
function to which advice is added, and that from which it is
removed.

* lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load):
Add a `debug' to the condition-case handler for `error', so
that a useful backtrace will be produced on a macro expansion
error.

* lisp/progmodes/elisp-mode.el (elisp--local-variables): Add
`debug' to a condition-case handler, as above.  In the
advice-remove call, give the same function, macroexpand-1, as
in the corresponding advice-add call.
2023-09-20 15:51:17 +00:00
João Távora
5792ea14ad Flymake: fix many problems with the end-of-line overlays
bug#66041

* lisp/progmodes/flymake.el (flymake-diagnostics): Rewrite.
(flymake--really-all-overlays): Rename from flymake--overlays.
(flymake--delete-overlay): Complexify.
(flymake--highlight-line): Rework.
(flymake--handle-report): Update eol overlays
(flymake-mode): use flymake--really-all-overlays.
(flymake-after-change-function): Simplify.
(flymake-goto-next-error): Don't use flymake--overlays.
2023-09-20 14:53:13 +01:00
Andrea Corallo
ea12230039 * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Simplify. 2023-09-20 12:09:15 +02:00
João Távora
76cdf293c4 Eglot: better consider diagnostics at point on code action requests
* lisp/progmodes/eglot.el (eglot--code-action-bounds): Rename from
eglot--code-action-bounds.  Rework to consider diagnostics.
(eglot-code-actions): Use new eglot--code-action-bounds.
(eglot--code-action): Use new eglot--code-action-bounds.

* etc/EGLOT-NEWS: mention change.

GitHub-reference: https://github.com/joaotavora/eglot/discussions/1295
2023-09-20 11:02:51 +01:00
Mattias Engdegård
f0794ac9ca Re-enable -Wswitch when building with Clang
* configure.ac (WERROR_CFLAGS): Remove -Wno-switch, inserted a decade
ago but doesn't seem to be needed now.  Please tell me if you
observe otherwise.
2023-09-20 11:30:31 +02:00
Mattias Engdegård
a82785e297 Reorder type tests for efficiency
* src/fns.c (Flength, Fdelete, Fnreverse):
Test types in descending order of frequency, roughly.
2023-09-20 11:30:31 +02:00
Mattias Engdegård
054fc8a5e0 * src/alloc.c: (cleanup_vector) Dispatch on pseudovector type
Enable the compiler to generate a jump table instead of a chain of
conditional branches.
2023-09-20 11:30:31 +02:00
Paul Eggert
fb8dfba0f1 Fix off-by-1 typo in vadd_to_log
* src/xdisp.c (vadd_to_log): Fix off-by-1 typo that I introduced
in commit fbee6265a7
dated Thu Aug 13 13:48:28 2015 -0700.
Problem and fix reported by Robert Pluim (Bug#66098#11).
2023-09-20 01:05:42 -07:00
Juri Linkov
74dffcdf4f * lisp/tab-bar.el (tab-bar-auto-width): Don't check if width changes.
Remove the condition '(< curr-width prev-width)' that was intended to check
if the width stopped to change.  But actually it's not only unneeded,
but causes a bug: when the name contains a combining character, then
the width doesn't change, and the name truncation stops too early.
2023-09-19 20:51:07 +03:00
Juri Linkov
3c14cab797 ; * tab-bar, tab-line: Use integer 1 instead of float for height em. 2023-09-19 20:44:16 +03:00
Mattias Engdegård
b03338c70d Warn about duplicated :tag strings in defcustom choices
It is bad user experience when two menu items have identical labels.

* lisp/emacs-lisp/bytecomp.el (bytecomp--check-cus-type): Add check.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-defcustom-type): Add test case.
2023-09-19 15:21:03 +02:00
Mattias Engdegård
321f2e1e4d Don't use pointer arithmetic for pointer tagging (bug#65491)
This makes for safer code when tagging null pointers in particular,
since pointer arithmetic on NULL is undefined and therefore can be
assumed, by the compiler, not to occur.

* src/lisp.h (untagged_ptr): Remove.
(TAG_PTR): Cast to uintptr_t instead of untagged_ptr.
2023-09-19 15:21:03 +02:00
Protesilaos Stavrou
7be5c8f47c
Update modus-themes to their version 4.3.0
* doc/misc/modus-themes.org
(Option for reloading the theme on custom change)
(Option for disabling other themes while loading Modus)
(Option for completion framework aesthetics)
(Option for org-mode block styles, Get a single color from the palette)
(Add padding to mode line, Note on SHR fonts)
(Note on goto-address-mode faces): Use correct markup for 'nil'.
(Custom Org todo keyword and priority faces): Reword statements and
update the value of sample configuration blocks.
(Use more spacious margins or padding in Emacs frames): Mention the
'spacious-padding' package on GNU ELPA.
(Full support for packages or face groups): Document newly supported
packages and remove those that are no longer covered explicitly.
(Indirectly covered packages): Note that css-mode is covered
indirectly.
(Acknowledgements): Expand list of people who have helped with the
project.

* etc/themes/modus-operandi-deuteranopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-operandi-deuteranopia): Expand or tweak the palette, where
necessary.

* etc/themes/modus-operandi-theme.el (unless): Add theme-autoload
cookie and relevant metadata.
(modus-operandi): Expand or tweak the palette, where necessary.
* etc/themes/modus-operandi-tinted-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-operandi-tinted): Expand or tweak the palette, where necessary.

* etc/themes/modus-operandi-tritanopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-operandi-tritanopia): Expand or tweak the palette, where
necessary.

* etc/themes/modus-vivendi-deuteranopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-vivendi-deuteranopia): Expand or tweak the palette, where
necessary.

* etc/themes/modus-vivendi-theme.el (unless): Add theme-autoload
cookie and relevant metadata.
(modus-vivendi): Expand or tweak the palette, where necessary.

* etc/themes/modus-vivendi-tinted-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-vivendi-tinted): Expand or tweak the palette, where necessary.

* etc/themes/modus-vivendi-tritanopia-theme.el (unless): Add
theme-autoload cookie and relevant metadata.
(modus-vivendi-tritanopia): Expand or tweak the palette, where
necessary.

* etc/themes/modus-themes.el (modus-themes-preset-overrides-faint)
(modus-themes-preset-overrides-intense)
(modus-themes-preset-overrides-warmer): Make minor tweaks.
(modus-themes--annotate-theme, modus-themes--select-prompt)
(modus-themes--toggle-theme-p, modus-themes-toggle)
(modus-themes--list-colors-prompt, modus-themes--heading)
(modus-themes-faces): Refine internal functions.

The detailed release notes are available here:
<https://protesilaos.com/codelog/2023-09-19-modus-themes-4-3-0/>.
2023-09-19 16:03:11 +03:00
Po Lu
7fd2a601ab ; Fix typos in last change
* src/android.c (android_exception_check_2)
(android_exception_check_3, android_exception_check_4): Fix
typos.
2023-09-19 19:59:21 +08:00
Po Lu
d18be27594 Update Android port
* src/android.c (android_exception_check_1)
(android_exception_check_2, android_exception_check_3)
(android_exception_check_4): Permit each object to be NULL.
(android_browse_url): Release VALUE if an exception transpires.
2023-09-19 19:58:27 +08:00
Alan Mackenzie
761f8901ff Don't use ellipses while cl-printing strings.
This fixes bug#65680.  The former use of print-length as a
bound on the length of the printed string was erroneous,
causing error messages preceding backtracees to get
unnecessarily truncated to 50 characters.

* lisp/emacs-lisp/cl-print.el (cl-print-object <string>):
Remove the substitution of ellipses for long strings.

* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-ellipsis-string): Remove this test.
2023-09-19 10:25:34 +00:00
Andrea Corallo
ea5ae08b06 * lisp/emacs-lisp/comp.el (comp-final1): Clean-up unused form. 2023-09-19 11:46:19 +02:00
Andrea Corallo
438d71e83b * lisp/emacs-lisp/comp.el (comp-op-to-fun): Use `string-replace'. 2023-09-19 11:46:19 +02:00
Yuan Fu
fc7c1f1e93
Fix treesit--update-ranges-local
* lisp/treesit.el (treesit--update-ranges-local): Don't forget to set
local parser's range when creating it.
2023-09-18 20:48:28 -07:00
Jim Porter
acdb77c289 ; Add debug instrumention for queueing commands in Eshell
* lisp/eshell/esh-cmd.el (eshell-eval-command): Log the new command
form.
2023-09-18 18:00:07 -07:00
Paul Eggert
e942581488 Improve XUNTAG comment
* src/lisp.h (XUNTAG): Shorten (and I hope clarify) new comment.
2023-09-18 14:11:16 -07:00
Mattias Engdegård
861f9cb783 Don't use pointer arithmetic for untagging Lisp values (bug#65491)
* src/lisp.h (XUNTAG):
Instead of casting a Lisp value to char * and subtracting the tag,
cast it to a suitable integral type and work on that.

This should result in identical or at least equivalent code, except
that it avoids potential problems arising from the restrictions on
pointer arithmetic in C.  In particular, a null pointer can be neither
an operand in nor the result of pointer arithmetic.

C compilers know this and would, prior to this change, optimise

  XUNTAG(obj, Lisp_Int0, mytype) != NULL

to 1.  This means, for example, that make_pointer_integer and
XFIXNUMPTR could not be entrusted with null pointers, and
next_vector in alloc.c was unsafe to use.
2023-09-18 20:06:01 +02:00
Jim Porter
146bd41dde Fix another race condition when waiting for Eshell processes
When checking if the other processes in our pipeline are "alive", we
also need to check whether their sentinels are finished.  Otherwise,
we might proceed with command evaluation while one of the other
processes is still cleaning up.

* lisp/eshell/esh-proc.el (eshell-process-active-p): New function...
(eshell-wait-for-process)
* lisp/eshell/esh-cmd.el (eshell-resume-command): ... use it.
2023-09-18 10:26:34 -07:00
Andrea Corallo
991bf3f0f5 * Fix comp-function-type-spec for non symbol input (bug#66021)
* lisp/emacs-lisp/comp.el (comp-function-type-spec): Make it robust
against closures (bug#66021).
2023-09-18 10:15:38 +02:00
Po Lu
b331bf6d8a Correct build on systems without PAGE_MASK
* exec/exec.c (write_load_command) <PAGE_MASK, PAGE_SIZE>:
Uniformly define even if !HAVE_GETPAGESIZE.
2023-09-18 14:16:40 +08:00
Po Lu
cd69120731 Correct crash in child processes under armeabi Android
* exec/trace.c (process_system_call) <READLINKAT_SYSCALL>:
Examine tracee->waiting_for_syscall and avoid rewriting user
arguments if a system call is presently being executed by the
kernel.  Reported by Romário Rios <romariorios@protonmail.com>.
2023-09-18 14:16:39 +08:00
Danny Freeman
b892da5f61
Offset ranges before applying embedded tree-sitter parser
This feature would allow treesitter major modes to easily specify
offsets when using embeded parsers.  A potential use case for this is
javascript template strings, when we want to apply a different parser
to the string's contents, but do not want to include the template
string's delimiters.

* lisp/treesit.el
(treesit-query-range): Accept an optional offest arg, apply the offset
to all returned ranges.
(treesit-range-rules): Accept an optional :offset keyword arg to adjust
ranges an embded parser is applied to.
(treesit-update-ranges): Forward optional :offset setting from
`treesit-range-rules' to `treesit-query-rang'.
* test/lisp/treesit-tests.el
(treesit-range-offset): Tests the new offset functionality.
2023-09-17 21:12:56 -07:00
Jim Porter
9ab8b968d6 Use 'eshell-with-temp-command' (indirectly) to parse Eshell script files
* lisp/eshell/esh-cmd.el (eshell--region-p): New function.
(eshell-with-temp-command, eshell-parse-command): Support
'(:file . FILENAME)' to use the contents of FILENAME.

* lisp/eshell/em-script.el (eshell-source-file): Call
'eshell-parse-command' and use backticks.
2023-09-17 21:10:28 -07:00