diff options
| author | Glenn Morris | 2013-01-30 09:16:30 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-01-30 09:16:30 -0800 |
| commit | 741d511359a7862a6f7c65da9e2952a1cc8cd92b (patch) | |
| tree | 82eb14584c41c47800782c2233a3492ce30cf5ce | |
| parent | 1d4e72256b0e35046a70f561a2da3169872feeb1 (diff) | |
| parent | c491dd7037811c143fd453722c48f81c4fece58a (diff) | |
| download | emacs-741d511359a7862a6f7c65da9e2952a1cc8cd92b.tar.gz emacs-741d511359a7862a6f7c65da9e2952a1cc8cd92b.zip | |
Merge from emacs-24; up to 2012-12-13T00:52:17Z!yamaoka@jpl.org
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/mouse.el | 59 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 20 |
3 files changed, 50 insertions, 41 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 868f6cf6fad..e46e66651ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2013-01-30 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * mouse.el (mouse-drag-line): Avoid pushing same event onto | ||
| 4 | unread-command-events twice in some cases. This tries to implement | ||
| 5 | the 2012-07-26 changes in a different way. (Bug#13560) | ||
| 6 | |||
| 7 | 2013-01-30 Fabián Ezequiel Gallina <fgallina@cuca> | ||
| 8 | |||
| 9 | * progmodes/python.el | ||
| 10 | (python-pdbtrack-comint-output-filter-function): Enhancements on | ||
| 11 | stacktrace detection. (thanks @gnovak) | ||
| 12 | |||
| 1 | 2013-01-30 Stefan Monnier <monnier@iro.umontreal.ca> | 13 | 2013-01-30 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 14 | ||
| 3 | * jit-lock.el (jit-lock-stealth-chunk-start): Don't widen (bug#13542). | 15 | * jit-lock.el (jit-lock-stealth-chunk-start): Don't widen (bug#13542). |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 538e6a500bb..9c7bf6f9c36 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -425,7 +425,7 @@ must be one of the symbols `header', `mode', or `vertical'." | |||
| 425 | (frame-parameters frame))) | 425 | (frame-parameters frame))) |
| 426 | 'right))) | 426 | 'right))) |
| 427 | (draggable t) | 427 | (draggable t) |
| 428 | finished event position growth dragged) | 428 | event position growth dragged) |
| 429 | (cond | 429 | (cond |
| 430 | ((eq line 'header) | 430 | ((eq line 'header) |
| 431 | ;; Check whether header-line can be dragged at all. | 431 | ;; Check whether header-line can be dragged at all. |
| @@ -456,39 +456,33 @@ must be one of the symbols `header', `mode', or `vertical'." | |||
| 456 | 456 | ||
| 457 | ;; Start tracking. | 457 | ;; Start tracking. |
| 458 | (track-mouse | 458 | (track-mouse |
| 459 | ;; Loop reading events and sampling the position of the mouse. | 459 | ;; Loop reading events and sampling the position of the mouse, |
| 460 | (while (not finished) | 460 | ;; until there is a non-mouse-movement event. Also, |
| 461 | (setq event (read-event)) | 461 | ;; scroll-bar-movement events are the same as mouse movement for |
| 462 | ;; our purposes. (Why? -- cyd) | ||
| 463 | ;; If you change this, check that all of the following still work: | ||
| 464 | ;; Resizing windows by dragging mode-lines and header lines, | ||
| 465 | ;; and vertical lines (in windows without scroll bars). | ||
| 466 | ;; Doing this should not select another window, even if | ||
| 467 | ;; mouse-autoselect-window is non-nil. | ||
| 468 | ;; Mouse-1 clicks in Info header lines should advance position | ||
| 469 | ;; by one node at a time if mouse-1-click-follows-link is non-nil, | ||
| 470 | ;; otherwise they should just select the window. | ||
| 471 | (while (progn | ||
| 472 | (setq event (read-event)) | ||
| 473 | (memq (car-safe event) | ||
| 474 | '(mouse-movement scroll-bar-movement | ||
| 475 | switch-frame select-window))) | ||
| 462 | (setq position (mouse-position)) | 476 | (setq position (mouse-position)) |
| 463 | ;; Do nothing if | 477 | ;; Do nothing if |
| 464 | ;; - there is a switch-frame event. | 478 | ;; - there is a switch-frame event. |
| 465 | ;; - the mouse isn't in the frame that we started in | 479 | ;; - the mouse isn't in the frame that we started in |
| 466 | ;; - the mouse isn't in any Emacs frame | 480 | ;; - the mouse isn't in any Emacs frame |
| 467 | ;; Drag if | ||
| 468 | ;; - there is a mouse-movement event | ||
| 469 | ;; - there is a scroll-bar-movement event (Why? -- cyd) | ||
| 470 | ;; (same as mouse movement for our purposes) | ||
| 471 | ;; Quit if | ||
| 472 | ;; - there is a keyboard event or some other unknown event. | ||
| 473 | (cond | 481 | (cond |
| 474 | ((not (consp event)) | ||
| 475 | (setq finished t)) | ||
| 476 | ((memq (car event) '(switch-frame select-window)) | 482 | ((memq (car event) '(switch-frame select-window)) |
| 477 | nil) | 483 | nil) |
| 478 | ((not (memq (car event) '(mouse-movement scroll-bar-movement))) | 484 | ((not (and (eq (car position) frame) |
| 479 | (when (consp event) | 485 | (cadr position))) |
| 480 | ;; Do not unread a drag-mouse-1 event to avoid selecting | ||
| 481 | ;; some other window. For vertical line dragging do not | ||
| 482 | ;; unread mouse-1 events either (but only if we dragged at | ||
| 483 | ;; least once to allow mouse-1 clicks get through). | ||
| 484 | (unless (and dragged | ||
| 485 | (if (eq line 'vertical) | ||
| 486 | (memq (car event) '(drag-mouse-1 mouse-1)) | ||
| 487 | (eq (car event) 'drag-mouse-1))) | ||
| 488 | (push event unread-command-events))) | ||
| 489 | (setq finished t)) | ||
| 490 | ((not (and (eq (car position) frame) | ||
| 491 | (cadr position))) | ||
| 492 | nil) | 486 | nil) |
| 493 | ((eq line 'vertical) | 487 | ((eq line 'vertical) |
| 494 | ;; Drag vertical divider. | 488 | ;; Drag vertical divider. |
| @@ -512,12 +506,13 @@ must be one of the symbols `header', `mode', or `vertical'." | |||
| 512 | growth | 506 | growth |
| 513 | (- growth))))))) | 507 | (- growth))))))) |
| 514 | ;; Process the terminating event. | 508 | ;; Process the terminating event. |
| 515 | (when (and (mouse-event-p event) on-link (not dragged) | 509 | (unless dragged |
| 516 | (mouse--remap-link-click-p start-event event)) | 510 | (when (and (mouse-event-p event) on-link |
| 517 | ;; If mouse-2 has never been done by the user, it doesn't have | 511 | (mouse--remap-link-click-p start-event event)) |
| 518 | ;; the necessary property to be interpreted correctly. | 512 | ;; If mouse-2 has never been done by the user, it doesn't have |
| 519 | (put 'mouse-2 'event-kind 'mouse-click) | 513 | ;; the necessary property to be interpreted correctly. |
| 520 | (setcar event 'mouse-2) | 514 | (put 'mouse-2 'event-kind 'mouse-click) |
| 515 | (setcar event 'mouse-2)) | ||
| 521 | (push event unread-command-events)))) | 516 | (push event unread-command-events)))) |
| 522 | 517 | ||
| 523 | (defun mouse-drag-mode-line (start-event) | 518 | (defun mouse-drag-mode-line (start-event) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a1322239b35..2cb108cc316 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2327,15 +2327,17 @@ Argument OUTPUT is a string with the output from the comint process." | |||
| 2327 | (file-name | 2327 | (file-name |
| 2328 | (with-temp-buffer | 2328 | (with-temp-buffer |
| 2329 | (insert full-output) | 2329 | (insert full-output) |
| 2330 | (goto-char (point-min)) | 2330 | ;; When the debugger encounters a pdb.set_trace() |
| 2331 | ;; OK, this sucked but now it became a cool hack. The | 2331 | ;; command, it prints a single stack frame. Sometimes |
| 2332 | ;; stacktrace information normally is on the first line | 2332 | ;; it prints a bit of extra information about the |
| 2333 | ;; but in some cases (like when doing a step-in) it is | 2333 | ;; arguments of the present function. When ipdb |
| 2334 | ;; on the second. | 2334 | ;; encounters an exception, it prints the _entire_ stack |
| 2335 | (when (or (looking-at python-pdbtrack-stacktrace-info-regexp) | 2335 | ;; trace. To handle all of these cases, we want to find |
| 2336 | (and | 2336 | ;; the _last_ stack frame printed in the most recent |
| 2337 | (forward-line) | 2337 | ;; batch of output, then jump to the corrsponding |
| 2338 | (looking-at python-pdbtrack-stacktrace-info-regexp))) | 2338 | ;; file/line number. |
| 2339 | (goto-char (point-max)) | ||
| 2340 | (when (re-search-backward python-pdbtrack-stacktrace-info-regexp nil t) | ||
| 2339 | (setq line-number (string-to-number | 2341 | (setq line-number (string-to-number |
| 2340 | (match-string-no-properties 2))) | 2342 | (match-string-no-properties 2))) |
| 2341 | (match-string-no-properties 1))))) | 2343 | (match-string-no-properties 1))))) |