commit de576a55d8c47ffd2e24fca2d48ed99f298d4334 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Fri Jul 24 10:47:05 2015 +0300 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. 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 commit 1917d86e1609737046ab1401e7ff7caad93e71a3 Author: Eli Zaretskii Date: Fri Jul 24 10:29:16 2015 +0300 Improve documentation of Flyspell commands * doc/emacs/fixit.texi (Spelling): Mention Flyspell commands that can be invoked via the keyboard. Mention those commands by name and add them to the fn index. (Bug#21125) diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index 0888f8a..953b22f 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -404,10 +404,17 @@ mode in the current buffer. To enable Flyspell mode in all text mode buffers, add @code{flyspell-mode} to @code{text-mode-hook}. @xref{Hooks}. +@findex flyspell-correct-word +@findex flyspell-auto-correct-word +@findex flyspell-correct-word-before-point When Flyspell mode highlights a word as misspelled, you can click on -it with @kbd{Mouse-2} to display a menu of possible corrections and -actions. You can also correct the word by editing it manually in any -way you like. +it with @kbd{Mouse-2} (@code{flyspell-correct-word}) to display a menu +of possible corrections and actions. In addition, @kbd{C-.} or +@kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) will +propose various successive corrections for the word at point, and +@kbd{C-c $} (@code{flyspell-correct-word-before-point}) will pop up a +menu of possible corrections. Of course, you can always correct the +misspelled word by editing it manually in any way you like. @findex flyspell-prog-mode Flyspell Prog mode works just like ordinary Flyspell mode, except commit 8e03731cb9083330939b2c9b2d3318f32e93e41d Author: Michael Albinus Date: Thu Jul 23 21:49:40 2015 +0200 Fix some Tramp problems with HP-UX * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Add "tab0" to stty call. * test/automated/tramp-tests.el (tramp-persistency-file-name): Set to nil. (tramp--test-hpux-p): New defun. (tramp--test-utf8): Use it. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index fbb5d8c..670ff4b 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4025,9 +4025,9 @@ process to set up. VEC specifies the connection." (let ((tramp-end-of-output tramp-initial-end-of-output)) (tramp-open-shell vec (tramp-get-method-parameter vec 'tramp-remote-shell)) - ;; Disable echo. + ;; Disable tab and echo expansion. (tramp-message vec 5 "Setting up remote shell environment") - (tramp-send-command vec "stty -inlcr -echo kill '^U' erase '^H'" t) + (tramp-send-command vec "stty tab0 -inlcr -echo kill '^U' erase '^H'" t) ;; Check whether the echo has really been disabled. Some ;; implementations, like busybox of embedded GNU/Linux, don't ;; support disabling. diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index 24cfa24..6972373 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -49,6 +49,7 @@ (declare-function tramp-get-remote-stat "tramp-sh") (declare-function tramp-get-remote-perl "tramp-sh") (defvar tramp-copy-size-limit) +(defvar tramp-persistency-file-name) (defvar tramp-remote-process-environment) ;; There is no default value on w32 systems, which could work out of the box. @@ -70,7 +71,8 @@ (setq password-cache-expiry nil tramp-verbose 0 tramp-copy-size-limit nil - tramp-message-show-message nil) + tramp-message-show-message nil + tramp-persistency-file-name nil) ;; This shall happen on hydra only. (when (getenv "NIX_STORE") @@ -1690,6 +1692,14 @@ This requires restrictions of file name syntax." (or (eq system-type 'windows-nt) (tramp-smb-file-name-p tramp-test-temporary-file-directory))) +(defun tramp--test-hpux-p () + "Check, whether the remote host runs HP-UX. +Several special characters do not work properly there." + ;; We must refill the cache. + (with-parsed-tramp-file-name + (file-truename tramp-test-temporary-file-directory) nil + (string-match "^HP-UX" (tramp-get-connection-property v "uname" "")))) + (defun tramp--test-check-files (&rest files) "Run a simple but comprehensive test over every file in FILES." ;; We must use `file-truename' for the temporary directory, because @@ -1939,8 +1949,9 @@ Use the `ls' command." (coding-system-for-write 'utf-8) (file-name-coding-system 'utf-8)) (tramp--test-check-files - "Γυρίστε το Γαλαξία με Ώτο Στοπ" - "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت" + (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") + (unless (tramp--test-hpux-p) + "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") "银河系漫游指南系列" "Автостопом по гала́ктике")))