Mercurial > hg > xemacs-beta
diff lisp/prim/frame.el @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | 49a24b4fd526 |
line wrap: on
line diff
--- a/lisp/prim/frame.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/frame.el Mon Aug 13 08:46:35 2007 +0200 @@ -773,15 +773,18 @@ (or deselect-frame-hook (add-hook 'deselect-frame-hook 'default-deselect-frame-hook)) -(defun default-drag-and-drop-functions (frame filepath) +(defun default-drag-and-drop-functions (frame filepath &optional data) "Implements the `drag-and-drop-functions' variable. For use as the value of `drag-and-drop-functions'. -This default simply pops up the file in the selected frame." - (let ((x pop-up-windows)) - (setq pop-up-windows nil) - (pop-to-buffer (find-file-noselect filepath) nil frame) - (make-frame-visible frame) - (setq pop-up-windows x))) +This default simply pops up the file in the selected frame or, +if the dragged object is a buffer, inserts it at point." + (if data + (insert data) + (let ((x pop-up-windows)) + (setq pop-up-windows nil) + (pop-to-buffer (find-file-noselect filepath) nil frame) + (make-frame-visible frame) + (setq pop-up-windows x)))) (and (boundp 'drag-and-drop-functions) (or drag-and-drop-functions