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 | |
| parent | c34607fc30a2d12cc90e2d0fe378b034c45ada47 (diff) | |
| download | emacs-a6127c0f7adaead98330ef97d67606b13bc658fa.tar.gz emacs-a6127c0f7adaead98330ef97d67606b13bc658fa.zip | |
(interprogram-paste-function): Handle empty clipboard.
| -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 df29ecdbb47..0eca76d76e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,9 @@ | |||
| 1 | 2003-01-22 <karl@gnu.org> | 1 | 2003-01-23 John Paul Wallington <jpw@shootybangbang.com> |
| 2 | |||
| 3 | * term/mac-win.el (interprogram-paste-function): Handle empty | ||
| 4 | clipboard. | ||
| 5 | |||
| 6 | 2003-01-22 Karl Berry <karl@gnu.org> | ||
| 2 | 7 | ||
| 3 | * info.el (Info-index): change pattern so that index entries with | 8 | * info.el (Info-index): change pattern so that index entries with |
| 4 | colons can be read properly; also, require at least one space | 9 | 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 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\ |