Mercurial > emacs
comparison src/xselect.c @ 13555:e640f6afb190
(x_clear_frame_selections): Get selection_symbol properly.
(x_clear_frame_selections): Undo previous change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 15 Nov 1995 18:32:09 +0000 |
parents | b36aa014cee4 |
children | 037f27af8c7b |
comparison
equal
deleted
inserted
replaced
13554:626f0886b434 | 13555:e640f6afb190 |
---|---|
816 XSETFRAME (frame, f); | 816 XSETFRAME (frame, f); |
817 | 817 |
818 /* Otherwise, we're really honest and truly being told to drop it. | 818 /* Otherwise, we're really honest and truly being told to drop it. |
819 Don't use Fdelq as that may QUIT;. */ | 819 Don't use Fdelq as that may QUIT;. */ |
820 | 820 |
821 /* Delete elements from the beginning of Vselection_alist. */ | |
822 while (!NILP (Vselection_alist) | |
823 && EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (Vselection_alist))))))) | |
824 { | |
825 /* Let random Lisp code notice that the selection has been stolen. */ | |
826 Lisp_Object hooks, selection_symbol; | |
827 | |
828 hooks = Vx_lost_selection_hooks; | |
829 selection_symbol = Fcar (Fcar (Vselection_alist)); | |
830 | |
831 if (!EQ (hooks, Qunbound)) | |
832 { | |
833 for (; CONSP (hooks); hooks = Fcdr (hooks)) | |
834 call1 (Fcar (hooks), selection_symbol); | |
835 redisplay_preserve_echo_area (); | |
836 } | |
837 | |
838 Vselection_alist = Fcdr (Vselection_alist); | |
839 } | |
840 | |
841 /* Delete elements after the beginning of Vselection_alist. */ | |
821 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) | 842 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) |
822 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCONS (rest)->cdr))))))) | 843 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCONS (rest)->cdr))))))) |
823 { | 844 { |
824 /* Let random Lisp code notice that the selection has been stolen. */ | 845 /* Let random Lisp code notice that the selection has been stolen. */ |
825 Lisp_Object hooks, selection_symbol; | 846 Lisp_Object hooks, selection_symbol; |
826 | 847 |
827 hooks = Vx_lost_selection_hooks; | 848 hooks = Vx_lost_selection_hooks; |
828 selection_symbol = Fcar (XCONS (rest)->cdr); | 849 selection_symbol = Fcar (Fcar (XCONS (rest)->cdr)); |
829 | 850 |
830 if (!EQ (hooks, Qunbound)) | 851 if (!EQ (hooks, Qunbound)) |
831 { | 852 { |
832 for (; CONSP (hooks); hooks = Fcdr (hooks)) | 853 for (; CONSP (hooks); hooks = Fcdr (hooks)) |
833 call1 (Fcar (hooks), selection_symbol); | 854 call1 (Fcar (hooks), selection_symbol); |