1 |
;;; lselect.el --- Lucid interface to X Selections |
;;; lselect.el --- Lucid interface to X Selections |
2 |
|
|
3 |
;; Copyright (C) 1990, 1993 Free Software Foundation, Inc. |
;; Copyright (C) 1990, 1993, 2004 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Maintainer: FSF |
;; Maintainer: FSF |
6 |
;; Keywords: emulations |
;; Keywords: emulations |
146 |
(x-disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY))) |
(x-disown-selection-internal (if secondary-p 'SECONDARY 'PRIMARY))) |
147 |
|
|
148 |
(defun x-dehilight-selection (selection) |
(defun x-dehilight-selection (selection) |
149 |
"for use as a value of x-lost-selection-hooks." |
"for use as a value of `x-lost-selection-functions'." |
150 |
(cond ((eq selection 'PRIMARY) |
(cond ((eq selection 'PRIMARY) |
151 |
(if primary-selection-extent |
(if primary-selection-extent |
152 |
(let ((inhibit-quit t)) |
(let ((inhibit-quit t)) |
160 |
(setq secondary-selection-extent nil))))) |
(setq secondary-selection-extent nil))))) |
161 |
nil) |
nil) |
162 |
|
|
163 |
(setq x-lost-selection-hooks 'x-dehilight-selection) |
(setq x-lost-selection-functions 'x-dehilight-selection) |
164 |
|
|
165 |
(defun x-notice-selection-requests (selection type successful) |
(defun x-notice-selection-requests (selection type successful) |
166 |
"for possible use as the value of x-sent-selection-hooks." |
"for possible use as the value of `x-sent-selection-functions'." |
167 |
(if (not successful) |
(if (not successful) |
168 |
(message "Selection request failed to convert %s to %s" |
(message "Selection request failed to convert %s to %s" |
169 |
selection type) |
selection type) |
170 |
(message "Sent selection %s as %s" selection type))) |
(message "Sent selection %s as %s" selection type))) |
171 |
|
|
172 |
(defun x-notice-selection-failures (selection type successful) |
(defun x-notice-selection-failures (selection type successful) |
173 |
"for possible use as the value of x-sent-selection-hooks." |
"for possible use as the value of `x-sent-selection-functions'." |
174 |
(or successful |
(or successful |
175 |
(message "Selection request failed to convert %s to %s" |
(message "Selection request failed to convert %s to %s" |
176 |
selection type))) |
selection type))) |
177 |
|
|
178 |
;(setq x-sent-selection-hooks 'x-notice-selection-requests) |
;(setq x-sent-selection-functions 'x-notice-selection-requests) |
179 |
;(setq x-sent-selection-hooks 'x-notice-selection-failures) |
;(setq x-sent-selection-functions 'x-notice-selection-failures) |
180 |
|
|
181 |
|
|
182 |
;; Random utility functions |
;; Random utility functions |
232 |
|
|
233 |
(provide 'lselect) |
(provide 'lselect) |
234 |
|
|
235 |
;;; arch-tag: 92fa54d4-c5d1-4e9b-ad58-cf1e13930556 |
;; arch-tag: 92fa54d4-c5d1-4e9b-ad58-cf1e13930556 |
236 |
;;; lselect.el ends here |
;;; lselect.el ends here |