# HG changeset patch # User Kim F. Storm # Date 1109253389 0 # Node ID 4779874c6d72a50e2cda7df560362aa96b47c45d # Parent 431c8b8908a54aa389e800d5a240aa0b162a1a68 (iso-accents-compose): Fix crash during redisplay. Call force-window-update after read-event and delete-region to signal that window is not accurate. diff -r 431c8b8908a5 -r 4779874c6d72 lisp/international/iso-acc.el --- a/lisp/international/iso-acc.el Thu Feb 24 13:55:38 2005 +0000 +++ b/lisp/international/iso-acc.el Thu Feb 24 13:56:29 2005 +0000 @@ -290,6 +290,16 @@ (iso-accents-compose prompt) (vector last-input-char))) + +;; The iso-accents-compose function is called deep inside Emacs' read +;; key sequence machinery, so the call to read-event below actually +;; recurses into that machinery. Doing that does not cause any +;; problem on its own, but read-event will have marked the window's +;; display matrix to be accurate -- which is broken by the subsequent +;; call to delete-region. Therefore, we must call force-window-update +;; after delete-region to explicitly clear the accurate state of the +;; window's display matrix. + (defun iso-accents-compose (prompt) (let* ((first-char last-input-char) (list (assq first-char iso-accents-list)) @@ -308,7 +318,9 @@ (read-event)) (insert first-char) (prog1 (read-event) - (delete-region (1- (point)) (point))))) + (delete-region (1- (point)) (point)) + ;; Display is no longer up-to-date. + (force-window-update (selected-window))))) (entry (cdr (assq second-char list)))) (if entry ;; Found it: return the mapped char