diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 02eae55a19..31023d5644 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -399,8 +399,6 @@ icomplete-exhibit See `icomplete-mode' and `minibuffer-setup-hook'." (when (and icomplete-mode (icomplete-simple-completing-p)) ;Shouldn't be necessary. - (redisplay) ; FIXME: why is this sometimes needed when moving - ; up dirs in a file-finding table? (save-excursion (goto-char (point-max)) ; Insert the match-status information: @@ -430,13 +428,15 @@ icomplete-exhibit (buffer-undo-list t) deactivate-mark) ;; Do nothing if while-no-input was aborted. - (when (stringp text) - (move-overlay icomplete-overlay (point) (point) (current-buffer)) - ;; The current C cursor code doesn't know to use the overlay's - ;; marker's stickiness to figure out whether to place the cursor - ;; before or after the string, so let's spoon-feed it the pos. - (put-text-property 0 1 'cursor t text) - (overlay-put icomplete-overlay 'after-string text))))))) + (if (stringp text) + (progn + (move-overlay icomplete-overlay (point) (point) (current-buffer)) + ;; The current C cursor code doesn't know to use the overlay's + ;; marker's stickiness to figure out whether to place the cursor + ;; before or after the string, so let's spoon-feed it the pos. + (put-text-property 0 1 'cursor t text) + (overlay-put icomplete-overlay 'after-string text)) + (message "text is %s" text))))))) ;;;_ > icomplete-completions (name candidates predicate require-match) (defun icomplete-completions (name candidates predicate require-match) diff --git a/lisp/subr.el b/lisp/subr.el index b408ef0931..3610fe30f2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3727,11 +3727,14 @@ while-no-input (declare (debug t) (indent 0)) (let ((catch-sym (make-symbol "input"))) `(with-local-quit + (message "after with-local-quit") (catch ',catch-sym (let ((throw-on-input ',catch-sym) val) + (message "after catch and let") (setq val (or (input-pending-p) (progn ,@body))) + (message "after setq val") (cond ;; When input arrives while throw-on-input is non-nil, ;; kbd_buffer_store_buffered_event sets quit-flag to the @@ -3746,13 +3749,17 @@ while-no-input ;; such as discarding input etc. We return t in that case ;; because input did arrive during execution of BODY. ((eq quit-flag throw-on-input) + (message "cond: got input") (setq quit-flag nil) t) ;; This is for when the user actually QUITs during ;; execution of BODY. (quit-flag + (message "cond: got quit-flag %s" quit-flag) nil) - (t val))))))) + (t + (message "cond: return val") + val))))))) (defmacro condition-case-unless-debug (var bodyform &rest handlers) "Like `condition-case' except that it does not prevent debugging.