Mercurial > emacs
comparison lisp/textmodes/flyspell.el @ 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 | 460403d9f673 |
children | b6d25790aab2 d1039e83b4a7 |
comparison
equal
deleted
inserted
replaced
77800:444a75269831 | 77801:ac2665c1975b |
---|---|
2023 (interactive) | 2023 (interactive) |
2024 (unless (mouse-position) | 2024 (unless (mouse-position) |
2025 (error "Pop-up menus do not work on this terminal")) | 2025 (error "Pop-up menus do not work on this terminal")) |
2026 ;; use the correct dictionary | 2026 ;; use the correct dictionary |
2027 (flyspell-accept-buffer-local-defs) | 2027 (flyspell-accept-buffer-local-defs) |
2028 (or opoint (setq opoint (point-marker))) | |
2028 (let ((cursor-location (point)) | 2029 (let ((cursor-location (point)) |
2029 (word (flyspell-get-word nil))) | 2030 (word (flyspell-get-word nil))) |
2030 (if (consp word) | 2031 (if (consp word) |
2031 (let ((start (car (cdr word))) | 2032 (let ((start (car (cdr word))) |
2032 (end (car (cdr (cdr word)))) | 2033 (end (car (cdr (cdr word)))) |
2131 ;;*---------------------------------------------------------------------*/ | 2132 ;;*---------------------------------------------------------------------*/ |
2132 ;;* flyspell-emacs-popup ... */ | 2133 ;;* flyspell-emacs-popup ... */ |
2133 ;;*---------------------------------------------------------------------*/ | 2134 ;;*---------------------------------------------------------------------*/ |
2134 (defun flyspell-emacs-popup (event poss word) | 2135 (defun flyspell-emacs-popup (event poss word) |
2135 "The Emacs popup menu." | 2136 "The Emacs popup menu." |
2137 (unless window-system | |
2138 (error "This command requires pop-up dialogs")) | |
2136 (if (not event) | 2139 (if (not event) |
2137 (let* ((mouse-pos (mouse-position)) | 2140 (let* ((mouse-pos (mouse-position)) |
2138 (mouse-pos (if (nth 1 mouse-pos) | 2141 (mouse-pos (if (nth 1 mouse-pos) |
2139 mouse-pos | 2142 mouse-pos |
2140 (set-mouse-position (car mouse-pos) | 2143 (set-mouse-position (car mouse-pos) |