1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00
Commit graph

50338 commits

Author SHA1 Message Date
Martin Rudalics
be60601ae8 Clarify semantics of 'frame-inhibit-implied-resize'
* src/frame.c (frame_inhibit_implied_resize):
* doc/lispref/frames.texi (Implied Frame Resizing): Clarify
semantics of 'frame-inhibit-implied-resize'.
2025-02-24 09:47:30 +01:00
Stefan Monnier
d84dbcb450 (Ftranspose_regions): Fix text-properties for len1==len2
When `len1_byte == len2_byte`, the code presumed that len1==len2
as well in its handling of text-properties.  Fix that case.
While at it, try and reduce code duplication by hoisting common
code out of `if`s, and throw away the optimization for `len_mid == 0`
which only saved 3 trivial function calls.

* src/editfns.c (Ftranspose_regions): Shuffle the code a bit.

* test/src/editfns-tests.el (editfns-tests--transpose-equal-but-not):
New test.
2025-02-23 11:46:37 -05:00
Eli Zaretskii
70b15c5174 ; Fix last change
* src/frame.c (syms_of_frame) <frame-inhibit-implied-resize>:
* doc/lispref/frames.texi (Implied Frame Resizing): Don't use
passive voice.  (Bug#76275)
2025-02-23 12:25:14 +02:00
Martin Rudalics
499da9e1a9 Optionally inhibit implied resizing while frame is made (Bug#76275)
* src/frame.c (frame_inhibit_resize): Handle new value 'force'
for 'frame-inhibit-implied-resize' (Bug#76275).
(frame_inhibit_implied_resize): New value 'force' to inhibit
implied resizing while a new frame is made.
* lisp/cus-start.el (frame-inhibit-implied-resize): Make new
value 'force' customizable.
* doc/lispref/frames.texi (Implied Frame Resizing): Describe new
value 'force' of 'frame-inhibit-implied-resize'.
* etc/NEWS: Announce new value 'force' of
'frame-inhibit-implied-resize'.
2025-02-23 11:01:20 +01:00
Gerd Möllmann
2a756ce9d7 Enforce redisplay when deleting a child frame (bug#76406)
* src/term.c (tty_free_frame_resources): When deleting a child mark its
root frame to garbaged.
* src/dispnew.c (prepare_desired_root_row): Add a check for GLYPH_DEBUG.
2025-02-23 10:38:27 +01:00
Paul Eggert
f12fbed4c1 Revert “Pacify GCC in pgtkselect malloc alignment”
Problem reported by the wurfkreuz (Bug#76414).
* src/pgtkselect.c: Revert my commit
ff65cc9944 dated Sun Jan 26 22:15:49
2025 -0800 for now.  I may come up with a better commit later.
2025-02-22 23:54:22 -07:00
Eli Zaretskii
827a91dbf3 Make 'text-property-default-nonsticky' buffer-local when set
* src/textprop.c (syms_of_textprop)
<text-property-default-nonsticky>: Make buffer-local when set.
(Bug#76445)

* etc/symbol-releases.eld: Add text-property-default-nonsticky.

* etc/NEWS:
* doc/lispref/text.texi (Sticky Properties): Document the change.
2025-02-22 18:04:04 +02:00
Stefan Kangas
702cb123fa ; Fix typos 2025-02-22 14:48:29 +01:00
Po Lu
1f2e06283c Merge from savannah/emacs-30
25ba253609 Fix reported Haiku build error in emacs-30.1-rc1
92e96a1175 ; Delete troff markers from ChangeLog files
2025-02-21 13:32:14 +08:00
Po Lu
25ba253609 Fix reported Haiku build error in emacs-30.1-rc1
* src/haiku_support.cc (keysym_from_raw_char): Don't define
duplicate cases on the previous release.
2025-02-21 13:28:55 +08:00
Mattias Engdegård
b481fbe92f * src/fns.c (Fmapconcat): Faster fast-path condition 2025-02-20 20:14:33 +01:00
Paul Eggert
241e8e5fcf ; Spelling fix in comment. 2025-02-20 09:42:33 -08:00
Po Lu
1c49cfc711 Fix set-time-zone-rule on DJGPP
* lisp/loadup.el ("tooltip"): Load even on MS-DOS.

* src/timefns.c (tzvalbuf): Don't define on MS-DOS.
(emacs_getenv_TZ, emacs_setenv_TZ) [MSDOS]: Call getenv and
putenv rather than overwrite existing environment storage to
update DJGPP's environment modification counter.
2025-02-20 19:46:50 +08:00
Po Lu
b65971b2c0 ; * src/pdumper.c (Fdump_emacs_portable): Fix typo in comment. 2025-02-20 14:27:03 +08:00
Po Lu
c22957c4bf Port to modern GCC and pdumper on MS-DOS
* config.bat (mvOk): Protoize.
(djgppOk): Include sys/version.h for _DJGPP_MINOR.

* lisp/loadup.el: If system-type is ms-dos, dump bootstrap-emacs
as b-emacs.dmp.

* msdos/INSTALL: Document new versions of tools that have been
verified successfully to compile Emacs.

* msdos/emacs.djl: New linker script that arranges to link
symbols in `.subrs' in a contiguous part of data, as the DJGPP
runtime appears to treat any non-data and non-text section as
allocatable.

* msdos/mainmake.v2 (install): Install emacs.dmp alongside
emacs.exe.

* msdos/sed1v2.inp (CFLAGS): Define to -O2 -g3.
(LDFLAGS): Provide the said linker script.
(HAVE_PDUMPER): Define to yes.
(UNEXEC_OBJ, PAXCTL_dumped, PAXCTL_notdumped): Delete.
(DUMPING): Set to pdumper.
(MAKE_PDUMPER_FINGERPRINT): Don't erase this variable.
Don't stubify or set minstack.  Remove native-comp specific
directives.  Don't remove temacs prior to copying and replace
`pdmp' extension with DOS-conformant `dmp'.

* msdos/sed2v2.inp (HAVE_UNEXEC): Remove definition.
(HAVE_PDUMPER): Define to 1.

* msdos/sed6.inp (top_srcdir): Define appropriately.

* msdos/sedlibmk.inp (HAVE_BLKCNT_T): Define to 1.

* src/emacs.c (load_pdump) [MSDOS]: Use `dmp' suffix.

* src/pdumper.c (Fdump_emacs_portable) [MSDOS]: Replace ".pdmp"
suffixes with ".dmp".
2025-02-20 14:04:59 +08:00
Stefan Kangas
92e96a1175 ; Delete troff markers from ChangeLog files 2025-02-20 02:46:43 +01:00
Gerd Möllmann
23bf94a011 Don't call x-popup-function for non-tty frames
* src/menu.c (x_popup_menu_1): Don't call x-popup-function for non-tty
frames
(syms_of_menu): Remove Qx_popup_menu_function because unused, extend doc
string of x-popup-menu-function.
2025-02-19 08:36:59 +01:00
Gerd Möllmann
1194ebe3a7 Handle nil top frame (bug#76410)
* src/frame.c (do_switch_frame): Don't assume that top_frame is always a
frame, it can be nil.
2025-02-19 08:05:56 +01:00
Stefan Monnier
d685d21e8a (lexical-binding): Allow changing the default value (bug#74145)
* lisp/loadup.el: Preserve (default-toplevel-value 'lexical-binding).

* src/lread.c (Fload, Feval_buffer): Obey (default-toplevel-value
'lexical-binding).

* doc/lispintro/emacs-lisp-intro.texi (Lexical vs Dynamic Binding
Example): Use the lexical dialect also for the dynamic
scoping example.
* doc/lispref/edebug.texi (Edebug Eval): Remove long-obsolete mention
of Edebug support for `lexical-let`.
2025-02-18 15:37:50 -05:00
Stefan Monnier
20edecd21f Merge remote-tracking branch 'refs/remotes/origin/master' 2025-02-18 10:07:34 -05:00
Gerd Möllmann
4d3a618941 ; * src/menu.c (x_popup_menu_1): Fix typo. 2025-02-18 16:05:38 +01:00
Stefan Monnier
41624d94ce (replace_range): Delete last arg, always the negation of the first bool
* src/insdel.c (replace_range): Merge last arg, with `prepare`.
Rename `prepare` to `run-mode-hooks`.
* src/lisp.h (replace_range): Adjust accordingly.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers.
2025-02-18 10:05:34 -05:00
Stefan Monnier
19f5ccbf39 src/search.c (Freplace_match): Let replace_range call the a-c-f 2025-02-18 09:54:48 -05:00
Stefan Monnier
9854103b52 * src/editfns.c (Fsubst_char_in_region): Delete left-over code
This code was missed back in 2000 (commit 1b16afa45bb6).
2025-02-18 09:52:35 -05:00
Gerd Möllmann
bf067daf0d * src/menu.c (x_popup_menu_1): Use calln. 2025-02-18 15:47:18 +01:00
Po Lu
37fad04830 * src/menu.c (x_popup_menu_1): Fix coding style. 2025-02-18 21:00:08 +08:00
Gerd Möllmann
17bf6b9efe Add x-popup-menu-function
* src/menu.c (x_popup_menu_1): If non-nil call x-popup-menu-function.
(syms_of_menu): DEFSYM x-popup-menu-function, DEFVAR_LISP it.
2025-02-18 05:13:16 +01:00
Gerd Möllmann
a51cfbbd15 Hide cursor based on tty frame's `cursor-type'
* src/dispnew.c (terminal_cursor_magic): if selected-frame has
`(cursor-type . nil)' parameter.
2025-02-18 05:05:39 +01:00
Eli Zaretskii
1136963b4e ; * src/xdisp.c (maybe_produce_line_number): Fix last change (bug#76362). 2025-02-17 18:00:30 +02:00
Gerd Möllmann
d80ac0fbaa Fix child coordinate calculation (bug#76321)
* src/dispnew.c (rect_intersect): Simplify.
(copy_child_glyphs): Compute child coordinates using child_xy.
2025-02-17 11:22:28 +01:00
Po Lu
a951dbcf16 Implement `(- N)' frame position specifications on Haiku
* src/haikuterm.c (haiku_calc_absolute_position): New function.
(haiku_set_offset): Apply offsets configured by the said
function.
2025-02-17 12:07:20 +08:00
Po Lu
6c1e6ba83c ; * src/androidterm.c (android_set_offset): Apply correct frame offsets. 2025-02-17 12:02:05 +08:00
Po Lu
718a227f0f ; Correct merge errors. 2025-02-17 11:36:41 +08:00
Po Lu
25b25fce75 Merge from savannah/emacs-30
e3dc0ea254 Fix crash in frame deletion on Android
e34ea5db5f * src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug...
48f9d6aafe * lisp/man.el (Man-shell-file-name): Ensure a Bourne shel...
7016c13e5e ; Update etc/AUTHORS (bug#76319).
0bc7b5a389 ; * admin/authors.el (authors-aliases): Add "Elías Gabrie...
e9c4f642b9 ; * doc/emacs/package.texi (Package Installation): Add om...
8c4294f370 ; Move index entries in user manual

# Conflicts:
#	src/pgtkterm.c
2025-02-17 11:36:14 +08:00
Po Lu
0a6997b58d Synchronize frame placement logic with X
* src/androidterm.c (android_calc_absolute_position): New
function.
(android_set_offset): Call android_calc_absolute_position.

* src/pgtkterm.c (pgtk_calc_absolute_position): Synchronize with
X.
2025-02-17 11:34:06 +08:00
Po Lu
e34ea5db5f * src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug#76239. 2025-02-17 10:56:45 +08:00
Eli Zaretskii
0f768b8843 Prevent buffer overflow in line-numbering code
* src/xdisp.c (maybe_produce_line_number): Limit the value of
'display-line-numbers-width' to what can be shown in the window,
and set dimension of the lnum_buf[] accordingly.  (Bug#75969)
2025-02-15 13:15:36 +02:00
Po Lu
c37e7cef42 Merge from savannah/emacs-30
58e4bfe340 Add two missing NULL checks of malloc'd values on Android
81ca9c75f1 ; * etc/PROBLEMS: Document how to grant storage permissio...
d82d468979 ; * etc/TODO: Rethink finder-known-keywords.
b9b9c33dcb Fix (Non)GNU ELPA description in manual
87a61eba1b Move 'package-archives' documentation to emacs manual
316e47c5af ; * src/fns.c (Fmapconcat): Doc fix (bug#76242).
3cfbeb3fca ; Fix >72 character long lines in docstring
c68886ddb7 ; Change "virus" to "malicious" in lispref
6701866be4 Document (Non-)GNU ELPA in emacs manual
02851768b7 ; * .mailmap: Add entry for Thuna.  (Bug#76221)
2d7a8cbf4c Fix author name
1931425748 Use c-ts-common's comment setup in go-ts-mode (bug#75978)
316893ca38 Add java-language-server to eglot-server-programs
2025-02-15 16:58:55 +08:00
Po Lu
58e4bfe340 Add two missing NULL checks of malloc'd values on Android
* src/android.c (sendDndUri, sendDndText): Verify that allocated
string memory is non-nil before writing to it.
2025-02-15 16:58:18 +08:00
Pip Cet
608113628c Avoid crashes in lread.c when invalid characters are read
* src/lread.c (readchar): Don't crash for non-fixnum return values.
(read_filtered_event): Don't crash for invalid symbol properties.
(Fread_char):
(Fread_char_exclusive):
(character_name_to_code): Check 'FIXNUMP' before using 'XFIXNUM'.
(read_char_escape): Crash on invalid Lisp-supplied data when
ENABLE_CHECKING; otherwise, signal an error.
2025-02-14 13:51:28 +00:00
Eli Zaretskii
316e47c5af ; * src/fns.c (Fmapconcat): Doc fix (bug#76242). 2025-02-13 11:03:26 +02:00
Martin Rudalics
8eef890739 Handle negative frame position values in xterm.c (Bug#76190)
* src/xterm.c (x_calc_absolute_position): Always handle negative
positions when XNegative or YNegative were set (Bug#76190).
2025-02-12 10:54:28 +01:00
Po Lu
fa4260594f X11 drag-and-drop corrections
* lisp/x-dnd.el (x-dnd-handle-drag-n-drop-event): Take cdddr of
client-message, skipping the selection information.
(x-dnd-do-direct-save): Do not erase the local copy of a remote
file if it was not in fact copied on behalf of the recipient.
(x-dnd-handle-xds-drop): Return proper action.

* src/xterm.c (x_term_init): Remove unused variable on non-GTK
builds.
2025-02-12 15:51:39 +08:00
Eli Zaretskii
326593c88d * src/bidi.c: Add comments to uses of INT_PROMOTE (bug#75964). 2025-02-11 15:42:26 +02:00
Stefan Kangas
2a405cb897 Minor simplification in Fdescribe_buffer_bindings
* src/keymap.c (Fdescribe_buffer_bindings): Minor simplification.
2025-02-11 02:05:07 +01:00
Paul Eggert
467a88394f Pacify gcc -Wswitch-enum in bidi.c
* src/bidi.c (bidi_get_type, bidi_resolve_explicit)
(bidi_find_bracket_pairs, bidi_resolve_brackets)
(bidi_resolve_neutral): Use ‘switch (INT_PROMOTE (E))’
to indicate that it’s intended that we not enumerate all the enum
values.
2025-02-10 15:22:30 -08:00
Stefan Kangas
8a669b6be5 Set process-adaptive-read-buffering to nil by default
* src/process.c (syms_of_process) <process-adaptive-read-buffering>:
Set the default to nil.  (Bug#75574)
2025-02-10 21:55:11 +01:00
Martin Rudalics
4d1ceac9f9 Fix handling of visibility on tty frames (Bug#76031)
* src/frame.h (FRAME_REDISPLAY_P): Remove.  Use the new function
frame_redisplay_p instead.  Extern frame_redisplay_p.
* src/frame.c (frame_redisplay_p): New function to replace
FRAME_REDISPLAY_P macro.
(make_terminal_frame): Don't tinker with frame visibility and
don't make the new frame the terminal's top frame.
(do_switch_frame): Make sure frame switched to and any of its
ancestors are visible.  Don't reset the visibility of other
frames.
(other_frames): Do not assume tty frames are by default visible.
(Fmake_frame_invisible): When making the selected tty frame
invisible, explicitly select the next visible frame.
* src/dispnew.c (Fredraw_display): Use frame_redisplay_p instead
of FRAME_REDISPLAY_P.
* src/xdisp.c (clear_garbaged_frames, echo_area_display)
(prepare_menu_bars, redisplay_internal, display_and_set_cursor)
(gui_clear_cursor): Use frame_redisplay_p instead of
FRAME_REDISPLAY_P.
* src/keyboard.c (tty_read_avail_input): When storing an event
and the selected frame is a child frame whose root is its
terminal's top frame, set the frame_or_window slot to the child
frame since otherwise the next switch frame event will select
the top frame instead.
2025-02-10 10:36:38 +01:00
Po Lu
6e8bb75784 Fix compilation on Haiku Nightly hrev58622
* configure.ac (BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER):
Define if BObjectList ownership over its contents is specified
as a template parameter.

* src/haiku_support.cc (class EmacsFontSelectionDialog)
[BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER]: Adjust
accordingly.
2025-02-10 12:04:27 +08:00
Eli Zaretskii
3cd9f62687 Merge from origin/emacs-30
ed9dd4705c ; * admin/authors.el (authors-aliases): Add aliases.
223ee56aae ; Avoid passive tense in Emacs manual
be4cf26c16 Fix gnus-score-find-score-files-function :type
143f1096da Improve documentation of 'file-name-concat'
2025-02-08 07:36:34 -05:00