diff options
author | Richard M. Stallman <rms@gnu.org> | 2007-05-24 22:12:25 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2007-05-24 22:12:25 +0000 |
commit | 913a8cda3525fdd39156ae203684ed9920bfc149 (patch) | |
tree | ac30b1420fc0c09de4042608fbfb180377aeb708 /lisp/textmodes | |
parent | c721aa42234fb4d4f74842f602ca3ee94f1f708d (diff) | |
download | emacs-913a8cda3525fdd39156ae203684ed9920bfc149.tar.gz |
(flyspell-correct-word-before-point): Don't let opoint be nil.
(flyspell-emacs-popup): Explicit error if no dialogs.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/flyspell.el | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index a509fdf7f6c..e02fec1362f 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -2025,6 +2025,7 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." (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 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." ;;*---------------------------------------------------------------------*/ (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) |