diff options
-rw-r--r-- | lisp/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/term/mac-win.el | 15 |
2 files changed, 14 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df29ecdbb4..0eca76d76e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,9 @@ -2003-01-22 <[email protected]> +2003-01-23 John Paul Wallington <[email protected]> + + * term/mac-win.el (interprogram-paste-function): Handle empty + clipboard. + +2003-01-22 Karl Berry <[email protected]> * info.el (Info-index): change pattern so that index entries with colons can be read properly; also, require at least one space diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 67fd510212..22a2e7fab3 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -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\ |