diff options
| author | Juanma Barranquero | 2007-06-14 00:09:10 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-06-14 00:09:10 +0000 |
| commit | 011acd1803f5771dc08899ca65aa7418c5d5e0de (patch) | |
| tree | 133faec87f3aca3fd746227c9d56458b615b431a | |
| parent | ccb13f4de6e04f832c88a29b225d352a2c65679b (diff) | |
| download | emacs-011acd1803f5771dc08899ca65aa7418c5d5e0de.tar.gz emacs-011acd1803f5771dc08899ca65aa7418c5d5e0de.zip | |
(x-dnd-maybe-call-test-function, x-dnd-save-state, x-dnd-drop-data):
Remove redundant checks.
| -rw-r--r-- | lisp/x-dnd.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index c3a9e7910a6..a215faab85e 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el | |||
| @@ -171,7 +171,7 @@ FRAME-OR-WINDOW is the frame or window that the mouse is over." | |||
| 171 | WINDOW is the window the mouse is over. ACTION is the suggested | 171 | WINDOW is the window the mouse is over. ACTION is the suggested |
| 172 | action from the source. If nothing has changed, return the last | 172 | action from the source. If nothing has changed, return the last |
| 173 | action and type we got from `x-dnd-test-function'." | 173 | action and type we got from `x-dnd-test-function'." |
| 174 | (let ((buffer (when (and (windowp window) (window-live-p window)) | 174 | (let ((buffer (when (window-live-p window) |
| 175 | (window-buffer window))) | 175 | (window-buffer window))) |
| 176 | (current-state (x-dnd-get-state-for-frame window))) | 176 | (current-state (x-dnd-get-state-for-frame window))) |
| 177 | (when (or (not (equal buffer (aref current-state 0))) | 177 | (when (or (not (equal buffer (aref current-state 0))) |
| @@ -206,9 +206,7 @@ EXTRA-DATA is data needed for a specific protocol." | |||
| 206 | (when types (aset current-state 2 types)) | 206 | (when types (aset current-state 2 types)) |
| 207 | (when extra-data (aset current-state 6 extra-data)) | 207 | (when extra-data (aset current-state 6 extra-data)) |
| 208 | (aset current-state 1 window) | 208 | (aset current-state 1 window) |
| 209 | (aset current-state 0 (if (and (windowp window) | 209 | (aset current-state 0 (and (window-live-p window) (window-buffer window))) |
| 210 | (window-live-p window)) | ||
| 211 | (window-buffer window) nil)) | ||
| 212 | (setcdr (x-dnd-get-state-cons-for-frame window) current-state))) | 210 | (setcdr (x-dnd-get-state-cons-for-frame window) current-state))) |
| 213 | 211 | ||
| 214 | 212 | ||
| @@ -319,7 +317,7 @@ nil if not." | |||
| 319 | (action (aref state 5)) | 317 | (action (aref state 5)) |
| 320 | (w (posn-window (event-start event)))) | 318 | (w (posn-window (event-start event)))) |
| 321 | (when handler | 319 | (when handler |
| 322 | (if (and (windowp w) (window-live-p w) | 320 | (if (and (window-live-p w) |
| 323 | (not (window-minibuffer-p w)) | 321 | (not (window-minibuffer-p w)) |
| 324 | (not (window-dedicated-p w))) | 322 | (not (window-dedicated-p w))) |
| 325 | ;; If dropping in an ordinary window which we could use, | 323 | ;; If dropping in an ordinary window which we could use, |