Commit 913a8cda authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(flyspell-correct-word-before-point): Don't let opoint be nil.

(flyspell-emacs-popup): Explicit error if no dialogs.
parent c721aa42
2007-05-24 Richard Stallman <rms@gnu.org>
* textmodes/flyspell.el (flyspell-correct-word-before-point):
Don't let opoint be nil.
(flyspell-emacs-popup): Explicit error if no dialogs.
2007-05-23 Eli Zaretskii <eliz@gnu.org> 2007-05-23 Eli Zaretskii <eliz@gnu.org>
   
* tar-mode.el (tar-file-name-handler): New function. * tar-mode.el (tar-file-name-handler): New function.
...@@ -2025,6 +2025,7 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." ...@@ -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")) (error "Pop-up menus do not work on this terminal"))
;; use the correct dictionary ;; use the correct dictionary
(flyspell-accept-buffer-local-defs) (flyspell-accept-buffer-local-defs)
(or opoint (setq opoint (point-marker)))
(let ((cursor-location (point)) (let ((cursor-location (point))
(word (flyspell-get-word nil))) (word (flyspell-get-word nil)))
(if (consp word) (if (consp word)
...@@ -2133,6 +2134,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." ...@@ -2133,6 +2134,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
;;*---------------------------------------------------------------------*/ ;;*---------------------------------------------------------------------*/
(defun flyspell-emacs-popup (event poss word) (defun flyspell-emacs-popup (event poss word)
"The Emacs popup menu." "The Emacs popup menu."
(unless window-system
(error "This command requires pop-up dialogs"))
(if (not event) (if (not event)
(let* ((mouse-pos (mouse-position)) (let* ((mouse-pos (mouse-position))
(mouse-pos (if (nth 1 mouse-pos) (mouse-pos (if (nth 1 mouse-pos)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment