1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00
Commit graph

44247 commits

Author SHA1 Message Date
Po Lu
b30ef09919 Prevent crashes caused by invalid locale coding systems
* src/xterm.c (handle_one_xevent): Prevent a signal inside
`setup_coding_system' which crashes recent versions of GLib if
the locale coding system is invalid.

Do not merge to master.
2022-02-17 15:35:41 +08:00
Eli Zaretskii
31ef751f94 Clarify documentation of a "face's font"
* doc/lispref/display.texi (Attribute Functions)
(Face Attributes): Clarify that the :font attribute of a face and
the font returned by 'face-font' are by default for ASCII
characters.  (Bug#53664)
2022-01-31 19:29:54 +02:00
Alan Mackenzie
29bdedf12f Bind Qdebugger to Qdebug in signal_or_quit.
* src/eval.c (signal_or_quit): Bind the correct variable, Qdebugger (not
Vdebugger) to Qdebug in the section for errors in batch jobs.
(syms_of_eval): New DEFSYM for Qdebugger.
2022-01-31 17:20:45 +00:00
Alan Third
611736f3bc Remove debug logging
* src/nsterm.m ([EmacsView copyRect:to:]): Remove logging as it's no
longer required.
2022-01-29 12:15:39 +00:00
Michael Albinus
ddba3c3dba Fix error in filelock.c
* src/filelock.c (lock_file): Move call of file name handler to
`Flock_file'.  Determine lock_filename only in case
create_lockfiles is non-nil.  Adapt the rest of the function accordingly.
(Flock_file): Do not check for create_lockfiles.  Call file name
handler if appropriate.  (Bug#53207)
2022-01-29 11:45:38 +01:00
Eli Zaretskii
6075ea0b79 Fix 'make_lispy_position' when there's an image at EOB
* src/xdisp.c (move_it_to): Don't compare IT_CHARPOS with an
invalid TO_CHARPOS.  (Bug#53546)
2022-01-26 16:44:14 +02:00
Eli Zaretskii
7eca80b204 ; * src/composite.c (syms_of_composite) <auto-composition-mode>: Doc fix. 2022-01-25 14:15:36 +02:00
Martin Rudalics
ef0c1d4c2c Add workaround to handle a problem with Enlightenment WM (Bug#53298)
* src/xterm.c (handle_one_xevent): Handle setting of variable
'x_set_frame_visibility_more_laxly' when receiving an Expose or
FocusIn event (Bug#53298).
(Qexpose): Define symbol.
(x_set_frame_visibility_more_laxly): New Lisp variable.
* etc/PROBLEMS: Mention frame redraw problem with the
Enlightenment WM and 'x-set-frame-visibility-more-laxly'
workaround.
2022-01-20 10:30:08 +01:00
Eli Zaretskii
c05864dd25 Avoid another segfault in 'face_at_buffer_position'
* src/xfaces.c (face_at_buffer_position): Make really sure the
default face is usable.  (Bug#53254)
2022-01-14 16:11:34 +02:00
Eli Zaretskii
362ceb75a9 ; * src/fns.c (Frequire): Fix wording of doc string. 2022-01-09 19:02:17 +02:00
Eli Zaretskii
6e53178a37 Avoid inflooping when 'tab-bar-format' includes embedded newlines
* src/xdisp.c (tab_bar_height, redisplay_tab_bar): Support
'tab-bar-format' with embedded newlines.  (Bug#52947)
2022-01-02 21:36:13 +02:00
Eli Zaretskii
b477cff35d Clarify %g and %G time format specs
* src/timefns.c (Fformat_time_string):
* doc/lispref/os.texi (Time Parsing): Clarify %g/%G.  (Bug#52934)
2022-01-02 09:30:15 +02:00
Zhehao Lin
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
Copyright-paperwork-exempt: yes
2022-01-01 11:57:42 +02:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Eli Zaretskii
67400da412 Improve doc strings of fringe indicator variables
* src/buffer.c (syms_of_buffer): Fix doc strings of
'indicate-empty-lines' and 'indicate-buffer-boundaries'.
2021-12-31 21:58:42 +02:00
Eli Zaretskii
89f205084b Avoid assertion violations with variable-weight fonts
* src/font.c (font_score, font_delete_unmatched): Don't assume
weight, slant, and width properties of the font must be fixnums:
some variable-weight fonts violate that assumption.  Reported
by Sean Whitton <spwhitton@spwhitton.name>.  Do not merge to
master.  (Bug#52888)
2021-12-30 20:28:58 +02:00
Eli Zaretskii
5fccd1e371 Explain why we remove stuff from 'user-full-name'
* src/editfns.c (Fuser_full_name): Document why we chop everything
starting from the first comma.  (Bug#52785)
2021-12-25 09:38:39 +02:00
YAMAMOTO Mitsuharu
7078f32b5b Fix crash when dumping charset_table with portable dumper (Bug#52461)
* src/charset.h:
* src/charset.c (charset_table_used): Now extern.
* src/pdumper.c (dump_charset): Don't dump code_space_mask for unused
slots of charset_table.
2021-12-15 13:12:02 +09:00
Philipp Stephani
f88c1d222f Remove maintainer comment from Emacs 28 module snippet.
This is the same as 44c13eefe8 on
master.  We should also remove this comment on the release branch,
otherwise it ends up in the emacs-module.h shipped to users.

* src/module-env-28.h: Remove maintainer comment.
2021-12-14 11:17:37 +01:00
Eli Zaretskii
cea8deea72 ; * src/xdisp.c (move_it_vertically_backward): Clarify commentary. 2021-12-13 21:02:38 +02:00
Philipp Stephani
8a0734329a Avoid undefined behavior in 'send-process-region' (Bug#52369).
* src/process.c (send_process): Signal an error if the file descriptor
has already been closed.
2021-12-11 19:03:00 +01:00
Po Lu
a374849926 Fix the DJGPP port
* config.bat:
* msdos/sed1v2.inp:
* msdos/sed2v2.inp:
* msdos/sed3v2.inp:
* msdos/sedlibmk.inp: Update for Emacs 28.
* msdos/langinfo.h: New file.

* lisp/loadup.el: Use correct path to temacs when dumping on
MS-DOS.
* src/callproc.c (environ) [MSDOS]: New declaration.
(child_setup, emacs_spawn): Update MS-DOS parts for Emacs 28.
* src/fileio.c (Fcopy_file): Don't use copy_file_range on
MS-DOS.
* src/msdos.c (initialize_msdos_display): Add
`defined_color_hook'.
(openat, fchmodat, futimens, utimensat): New functions.

* src/msdos.h (FRAME_X_DISPLAY): New macro.
* src/process.c: Make some more things conditional on
subprocess support.
(PIPECONN_P, PIPECONN1_P) [!subprocesses]: New placeholder
macros.
(Fnum_processors): Return 1 on MSDOS.
(open_channel_for_module): Avoid subprocess specific code
on MSDOS.
2021-12-11 19:49:40 +08:00
Eli Zaretskii
35a96139df Clarify a comment in xdisp.c
* src/xdisp.c (compute_window_start_on_continuation_line): Clarify
a comment.  (Bug#52378)
2021-12-09 09:18:04 +02:00
Eli Zaretskii
00236cc802 Fix the enumeration values returned by 'try_scrolling'
* src/xdisp.c (try_scrolling): Make the enum values match the
commentary.  Reported by Po Lu <luangruo@yahoo.com>.
2021-12-04 10:19:56 +02:00
Stefan Kangas
bef17bca21 * src/dosfns.c (Fint86): Doc fix; don't use obsolete names. 2021-12-04 01:00:11 +01:00
Philipp Stephani
5d6f828799 Unbreak build after 9c222b9c1a.
* src/pdumper.c (dump_subr): Fix Lisp_Subr hash value.
2021-12-03 09:40:15 +01:00
Paul Eggert
9c222b9c1a Port to C compilers that lack size-0 arrays
The C standard does not allow size-zero arrays, so redo struct
Lisp_Subr to not use size-zero arrays when native compilation is
not being used.  Formerly, the code was using size-zero arrays (a
GNU C extension) to avoid using memory unnecessarily when
HAVE_NATIVE_COMP is not defined.  Replace this hack with the
more-traditional hack of putting the relevant members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/alloc.c (cleanup_vector, mark_object):
* src/comp.c (make_subr):
* src/data.c (Fsubr_native_lambda_list, Fsubr_native_comp_unit):
* src/eval.c (init_eval_once, funcall_lambda):
* src/lisp.h (SUBR_NATIVE_COMPILEDP, SUBR_NATIVE_COMPILED_DYNP)
(SUBR_TYPE):
* src/lread.c (Fload):
Conditionally compile with ‘#ifdef HAVE_NATIVE_COMP’ instead of
with ‘if (NATIVE_COMP_FLAG)’.  Redo members like native_comp_u[0]
to be plain native_comp_u.  Put all uses of these members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/lisp.h (struct Lisp_Subr): Members native_comp_u,
native_c_name, lambda_list, type are now all ifdeffed out if
HAVE_NATIVE_COMP is not defined, instead of being size-zero
arrays.  All uses changed.
* src/pdumper.c (dump_subr, dump_cold_native_subr)
(dump_do_dump_relocation):
* src/comp.h (NATIVE_COMP_FLAG): Remove; no longer needed.
2021-12-02 19:03:14 -08:00
Paul Eggert
e0ee1d003a Work around IBM XL C compiler bug
* src/fileio.c (Fcopy_file): Work around a compiler bug in IBM XL
C for AIX, V12.1 (5765-J02, 5725-C72).  Without this patch, the
compiler incorrectly complains “Initialization between types "int"
and "struct timespec" is not allowed” and “Initialization between
types "long" and "struct timespec" is not allowed”.
2021-12-02 18:20:05 -08:00
Eli Zaretskii
9e16c6a96d ; * src/comp.c (syms_of_comp) <comp-no-native-file-h>: Doc fix. 2021-11-30 20:23:47 +02:00
Juri Linkov
9aa8fd6e62 * src/callint.c (Fcall_interactively): Fix inhibit_mouse_event_check.
Don't search for the next mouse event with parameters
when inhibit-mouse-event-check is non-nil (bug#50067).
2021-11-30 20:12:06 +02:00
Andreas Schwab
de9d27f679 Avoid undefined behaviour when copying part of structure
* src/dispnew.c (copy_row_except_pointers): Don't use address of
subobject as starting point.

(cherry picked from commit 6943786b5c)
2021-11-29 14:45:40 +02:00
Karl Fogel
bca57086be ; Remove an obsolete comment
* src/editfns.c (Ftranspose_regions): Remove an obsolete comment about
  memmove, following up to commit 72af86bd8c of 8 Jul 2010 by Andreas
  Schwab and commit 354f9f0fc6 of 23 Feb 2016 by Fredrik Bergroth,
  both of which added calls to memmove.
2021-11-28 13:34:57 -06:00
Eli Zaretskii
455b64c336 * src/coding.c (Fdecode_coding_region, Fencode_coding_region): Doc fix. 2021-11-28 20:18:16 +02:00
Eli Zaretskii
cfaf681d3d ; * src/emacs.c (main): Add commentary about command-line processing. 2021-11-25 22:31:47 +02:00
Eli Zaretskii
a22c9a34bd Fix 'posn-at-point' near some overlays
* src/xdisp.c (pos_visible_p): Fix 'posn-at-point' for positions
just after a display property that draws a fringe bitmap.
(Bug#52097)
2021-11-25 15:06:08 +02:00
Eli Zaretskii
b4fb381d8d ; * src/xdisp.c (produce_stretch_glyph): Avoid compilation warning. 2021-11-23 14:37:53 +02:00
Eli Zaretskii
d791cd556d Fix '(space :relative-width N)' display spec w/non-ASCII chars
* src/xdisp.c (produce_stretch_glyph): Use the correct face for
non-ASCII characters.  Support :relative-width display spec on
Lisp strings, not just on buffer text.
2021-11-22 20:00:48 +02:00
Eli Zaretskii
e3d5337970 Fix mouse handling with several TTY frames on MS-Windows
* src/w32inevt.c (do_mouse_event): Reset the 'mouse_moved' flag of
the selected frame.  Without that, this flag might remain set on a
TTY frame that is not displayed.
2021-11-20 20:08:06 +02:00
Eli Zaretskii
7e437af413 Fix temacs invocation from outside of the 'src' directory
* src/emacs.c (main) [HAVE_NATIVE_COMP]: Recompute the value of
native-comp-eln-load-path if about to load loadup in uninitialized
Emacs.  (Bug#51999)
2021-11-20 18:17:59 +02:00
martin rudalics
c22c988b1f Fix mouse events on tab bar or tool bar when 'track-mouse' is t
* lisp/mouse.el (mouse-drag-track):
* lisp/mouse-drag.el (mouse-drag-drag): Set 'track-mouse' to some
value neither t nor nil.
* src/keyboard.c (make_lispy_position): If track_mouse is Qt,
report event on tool or tab bar (Bug#51794).
2021-11-20 12:05:36 +02:00
Eli Zaretskii
7404f4b4e0 Improve doc string of 'highlight-nonselected-windows'
* src/xdisp.c (syms_of_xdisp) <highlight-nonselected-windows>:
Clarify the doc string.  (Bug#51927)
2021-11-18 08:46:17 +02:00
Eli Zaretskii
5044151486 Avoid segfaults due to freed face cache
* src/xfaces.c (face_at_buffer_position): Make sure DEFAULT_FACE
is usable.  (Bug#51864)
2021-11-15 15:35:31 +02:00
Eli Zaretskii
289f3a9e5f Add more files to be natively-compiled AOT
* src/Makefile.in (elnlisp): Add emacs-lisp/gv.eln and other
missing dependencies of comp.el.
2021-11-14 14:46:27 +02:00
Eli Zaretskii
480241983e Fix compilation on MS-Windows
* src/callproc.c (emacs_spawn) <fork_done>: Define the label only
if USABLE_POSIX_SPAWN is defined, to avoid a compiler warning.

(cherry picked from commit a8fc080851)
2021-11-13 16:46:31 +01:00
Philipp Stephani
cc4edea872 Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux.  Use
it if we don't need to configure a pseudoterminal.

Backported from commit a60053f836.
Unlike that commit, only define USABLE_POSIX_SPAWN on macOS, because
there posix_spawn is much faster than vfork.

Don't merge to master.

* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.

(cherry picked from commit a60053f836)
2021-11-13 16:45:19 +01:00
Eli Zaretskii
a56dd60d2f Improve style and comments in font-related sources
* src/w32font.c (fill_in_logfont): Stylistic changes.
* src/font.h (font_property_index, font_select_entity):
Add/improve comments.
2021-11-13 16:37:39 +02:00
Stefan Kangas
42d4e24ff3 ; Fix typos 2021-11-12 13:59:58 +01:00
Eli Zaretskii
0d0125daae Improve documentation of 'decode-coding-region'
* src/coding.c (Fdecode_coding_region): Doc fix.

* doc/lispref/nonascii.texi (Coding System Basics)
(Explicit Encoding): Explain the significance of using 'undecided'
in 'decode-coding-*' functions.
2021-11-12 10:53:52 +02:00
Eli Zaretskii
24b86cb4f7 Fix ACL errors with WebDAV volumes on MS-Windows
* src/w32.c (acl_get_file): Handle ERROR_INVALID_FUNCTION from
WebDAV.  Patch from Ioannis Kappas <ioannis.kappas@gmail.com>.
(Bug#51773)
2021-11-11 21:41:10 +02:00
Stefan Kangas
2782bc113e Revert "Fix localized display of date and time in the NS port"
This reverts commit 5e05be566b.

This was discussed in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51321#93
2021-11-09 08:49:34 +01:00