[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111629: Merge from emacs-24; up to r
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111629: Merge from emacs-24; up to r111208 |
Date: |
Wed, 30 Jan 2013 09:16:30 -0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111629 [merge]
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-01-30 09:16:30 -0800
message:
Merge from emacs-24; up to r111208
modified:
lisp/ChangeLog
lisp/mouse.el
lisp/progmodes/python.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-01-30 17:03:44 +0000
+++ b/lisp/ChangeLog 2013-01-30 17:16:30 +0000
@@ -1,3 +1,15 @@
+2013-01-30 Glenn Morris <address@hidden>
+
+ * mouse.el (mouse-drag-line): Avoid pushing same event onto
+ unread-command-events twice in some cases. This tries to implement
+ the 2012-07-26 changes in a different way. (Bug#13560)
+
+2013-01-30 Fabián Ezequiel Gallina <address@hidden>
+
+ * progmodes/python.el
+ (python-pdbtrack-comint-output-filter-function): Enhancements on
+ stacktrace detection. (thanks @gnovak)
+
2013-01-30 Stefan Monnier <address@hidden>
* jit-lock.el (jit-lock-stealth-chunk-start): Don't widen (bug#13542).
=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el 2013-01-01 09:11:05 +0000
+++ b/lisp/mouse.el 2013-01-30 17:14:24 +0000
@@ -425,7 +425,7 @@
(frame-parameters frame)))
'right)))
(draggable t)
- finished event position growth dragged)
+ event position growth dragged)
(cond
((eq line 'header)
;; Check whether header-line can be dragged at all.
@@ -456,39 +456,33 @@
;; Start tracking.
(track-mouse
- ;; Loop reading events and sampling the position of the mouse.
- (while (not finished)
- (setq event (read-event))
+ ;; Loop reading events and sampling the position of the mouse,
+ ;; until there is a non-mouse-movement event. Also,
+ ;; scroll-bar-movement events are the same as mouse movement for
+ ;; our purposes. (Why? -- cyd)
+ ;; If you change this, check that all of the following still work:
+ ;; Resizing windows by dragging mode-lines and header lines,
+ ;; and vertical lines (in windows without scroll bars).
+ ;; Doing this should not select another window, even if
+ ;; mouse-autoselect-window is non-nil.
+ ;; Mouse-1 clicks in Info header lines should advance position
+ ;; by one node at a time if mouse-1-click-follows-link is non-nil,
+ ;; otherwise they should just select the window.
+ (while (progn
+ (setq event (read-event))
+ (memq (car-safe event)
+ '(mouse-movement scroll-bar-movement
+ switch-frame select-window)))
(setq position (mouse-position))
;; Do nothing if
;; - there is a switch-frame event.
;; - the mouse isn't in the frame that we started in
;; - the mouse isn't in any Emacs frame
- ;; Drag if
- ;; - there is a mouse-movement event
- ;; - there is a scroll-bar-movement event (Why? -- cyd)
- ;; (same as mouse movement for our purposes)
- ;; Quit if
- ;; - there is a keyboard event or some other unknown event.
(cond
- ((not (consp event))
- (setq finished t))
((memq (car event) '(switch-frame select-window))
nil)
- ((not (memq (car event) '(mouse-movement scroll-bar-movement)))
- (when (consp event)
- ;; Do not unread a drag-mouse-1 event to avoid selecting
- ;; some other window. For vertical line dragging do not
- ;; unread mouse-1 events either (but only if we dragged at
- ;; least once to allow mouse-1 clicks get through).
- (unless (and dragged
- (if (eq line 'vertical)
- (memq (car event) '(drag-mouse-1 mouse-1))
- (eq (car event) 'drag-mouse-1)))
- (push event unread-command-events)))
- (setq finished t))
- ((not (and (eq (car position) frame)
- (cadr position)))
+ ((not (and (eq (car position) frame)
+ (cadr position)))
nil)
((eq line 'vertical)
;; Drag vertical divider.
@@ -512,12 +506,13 @@
growth
(- growth)))))))
;; Process the terminating event.
- (when (and (mouse-event-p event) on-link (not dragged)
- (mouse--remap-link-click-p start-event event))
- ;; If mouse-2 has never been done by the user, it doesn't have
- ;; the necessary property to be interpreted correctly.
- (put 'mouse-2 'event-kind 'mouse-click)
- (setcar event 'mouse-2)
+ (unless dragged
+ (when (and (mouse-event-p event) on-link
+ (mouse--remap-link-click-p start-event event))
+ ;; If mouse-2 has never been done by the user, it doesn't have
+ ;; the necessary property to be interpreted correctly.
+ (put 'mouse-2 'event-kind 'mouse-click)
+ (setcar event 'mouse-2))
(push event unread-command-events))))
(defun mouse-drag-mode-line (start-event)
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2013-01-30 08:07:37 +0000
+++ b/lisp/progmodes/python.el 2013-01-30 17:16:30 +0000
@@ -2327,15 +2327,17 @@
(file-name
(with-temp-buffer
(insert full-output)
- (goto-char (point-min))
- ;; OK, this sucked but now it became a cool hack. The
- ;; stacktrace information normally is on the first line
- ;; but in some cases (like when doing a step-in) it is
- ;; on the second.
- (when (or (looking-at python-pdbtrack-stacktrace-info-regexp)
- (and
- (forward-line)
- (looking-at python-pdbtrack-stacktrace-info-regexp)))
+ ;; When the debugger encounters a pdb.set_trace()
+ ;; command, it prints a single stack frame. Sometimes
+ ;; it prints a bit of extra information about the
+ ;; arguments of the present function. When ipdb
+ ;; encounters an exception, it prints the _entire_ stack
+ ;; trace. To handle all of these cases, we want to find
+ ;; the _last_ stack frame printed in the most recent
+ ;; batch of output, then jump to the corrsponding
+ ;; file/line number.
+ (goto-char (point-max))
+ (when (re-search-backward python-pdbtrack-stacktrace-info-regexp
nil t)
(setq line-number (string-to-number
(match-string-no-properties 2)))
(match-string-no-properties 1)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111629: Merge from emacs-24; up to r111208,
Glenn Morris <=