diff options
| author | John Paul Wallington | 2003-01-23 00:04:20 +0000 |
|---|---|---|
| committer | John Paul Wallington | 2003-01-23 00:04:20 +0000 |
| commit | a6127c0f7adaead98330ef97d67606b13bc658fa (patch) | |
| tree | 038bc0e0087aeea9655cd0f176b87037f47811ef /lisp/term | |
| parent | c34607fc30a2d12cc90e2d0fe378b034c45ada47 (diff) | |
| download | emacs-a6127c0f7adaead98330ef97d67606b13bc658fa.tar.gz emacs-a6127c0f7adaead98330ef97d67606b13bc658fa.zip | |
(interprogram-paste-function): Handle empty clipboard.
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/mac-win.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 67fd5102125..22a2e7fab30 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -125,15 +125,16 @@ | |||
| 125 | ;; mac-paste-function are defined in mac.c. | 125 | ;; mac-paste-function are defined in mac.c. |
| 126 | (set-selection-coding-system 'compound-text-mac) | 126 | (set-selection-coding-system 'compound-text-mac) |
| 127 | 127 | ||
| 128 | (setq interprogram-cut-function | 128 | (setq interprogram-cut-function |
| 129 | '(lambda (str push) | 129 | '(lambda (str push) |
| 130 | (mac-cut-function | 130 | (mac-cut-function |
| 131 | (encode-coding-string str selection-coding-system t) push))) | 131 | (encode-coding-string str selection-coding-system t) push))) |
| 132 | 132 | ||
| 133 | (setq interprogram-paste-function | 133 | (setq interprogram-paste-function |
| 134 | '(lambda () | 134 | '(lambda () |
| 135 | (decode-coding-string | 135 | (let ((clipboard (mac-paste-function))) |
| 136 | (mac-paste-function) selection-coding-system t))) | 136 | (if clipboard |
| 137 | (decode-coding-string clipboard selection-coding-system t))))) | ||
| 137 | 138 | ||
| 138 | (defun mac-drag-n-drop (event) | 139 | (defun mac-drag-n-drop (event) |
| 139 | "Edit the files listed in the drag-n-drop event.\n\ | 140 | "Edit the files listed in the drag-n-drop event.\n\ |