[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9b8a507: Don't error out when selection data is unavailable (bug#
From: |
Juri Linkov |
Subject: |
master 9b8a507: Don't error out when selection data is unavailable (bug#47642) |
Date: |
Wed, 14 Apr 2021 14:23:15 -0400 (EDT) |
branch: master
commit 9b8a5070e5af506158e998e6125c3dab44fa8e5f
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
Don't error out when selection data is unavailable (bug#47642)
* src/xselect.c (x_get_window_property_as_lisp_data):
Display a message and return nil when data is not available.
---
src/xselect.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/xselect.c b/src/xselect.c
index 030f624..cd6d86b 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1482,14 +1482,21 @@ x_get_window_property_as_lisp_data (struct
x_display_info *dpyinfo,
= XGetSelectionOwner (display, selection_atom) != 0;
unblock_input ();
if (there_is_a_selection_owner)
- signal_error ("Selection owner couldn't convert",
- actual_type
- ? list2 (target_type,
- x_atom_to_symbol (dpyinfo, actual_type))
- : target_type);
+ {
+ AUTO_STRING (format, "Selection owner couldn't convert: %s");
+ CALLN (Fmessage, format,
+ actual_type
+ ? list2 (target_type,
+ x_atom_to_symbol (dpyinfo, actual_type))
+ : target_type);
+ return Qnil;
+ }
else
- signal_error ("No selection",
- x_atom_to_symbol (dpyinfo, selection_atom));
+ {
+ AUTO_STRING (format, "No selection: %s");
+ CALLN (Fmessage, format, x_atom_to_symbol (dpyinfo, selection_atom));
+ return Qnil;
+ }
}
if (actual_type == dpyinfo->Xatom_INCR)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 9b8a507: Don't error out when selection data is unavailable (bug#47642),
Juri Linkov <=