changeset 102285:ece8e00c3763

* x-dnd.el (x-dnd-test-function, x-dnd-get-state-cons-for-frame) (x-dnd-get-state-for-frame, x-dnd-handle-moz-url) (x-dnd-handle-uri-list, x-dnd-choose-type, x-dnd-get-drop-width-height) (x-dnd-init-motif-for-frame): Fix typos in docstrings. (x-dnd-drop-data, x-dnd-types-alist, x-dnd-default-test-function): Reflow docstrings.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 26 Feb 2009 10:26:32 +0000
parents 54ac3994d290
children 56670ab44a20
files lisp/ChangeLog lisp/x-dnd.el
diffstat 2 files changed, 30 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Feb 26 10:18:15 2009 +0000
+++ b/lisp/ChangeLog	Thu Feb 26 10:26:32 2009 +0000
@@ -1,3 +1,12 @@
+2009-02-26  Juanma Barranquero  <lekktu@gmail.com>
+
+	* x-dnd.el (x-dnd-test-function, x-dnd-get-state-cons-for-frame)
+	(x-dnd-get-state-for-frame, x-dnd-handle-moz-url)
+	(x-dnd-handle-uri-list, x-dnd-choose-type, x-dnd-get-drop-width-height)
+	(x-dnd-init-motif-for-frame): Fix typos in docstrings.
+	(x-dnd-drop-data, x-dnd-types-alist, x-dnd-default-test-function):
+	Reflow docstrings.
+
 2009-02-26  Glenn Morris  <rgm@gnu.org>
 
 	* mail/rmailsum.el (rmail-summary-rmail-update):
--- a/lisp/x-dnd.el	Thu Feb 26 10:18:15 2009 +0000
+++ b/lisp/x-dnd.el	Thu Feb 26 10:26:32 2009 +0000
@@ -33,12 +33,12 @@
 ;;; Customizable variables
 (defcustom x-dnd-test-function 'x-dnd-default-test-function
   "The function drag and drop uses to determine if to accept or reject a drop.
-The function takes three arguments, WINDOW ACTION and TYPES.
+The function takes three arguments, WINDOW, ACTION and TYPES.
 WINDOW is where the mouse is when the function is called.  WINDOW may be a
 frame if the mouse isn't over a real window (i.e. menu bar, tool bar or
 scroll bar).  ACTION is the suggested action from the drag and drop source,
-one of the symbols move, copy link or ask.  TYPES is a list of available types
-for the drop.
+one of the symbols move, copy, link or ask.  TYPES is a list of available
+types for the drop.
 
 The function shall return nil to reject the drop or a cons with two values,
 the wanted action as car and the wanted type as cdr.  The wanted action
