# HG changeset patch # User Richard M. Stallman # Date 1180044710 0 # Node ID ac2665c1975bd9b23d8ec38a4e2c6f663d6763da # Parent 444a7526983185c1df129c8f965ff71eba112649 (flyspell-correct-word-before-point): Don't let opoint be nil. (flyspell-emacs-popup): Explicit error if no dialogs. diff -r 444a75269831 -r ac2665c1975b lisp/textmodes/flyspell.el --- a/lisp/textmodes/flyspell.el Thu May 24 15:42:36 2007 +0000 +++ b/lisp/textmodes/flyspell.el Thu May 24 22:11:50 2007 +0000 @@ -2025,6 +2025,7 @@ (error "Pop-up menus do not work on this terminal")) ;; use the correct dictionary (flyspell-accept-buffer-local-defs) + (or opoint (setq opoint (point-marker))) (let ((cursor-location (point)) (word (flyspell-get-word nil))) (if (consp word) @@ -2133,6 +2134,8 @@ ;;*---------------------------------------------------------------------*/ (defun flyspell-emacs-popup (event poss word) "The Emacs popup menu." + (unless window-system + (error "This command requires pop-up dialogs")) (if (not event) (let* ((mouse-pos (mouse-position)) (mouse-pos (if (nth 1 mouse-pos)