Commit graph

155504 commits

Author SHA1 Message Date
Lars Ingebrigtsen
a987e66e6b Improve DISPOSE_PREVIOUS in gif_load slightly
* src/image.c (gif_load): Tweak how DISPOSE_PREVIOUS is handled.
It's still not right, but it's less glaringly wrong.
2022-04-12 16:22:38 +02:00
Eli Zaretskii
66189689ca Fix 'window-text-pixel-size' when starting from a 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.
(Bug#54862)
2022-04-12 17:19:06 +03:00
Lars Ingebrigtsen
9b892eeb91 Fix webp_load data lifetime issues
* src/image.c (webp_load): Take care of lifetime issues of the
image data we're iterating over for animated images.
2022-04-12 16:08:58 +02:00
Po Lu
c3c08b90b6 Fix keyboard event device attribution on GTK+ 2
* src/xfns.c (setup_xi_event_mask): Select for raw keypress
events on GTK 2.
* src/xterm.c (handle_one_xevent): Set pending keystroke time
when a raw event is received.
* src/xterm.h (struct x_display_info): New flag
`pending_keystroke_time_special_p'.
2022-04-12 21:30:25 +08:00
Po Lu
1b20c4eaa2 Fix detection of Meta key in some cases
* src/xterm.c (x_find_modifier_meanings): Set found_meta_p
correctly.
2022-04-12 21:30:25 +08:00
Lars Ingebrigtsen
4a108df0eb Fix check for whether frames fit into gif images
* src/image.c (gif_load): Really check all frames that they fit.
2022-04-12 15:11:32 +02:00
Po Lu
00071c976f Fix some confusing names in xterm.c
* src/xterm.c (enum xm_targets_table_byte_order): Rename to
`xm_byte_order'.  All uses changed.
2022-04-12 21:09:25 +08:00
Lars Ingebrigtsen
7b67b9a5a2 Store less data in the gif animation cache
* src/image.c (gif_load): Only start a cache if we're have an
:index entry (which means that we're trying to animate something).
2022-04-12 14:45:29 +02:00
Po Lu
9561d45de1 Fix clicking on files in Dired when drag is enabled
* lisp/dired.el (dired-mouse-drag): Don't drag if the mouse
didn't move far enough.
2022-04-12 19:22:01 +08:00
Lars Ingebrigtsen
25a28ed4f7 Release resources in gif_load on errors
* src/image.c (webp_load): Clean up code slightly.
(gif_load): Really release resources on GIF parsing errors.
2022-04-12 13:17:14 +02:00
Lars Ingebrigtsen
3de2462da7 Animate GIF images that don't have an explicit delay setting
* src/image.c (gif_load): Use the default delay for GIF images
that don't explicitly state a delay.
2022-04-12 12:43:56 +02:00
Olaf Trygve Berglihn
8c3d655fe7 Add biblatex alias entry types for compability with bibtex
* lisp/textmodes/bibtex.el (bibtex-biblatex-entry-alist): Add
biblatex alias entry types for compability with bibtex (bug#54877).

Copyright-paperwork-exempt: yes
2022-04-12 12:21:19 +02:00
Lars Ingebrigtsen
8e1c0054b3 Fix thinko in the anim cache
* src/image.c (gif_load): Fix resetting the cache when we're out
of sync.
(anim_create_cache): Start from zero, not 1.
2022-04-12 12:12:24 +02:00
Po Lu
78784ccfad Disallow drag and drop inside a menu-entry
* src/xterm.c (x_dnd_cleanup_drag_and_drop): Always free DND
targets even if waiting for finish.
(x_dnd_begin_drag_and_drop): Free targets correctly when
signalling error and prevent activating drag-and-drop inside a
menu or popup.  (It doesn't work.)
2022-04-12 16:38:02 +08:00
Michael Albinus
17f0900d7b Adapt macOS defaults in Tramp's process-attributes implementation
* doc/misc/tramp.texi (Remote processes):
Mention tramp-connection-local-darwin-ps-* constants.

* lisp/net/tramp-integration.el
(tramp-connection-local-darwin-ps-variables): Fix docstring.
(top): Simplify setting local profiles.

* test/lisp/net/tramp-tests.el (tramp-test31-list-system-processes)
(tramp-test31-process-attributes): New tests.
2022-04-12 09:41:11 +02:00
Filipp Gunbin
e258e58276 process-attributes-ps-args / process-attributes-ps-format for Darwin
* lisp/net/tramp-integration.el
(tramp-darwin-process-attributes-ps-args)
(tramp-darwin-process-attributes-ps-format)
(tramp-connection-local-darwin-ps-variables): New defconsts.  Add
them to connection-local variables.  Preset default "ps" profile
for Darwin.
2022-04-12 09:12:29 +02:00
Sean Whitton
2e9111813b Add two classic Common Lisp macro-writing macros
* lisp/emacs-lisp/cl-macs.el (cl-with-gensyms, cl-once-only): New macros.
2022-04-11 23:01:55 -07:00
Po Lu
e2b64f8999 Fix some DISPLAY variable related bugs on PGTK
* src/callproc.c (getenv_internal, make_environment_block):
Don't set DISPLAY on non-X GDK backends.  (bug#54844)
2022-04-12 13:27:56 +08:00
Po Lu
b15d9fcebb * src/xterm.c (frame_set_mouse_pixel_position): Avoid server grab. 2022-04-12 12:01:34 +08:00
Po Lu
bf44581a5e Don't use native image APIs for some types on Haiku
* src/haikuimage.c (haiku_can_use_native_image_api): Ignore
types with animations when their respective libraries are
present.
2022-04-12 02:37:39 +00:00
Po Lu
1ef57361ab Fix last tool bar bug on Haiku as well
* src/haikuterm.c (haiku_read_socket): Adapt last change to
Haiku.
2022-04-12 00:47:38 +00:00
Po Lu
60f66cc2a2 Fix selecting text and releasing the mouse buttons above the toolbar
* src/xterm.c (handle_one_xevent): Don't send ButtonRelease
events to tool bars if there is no selected tool bar item.
2022-04-12 08:41:19 +08:00
Stefan Monnier
6a480c830b * lisp/emacs-lisp/macroexp.el (macroexp-let2*): Allow common shorthand 2022-04-11 15:10:51 -04:00
Paul Eggert
d6338f8a6a Use preferred chars among duplicates as per UTR#25 §25. 2022-04-11 10:54:28 -07:00
Juri Linkov
67505e0355 * lisp/minibuffer.el (minibuffer-completion-auto-choose): New defcustom.
(minibuffer-choose-previous-completion)
(minibuffer-choose-next-completion): Remove commands.
(minibuffer-local-completion-map): Remove keybindings of
minibuffer-choose-next-completion and minibuffer-choose-previous-completion.
Use them for minibuffer-next-completion and minibuffer-previous-completion.
* lisp/simple.el (minibuffer-local-shell-command-map): Idem.
2022-04-11 19:52:47 +03:00
Lars Ingebrigtsen
1c28b9ed1a Make normal image caching actually work when doing animated images
* src/image.c (filter_image_spec): New function.
(uncache_image): Use it.
(lookup_image): Ditto.
(syms_of_image): Define some keywords.
2022-04-11 18:50:39 +02:00
Juri Linkov
aeffeccb40 ; etc/NEWS: Fix grammer. 2022-04-11 19:48:13 +03:00
Lars Ingebrigtsen
2c45d3cae0 Make more IPV6 domains non-suspicious in textsec
* lisp/international/textsec.el (textsec--ipvx-address-p): Make
more IPV6 domains non-suspicious.
2022-04-11 17:36:26 +02:00
Mattias Engdegård
949bc336a0 ; * src/image.c: move #endif to correct place 2022-04-11 17:11:00 +02:00
Lars Ingebrigtsen
0e7185cefa Make gif_load work across architectures again
* src/image.c (gif_load): Invert the way animated pixmaps are
created: Work on the cached computed-so-far pixmap, and then copy
the entire thing to the ximg with PUT_PIXEL at the end.  This
should work across platforms, which the previous version didn't.
2022-04-11 16:52:34 +02:00
Lars Ingebrigtsen
be48dfe0b3 Revert "; * src/image.c (gif_load): Fix compilation error on MS-Windows."
This reverts commit a715f2fbe7.

This is fixed in a different way in a subsequent commit.
2022-04-11 16:45:14 +02:00
Mattias Engdegård
26db1ca80e Recognise hybrid IPv6/IPv4 addresses in textsec (bug#54624)
* lisp/international/textsec.el (textsec--ipvx-address-p):
  Recognise hybrid addresses like "::ffff:129.55.2.201".
  Combine to a single regexp and translate to rx.
  Remove some regexp ambiguity (relint complaint).
* test/lisp/international/textsec-tests.el (test-suspiction-domain):
  Add test cases.
2022-04-11 16:29:24 +02:00
Eli Zaretskii
a715f2fbe7 ; * src/image.c (gif_load): Fix compilation error on MS-Windows. 2022-04-11 17:04:31 +03:00
Lars Ingebrigtsen
68ec0ffa21 Fix anim_cache garbage collection
* src/image.c (struct anim_cache): Move earlier.
(mark_image_cache): Mark the Lisp_Object in the anim cache.
2022-04-11 15:18:41 +02:00
Lars Ingebrigtsen
0347969bdf Fix compilation errors when HAVE_GIF and not HAVE_WEBP
* src/image.c: Enable the cache functions when HAVE_GIF, too
2022-04-11 14:54:31 +02:00
Lars Ingebrigtsen
8b7aaf3e56 Speed up GIF animations
* src/image.c (anim_prune_animation_cache): Tweak the destructor
API.
(gif_destroy): New function.
(gif_load): Use a cache to avoid quadratic CPU usage for animated
images (bug#45224).
(webp_destroy): New function.
(webp_load): Use it.
2022-04-11 14:38:27 +02:00
Lars Ingebrigtsen
5141234acf Refactor the webp cache code to allow usage by gif_load, too
* src/image.c (struct anim_cache, anim_create_cache)
(anim_prune_animation_cache, anim_get_animation_cache): Rename
from webp_cache (etc) to prepare for usage in the gif animation
implementation, too.
(webp_load): Adjust cache usage.
2022-04-11 13:35:56 +02:00
Po Lu
07ee24d83d Fix event source attribution for GTK input methods
* src/gtkutil.c (xg_im_context_commit): Use pending keystroke
source if it exists.
2022-04-11 19:27:48 +08:00
Lars Ingebrigtsen
11080420dd Improve gif_load error messages
* src/image.c (gif_load): Improve error reporting (bug#54848).
2022-04-11 12:32:55 +02:00
Lars Ingebrigtsen
7d5d0abd2d Ensure shell.el loading properly
* lisp/shell.el (subr-x): Require for string-chop-newline
(bug#54834).
2022-04-11 12:12:49 +02:00
Po Lu
7140b1e82d Always cascade from toplevel frames on Haiku
* src/haikufns.c (haiku_create_frame): Cascade from toplevel
frames, since otherwise the positions are wrong anyway, and it
doesn't make sense to cascade from a frame that disappears when
it becomes deactivated.
2022-04-11 07:45:37 +00:00
Po Lu
a6bfc3cb87 Fix IM event source attribution on GTK
* src/xterm.c (handle_one_xevent): Set pending times on GTK as
well.
* src/gtkutil.c (xg_widget_key_press_event_cb): Respect pending
keystroke time on XI2.
2022-04-11 12:25:51 +08:00
Po Lu
bdd7cd0d2e * src/xterm.c (handle_one_event): Make event attribution more accurate. 2022-04-11 09:16:22 +08:00
Augusto Stoffel
48cb9c4aaa Add lazy highlight when reading 'query-replace' arguments
* lisp/replace.el (query-replace-read-args):  Use
'minibuffer-lazy-highlight-setup' to highlight the text to be replaced
in the original buffer (and a match count, if applicable).
(replace--region-filter): New function for code that
used to be inlined in perform-replace but is useful elsewhere.
(perform-replace): Use 'replace--region-filter'.
2022-04-10 22:37:04 +03:00
Augusto Stoffel
4c0c9d23ab Rewrite the minibuffer lazy highlight feature
The new API was discussed in bug#53126.  It's more robust and easier
to use in complex cases like that of 'query-replace'.

* etc/NEWS: Amend the feature announcement
* lisp/isearch.el (isearch-edit-string): Use new API.
(minibuffer-lazy-highlight-transform,
minibuffer-lazy-highlight--overlay, minibuffer-lazy-highlight--count,
minibuffer-lazy-highlight--after-change,
minibuffer-lazy-highlight--exit) Remove helper functions, which are
now kept together with the lazy highlight configuration variables
within a closure.
(minibuffer-lazy-highlight-setup): This function now takes the lazy
highlighting configuration variables as argument, and returns a
closure that is intended to run as part of the minibuffer setup.
2022-04-10 22:36:47 +03:00
Lars Ingebrigtsen
7c6cdc1eff Fix markup in Drag and Drop
* doc/emacs/frames.texi (Drag and Drop): Fix markup.
2022-04-10 16:15:29 +02:00
Eli Zaretskii
8addfafc2a Fix WebP image support on MS-Windows
* src/image.c (init_webp_functions) [WINDOWSNT]: Load Demux
functions from the WebPDemux DLL.  Load internal functions where
the public APIs are inline functions defined in the WebP headers.
(WebPAnimDecoderOptionsInit) [WINDOWSNT]: Define to call
'WebPAnimDecoderOptionsInitInternal'.
(WebPDemux): Define to call 'WebPDemuxInternal'.
(WebPAnimDecoderNew): Define to call
'WebPAnimDecoderNewInternal'.
(syms_of_image) <webpdemux>: New symbol.

* lisp/term/w32-win.el (dynamic-library-alist): Add a member for
'webpdemux'.
2022-04-10 16:45:43 +03:00
Kévin Le Gouguec
a64e5a3a84 Fix a ja-dic compilation warning
* leim/Makefile.in (${leimdir}/ja-dic/ja-dic.el): Increase
specpdl-size to avoid a compilation warning (bug#54816).
2022-04-10 14:43:02 +02:00
Alan Mackenzie
02b521ad74 CC Mode: Fix unwanted fontification of function call as function declaration
This happens when the enclosing function's return type is a struct, etc.  This
fixes bug #54743;

* lisp/progmodes/cc-engine.el (c-update-brace-stack): Replace "(" by ")" in a
`member' call.
2022-04-10 12:20:39 +00:00
Kaushal Modi
cca47ae555 Update docstrings for shortdoc.el FUNC lisp form API
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group):
Updated docstrings.
2022-04-10 13:52:49 +02:00