1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 22:40:46 -08:00
Commit graph

44067 commits

Author SHA1 Message Date
Andreas Schwab
6767e55659 Implement proper type conversion in native compiler
* src/comp.c (enum cast_kind_of_type): Remove.
(comp_t): Add cast_ptr_to_int, cast_int_to_ptr, remove
cast_type_sizes, cast_type_kind, cast_type_names, cast_union_fields,
cast_union_field_biggest_type.
(emit_coerce): Remove check for type size.
(struct cast_type): Remove bytes_size.
(define_type_punning): New function.
(define_cast_from_to): Implement proper type conversion.
(define_cast_functions): Adjust.  (bug#50230)
2021-08-30 19:00:46 +02:00
Eli Zaretskii
a2a0b70c8b ; * src/xfaces.c (gui_supports_face_attributes_p): Fix typo in comment. 2021-08-29 18:03:28 +03:00
Alan Third
b0fe06e656 Disable the NS app when no frames are left (bug#14619, bug#21357, bug#23586)
* src/nsfns.m (Fx_create_frame): Enable the app.
* src/nsterm.m (ns_delete_terminal): Disable the app.
2021-08-29 10:22:15 +01:00
Lars Ingebrigtsen
64b4c85637 Fix up deleting auto-save/killing buffer wrt. `auto-save-visited-mode'
* src/buffer.c (Fkill_buffer): Respect `auto-save-visited-mode'.
2021-08-25 11:58:27 +02:00
Lars Ingebrigtsen
de64510973 Further checks for kill-buffer-delete-auto-save-files
* src/buffer.c (Fkill_buffer): Check that the auto-save file
exists before asking whether to delete it.
2021-08-25 11:49:52 +02:00
Eli Zaretskii
8f43180f0d Improve documentation of 'inhibit-mouse-event-check'
* etc/NEWS:
* src/callint.c (syms_of_callint): Fix wording of the
documentation of 'inhibit-mouse-event-check'.
2021-08-23 22:14:03 +03:00
Juri Linkov
976594d905 * lisp/mouse.el (context-menu-open): New command bound to [S-f10].
* doc/emacs/frames.texi (Menu Mouse Clicks): Mention S-F10
to pop up the context menu.

* src/callint.c (Fcall_interactively):
Use inhibit_mouse_event_check for the case 'e'.
(inhibit-mouse-event-check): New variable.

https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00733.html
2021-08-23 20:42:16 +03:00
Eli Zaretskii
efddcc9fbe Improve recently-changed docs
* src/frame.c (Fnext_frame):
* doc/lispref/frames.texi (Finding All Frames): Improve wording
and style of the 'next-frame's documentation.
2021-08-23 19:11:49 +03:00
Lars Ingebrigtsen
4167d4b4b2 Clarify the documentation of `next-frame'
* doc/lispref/frames.texi (Finding All Frames): Clarify what it
means to "consider".
* src/frame.c (Fnext_frame): Rewrite doc string to say what the
parameters actually mean (bug#13339).
2021-08-23 16:32:33 +02:00
Lars Ingebrigtsen
591b8bd87a Add new variable 'kill-buffer/delete-auto-save-files'
* doc/emacs/files.texi (Auto Save Files): Document it.
* lisp/cus-start.el (standard): Add customize form.

* lisp/files.el (delete-auto-save-files): Move definition to C
(since it's used in the C layer).

* src/buffer.c (Fkill_buffer): Use the new variable (and remove
the old code that apparently didn't trigger for
kill-buffer/delete-auto-save-files.
(syms_of_buffer): Add new variable
kill-buffer-delete-auto-save-files and move definition of
delete-auto-save-files here (bug#21612).
2021-08-23 15:56:54 +02:00
Lars Ingebrigtsen
8c62871829 Clarify :stderr in the make-process doc string
* src/process.c (Fmake_process): Elaborate upon what :stderr does
(bug#50166).
2021-08-23 03:53:41 +02:00
Basil L. Contovounesios
ff2124d297 Fix recent parse-partial-sexp argument validation
* src/syntax.c (parse-partial-sexp): Also handle markers as
arguments (bug#49944).  Tweak error message to follow conventions in
"(elisp) Signaling Errors".
2021-08-22 23:52:23 +01:00
Andrea Corallo
6c007668b3 Set a unique ID for eln files on macOS (bug#45934)
* src/comp.c (Fcomp__compile_ctxt_to_file): Set gcc's -install_name
parameter to the real filename.
2021-08-22 22:15:29 +01:00
Masahiro Nakamura
48d4969453 Set label for NSToolbarItem (bug#50159)
* src/nsmenu.m (update_frame_tool_bar): Get label text and pass it to ...
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
... this that sets label for NSToolbarItem.
* src/nsterm.h
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
Add labelText argument.
2021-08-22 20:58:26 +01:00
Mattias Engdegård
7f5f99f2a0 Make Qhide declaration non-target-specific
* src/xfns.c (syms_of_xfns): Move DEFSYM from here...
* src/menu.c (syms_of_menu): ... to here.
This fixes the NS build after dd7d966eb4.
2021-08-22 10:59:17 +02:00
Juri Linkov
dd7d966eb4 Don't show menu titles with the text property 'hide' (bug#50067)
* lisp/mouse.el (context-menu-map): Add menu title "Context Menu"
propertized with the text property 'hide'.

* src/menu.c (x_popup_menu_1): Don't show the title with the non-nil
text property 'hide' on GTK and NS.
2021-08-22 11:46:08 +03:00
Eli Zaretskii
964151570b ; * src/syntax.c: Remove a stray comment. 2021-08-21 17:13:46 +03:00
Lars Ingebrigtsen
5da7103443 Tweak the comment-start-skip example in the manual
* doc/emacs/programs.texi (Options for Comments): Tweak the
example regexp for comment-start-skip (bug#15006).
2021-08-21 16:08:36 +02:00
Lars Ingebrigtsen
cabd22f5c6 Make parse-partial-sexp signal an error if TO is smaller than FROM
* src/syntax.c (Fparse_partial_sexp): Signal an error if TO is
smaller than FROM (bug#49944).
2021-08-21 15:24:15 +02:00
Alan Third
2837e25caf Fix display bug on macOS (bug#50112)
* src/nsterm.m ([EmacsLayer initWithColorSpace:]): Use the colorspace
setter.
([EmacsLayer setColorSpace:]): Sometimes we seem to get null
colorspaces, so set a default in this case.
([EmacsLayer getContext]): Check whether there's been a surface or
graphics context allocation failure and log it.
2021-08-21 13:12:56 +01:00
Mattias Engdegård
f4159568a1 Remove default "Select" title from NS popup menus (bug#50067)
* src/menu.c (x_popup_menu_1): Remove default "Select" title.
* src/nsmenu.m (ns_menu_show): Allow title to be absent.
2021-08-21 12:41:54 +02:00
Eli Zaretskii
1511f3cecc Fix inaccuracies in documentation of 'message-truncate-lines'
* doc/lispref/display.texi (Echo Area Customization):
* src/xdisp.c (syms_of_xdisp): Adjust the documentation of
message-truncate-lines to changes that fixed bug#46718.
2021-08-19 15:44:55 +03:00
Eli Zaretskii
8e93a37b77 ; * src/xdisp.c (hscroll_window_tree): Fix a typo in a comment. 2021-08-19 15:25:26 +03:00
Eli Zaretskii
4bd7be2b8f Fix errors with hscrolling mini-windows under truncate-lines
* src/xdisp.c (hscroll_window_tree): Disallow hscroll in
mini-windows that display echo-area messages.  (Bug#50096)
2021-08-19 15:24:14 +03:00
Eli Zaretskii
78b427648b Improve documentation of 'assoc'
* doc/lispref/lists.texi (Association Lists):
* src/fns.c (Fassoc): Document how TESTFN is called.  (Bug#50110)
2021-08-18 22:07:30 +03:00
Eli Zaretskii
0d5ff75e94 Improve documentation of last change.
* etc/NEWS: Mention the string value of 'auto-composition-mode'.

* src/composite.c (syms_of_composite) <auto-composition-mode>: Doc
fix.
2021-08-18 19:10:01 +03:00
Lars Ingebrigtsen
15a8026caf Disable auto compositions on the Linux console only
* lisp/term/linux.el (terminal-init-linux): Disable auto
compositions on "linux" consoles (bug#21363).

* src/composite.c (inhibit_auto_composition): New function to
implement this.
(composition_compute_stop_pos, composition_adjust_point)
(Ffind_composition_internal): Use it.
(syms_of_composite): Document it.

* src/lisp.h: Export tty_type_name.

* src/term.c (tty_type_name): Factored out.
(Ftty_type): Use it.
2021-08-18 16:24:40 +02:00
Eli Zaretskii
ee812f2a98 Yet another place inside redisplay_window to prevent quitting
* src/xdisp.c (handle_single_display_spec): Inhibit quitting
around the call to lookup_image.  (Bug#44448)
2021-08-18 16:14:29 +03:00
Eli Zaretskii
bf4f7388b6 Fix abort when turning on Hebrew or Arabic input methods
* src/xdisp.c (face_before_or_after_it_pos): Add the missing
initialization of the bidi scan direction.  (Bug#50107)
2021-08-18 16:01:57 +03:00
Eli Zaretskii
130d47bdcc Another fix for quitting while displaying non-selected windows
* src/xdisp.c (handle_face_prop, extend_face_to_end_of_line):
Inhibit quitting around the call to face_at_pos, to prevent
leaking wrong value of point when the user quits while we
redisplay a non-selected window.  (Bug#44448)
2021-08-17 21:29:58 +03:00
Eli Zaretskii
5f47d17d33 Fix TTY display performance degradation due to many markers
* src/coding.c (encode_coding_object): Don't assume that
src_object == dst_object means src_object is the current buffer.
Add the missing commentary that explains the arguments.
(Bug#49127)
2021-08-17 15:31:53 +03:00
Eli Zaretskii
6898ae6f8c Plug another hole for longjmp-ing from 'redisplay_window'
* src/fringe.c (update_window_fringes): Inhibit quitting, so as
not to longjmp out of redisplay_window.  (Bug#44448)
2021-08-16 22:06:26 +03:00
Lars Ingebrigtsen
5d7b1d5fc7 Make overlays-in treat zero-length overlays at point-max consistently
* doc/lispref/display.texi (Finding Overlays): Adjust documentation.

* src/buffer.c (overlays_in): Treat the end of the buffer and the
end of the narrowed-to buffer the same (bug#19422).
(Foverlays_in): Adjust doc string.
2021-08-16 15:40:43 +02:00
Lars Ingebrigtsen
55772baee1 Make Emacs compile with musl instead of glibc
* src/alloc.c: musl doesn't have malloc_info (bug#50058).
2021-08-15 13:25:23 +02:00
Eli Zaretskii
36964b2358 ; * src/xdisp.c (display_mode_lines): Fix comment. 2021-08-15 14:18:17 +03:00
Eli Zaretskii
fdf148cab4 Fix unwarranted point movement after C-g
When the same buffer is displayed in more than one window,
redisplay temporarily moves point to the window-point when it
works on non-selected windows.  If we allow C-g to quit out of
redisplay_window in this situation, point will appear to have
moved to the window-point of that non-selected window, which is
unwarranted.  These changes prevent quitting in strategic places,
so that we never quit out of redisplay_window.
* src/xdisp.c (run_window_scroll_functions):
Prevent quitting while running window-scroll-functions, so that we
don't quit out of redisplay_window with temporarily moved point.
(redisplay_window): While redisplaying the mode line, prevent
quitting, to avoid exiting while point is temporarily moved.
(decode_mode_spec): Use safe_call1 instead of call1, to trap any
errors instead of letting them throw out of redisplay.  (Bug#44448)
2021-08-15 14:11:23 +03:00
Eli Zaretskii
9c5dc3cbe0 * src/w32.c (_sys_read_ahead): Pacify a silly compiler warning. 2021-08-14 20:38:05 +03:00
Eli Zaretskii
482049e542 Fix 'random' on MS-Windows when integers are wider than 30 bits
* src/w32.c (random): Provide more random bits for MS-Windows
builds with EMACS_INT that is wider than 32 bits.  (Bug#32605)
2021-08-14 17:39:38 +03:00
Lars Ingebrigtsen
65dd00667f Fix problem where an error would change standard-output
* src/keyboard.c (cmd_error): Don't set
standard-output/standard-input (bug#30529).  Instead bind them
temporarily while handling the error.
2021-08-13 13:19:39 +02:00
Lars Ingebrigtsen
81fd380dea Allow using XLFD font names with dashes in the family name
* src/font.c (font_parse_xlfd_1): Rename from font_parse_xlfd to
allow calling twice from a wrapper (bug#35816).
(font_parse_xlfd): Wrapper function -- first try to parse in the
normal way, and then try to guess that the hyphenated bits are in
the family name.
2021-08-11 22:07:13 +02:00
Alan Third
c7855c8ca3 * src/nsterm.m (max_used_fringe_bitmap): Remove unused variable. 2021-08-08 22:23:34 +01:00
Lars Ingebrigtsen
8ce7a697ca Allow building on MacOS with MacPorts and libgccjit
* configure.ac: Check for the "port" command (MacPorts).
Add the required lib/include directories for nativecomp.

* src/Makefile.in (LIBGCCJIT_CFLAGS, LIBGCCJIT_LIBS): Split into
two parts to allow including -L/-I for MacPorts.
(LIBES): Adjust.
(EMACS_CFLAGS): Ditto.
2021-08-07 11:56:44 +02:00
Eli Zaretskii
4d6511a284 Fix automatic hscrolling when line numbers are displayed
* src/xdisp.c (hscroll_window_tree): When line numbers are
displayed, account for the the line-number space when calculating
the desired X coordinate on the left.  (Bug#49891)
2021-08-06 10:51:45 +03:00
Eli Zaretskii
c327d61ec8 Improve wording of recently changed documentation
* src/minibuf.c (syms_of_minibuf):
* lisp/minibuffer.el (minibuffer-restore-windows):
* lisp/progmodes/etags.el (etags-xref-prefer-current-file):
Improve wording of doc strings.

* etc/NEWS: Improve wording and format of recently added entries.
2021-08-06 10:22:22 +03:00
Juri Linkov
18d7562e91 Add function minibuffer-restore-windows (bug#45072)
* lisp/minibuffer.el (minibuffer-restore-windows): New function
that removes the completions buffer.  Add it to minibuffer-exit-hook.
* src/minibuf.c (read-minibuffer-restore-windows): Mention
minibuffer-restore-windows.
2021-08-06 02:36:22 +03:00
martin rudalics
51583a0f9f Add new user option 'read-minibuffer-restore-windows'
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it
(bug#45072).

* lisp/cus-start.el (standard): Add.

* src/minibuf.c (syms_of_minibuf): New variable
'read-minibuffer-restore-windows'.
2021-08-04 08:48:18 +02:00
Lars Ingebrigtsen
f6c5a801ef Adjust how `replace-match' runs modification hooks
* src/editfns.c (Fsubst_char_in_region)
(Ftranslate_region_internal):
* src/cmds.c (internal_self_insert): Update callers.
* src/insdel.c (replace_range): Allow inhibiting
signal_after_change/update_compositions.
* src/lisp.h: Update.

* src/search.c (Freplace_match): Run the modification hooks at the
end instead of before adjusting point (bug#42424).
2021-07-31 17:44:43 +02:00
Alan Third
12c5ca4d82 Fix some macOS problems
* src/nsmenu.m (update_frame_tool_bar): Make sure the toolbar isn't
displayed when it's not supposed to be.
* src/nsterm.m ([EmacsView layoutSublayersOfLayer:]): Reinstate code
intended to prevent a crash when running redisplay.
2021-07-31 11:13:05 +01:00
Alan Third
5a48c99696 Move parent frame setting code into EmacsWindow
* src/nsterm.m (ns_make_frame_visible):
(ns_set_parent_frame):
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):  Use new method.
([EmacsWindow setParentChildRelationships]): New method.
2021-07-31 11:13:05 +01:00
Alan Third
0b5cf48509 Move NS port toolbar handling to the window
* src/nsmenu.m (free_frame_tool_bar):
(update_frame_tool_bar): Remove wait_for_tool_bar and get the toolbar
from the window.
* src/nsterm.h (EmacsView): Remove toolbar and wait_for_tool_bar.
* src/nsterm.m (ns_update_begin):
([EmacsView windowDidEnterFullScreen]):
([EmacsView windowDidExitFullScreen]): Get the toolbar from the
window, not the view.
([EmacsView dealloc]): Remove toolbar from view.
([EmacsView createToolbar:]): Move method to EmacsWindow.
([EmacsView initFrameFromEmacs:]): Don't create toolbar here any more.
([EmacsView toolbar]): Remove method.
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Create toolbar here.
([EmacsWindow createToolbar:]): Moved from EmacsView.
([EmacsWindow dealloc]): Make sure we clean up the toolbar after
closing the window.
2021-07-31 11:13:05 +01:00