@@ -71,8 +71,8 @@
 and DATA.  WINDOW is where the drop occurred, ACTION is the action for
 this drop (copy, move, link, private or ask) as determined by a previous
 call to `x-dnd-test-function'.  DATA is the drop data.
-The function shall return the action used (copy, move, link or private) if drop
-is successful, nil if not."
+The function shall return the action used (copy, move, link or private)
+if drop is successful, nil if not."
   :version "22.1"
   :type 'alist
   :group 'x)
@@ -130,7 +130,7 @@
     (x-dnd-init-motif-for-frame frame)))
 
 (defun x-dnd-get-state-cons-for-frame (frame-or-window)
-  "Return the entry in x-dnd-current-state for a frame or window."
+  "Return the entry in `x-dnd-current-state' for a frame or window."
   (let* ((frame (if (framep frame-or-window) frame-or-window
 		  (window-frame frame-or-window)))
 	 (display (frame-parameter frame 'display)))
@@ -140,13 +140,13 @@
     (assoc display x-dnd-current-state)))
 
 (defun x-dnd-get-state-for-frame (frame-or-window)
-  "Return the state in x-dnd-current-state for a frame or window."
+  "Return the state in `x-dnd-current-state' for a frame or window."
   (cdr (x-dnd-get-state-cons-for-frame frame-or-window)))
 
 (defun x-dnd-default-test-function (window action types)
   "The default test function for drag and drop.
-WINDOW is where the mouse is when this function is called.  It may be a frame
-if the mouse is over the menu bar, scroll bar or tool bar.
+WINDOW is where the mouse is when this function is called.  It may be
+a frame if the mouse is over the menu bar, scroll bar or tool bar.
 ACTION is the suggested action from the source, and TYPES are the
 types the drop data can have.  This function only accepts drops with
 types in `x-dnd-known-types'.  It always returns the action private."
@@ -212,7 +212,7 @@
 (defun x-dnd-handle-moz-url (window action data)
   "Handle one item of type text/x-moz-url.
 WINDOW is the window where the drop happened.  ACTION is ignored.
-DATA is the moz-url, which is formatted as two strings separated by \r\n.
+DATA is the moz-url, which is formatted as two strings separated by \\r\\n.
 The first string is the URL, the second string is the title of that URL.
 DATA is encoded in utf-16.  Decode the URL and call `x-dnd-handle-uri-list'."
   ;; Mozilla and applications based on it (Galeon for example) uses
@@ -249,11 +249,11 @@
 (defun x-dnd-handle-uri-list (window action string)
   "Split an uri-list into separate URIs and call `dnd-handle-one-url'.
 WINDOW is the window where the drop happened.
-STRING is the uri-list as a string.  The URIs are separated by \r\n."
+STRING is the uri-list as a string.  The URIs are separated by \\r\\n."
   (let ((uri-list (split-string string "[\0\r\n]" t))
 	retval)
     (dolist (bf uri-list)
-      ;; If one URL is handeled, treat as if the whole drop succeeded.
+      ;; If one URL is handled, treat as if the whole drop succeeded.
       (let ((did-action (dnd-handle-one-url window action bf)))
 	(when did-action (setq retval did-action))))
     retval))
@@ -268,7 +268,7 @@
 			 default-file-name-coding-system)))
 	retval)
     (dolist (bf uri-list)
-      ;; If one URL is handeled, treat as if the whole drop succeeded.
+      ;; If one URL is handled, treat as if the whole drop succeeded.
       (if coding (setq bf (encode-coding-string bf coding)))
       (let* ((file-uri (concat "file://"
 			       (mapconcat 'url-hexify-string
@@ -282,7 +282,7 @@
   "Choose which type we want to receive for the drop.
 TYPES are the types the source of the drop offers, a vector of type names
 as strings or symbols.  Select among the types in `x-dnd-known-types' or
-KNOWN-TYPES if given,  and return that type name.
+KNOWN-TYPES if given, and return that type name.
 If no suitable type is found, return nil."
   (let* ((known-list (or known-types x-dnd-known-types))
 	 (first-known-type (car known-list))
@@ -303,10 +303,10 @@
 
 (defun x-dnd-drop-data (event frame window data type)
   "Drop one data item onto a frame.
-EVENT is the client message for the drop, FRAME is the frame the drop occurred
-on.  WINDOW is the window of FRAME where the drop happened.  DATA is the data
-received from the source, and type is the type for DATA, see
-`x-dnd-types-alist').
+EVENT is the client message for the drop, FRAME is the frame the drop
+occurred on.  WINDOW is the window of FRAME where the drop happened.
+DATA is the data received from the source, and type is the type for DATA,
+see `x-dnd-types-alist').
 
 Returns the action used (move, copy, link, private) if drop was successful,
 nil if not."
@@ -389,10 +389,10 @@
 			    frame "ATOM" 32 t))
 
 (defun x-dnd-get-drop-width-height (frame w accept)
-  "Return the widht/height to be sent in a XDndStatus message.
+  "Return the width/height to be sent in a XDndStatus message.
 FRAME is the frame and W is the window where the drop happened.
 If ACCEPT is nil return 0 (empty rectangle),
-otherwise if W is a window, return its widht/height,
+otherwise if W is a window, return its width/height,
 otherwise return the frame width/height."
   (if accept
       (if (windowp w)   ;; w is not a window if dropping on the menu bar,
@@ -520,7 +520,7 @@
 ;;;  Motif protocol.
 
 (defun x-dnd-init-motif-for-frame (frame)
-  "Set _MOTIF_DRAG_RECEIVER_INFO  for FRAME to indicate that we do Motif DND."
+  "Set _MOTIF_DRAG_RECEIVER_INFO for FRAME to indicate that we do Motif DND."
   (x-change-window-property "_MOTIF_DRAG_RECEIVER_INFO"
 			    (list
 			     (byteorder)