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

44095 commits

Author SHA1 Message Date
Alan Third
483df14d5c A further fix for toolbar visibility problems on macOS (bug#50534)
* src/nsterm.m (ns_update_begin): Ensure the toolbar's visibility is
set correctly.
2021-09-14 15:38:55 +01:00
Alan Third
1e83d04214 Fix incorrectly appearing toolbar on NS (bug#50534)
* src/nsmenu.m (update_frame_tool_bar): Ensure both sides of the test
are booleans.
* src/nsterm.m ([EmacsWindow createToolbar:]): Make the toolbar
non-visible initially, in case things get out of sync.  Remove call to
update_frame_tool_bar: the window isn't yet associated with the view,
so it will return immediately.
2021-09-14 10:08:17 +01:00
Andrea Corallo
1b0fb8fc2e * Clean-up some unnecessary macro usage in comp.c
* src/comp.c (emit_static_object)
	(Fcomp_native_driver_options_effective_p, add_driver_options)
	(Fcomp__compile_ctxt_to_file, Fcomp_libgccjit_version): Clean-up
	unenecessary 'defined (WINDOWSNT)' usage.
2021-09-13 16:51:49 +02:00
Juri Linkov
fd1379a85a Support mouse events clicked on the tab bar but outside of any tab (bug#41343)
* lisp/tab-bar.el (tab-bar--key-to-number): Return non-nil non-numeric t
when no tab is used.  Return nil for current-tab.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab): Do nothing
when tab-bar--key-to-number returns non-nil non-numeric t
for click events outside of any tab.
(tab-bar-mouse-context-menu): Add context menu when mouse is clicked
outside of tabs.  Add "Duplicate" alongside with "Close" to the menu
used when mouse is clicked on a tab.
(toggle-tab-bar-mode-from-frame, toggle-frame-tab-bar): Move code
closer to 'tab-bar-show'.

* src/xdisp.c (handle_tab_bar_click): Return Qtab_bar with empty list
when mouse is clicked on the tab bar but outside of any tab.
2021-09-13 11:15:10 +03:00
Juri Linkov
bb446c1d96 Change value of DEFAULT_TAB_BAR_BUTTON_MARGIN from 4 to 1 (bug#50424) 2021-09-13 10:58:44 +03:00
Eli Zaretskii
c7aaf2fcb8 ; * src/w32term.c (w32_read_socket): Avoid compiler warning. 2021-09-11 17:50:08 +03:00
Eli Zaretskii
afa82b3f7f ; * src/keyboard.c (make_lispy_position): Fix a recent change. 2021-09-11 15:59:32 +03:00
Alan Third
e40f5a91ee Fix display of tab-bar buttons
* src/xterm.c (x_draw_image_relief):
* src/w32term.c (w32_draw_image_relief): Fix the display of
tab-bar buttons when mouse pointer moves off the button.
(Bug#50424)
2021-09-11 15:09:59 +03:00
Eli Zaretskii
2e595b3e8b Fix tab-bar scrolling for mice that report mouse-wheel events
* src/keyboard.c (make_lispy_position): Call
'window_from_coordinates' with last 2 arguments non-zero, to have
it report on tool-bar and tab-bar positions.  Tweak the return
value according to the expectations of 'make_lispy_event'.
(make_lispy_event): No more need to inject "tab-bar" into a click
event on the tab bar: it's already there.
2021-09-11 13:58:10 +03:00
Eli Zaretskii
f98700af80 Fix restoring from pdumper file on MS-Windows 9X
* src/pdumper.c (dump_map_file_w32): Use PAGE_WRITECOPY flag when
calling CreateFileMapping for DUMP_MEMORY_ACCESS_READWRITE access,
as that is required by Windows 9X.  (Bug#50453)
2021-09-11 09:56:27 +03:00
Arthur Miller
dea67939b6 Add support for GCC compiler command-line options
* lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support
for new 'native-comp-compiler-options'.
* src/comp.c (Fcomp_native_compiler_options_effective_p): New function.
(add_compiler_options): New function.
(Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'.
2021-09-10 21:04:41 +02:00
Juri Linkov
14d5145441 Merge branch 'feature/tab-bar-events' 2021-09-09 10:52:41 +03:00
Miha Rihtaršič
d80552df71 Allow kmacros to end with C-g in minibuffer
* src/keyboard.c (cmd_error): If a command causes a minibuffer-quit
condition, record its key in a keyboard macro (bug#48603).
2021-09-08 09:40:28 +02:00
Eli Zaretskii
db74a93659 Fix display of tab-bar buttons
* src/xterm.c (x_draw_image_relief):
* src/w32term.c (w32_draw_image_relief): Fix calculation of relief
thickness for tab-bar buttons.

* lisp/tab-bar.el (tab-bar--load-buttons)
(tab-bar-history-mode): Fix the :margin specification for tab-bar
buttons.  (Bug#50424)
2021-09-07 13:24:01 +03:00
Juri Linkov
794fdce55d Improve tab-bar event handling (bug#41343)
* lisp/tab-bar.el (tab-bar--key-to-number): Rename from tab--key-to-number.
(tab-bar--event-to-item): New function from tab-bar-handle-mouse.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab)
(tab-bar-mouse-context-menu, tab-bar-mouse-move-tab):
Use tab-bar--event-to-item.

* src/menu.c (x_popup_menu_1): Handle Qtab_bar in the second list element.

* src/xdisp.c (tty_get_tab_bar_item): Change arg 'end' to bool 'close_p'.
(tty_get_tab_bar_item): Detect if the close button was clicked.
(tty_handle_tab_bar_click): Return a list with caption that has
text properties.
2021-09-05 20:16:33 +03:00
Basil L. Contovounesios
534e631b00 Avoid segfault in command-modes
* src/data.c (Fcommand_modes): Check that bytecode object is
interactive before accessing its interactive spec to avoid
segfaulting (bug#50376).
2021-09-04 21:28:31 +02:00
Eli Zaretskii
0daad76704 Improve documentation of line truncation and wrapping
* doc/emacs/display.texi (Line Truncation, Visual Line Mode):
* doc/lispref/display.texi (Truncation): Document that turning on
line truncation disables wrapping, and vice versa.

* src/buffer.c (syms_of_buffer) <truncate-lines>:
* src/xdisp.c (syms_of_xdisp) <truncate-partial-width-windows>:
Warn against turning on when 'visual-line-mode' is in effect.
* lisp/simple.el (visual-line-mode): Document that this mode
disables line truncation.  (Bug#29664)
2021-09-04 13:34:32 +03:00
Stefan Kangas
0cabf8bc36 ; Fix typos 2021-09-03 13:05:32 +02:00
Eli Zaretskii
3d26490749 Fix expansion of non-ASCII $HOME
* src/fileio.c (Fexpand_file_name): Make the file name multibyte
if the value of $HOME is multibyte.  (Bug#50266)
2021-09-02 18:49:01 +03:00
Eli Zaretskii
110db95e13 Fix 'clone-frame' on TTY frames
* src/frame.c (Fmake_terminal_frame): Make a separate copy of the
faces for the new frame before calling modify-frame-parameters, as
on TTY frames that needs the faces already set up.  (Bug#34715)
2021-09-02 14:58:41 +03:00
Eli Zaretskii
f85b8678c4 Fix segfault with invalid key-translation-map binding
* src/keyboard.c (access_keymap_keyremap): Don't assume an invalid
function is specified as a symbol.  Reported by Perry E. Metzger
<perry@piermont.com>.
2021-09-01 19:27:43 +03:00
Kien Nguyen
c0243d9e82 * Add a dll loader entry for gcc_jit_context_new_cast (bug#50315)
* src/comp.c: Add a dll loader entry for
'gcc_jit_context_new_cast' (bug#50315).
2021-09-01 15:26:04 +02:00
Miha Rihtaršič
45793b195c In batch mode, avoid killing Emacs with C-g in the minibuffer
* src/keyboard.c (Fcommand_error_default_function): Don't kill emacs
when handling the minibuffer-quit condition (bug#48603).
2021-09-01 10:10:44 +02:00
Lars Ingebrigtsen
b612821388 call-process doc string clarification
* src/callproc.c (Fcall_process): Explicitly say that "output"
means both stdout and stderr (bug#37906).
2021-08-31 04:13:58 +02:00
Lars Ingebrigtsen
50765f3f51 Make run-at-time try harder to run at integral multiples
* lisp/emacs-lisp/timer.el (timer): Add new slot integral-multiple.
(timerp): Adjust.
(timer-event-handler): Recompute the delay if requested
(bug#39099).
(run-at-time): Mark the timer as recomputable if given a t
parameter.

* src/keyboard.c (decode_timer): Adjust.
2021-08-31 03:04:22 +02:00
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