changeset 77801:ac2665c1975b

(flyspell-correct-word-before-point): Don't let opoint be nil. (flyspell-emacs-popup): Explicit error if no dialogs.
author Richard M. Stallman <rms@gnu.org>
date Thu, 24 May 2007 22:11:50 +0000
parents 444a75269831
children bf0271237be3
files lisp/textmodes/flyspell.el
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)