[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master de576a5: Don't require GUI frames and mouse for Fly
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master de576a5: Don't require GUI frames and mouse for Flyspell menus |
Date: |
Fri, 24 Jul 2015 07:48:19 +0000 |
branch: master
commit de576a55d8c47ffd2e24fca2d48ed99f298d4334
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Don't require GUI frames and mouse for Flyspell menus
* lisp/textmodes/flyspell.el (flyspell-correct-word-before-point)
(flyspell-emacs-popup): Require neither a GUI frame nor mouse
support, since pop-up menus work with text terminals and can be
controlled via the keyboard.
---
lisp/textmodes/flyspell.el | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 8aadf51..a5dff07 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -2087,8 +2087,6 @@ If EVENT is non-nil, it is the mouse event that invoked
this operation;
that controls where to put the menu.
If OPOINT is non-nil, restore point there after adjusting it for replacement."
(interactive)
- (unless (mouse-position)
- (error "Pop-up menus do not work on this terminal"))
;; use the correct dictionary
(flyspell-accept-buffer-local-defs)
(or opoint (setq opoint (point)))
@@ -2203,9 +2201,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)
+ (if (and (not event)
+ (display-mouse-p))
(let* ((mouse-pos (mouse-position))
(mouse-pos (if (nth 1 mouse-pos)
mouse-pos
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master de576a5: Don't require GUI frames and mouse for Flyspell menus,
Eli Zaretskii <=