[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115123: * semantic/fw.el (semantic-exit-on-input)
From: |
Barry O'Reilly |
Subject: |
[Emacs-diffs] trunk r115123: * semantic/fw.el (semantic-exit-on-input) |
Date: |
Sat, 16 Nov 2013 20:28:34 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115123
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15045
committer: Barry O'Reilly <address@hidden>
branch nick: trunk
timestamp: Sat 2013-11-16 15:27:24 -0500
message:
* semantic/fw.el (semantic-exit-on-input)
(semantic-throw-on-input): Restore point before
accept-process-output because timers which redisplay can run.
(Bug#15045)
modified:
lisp/cedet/ChangeLog changelog-20100919015713-3rbr456yray5m84f-1
lisp/cedet/semantic/fw.el fw.el-20091113204419-o5vbwnq5f7feedwu-11279
=== modified file 'lisp/cedet/ChangeLog'
--- a/lisp/cedet/ChangeLog 2013-11-03 21:51:25 +0000
+++ b/lisp/cedet/ChangeLog 2013-11-16 20:27:24 +0000
@@ -1,3 +1,10 @@
+2013-10-28 Barry O'Reilly <address@hidden>
+
+ * semantic/fw.el (semantic-exit-on-input)
+ (semantic-throw-on-input): Restore point before
+ accept-process-output because timers which redisplay can run.
+ (Bug#15045)
+
2013-11-03 Johan Bockgård <address@hidden>
* semantic/lex.el (semantic-lex-start-block)
=== modified file 'lisp/cedet/semantic/fw.el'
--- a/lisp/cedet/semantic/fw.el 2013-09-20 17:21:28 +0000
+++ b/lisp/cedet/semantic/fw.el 2013-11-16 20:27:24 +0000
@@ -369,6 +369,8 @@
;;
(defvar semantic-current-input-throw-symbol nil
"The current throw symbol for `semantic-exit-on-input'.")
+(defvar semantic--on-input-start-marker nil
+ "The marker when starting a semantic-exit-on-input form.")
(defmacro semantic-exit-on-input (symbol &rest forms)
"Using SYMBOL as an argument to `throw', execute FORMS.
@@ -376,7 +378,8 @@
if a user presses any key during execution, this form macro
will exit with the value passed to `semantic-throw-on-input'.
If FORMS completes, then the return value is the same as `progn'."
- `(let ((semantic-current-input-throw-symbol ,symbol))
+ `(let ((semantic-current-input-throw-symbol ,symbol)
+ (semantic--on-input-start-marker (point-marker)))
(catch ,symbol
,@forms)))
(put 'semantic-exit-on-input 'lisp-indent-function 1)
@@ -387,7 +390,16 @@
to pass to `throw'. It is recommended to use the name of the function
calling this one."
`(when (and semantic-current-input-throw-symbol
- (or (input-pending-p) (accept-process-output)))
+ (or (input-pending-p)
+ (save-excursion
+ ;; Timers might run during accept-process-output.
+ ;; If they redisplay, point must be where the user
+ ;; expects. (Bug#15045)
+ (set-buffer (marker-buffer
+ semantic--on-input-start-marker))
+ (goto-char (marker-position
+ semantic--on-input-start-marker))
+ (accept-process-output))))
(throw semantic-current-input-throw-symbol ,from)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115123: * semantic/fw.el (semantic-exit-on-input),
Barry O'Reilly <=