# HG changeset patch # User John Paul Wallington # Date 1043280260 0 # Node ID 689e43474805c7c4d6a8acddfb3fb2e7e6522bb8 # Parent 81f3c177abae216c1084741f6f4716f71e3abdd2 (interprogram-paste-function): Handle empty clipboard. diff -r 81f3c177abae -r 689e43474805 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jan 22 23:16:41 2003 +0000 +++ b/lisp/ChangeLog Thu Jan 23 00:04:20 2003 +0000 @@ -1,4 +1,9 @@ -2003-01-22 +2003-01-23 John Paul Wallington + + * term/mac-win.el (interprogram-paste-function): Handle empty + clipboard. + +2003-01-22 Karl Berry * info.el (Info-index): change pattern so that index entries with colons can be read properly; also, require at least one space diff -r 81f3c177abae -r 689e43474805 lisp/term/mac-win.el --- a/lisp/term/mac-win.el Wed Jan 22 23:16:41 2003 +0000 +++ b/lisp/term/mac-win.el Thu Jan 23 00:04:20 2003 +0000 @@ -125,15 +125,16 @@ ;; 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\