]> git.eshelyaron.com Git - emacs.git/commitdiff
(interprogram-paste-function): Handle empty clipboard.
authorJohn Paul Wallington <jpw@pobox.com>
Thu, 23 Jan 2003 00:04:20 +0000 (00:04 +0000)
committerJohn Paul Wallington <jpw@pobox.com>
Thu, 23 Jan 2003 00:04:20 +0000 (00:04 +0000)
lisp/ChangeLog
lisp/term/mac-win.el

index df29ecdbb47161d3673f2b8fb64676fbcb1420a3..0eca76d76e5b01d961867090a85745ca3e2674fc 100644 (file)
@@ -1,4 +1,9 @@
-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
index 67fd5102125ba4cb099dea4138d883654b89848c..22a2e7fab30032a31d02789b0c4583b726791239 100644 (file)
 ;; 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\