1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-03 22:20:52 -08:00
Commit graph

44289 commits

Author SHA1 Message Date
Robert Pluim
04bdcf4aaa * src/terminal.c (Fframe_terminal): Use active voice 2022-07-22 14:19:04 +02:00
Robert Pluim
7fa491a9e9 Improve 'terminal-live-p' docstring some more
* terminal.c (Fterminal_live_p): Improve description of arguments and
return value.
2022-07-22 14:10:10 +02:00
Robert Pluim
b9ac8c29ae Improve terminal-live-p docstring
* src/terminal.c (Fterminal_live_p): Explain what happens when the
argument is nil.
2022-07-22 10:14:45 +02:00
Gerd Moellmann
f02944f5a1 Prevent GC of window referenced from EmacsScroller
* src/nsterm.m (EmacsScroller.mark, mark_nsterm): New functions.
* src/nsterm.h (EmacsScroller.mark, mark_nsterm): Declare.
* src/alloc.c (garbage_collect) [MAVE_NS]: Call mark_nsterm.
(Bug#56095)

(cherry picked from commit 5f1bd87247)
2022-07-19 16:04:13 +03:00
Eli Zaretskii
8f9993bb3f ; * src/buffer.c (syms_of_buffer) <mode-line-format>: Doc fix. 2022-07-18 15:31:26 +03:00
Stefan Kangas
ba0871bef1 ; Fix typos: prefer American spelling 2022-07-13 13:04:22 +02:00
Stefan Kangas
3442de2edd Doc fix; don't mention obsolete variable
* src/window.c (Fset_window_hscroll): Doc fix; don't mention obsolete
variable.
2022-07-08 21:16:00 +02:00
Brennan Vincent
7e33618bbc ; * src/fns.c (Frequire): Fix a typo in the doc string. (Bug#56328)
Copyright-paperwork-exempt: yes
2022-07-01 08:32:13 +03:00
Eli Zaretskii
2eb738f2b8 Support builds configured with a separate --bindir
* src/emacs.c (load_pdump): Don't overwrite the leading
directories of the Emacs executable just because the pdumper file
was not found in the expected directory relative to the binary.
This is needed to support builds with a separate --bindir
configure-time option and native-compilation.  (Bug#55741)
2022-06-20 19:04:06 +03:00
Robert Pluim
4d7a936ac2 ; * src/fileio.c (Fset_file_modes): Improve previous change 2022-06-15 15:16:47 +02:00
Robert Pluim
32cff740e2 Describe 'set-file-modes' argument prompting
* src/fileio.c (Fset_file_modes): Document that FILENAME is prompted
for.  (Bug#55984)
2022-06-15 14:27:28 +02:00
Jeff Walsh
8436e0bee9 Update error message to reflect variable rename
* src/comp.c (Fcomp_el_to_eln_filename): Update error message.  (Bug#55861)
2022-06-09 09:31:01 +03:00
Eli Zaretskii
ef5651cc77 Fix segfaults when starting on 80x26 TTY frames
* src/dispnew.c (adjust_frame_glyphs_for_frame_redisplay): Make
sure we have valid frame glyph matrices for the interactive
session.  (Bug#55760)
(adjust_frame_glyphs): Add assertions for when we fail to allocate
valid frame glyph matrices for a TTY frame.
2022-06-02 13:41:59 +03:00
Alan Mackenzie
f9ee83bfb9 do_switch_frame: before leaving mini-window, check other (mru) window is live
This fixes bug#55684.  There, with a minibuffer-only frame at start up,
Emacs tried to switch to this frame, whose selected window was the
mini-window.  There is no other active window in this frame, so the
attempt to swith to another window failed.

* src/frame.c (do_switch_frame): On switching to a frame whose selected
window is as above, before selecting the most recently used window, check
this ostensible window is an actual live window.  Otherwise leave the
mini-window selected.
2022-05-28 12:55:32 +00:00
Alan Mackenzie
dfa3e6f424 Restore the Fselect_window call in gui_consider_frame_title.
This fixes bug #55412.  The call to Fselect_window was removed on 2021-03-21
in the commit "Prevent open minibuffers getting lost when their frame gets
deleted".  This call is actually needed to determine current elements of the
pertinent window and frame when these are used in the frame title.

* src/frame.c (do_switch_frame): When the selected window in the target frame
is the mini-window, switch away from this window unless there is a valid
minibuffer there.

* src/frame.h (struct frame): Add an incidental comment about the element
selected_window.

* src/minibuf.c (move_minibuffers_onto_frame): No longer set the selected
window of the source frame.  This action is now performed later, on returning
to that frame, in do_switch_frame when needed (see above).

* src/xdisp.c (gui_consider_frame_title): Replace the Fselect_window call and
associated ancillary settings.
2022-05-20 20:18:38 +00:00
Stefan Kangas
5dbaddc729 ; Fix some typos 2022-05-15 11:05:36 +02:00
Lars Ingebrigtsen
936009cfe5 Be more resilient towards errors during error handling
* src/print.c (print_error_message): Avoid infinite recursion if
`substitute-command-keys' bugs out (bug#55269).

(cherry picked from commit 8364f058b8)
2022-05-05 20:05:28 +03:00
Eli Zaretskii
69c56cbe6e ; * src/w32notify.c: Fix a typo in a comment. 2022-05-05 10:38:40 +03:00
Eli Zaretskii
3b9e60ba2f ; * src/window.c (Fset_window_start): Mention the effect on vscroll. 2022-05-05 08:57:49 +03:00
Eli Zaretskii
3b6338c8c3 Improve documentation of font- and face-related attribute functions
* lisp/faces.el (face-attribute):
* src/xfaces.c (Fx_family_fonts):
* src/font.c (Ffont_get, Ffont_put): Improve and clarify the doc
strings.

* doc/lispref/display.texi (Low-Level Font): Document the :type
attribute of a font.  Improve documentation of 'font-get' and
'font-put'.
(Attribute Functions): Add cross-reference to the description of
face attributes.
2022-04-28 17:53:36 +03:00
Eli Zaretskii
1e9b9f403a Improve documentation of 'set-fontset-font'
* doc/lispref/display.texi (Fontsets):
* src/fontset.c (Fset_fontset_font): Improve and clarify the
documentation of 'set-fontset-font'.  Rename the arguments to be
more self-explanatory.  (Bug#55086)
2022-04-24 09:56:22 +03:00
Eli Zaretskii
d5728f129f Another fix for non-ASCII 'overlay-arrow-string'
* src/xdisp.c (get_overlay_arrow_glyph_row): Fix yet another place
that assumed each character is a single byte.
2022-04-22 09:05:57 +03:00
Eli Zaretskii
bf771e31bc ; * src/xdisp.c (get_overlay_arrow_glyph_row): Better var name. 2022-04-21 23:25:49 +03:00
Eli Zaretskii
5fe7e4d1ae Avoid a redisplay loop when 'overlay-arrow-string' is non-ASCII
* src/xdisp.c (get_overlay_arrow_glyph_row): Don't assume every
character in 'overlay-arrow-string' is one byte long.  Reported by
Yuri D'Elia <wavexx@thregr.org>.
2022-04-21 23:18:42 +03:00
Eli Zaretskii
c2f94f32b5 Revert "Don’t assume openat"
This reverts commit 3cccf0a910.

This is a change with far-reaching effects on MS-Windows at the least,
where file-related APIs are shadowed to support transparent support
for UTF-8 encoded file names.  Making such changes on a stable branch
for the benefit of a proprietary platform with a 13-year old OS is a
tail wagging the dog.  Please don't do that without discussing first.
2022-04-17 22:03:52 +03:00
Paul Eggert
3cccf0a910 Don’t assume openat
Use openat only on platforms with O_PATH.
This ports to OS X 10.9 and earlier.
Problem reported by Keith David Bershatsky in:
https://lists.gnu.org/r/emacs-devel/2022-04/msg00805.html
* lib-src/emacsclient.c (local_sockname): Use open, not openat.
* src/sysdep.c (sys_openat): New static function,
which uses openat only if O_PATH is defined.
(emacs_openat): Use it instead of openat.
(emacs_openat_noquit): Remove.
(emacs_open_noquit): Reimplement as per the old emacs_openat_noquit,
but use plain 'open'.
2022-04-17 10:43:13 -07:00
Paul Eggert
4641bc1c55 Fix GC bug in filelock.c
Fix a bug where if GC occurred at the wrong moment when locking a
file, the lock file’s name was trashed so file locking did not work.
This bug was introduced in Emacs 28.1.  The bug sometimes caused
filelock-tests-detect-external-change test failures on Fedora 35
x86-64 in an en_US.utf8 locale.
* src/filelock.c (lock_file_1, current_lock_owner, lock_if_free)
(lock_file, unlock_file, Ffile_locked_p):
Use Lisp_Object, not char *, for string, so that GC doesn’t trash
string contents.
(make_lock_file_name): Return the encoded name, not the original.
All callers changed.
2022-04-17 01:08:21 -07:00
Mattias Engdegård
dc3d1628ec ; * src/sysdep.c: Fix mistake in previous commit 2022-04-16 12:16:45 +02:00
Mattias Engdegård
855e15dbf1 Fix builds on older versions of macOS
This adds back macOS-specific code replaced earlier (bug#48548),
specifically to fix build errors on macOS 10.7.5.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2022-04/msg00779.html .

* src/sysdep.c (HAVE_RUSAGE_INFO_CURRENT, HAVE_PROC_PIDINFO): New.
(system_process_attributes): Use alternative code or exclude features
when building on older macOS versions.
2022-04-16 11:33:14 +02:00
Eli Zaretskii
803ac857ee Fix cursor motion under truncate-lines with Flymake fringe indicator
* src/indent.c (Fvertical_motion): Don't consider fringe bitmaps
as "images" for the purpose of vertical-motion logic dealing with
overshooting buffer positions.  (Bug#54946)
2022-04-15 12:03:36 +03:00
Eli Zaretskii
78e1640ad5 Fix 'window-text-pixel-width' when starting from display property
* src/xdisp.c (Fwindow_text_pixel_size): Handle the case where
there's a display property at START, and move_it_to overshoots.
Do not merge to master.  (Bug#54862)
2022-04-12 17:05:15 +03:00
Eli Zaretskii
e8d2f40f41 Clean up the MSDOS port
* src/msdos.h (tcdrain): Redirect to '_dos_commit'.
(openat, fchmodat, futimens, utimensat): Add prototypes.

* msdos/sed1v2.inp (MAKE_PDUMPER_FINGERPRINT): Fix indentation, so
that Make won't consider this line a command.
($(etc)/DOC): Chdir back to ../src, since "make-docfile -d" leaves
us in a wrong directory.
* msdos/sedlibmk.inp (GL_GNULIB_GETRANDOM, GL_GNULIB_MEMMEM)
(GL_GNULIB_SIGDESCR_NP): Define to 1, to get the prototypes from
Gnulib headers.
2022-04-10 15:44:11 +03:00
Eli Zaretskii
9dd44505b1 ; * src/window.c (Fset_window_start): Clarify the effect of NOFORCE. 2022-04-09 12:17:49 +03:00
Jürgen Hötzel
98abf01fd6 Use correct signal oldset in posix_spawn implementation
posix_spawn was restoring the wrong signal set, which still had
SIGCHLD and SIGINT masked, causing problems with child processes that
spawned child processes.  (Bug#54667)

See the thread ending at
https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00067.html
for more details.

* src/callproc.c (emacs_spawn): Pass oldset parameter.
(emacs_posix_spawn_init_attributes): Use correct oldset.
(emacs_posix_spawn_init): Remove intermediate function.

(cherry picked from commit 8103b060d8)
2022-04-07 12:54:26 +02:00
Lars Ingebrigtsen
c69a617742 Add notes about command modes and nativecomp interaction
* doc/lispref/commands.texi (Command Modes): Note interaction with
native-compile (bug#54437).

* src/data.c: Add comment about not being supported.

Do not merge to master.
2022-03-21 15:53:25 +01:00
Eli Zaretskii
e059d7c156 Fix region highlight in non-selected windows
* src/xdisp.c (prepare_menu_bars): Include in the windows passed
to pre-redisplay-functions windows whose point was moved from the
last recorded position.  (Bug#54450)
2022-03-19 09:19:53 +02:00
Eli Zaretskii
a9920473f6 Improve documentation of 'map-charset-chars'
* doc/lispref/nonascii.texi (Character Sets):
* src/charset.c (Fmap_charset_chars): Clarify the codepoint issue
in using 'map-charset-chars'.
2022-03-10 09:29:29 +02:00
Eli Zaretskii
d184773c2e Avoid assertion violations in 'bidi_resolve_brackets'
* src/bidi.c (bidi_resolve_brackets): Move assertion to where it
really matters.  (Bug#54295)
2022-03-08 15:35:39 +02:00
Eli Zaretskii
29ff903bb0 Avoid crashes when fringe bitmaps are defined in daemon mode
* src/dispextern.h (gui_define_fringe_bitmap): Add prototype.
(max_used_fringe_bitmap): Add declaration.
* src/fringe.c (gui_define_fringe_bitmap): New function.
* src/w32term.c (w32_draw_fringe_bitmap):
* src/xterm.c (x_draw_fringe_bitmap) [USE_CAIRO]: Call
'gui_define_fringe_bitmap' if the terminal-specific bitmap data is
not available when a fringe bitmap is about to be drawn.  Don't
try to draw a bitmap that is not known to fringe.c.  (Bug#54183)
2022-03-03 20:31:33 +02:00
Eli Zaretskii
92e2d19fe7 One more fix of the BPA implementation
* src/bidi.c (bidi_find_bracket_pairs): Disable BPA optimization
when there are no strong directional characters inside the
bracketed pair.  (Bug#54219)
2022-03-03 15:53:04 +02:00
Eli Zaretskii
cd51d9c7ab Fix handling of brackets in BPA
* src/bidi.c (bidi_resolve_brackets): Fix implementation of UBA's
N0 rule when there are no strong directional characters inside the
bracketed pair.  (Bug#54219)
2022-03-03 14:46:20 +02:00
Eli Zaretskii
666e40a109 Fix 'display-line-numbers-mode' in hide-show buffers
* src/xdisp.c (redisplay_internal): Disable redisplay
optimizations that consider just the current line, when
'display-line-numbers-mode' is turned on in the buffer.
(Bug#54091)
2022-02-21 22:12:57 +02:00
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