1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-06 07:31:13 -08:00
Commit graph

156035 commits

Author SHA1 Message Date
Po Lu
ece2ee965f Allow quitting inside font selection dialogs on Haiku
* src/haiku_support.cc (WaitForChoice): Accept new function for
checking quit flag.
(be_select_font): Pass that function.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (haikufont_should_quit_popup): New function.
(Fx_select_font): Give said function to `be_select_font'.
2022-05-01 03:20:58 +00:00
Po Lu
ed0de6200d Allow invoking fonts in the Haiku font dialog
* src/haiku_support.cc (MessageReceived): Handle invocations.
(EmacsFontSelectionDialog): Set style panel invocation message.
2022-05-01 02:43:18 +00:00
Po Lu
7dda9835c6 Improvements to the Haiku font dialog
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(EmacsFontSelectionDialog, FrameResized): Fix colors and respect
monospace only.
(be_select_font): New parameter `allow_monospace_only'.
* src/haiku_support.h: Update prototype.
* src/haikufont.c (Fx_select_font): Respect
`exclude-proportional'.
2022-05-01 02:17:04 +00:00
Po Lu
07ae30d8f2 Also fix some compiler warnings in xterm.c that didn't show up
* src/xterm.c (x_dnd_begin_drag_and_drop): Don't define unused
variable on GTK builds.
2022-05-01 09:45:20 +08:00
Po Lu
4e6eb023e0 Fix the GTK build
* src/xterm.c (x_dnd_begin_drag_and_drop): Let GTK handle events
again.
2022-05-01 09:43:08 +08:00
Po Lu
905fabe590 * src/xterm.c (x_dnd_begin_drag_and_drop): Fix typo. 2022-05-01 09:41:16 +08:00
Po Lu
ba0264e191 Fix processing events from multiple displays during DND
* src/xterm.c (x_next_event_from_any_display): New function.
Only used on no-toolkit builds.
(x_dnd_begin_drag_and_drop): Compute correct dpyinfo for
handle_one_xevent.
2022-05-01 09:37:12 +08:00
Po Lu
61d6d43fe5 Clean up X Windows tooltip code
* src/xfns.c (x_hide_tip): Remove "bloodcurdling hack".
* src/xterm.c (handle_one_xevent): Add a better version here
instead.  The code is unlikely to be hit as well, since tooltip
frames are typically deleted, not just hidden.
2022-05-01 09:15:52 +08:00
Po Lu
b2fdf78fd9 Implement font selection dialog on Haiku
* src/haiku_font_support.cc (font_style_to_flags): Handle style
allocation failures.
(be_font_style_to_flags): New function.

* src/haiku_support.cc (struct font_selection_dialog_message):
New struct.
(class EmacsFontSelectionDialog): New class.
(be_select_font): New function.

* src/haiku_support.h: Update prototypes.
* src/haikufont.c (Fx_select_font): New function.
(syms_of_haikufont): Define new subr.
2022-05-01 01:00:15 +00:00
Basil L. Contovounesios
02bf6650b0 Fix failing image test on nox builds
* test/lisp/image-tests.el (image-supported-file-p/built-in): Skip
test in --without-x builds.
2022-05-01 01:19:51 +03:00
Lars Ingebrigtsen
4ea8ab77e2 Make `M-x apropos' respect help-window-select
* lisp/apropos.el (apropos-print): Respect help-window-select.
(apropos): Mention it (bug#46034).
2022-04-30 21:34:18 +02:00
Lars Ingebrigtsen
95dbe4b6ae Make load-path-shadows-mode a special mode
* lisp/emacs-lisp/shadow.el (load-path-shadows-mode): Make the
mode inherit from special-mode so that the `q' command works.
2022-04-30 20:34:35 +02:00
Lars Ingebrigtsen
0ea217d646 Fix compilation-max-output-line-length type
* lisp/progmodes/compile.el (compilation-max-output-line-length):
Fix the type.
2022-04-30 19:42:42 +02:00
Lars Ingebrigtsen
d90f54db22 Avoid regexp overflow in mm-decode-content-transfer-encoding
* lisp/gnus/mm-bodies.el (mm-decode-content-transfer-encoding):
The base64 may be huge, so avoid backtracking (bug#55195).
2022-04-30 19:14:35 +02:00
Lars Ingebrigtsen
0ea0aa255c Fix Vx_show_tooltip_timeout in ns build, too
* src/nsfns.m (Fx_show_tip): Respect Vx_show_tooltip_timeout here,
too.
2022-04-30 18:21:51 +02:00
Lars Ingebrigtsen
52e6352b81 Fix compilation after recent x-show-tooltip-timeout changes
* src/dispnew.c (syms_of_display): Move x-show-tooltip-timeout to
a common file to avoid breaking other systems.
2022-04-30 18:20:19 +02:00
Lars Ingebrigtsen
90904f8ce4 Remove the "retro" Gnus/Message tool bars
* doc/misc/gnus.texi (Gravatars): Remove documentation.
* lisp/gnus/gmm-utils.el (gmm-tool-bar-style): Obsoleted.

* lisp/gnus/gnus-group.el (gnus-group-tool-bar): Use the "Gnome"
definition.
(gnus-group-tool-bar-gnome, gnus-group-tool-bar-retro)
(gnus-group-tool-bar-zap-list): Obsolete.

* lisp/gnus/gnus-sum.el (gnus-summary-tool-bar): Use the "Gnome"
definition.
(gnus-summary-tool-bar-gnome, gnus-summary-tool-bar-retro)
(gnus-summary-tool-bar-zap-list): Obsolete.

* lisp/gnus/message.el (message-tool-bar): Use the "Gnome"
definition.
(message-tool-bar-gnome, message-tool-bar-retro)
(message-tool-bar-zap-list): Obsolete.
2022-04-30 18:18:32 +02:00
Andreas Schwab
1e46487e4e * lisp/gnus/deuglify.el (gnus-article-outlook-rearrange-citation): Add autoload cookie. 2022-04-30 18:04:53 +02:00
Lars Ingebrigtsen
655d2319bc Use x-show-tooltip-timeout in all the implementations
* src/haikufns.c (Fx_show_tip): Use the timeout variable.
* src/pgtkfns.c (Fx_show_tip): Ditto.

* src/w32fns.c (Fx_show_tip): Ditto.

* src/xfns.c (Fx_show_tip): Doc fix.
2022-04-30 17:38:34 +02:00
Lars Ingebrigtsen
86b6a69f86 Don't hard code the default x-show-tip timeout
* src/xfns.c (Fx_show_tip): Use it.
(syms_of_xfns): Add a new x-show-tooltip-timeout variable
(bug#23341).
2022-04-30 17:09:02 +02:00
Lars Ingebrigtsen
b05a103ea7 Move the when-let family of macros to subr.el
* lisp/subr.el (internal--build-binding)
(internal--build-bindings): Moved from subr-x.el and rewritten to
not use the threading macro.
(if-let*, when-let*, and-let*, if-let, when-let): Moved from
subr-x.el.  This avoids breaking the build every time somebody
uses these macros in functions that end up being called during
bootstrap.
2022-04-30 16:42:44 +02:00
Lars Ingebrigtsen
93549c2b28 Avoid using if-let in subr.el
* lisp/subr.el (string-lines): Avoid using if-let (from subr-x) in
subr (bug#55194).
2022-04-30 16:24:55 +02:00
Eli Zaretskii
c1fa5bd8ee ; * doc/lispref/strings.texi (Creating Strings): Fix a typo. 2022-04-30 14:54:35 +03:00
Lars Ingebrigtsen
4290f64dc9 Make the xref--button-map more regular
* lisp/progmodes/xref.el (xref--button-map): Remove the mouse-1
binding (bug#35353).
2022-04-30 13:38:18 +02:00
Jin Choi
5a10e6377c Make Python evaluation work more reliably
* lisp/progmodes/python.el (python-shell-buffer-substring): Make
more regions valid Python code (bug#55174).

Copyright-paperwork-exempt: yes
2022-04-30 13:38:18 +02:00
Po Lu
2a2b3f5834 Fix some cases of flicker on MS Windows
* src/w32term.c (w32_read_socket): Fix typo in check before
flipping buffers.
2022-04-30 19:03:09 +08:00
Lars Ingebrigtsen
58398dea25 Truncate output from grep
* doc/emacs/building.texi (Compilation): Document it.
* lisp/progmodes/compile.el (compilation-max-output-line-length):
New user option (bug#44983).
(compilation-filter): Use it.
(compilation--insert-abbreviated-line): New function.
2022-04-30 12:57:20 +02:00
Lars Ingebrigtsen
5acf75cec1 Make grep-mode-font-lock-keywords more efficient
* lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Make the
regexp less greedy so that long lines don't take forever to
font-lock (bug#44983).
2022-04-30 12:57:20 +02:00
Lars Ingebrigtsen
aab5d7b3f3 Add a KEEP-NEWLINES argument to string-lines
* doc/lispref/strings.texi (Creating Strings): Document it.

* lisp/subr.el (string-lines): Add a KEEP-NEWLINES argument.
2022-04-30 12:57:20 +02:00
Po Lu
57447f5ce0 Fix display updating inside the minibuffer on MS Windows
* src/minibuf.c (read_minibuf): Call `w32_flip_buffers_if_dirty'
after changing the cursor position and redisplaying instead of
`flush_frame'.  (bug#55193)

* src/w32term.c (w32_flip_buffers_if_dirty): New function.
* src/w32term.h: Update prototypes.
2022-04-30 18:54:34 +08:00
Po Lu
5fd5472353 Avoid server roundtrip on wheel events from scroll bars on XI2
* src/xterm.c (handle_one_xevent): Translate coordinates for
scroll bars correctly when handling XI2 wheel events.
2022-04-30 18:05:44 +08:00
Eli Zaretskii
7b7a124afa ; * src/w32term.c (w32_read_socket): Add comment for recent change. 2022-04-30 12:35:48 +03:00
Eli Zaretskii
03561b4aad ; Minor fixes of documentation of double-buffering on MS-Windows
* etc/NEWS: Improve and expand wording of the entry about
double-buffering on MS-Windows.

* src/w32fns.c (w32_set_inhibit_double_buffering): Fix commentary.
2022-04-30 12:00:33 +03:00
Po Lu
e540c8778b * admin/CPP-DEFINES: Update for new features. 2022-04-30 16:46:33 +08:00
Po Lu
08c6e699f6 Process editres events not for frames correctly
* src/xterm.c (handle_one_xevent): Dispatch Editres events to
interested widgets.
2022-04-30 15:58:33 +08:00
Po Lu
1321b5989c Adjustments to double buffering on MS Windows
* src/w32fns.c (w32_set_inhibit_double_buffering): Add comment
describing double buffering.
(w32_wnd_proc): Respect `w32-disable-double-buffering'.
(globals_of_w32fns): New variable
`w32-disable-double-buffering'.

* src/w32term.c (w32_show_back_buffer): Return immediately if
double buffering is disabled on the frame.
(w32_scroll_run): Use old scrolling code if
`w32-disable-double-buffering' is enabled.
(w32_scroll_bar_clear): Document why we don't clear scroll bars
when double buffering is enabled.
(w32_read_socket): Respect `w32-disable-double-buffering' and
clean up some code.

* src/w32xfns.c (get_frame_dc): Respect
`w32-disable-double-buffering'.
2022-04-30 15:52:12 +08:00
Eli Zaretskii
1648791e7c Fix use of kp-decimal in 'vhdl-stutter-mode'
* lisp/progmodes/vhdl-mode.el (vhdl-electric-period): Avoid
signaling an error when the user presses the kp-decimal key on the
numeric pad in 'vhdl-stutter-mode'.  (Bug#55079)
2022-04-30 10:10:07 +03:00
Po Lu
0ce48e2882 Handle exposure in the widget's expose proc on X
* src/widget.c (emacsFrameClassRec): Don't inherit expose proc.
(get_default_char_pixel_size):
(pixel_to_char_size):
(char_to_pixel_size):
(round_size_to_char):
(EmacsFrameInitialize):
(EmacsFrameRealize):
(EmacsFrameResize): Clean up coding style.
(EmacsFrameExpose): New function.  Expose the frame here to
satisfy the toolkit when it calls the expose proc by hand.

* src/xterm.c (handle_one_xevent): Handle exposure through the
widget instead.
2022-04-30 14:29:33 +08:00
Po Lu
4fb028be6c Fix releasing the mouse on top of the tool bar on MS Windows
* src/w32term.c (w32_read_socket): Don't handle tool bar clicks
specially for button up events if no tool bar item was
previously pressed.
2022-04-30 13:26:40 +08:00
Po Lu
402c90c912 Fix palette freeing on MS Windows with double buffering
* src/w32term.c (w32_release_paint_buffer): Also release target
DC palette.
2022-04-30 11:33:38 +08:00
Po Lu
bc44455f77 Implement double buffering on MS Windows
* etc/NEWS: Announce changes.
* src/w32fns.c (w32_set_inhibit_double_buffering): New function.
(w32_wnd_proc):
(Fx_create_frame):
(w32_create_tip_frame): Set `inhibit-double-buffering' parameter.
(w32_frame_parm_handlers): Add new handler.

* src/w32term.c (w32_show_back_buffer):
(w32_release_paint_buffer): New functions.
(w32_frame_up_to_date): Show back buffer if applicable.
(w32_buffer_flipping_unblocked_hook): New hook.
(w32_scroll_run): Use BitBlt to scroll instead of window
scrolling functions.
(w32_scroll_bar_clear): Don't clear scroll bars when double
buffered.
(w32_read_socket): Flip buffers after reading input events in
some cases.
(w32_free_frame_resources): Free back buffer.
(w32_create_terminal): Add new hook.

* src/w32term.h (struct w32_output): New fields for handling
back buffers.
* src/w32xfns.c (select_palette): Fix indentation.
(get_frame_dc, release_frame_dc): Return back buffer when
appropriate and set dirty flag.
2022-04-30 11:20:46 +08:00
Po Lu
a33bf01149 Prevent cursors from being set on tooltip frames on Haiku
* src/haikuterm.c (haiku_show_hourglass, haiku_hide_hourglass)
(haiku_define_frame_cursor, haiku_toggle_invisible_pointer):
Ignore tooltip frames.  Otherwise, the cursor changes every time
a tooltip is mapped.
2022-04-30 02:34:35 +00:00
Stefan Monnier
08108a856a debug-early: Print bytecode in a more manageable way
* lisp/emacs-lisp/debug-early.el (debug-early-backtrace):
Escape newlines to and bytecodes to make backtraces slightly more
readable.  Use `cl-prin1` when available.
2022-04-29 22:18:09 -04:00
Stefan Monnier
73088b30cf * lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add symbol-with-pos 2022-04-29 22:13:20 -04:00
Po Lu
834383f1e1 Fix focus reversion of Motif menus on XI2
* src/xmenu.c (create_and_show_popup_menu): Stop setting input
focus on the menu window.
2022-04-30 09:29:56 +08:00
Po Lu
af84ea2b9e Fix mouse face bugs on Motif
* src/xterm.c (handle_one_xevent): Fix handling LeaveNotify
events from Motif menus.
2022-04-30 09:22:20 +08:00
Po Lu
94ecd2b3c6 Check display when handling XdndFinished events
* src/xterm.c (handle_one_xevent): Check that the display is
actually the one we want before finishing DND.
2022-04-30 08:47:42 +08:00
Stefan Monnier
acc985ae7c CL types: Accept both byte-code-function and compiled-function
`type-of` returns `compiled-function` for bytecode functions, but the
predicate for those objects is called `byte-code-function-p`,
So accept both `compiled-function` and `byte-code-function` as type
names for those objects.

* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
Add `byte-code-function`.
* lisp/emacs-lisp/cl-macs.el (byte-code-function, compiled-function, subr):
New types.
2022-04-29 15:29:35 -04:00
Juri Linkov
b566454449 * test/lisp/replace-tests.el (query-replace-tests): Add more tests (bug#54733)
(perform-replace-tests): New tests.
(perform-replace--run-tests): New function.
(perform-replace-tests): New test function.
2022-04-29 20:40:15 +03:00
Lars Ingebrigtsen
e065d08fa7 Simplify window-char-pixel-* code slightly
* lisp/window.el (window-char-pixel-width)
(window-char-pixel-height): Simplify code slightly.
2022-04-29 15:52:21 +02:00