;; SYNOPSIS: CLIPBOARD <=> win32/X.
;; AUTHOR: GPL(C) Mohsin Ahmed, http://www.cs.albany.edu/~mosh

(defun mosh-copy-to-clip ()
  (interactive)
  (cond
   (gnuemacs (clipboard-kill-ring-save (point) (mark)))
   (xemacs
    ;; (x-own-selection (buffer-substring (point) (mark)))
    ;; (x-copy-primary-selection)
    ;; (error "mosh-copy-to-clip doesn't work")
    (x-own-clipboard  (buffer-substring (point) (mark))))
  )
  (message "Region to clip")
)

(defun mosh-paste-clip ()
  (interactive)
  (cond
   (gnuemacs (clipboard-yank))
   (xemacs
    ; (x-insert-selection) (error "mosh-paste-clip doesn't work")
    (mouse-yank 0)  ; works with xterm, don't know what it means?
    )
  )
)

(provide 'mclip)

; EOF

