1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
Commit graph

48842 commits

Author SHA1 Message Date
Po Lu
ee4b6a4a2d Update Android port
* java/org/gnu/emacs/EmacsContextMenu.java (display): Return
false if the list of menu buttons is empty, lest Android cease
displaying menus on the assumption that Emacs is defective.

* java/org/gnu/emacs/EmacsView.java (popupMenu): Likewise.

* src/fns.c (sort_list): Render sentence motion commands
functional within commentary

* src/sfntfont.c (sfntfont_list_family): Sort and deduplicate
the returned family list and make it a list of symbols.
(syms_of_sfntfont) <Qstring_lessp>: New defsym.
2023-09-16 10:38:46 +08:00
Stefan Monnier
e7e925f062 (mutually_exclusive_p): Fix the regression from commit 6fad73d7cc
Commit 6fad73d7cc throws away some useful optimization because
it misfired in some cases (as seen in bug#657260).  Here we try to
recover those useful optimizations with a slightly more careful
algorithm.

* src/regex-emacs.c (mutually_exclusive_aux): Rename from
`mutually_exclusive_p`.  Add two new args.  Improve the
case where we need to recurse.
(mutually_exclusive_p): New function defined on top of it.

* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Re-enable the test.
2023-09-15 14:53:24 -04:00
Stefan Monnier
9610aaeb9e * src/regex-emacs.c (mutually_exclusive_p): Refactor
Minor refactoring to avoid swapping p1/p2.

* src/regex-emacs.c (mutually_exclusive_exactn)
(mutually_exclusive_charset): New functions, extracted from
`mutually_exclusive_p`.
(mutually_exclusive_p): Use them.
2023-09-15 14:16:48 -04:00
Eli Zaretskii
160b4c295d ; * src/process.c (child_signal_notify): Avoid compiler warning (bug#65919). 2023-09-15 09:05:14 +03:00
Po Lu
1442f4043a ; * src/xterm.c (handle_one_xevent): Cite the bug meant to be fixed. 2023-09-15 10:35:06 +08:00
Po Lu
e1a730017d Correct bug#65919
* src/process.c (child_signal_notify): Expunge call to
non-reentrant function from signal handler.

* src/xfns.c (setup_xi_event_mask): Cease selecting for
XI_FocusIn and XI_FocusOut under X toolkit builds.

* src/xterm.c (xi_handle_interaction, xi_handle_focus_change)
(xi_handle_focus_change): Make conditional on GTK 3 or no
toolkit builds.
(xi_handle_delete_frame, x_free_frame_resources): Adjust
correspondingly.
(handle_one_xevent) <EnterNotify, LeaveNotify>: Examine
EnterNotify and LeaveNotify events for focus changes
irrespective of whether XI2 is enabled under the X toolkit and
GTK 2.x.
2023-09-15 10:30:12 +08:00
Po Lu
6ffb0a1719 Avert a crash in the Android last resort font driver
* java/org/gnu/emacs/EmacsFontDriver.java (FONT_INVALID_CODE):
New constant.
(hasChar, encodeChar): Accept a jint character code rather than
a jchar.

* java/org/gnu/emacs/EmacsSdk23FontDriver.java (hasChar)
(encodeChar): Return 0 or FONT_INVALID_CODE if the character is
not representable in a Java char.

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (hasChar): Ditto.

* src/androidfont.c (android_init_font_driver): Adjust signature
to match.
2023-09-14 16:53:21 +08:00
Yuan Fu
f13b08be11
; * src/treesit.c (Ftreesit_parser_set_included_ranges): Minor fix. 2023-09-13 21:41:56 -07:00
Yuan Fu
ad624b961b
Update tree-sitter traversing functions' docstrings
* src/treesit.c (Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Update docstring.
2023-09-13 18:15:27 -07:00
Alan Third
4b44178e72 Fix build error on older macOS versions
* src/nsterm.m (ns_scroll_run): Use srcRect instead of destRect.
2023-09-13 20:27:49 +01:00
Po Lu
3ef5f10b19 Exclude ``regular'' from font adstyle
* src/sfntfont.c (sfnt_parse_style): Disregard tokens matching
Regular entirely.
2023-09-13 13:42:29 +08:00
Yuan Fu
d1d311a3b2
Avoid unnecessary tree-sitter reparse when setting the same range
* src/treesit.h (Lisp_TS_Parser)
* src/treesit.c (make_treesit_parser): Remove has_range field, add
last_set_ranges field.
(Ftreesit_parser_set_included_ranges): Return early if the new range
is the same as the old one.
(Ftreesit_parser_included_ranges): Change has_range to
last_set_ranges.
2023-09-12 13:16:42 -07:00
Yuan Fu
b392d05089
Make sure undefined tree-sitter thing doesn't raise an error
A previous change should've achived this, but that wasn't enough.
This one actually achieves the intended effect, namely,
treesit-node-match-p doesn't raise an error if IGNORE-MISSING is
non-nil, and traverse functions don't raise error by default.

* src/treesit.c (treesit_traverse_validate_predicate): Remove
ignore_missing parameter, return error symbol.
(Ftreesit_node_match_p)
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Check returned error symbol.
(syms_of_treesit): New symbol.
2023-09-12 13:16:41 -07:00
Stefan Monnier
1e1f3e30ef * src/alloc.c (garbage_collect): Run post-gc-hook later (bug#65700) 2023-09-12 14:06:54 -04:00
Po Lu
c465740273 Extract font foundry metadata from the OS/2 table
* src/sfnt.c (sfnt_table_names): Append an entry for OS/2
tables.
(sfnt_read_OS_2_table): New function.
(main): Introduce a new test for the OS/2 table reader.

* src/sfnt.h (sfnt_read_OS_2_table): New declaration.

* src/sfntfont.c (sfnt_decode_foundry_name): Delete function.
(sfnt_enum_font_1): Read the font's OS/2 table and extract the
foundry name from there.  Use `misc' if absent.
(sfntfont_desc_to_entity, sfntfont_open): Cease interning
desc->designer, as that is now a symbol.
(syms_of_sfntfont) <Qmisc>: New defsym Qmisc.  (bug#65865)
2023-09-12 10:37:55 +08:00
Alan Third
6acb3c5b05 Remove check for appdefined events on the queue (bug#65843)
It seems this was likely a bug in macOS 10.10.1. I have no way to find
out when it was fixed, but hopefully before 10.10.5, the most recent
release of that version.

* src/nsterm.m (ns_send_appdefined): Remove check for whether previous
appdefined events have been lost.
2023-09-11 17:22:01 +01:00
Alan Third
c19a2dff5a Fix crash on child frame creation (bug#65817)
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Reorder the way the
frame and layers are created.
([EmacsView makeBackingLayer]): Change to the newly renamed method
below.
([EmacsLayer initWithColorSpace:doubleBuffered:]):
([EmacsLayer initWithDoubleBuffered:]): Rename the method and remove
the colorspace argument as it's no longer able to be set on initial
creation.
* src/nsterm.h: Use new method prototype.
2023-09-11 17:22:01 +01:00
Alan Third
fa24bbb631 Simplify the EmacsLayer double buffering code (bug#63187) 2023-09-11 17:22:00 +01:00
Po Lu
38e96bee1f Provide an option to disable font instruction code execution
* etc/PROBLEMS: Mention instruction code woes and illustrate how
to circumvent them.

* src/sfntfont.c (sfntfont_setup_interpreter): Respect
Vsfnt_uninstructable_family_regexp.
(syms_of_sfntfont) <Vsfnt_uninstructable_family_regexp>: New
option.
2023-09-11 19:45:58 +08:00
Po Lu
f6d2ae766a Respect vertical centering preferences under Android
* src/sfntfont.c (sfntfont_open): Match XLFD name against
Vvertical_centering_font_regexp; if they agree, set
font->vertical_centering.  Also set a suitable full name.
2023-09-11 12:57:21 +08:00
Mattias Engdegård
90b8762ac8 Replace PVEC_FONT as pseudo-vector subtype upper bound
* src/lisp.h (enum pvec_type): Add PVEC_TAG_MAX.
* src/alloc.c (allocate_pseudovector): Use PVEC_TAG_MAX instead of
PVEC_FONT.
2023-09-10 14:00:19 +02:00
Mattias Engdegård
2f8204f5c3 ; Spruce up union vectorlike_header description
* src/lisp.h (union vectorlike_header): Rewrite the description of the
header word layout, with some useful added precision and the customary
ASCII art for bit fields.
2023-09-10 13:59:45 +02:00
Po Lu
df18864aa9 Update Android port
* src/sfntfont.c (sfntfont_probe_widths): Prevent widths of
glyphs representing control characters from affecting the
average width.
2023-09-10 13:48:39 +08:00
Po Lu
c0400151f8 Correct many instances of ``allows to''
Refer to:
lists.gnu.org/archive/html/emacs-devel/2016-01/msg01598.html

* doc/emacs/frames.texi (Tab Bars):

* doc/emacs/maintaining.texi (Tag Syntax):

* doc/lispref/compile.texi (Native Compilation):

* doc/lispref/control.texi (Destructuring with pcase Patterns):

* doc/lispref/display.texi (Overlay Properties, Glyphless Chars):

* doc/lispref/frames.texi (Size Parameters, Layout Parameters)
(Child Frames):

* doc/lispref/minibuf.texi (Minibuffer Windows):

* doc/lispref/processes.texi (Asynchronous Processes):

* doc/lispref/windows.texi (Precedence of Action Functions)
(Mouse Window Auto-selection):

* doc/misc/autotype.texi (Autoinserting):

* doc/misc/efaq.texi (New in Emacs 28):

* doc/misc/idlwave.texi (Examining Variables):

* doc/misc/ses.texi (Quick Tutorial, Standard formula functions):

* doc/misc/tramp.texi (External methods, FUSE-based methods):

* lisp/comint.el (comint-insert-previous-argument-from-end):

* lisp/emacs-lisp/rmc.el (read-multiple-choice):

* lisp/gnus/gnus-util.el:

* lisp/mail/rmailsum.el (rmail-summary-progressively-narrow):

* lisp/mouse.el (mouse-drag-track):

* lisp/net/tramp-sudoedit.el:

* lisp/obsolete/landmark.el:

* lisp/org/org.el (org-startup-truncated, org-file-apps):

* lisp/pixel-scroll.el (pixel-scroll-precision-mode):

* lisp/progmodes/cperl-mode.el (cperl-praise):

* lisp/simple.el (yank-from-kill-ring, kill-visual-line):

* lisp/window.el (delete-window-choose-selected):

* src/ChangeLog.11:

* src/xdisp.c (syms_of_xdisp):

* src/xterm.c (handle_one_xevent): The construct ``allows to
<infinitive>'' is not English inasmuch as no direct object to
``allows'' is provided.  Correct and rephrase each instance of such a
construct within our documentation and commentary.
2023-09-10 09:33:50 +08:00
Eli Zaretskii
9d27b95b26 Merge from origin/emacs-29
b8a8106fa1 ; Add missing space in the manual
5b906b6215 Fix defcustom :type of ielm-indirect-setup-hook
82af484ec1 ; Two updates of etc/TODO
0ab2823f51 ; Describe in PROBLEMS 2 problems with keyboard input
4e7112ab21 ; Fix inaccuracy in ELisp reference manual
34bbb6c8d2 Document NonGNU ELPA in FAQ
2af092741e Fix remote path setting in Eshell
4613575d97 ; * lisp/completion.el (dynamic-completion-mode): Fix las...
2f0f33fbf9 Update docs for (co-)maintainer changes
b068fcd4a3 * doc/lispref/strings.texi (Text Comparison): Fix typo (b...
2e2a5f8118 Adapt Tramp manual
d32f00a35b Improve docstring of message-sendmail-envelope-from
1a668cda8b Unbreak builds with CHECK_STRUCTS.
77b6e9bb17 Improve documentation of EPG
d3382f9471 ; * lisp/completion.el (dynamic-completion-mode): Doc fix.
1458daf316 Avoid crashes on macOS with context menus

# Conflicts:
#	src/pdumper.c
2023-09-09 04:33:47 -04:00
Eli Zaretskii
0273914921 Merge from origin/emacs-29
bc56da92d8 ; Fix error in 'tex-recenter-output-buffer'
d17c5adc05 Fix regexp for recognizing PBM images
9e9f61866e Improve wording in ELisp manual
7427efa033 Fix typo (Bug#65764)
59c6624408 ; * lisp/ido.el (ido-completion-buffer): Fix :type (bug#6...
4ec4b18c2a Fix libgccjit build on Haiku
80bdcf8f35 (regexp-tests-backtrack-optimization): Mark it as failing
8a9e653cc8 ; Add regression test for bug#65726
6fad73d7cc * src/regex-emacs.c (mutually_exclusive_p): Fix inf-loop ...
1d3d419607 ; * lisp/files.el (save-some-buffers-functions): Doc fix ...
42b14c6e5b Bump seq version to 2.24
ff5190a174 Add note on ELPA to admin/notes/bug-triage
f1e4cbe72a ; * etc/PROBLEMS: Minor wording fix.
fd5593c7f2 * etc/PROBLEMS: Mention bug#65432 and its remedy.
dd896ea1e6 Ignore errors when checking for object initializers (bug#...
3550f44c17 ; Fix typos
5b246b9b81 * CONTRIBUTE: Document making ChangeLogs with Magit.
0bd4661941 Doc fixes for obsolete functions and variables
524c0c34f2 ; * lisp/ffap.el (ffap-rfs-regexp): Fix :type (bug#65698).
f48dccc467 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
71a85e2266 A revision to the Widget manual
dbbcf4a659 Fix fontification of " in edit-kbd-macro

# Conflicts:
#	test/src/regex-emacs-tests.el
2023-09-09 04:32:45 -04:00
Po Lu
8b9d25b408 Update Android port
* src/android-asset.h (android_asset_read_internal): Return an
error indication if an exception arises while reading.
(AAsset_getBuffer): Free BUFFER using the C library free
function.
2023-09-09 15:50:06 +08:00
Po Lu
ec097d85ff Micro-optimize sfnt_interpret_trap
* src/sfnt.c (AVOID) [TEST]: Define to its standard value in
lisp.h.
(sfnt_interpret_trap): Label AVOID.
2023-09-09 10:00:17 +08:00
Po Lu
1d07bbe106 Fix typos
* src/android.c (android_set_task_name):

* src/sfnt.c (main): Test if fd < 0, not fd < 1.
2023-09-08 19:58:02 +08:00
Po Lu
46249f6139 Fix typos in last change
* src/font.c (font_dynamic_unparse_xlfd): Remove unused variable.
(Ffont_xlfd_name): Initialize name.
2023-09-08 11:01:30 +08:00
Po Lu
3fb671c88e ; * src/fontset.c: Remove extraneous portion of last change. 2023-09-08 10:37:53 +08:00
Po Lu
c933f5081f Permit XLFD names to exceed 255 characters
* doc/lispref/display.texi (Low-Level Font)
<font-xlfd-name>: Document new argument `long-xlfds'.

* etc/NEWS: Mention removal of XLFD length restrictions.

* src/font.c (font_build_object): Dynamically allocate XLFD,
permitting them to surpass 255 characters in length.
(font_parse_xlfd_1): Cease rejecting XLFDs more than 255
characters in length.
(font_dynamic_unparse_xlfd): New function.  Like
font_unparse_xlfd, but allocate the XLFD dynamically.
(font_delete_unmatched): Dynamically allocate XLFD if necessary.
(Ffont_xlfd_name): New arg LONG_XLFDs.  If t, return a
dynamically allocated XLFD.  All callers changed.

* src/font.h: Update prototypes.

* src/fontset.c (Fnew_fontset): Dynamically allocate XLFD when
establishing fontset name.
2023-09-08 10:37:18 +08:00
Yuan Fu
a9a096ff8b
Add Ftreesit_parser_tag
* lisp/treesit.el (treesit-parser-tag): Add.
* src/treesit.c (Ftreesit_parser_tag): Add.
2023-09-07 16:04:47 -07:00
Philipp Stephani
1a668cda8b Unbreak builds with CHECK_STRUCTS.
* src/pdumper.c (dump_buffer): Fix hash for 'struct buffer'.  The
recent changes to that structure where commits
8f3091defb and
0bd4661941, both of which just affected
comments.
2023-09-07 11:33:37 +02:00
Daniel Martín
1458daf316 Avoid crashes on macOS with context menus
* src/nsmenu.m ([EmacsMenu menuNeedsUpdate:]): Avoid crashes with
context menus.  (Bug#63495)
2023-09-07 08:21:38 +03:00
Po Lu
8b25edfbda Port Proced to Android
* configure.ac (HAVE_PROCFS): Define if opsys is `android'.

* src/android.c (android_set_task_name): New function.
(android_run_select_thread, android_run_debug_thread): Set the
name of the LWP for debugging purposes.

* src/process.c (create_process): Set F_SETPIPE_SZ on Android in
addition to GNU/Linux.

* src/sysdep.c (procfs_ttyname, system_process_attributes)
[__ANDROID__]: Enable procfs_ttyname on Android systems.
2023-09-07 09:35:59 +08:00
Po Lu
2416168310 Remedy bug#63395
* src/gtkutil.c (xg_update_frame_menubar): Avoid scaling the
requisiton height twice.  (bug#63395)
2023-09-07 08:58:21 +08:00
Yuan Fu
6b387d2edd
; Update Ftreesit_parser_list docstring.
* doc/lispref/parsing.texi (Using Parser): Update manual.
* src/treesit.c (Ftreesit_parser_list): Update docstring.
2023-09-05 21:03:38 -07:00
Yuan Fu
cf0986401c
Allow filter by tag in treesit-parser-list
* doc/lispref/parsing.texi: Update manual.
* src/treesit.c (Ftreesit_parser_create): Disallow using t for tag.
(Ftreesit_parser_list): Add LANGUAGE and TAG parameter.
2023-09-05 21:03:37 -07:00
Yuan Fu
722daf6fff
Add tag to tree-sitter parsers
* doc/lispref/parsing.texi (Using Parser): Update manual.
* lisp/treesit.el (treesit-buffer-root-node)
* src/treesit.c (make_treesit_parser)
* src/treesit.c (Ftreesit_parser_create): Add TAG parameter.
(treesit_resolve_node): Create a parser with nil tag.
* src/treesit.h (Lisp_TS_Parser): Add TAG field.
2023-09-05 21:03:37 -07:00
Po Lu
aa872f2540 Properly run emacsclient under Android if DISPLAY is set
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Make
dimensions final, since they are never changed after the
constructor.

* lib-src/emacsclient.c (decode_options): If --display is not
provided, always set display to `android' even if DISPLAY is
provided.

* lisp/net/browse-url.el (browse-url): Cease setting DISPLAY
under Android.

* src/callproc.c (getenv_internal, make_environment_block):
Don't afford DISPLAY special treatment under Android.
2023-09-06 10:31:26 +08:00
Po Lu
cf9353e219 Minor adjustments to Android port stubs
* src/androidfns.c (Fx_display_backing_store): Return
`when-mapped' in place of `always', since the former better
reflects Android port behavior.
(syms_of_androidfns) <always>: Delete defsym.
<when-mapped>: New defsym.

* src/term.c (Fsuspend_tty, Fresume_tty): Properly signal errors
on Android rather than quietly disregarding calls.
2023-09-05 14:39:34 +08:00
Stefan Kangas
bbcfe70991 ; Delete some commented out code in data.c (Bug#64595)
* src/data.c (set_internal): Delete commented out code.
2023-09-05 08:13:24 +02:00
Po Lu
eb9cfa8852 Avoid virtual function dispatch overhead
* src/androidvfs.c (android_saf_move_document): Circumvent JNI
dynamic function dispatch on call to final method.
2023-09-05 10:43:07 +08:00
Stefan Monnier
6fad73d7cc * src/regex-emacs.c (mutually_exclusive_p): Fix inf-loop (bug#65726) 2023-09-04 13:11:31 -04:00
Alan Mackenzie
afcb6d0bc7 Correct the handling of symbols with position in equal
* src/fns.c (internal_equal): Only regard symbols with position
as their symbols when symbols-with-pos-enabled is non-nil.

* doc/lispref/symbols.texi (Symbols with Position): Expand the
description of symbols with position, in particular the way
they work with eq and equal.

* doc/lispref/objects.texi (Equality Predicates): Describe how
eq and equal handle symbols with position.

* test/src/fns-tests.el (fns-tests-equal-symbols-with-position):
New tests for symbols with position.
2023-09-04 12:51:24 +00:00
Mattias Engdegård
c290b034e0 Move wholenump alias definition
* src/data.c (syms_of_data): From here...
* lisp/subr.el (wholenump): ...to here, with the other aliases.
2023-09-03 11:30:54 +02:00
Stefan Kangas
3550f44c17 ; Fix typos 2023-09-02 18:57:11 +02:00
Stefan Kangas
0bd4661941 Doc fixes for obsolete functions and variables
* admin/notes/multi-tty:
* doc/emacs/building.texi (Debugger Operation):
* doc/misc/efaq-w32.texi (Line ends by file system):
* doc/misc/gnus.texi (Hashcash):
* lisp/emacs-lisp/eieio.el (eieio-class-parents)
(eieio-class-children):
* lisp/progmodes/perl-mode.el:
* lisp/textmodes/ispell.el (ispell-lookup-words):
* src/buffer.h: Update or delete references to variables and functions
made obsolete in Emacs 24.4.
2023-09-02 15:37:08 +02:00
Eli Zaretskii
c45c2b2209 ; * src/treesit.c (treesit_recursion_limit): Fix compilation error. 2023-09-02 11:50:27 +03:00