-2003-01-22 <karl@gnu.org>
+2003-01-23 John Paul Wallington <jpw@shootybangbang.com>
+
+ * term/mac-win.el (interprogram-paste-function): Handle empty
+ clipboard.
+
+2003-01-22 Karl Berry <karl@gnu.org>
* info.el (Info-index): change pattern so that index entries with
colons can be read properly; also, require at least one space
;; mac-paste-function are defined in mac.c.
(set-selection-coding-system 'compound-text-mac)
-(setq interprogram-cut-function
- '(lambda (str push)
+(setq interprogram-cut-function
+ '(lambda (str push)
(mac-cut-function
- (encode-coding-string str selection-coding-system t) push)))
+ (encode-coding-string str selection-coding-system t) push)))
-(setq interprogram-paste-function
- '(lambda ()
- (decode-coding-string
- (mac-paste-function) selection-coding-system t)))
+(setq interprogram-paste-function
+ '(lambda ()
+ (let ((clipboard (mac-paste-function)))
+ (if clipboard
+ (decode-coding-string clipboard selection-coding-system t)))))
(defun mac-drag-n-drop (event)
"Edit the files listed in the drag-n-drop event.\n\