From 03bb7a8da9d16dd3dbd5a3ce56adb449e808bf2a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 26 Nov 2018 19:27:45 +0200 Subject: [PATCH 1/9] Avoid clearing echo-area message by auto-save-visited-file-name * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Record the previous echo-area message, if any, and restore it before exiting. (Bug#33490) --- lisp/emacs-lisp/map-ynp.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 8260af57278..93235bd9ece 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -79,6 +79,7 @@ are meaningful here. Returns the number of actions taken." (let* ((actions 0) + (msg (current-message)) user-keys mouse-event map prompt char elt def ;; Non-nil means we should use mouse menus to ask. use-menus @@ -250,9 +251,10 @@ the current %s and exit." (if delayed-switch-frame (setq unread-command-events (cons delayed-switch-frame unread-command-events)))) - ;; Clear the last prompt from the minibuffer. + ;; Clear the last prompt from the minibuffer, and restore the + ;; previous echo-area message, if any. (let ((message-log-max nil)) - (message "")) + (message (or msg ""))) ;; Return the number of actions that were taken. actions)) From 2925ce5a7ec1424cfaea9f2f86bd3cab27832584 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 26 Nov 2018 19:31:24 +0200 Subject: [PATCH 2/9] Support Hunspell 1.7.0 in ispell.el * lisp/textmodes/ispell.el (ispell-find-hunspell-dictionaries): Invoke Hunspell with an additional command-line argument, to work around a misfeature in Hunspell 1.7.0 that prevents it from reporting the loaded dictionary. (Bug#33493) --- lisp/textmodes/ispell.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index e77bc7e1128..9789968b15c 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1113,7 +1113,12 @@ dictionary from that list was found." null-device t nil - "-D") + ;; Hunspell 1.7.0 (and later?) won't + ;; show LOADED DICTIONARY unless + ;; there's at least one file argument + ;; on the command line. So we feed + ;; it with the null device. + "-D" null-device) (buffer-string)) "[\n\r]+" t)) From f0531b8e64250414baf1c0d2dde3fbfc55a748a0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 27 Nov 2018 10:09:55 +0200 Subject: [PATCH 3/9] Improve documentation of Ediff wordwise commands * lisp/vc/ediff.el (ediff-windows-wordwise) (ediff-windows-linewise, ediff-regions-wordwise): Update and clarify the doc strings. * doc/misc/ediff.texi (Major Entry Points): Update and clarify the documentation of 'ediff-windows-wordwise' and 'ediff-regions-wordwise'. See the discussion starting at https://lists.gnu.org/archive/html/help-gnu-emacs/2018-11/msg00197.html for the details. --- doc/misc/ediff.texi | 13 ++++++------- lisp/vc/ediff.el | 9 ++++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 746c4c829d2..cce8321d9eb 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -210,11 +210,11 @@ ancestors. Ediff selects only the files that are under version control. @item ediff-windows-wordwise @findex ediff-windows-wordwise -Compare windows word-by-word. +Compare text visible in 2 windows word-by-word. @item ediff-windows-linewise @findex ediff-windows-linewise -Compare windows line-by-line. +Compare text visible in 2 windows line-by-line. @item ediff-regions-wordwise @findex ediff-regions-wordwise @@ -373,13 +373,12 @@ The commands @code{ediff-windows-wordwise}, @code{ediff-windows-linewise}, @code{ediff-regions-wordwise} and @code{ediff-regions-linewise} do comparison on parts of existing Emacs buffers. The commands @code{ediff-windows-wordwise} and -@code{ediff-regions-wordwise} are intended for relatively small segments -of buffers (e.g., up to 100 lines, depending on the speed of your machine), +@code{ediff-regions-wordwise} could be slow on very large buffers, as they perform comparison on the basis of words rather than lines. -(Word-wise comparison of large chunks of text can be slow.) +(Word-wise comparison of large chunks of text is relatively expensive.) -To compare large regions, use @code{ediff-regions-linewise}. This -command displays differences much like @code{ediff-files} and +To compare very large regions, use @code{ediff-regions-linewise}. +This command displays differences much like @code{ediff-files} and @code{ediff-buffers}. The functions @code{ediff-patch-file} and @code{ediff-patch-buffer} apply a diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index cd2b2c4e628..da7b0f12919 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -927,6 +927,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files." ;;;###autoload (defun ediff-windows-wordwise (dumb-mode &optional wind-A wind-B startup-hooks) "Compare WIND-A and WIND-B, which are selected by clicking, wordwise. +This compares the portions of text visible in each of the two windows. With prefix argument, DUMB-MODE, or on a non-windowing display, works as follows: If WIND-A is nil, use selected window. @@ -940,6 +941,7 @@ arguments after setting up the Ediff buffers." ;;;###autoload (defun ediff-windows-linewise (dumb-mode &optional wind-A wind-B startup-hooks) "Compare WIND-A and WIND-B, which are selected by clicking, linewise. +This compares the portions of text visible in each of the two windows. With prefix argument, DUMB-MODE, or on a non-windowing display, works as follows: If WIND-A is nil, use selected window. @@ -950,7 +952,8 @@ arguments after setting up the Ediff buffers." (ediff-windows dumb-mode wind-A wind-B startup-hooks 'ediff-windows-linewise nil)) -;; Compare WIND-A and WIND-B, which are selected by clicking. +;; Compare visible portions of text in WIND-A and WIND-B, which are +;; selected by clicking. ;; With prefix argument, DUMB-MODE, or on a non-windowing display, ;; works as follows: ;; If WIND-A is nil, use selected window. @@ -991,8 +994,8 @@ arguments after setting up the Ediff buffers." "Run Ediff on a pair of regions in specified buffers. BUFFER-A and BUFFER-B are the buffers to be compared. Regions (i.e., point and mark) can be set in advance or marked interactively. -This function is effective only for relatively small regions, up to 200 -lines. For large regions, use `ediff-regions-linewise'. +This function might be slow for large regions. If you find it slow, +use `ediff-regions-linewise' instead. STARTUP-HOOKS is a list of functions that Emacs calls without arguments after setting up the Ediff buffers." (interactive From a291f624289bd2009b7fa230d62b5940e0484c83 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 27 Nov 2018 09:39:30 +0100 Subject: [PATCH 4/9] Don't call xwidget functions until GTK has been initialized Follow up fix to Bug#33294. * src/gtkutil.c: Define xg_gtk_initialized. (xg_initialize): Set it when GTK has finished initializing. * src/gtkutil.h: Declare xg_gtk_initialized. * src/xwidget.c (Fmake_xwidget): Error out if GTK has not been initialized. (xwidget_init_view): Likewise. --- src/gtkutil.c | 4 ++++ src/gtkutil.h | 1 + src/xwidget.c | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/src/gtkutil.c b/src/gtkutil.c index 5879ab683ea..9540bd9072b 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -147,6 +147,8 @@ struct xg_frame_tb_info GtkTextDirection dir; }; +bool xg_gtk_initialized; /* Used to make sure xwidget calls are possible */ + static GtkWidget * xg_get_widget_from_map (ptrdiff_t idx); @@ -5306,6 +5308,8 @@ xg_initialize (void) #ifdef HAVE_FREETYPE x_last_font_name = NULL; #endif + + xg_gtk_initialized = true; } #endif /* USE_GTK */ diff --git a/src/gtkutil.h b/src/gtkutil.h index 7dcd549f5c0..3b074073e44 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -202,5 +202,6 @@ extern void xg_initialize (void); to indicate that the callback should do nothing. */ extern bool xg_ignore_gtk_scrollbar; +extern bool xg_gtk_initialized; #endif /* USE_GTK */ #endif /* GTKUTIL_H */ diff --git a/src/xwidget.c b/src/xwidget.c index bcc450bac60..09c65d0d3ee 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -78,6 +78,8 @@ Returns the newly constructed xwidget, or nil if construction fails. */) Lisp_Object title, Lisp_Object width, Lisp_Object height, Lisp_Object arguments, Lisp_Object buffer) { + if (!xg_gtk_initialized) + error ("make-xwidget: GTK has not been initialized"); CHECK_SYMBOL (type); CHECK_NATNUM (width); CHECK_NATNUM (height); @@ -508,6 +510,10 @@ xwidget_init_view (struct xwidget *xww, struct glyph_string *s, int x, int y) { + + if (!xg_gtk_initialized) + error ("xwidget_init_view: GTK has not been initialized"); + struct xwidget_view *xv = allocate_xwidget_view (); Lisp_Object val; From 5f3926053eaebc8ebff696abfd5a8d4365d8671d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 27 Nov 2018 08:24:33 -0800 Subject: [PATCH 5/9] * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Pass format to message. --- lisp/emacs-lisp/map-ynp.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 93235bd9ece..5b1786af512 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -254,7 +254,9 @@ the current %s and exit." ;; Clear the last prompt from the minibuffer, and restore the ;; previous echo-area message, if any. (let ((message-log-max nil)) - (message (or msg ""))) + (if msg + (message "%s" msg) + (message ""))) ;; Return the number of actions that were taken. actions)) From d7132ad870c13932bd58b24d0b124799aa49a277 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 27 Nov 2018 20:19:59 -0800 Subject: [PATCH 6/9] * lisp/mh-e/mh-e.el (customize-package-emacs-version-alist): Additions. --- lisp/mh-e/mh-e.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 05ff672da52..78fa2af52c1 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -1022,12 +1022,13 @@ windows in the frame are removed." (when delete-other-windows-flag (delete-other-windows))) -;; FIXME: Maybe out of date? --xfq (if (boundp 'customize-package-emacs-version-alist) (add-to-list 'customize-package-emacs-version-alist '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1") ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1") - ("7.4" . "22.1") ("8.0" . "22.1")))) + ("7.4" . "22.1") ("8.0" . "22.1") ("8.1" . "23.1") + ("8.2" . "23.1") ("8.3" . "24.1") ("8.4" . "24.4") + ("8.5" . "24.4") ("8.6" . "24.4")))) From 19ed1e9a5f51fc27d60062bd70432c41cd08b3c1 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 27 Nov 2018 20:24:05 -0800 Subject: [PATCH 7/9] * lisp/net/trampver.el (customize-package-emacs-version-alist): Add 2.3.3. --- lisp/net/trampver.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 7badcd19f84..e4dc7168e4e 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -69,7 +69,7 @@ ("2.2.3-24.1" . "24.1") ("2.2.3-24.1" . "24.2") ("2.2.6-24.3" . "24.3") ("2.2.9-24.4" . "24.4") ("2.2.11-24.5" . "24.5") ("2.2.13.25.1" . "25.1") ("2.2.13.25.2" . "25.2") - ("2.2.13.25.2" . "25.3") + ("2.2.13.25.2" . "25.3") ("2.3.3" . "26.1") ("2.3.3.26.1" . "26.1") ("2.3.5.26.2" . "26.2"))) (add-hook 'tramp-unload-hook From 911766d419ad9d36c01371ac88cefb415bd77919 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 28 Nov 2018 09:22:00 +0200 Subject: [PATCH 8/9] Minor markup fix in frames.texi * doc/lispref/frames.texi (Frame Layout): Fix markup of @table entries. (Bug#33531) --- doc/lispref/frames.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index e95a684912c..3795f425e7b 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -497,7 +497,7 @@ Height | | | Height | | | Height In practice not all of the areas shown in the drawing will or may be present. The meaning of these areas is described below. -@table @samp +@table @asis @item Outer Frame @cindex outer frame @cindex outer edges From 74a3a795afbf092d4086e5ebb4dcf0254e7c8b46 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 28 Nov 2018 09:28:36 +0200 Subject: [PATCH 9/9] Fix a typo in a doc string * lisp/emacs-lisp/map-ynp.el (read-answer-short): Fix typo. (Bug#33528) --- lisp/emacs-lisp/map-ynp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 5b1786af512..906f6c96a54 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -269,7 +269,7 @@ the current %s and exit." "If non-nil, `read-answer' accepts single-character answers. If t, accept short (single key-press) answers to the question. If nil, require long answers. If `auto', accept short answers if -the function cell of `yes-or-no-p' is set to `y-or-on-p'." +the function cell of `yes-or-no-p' is set to `y-or-n-p'." :type '(choice (const :tag "Accept short answers" t) (const :tag "Require long answer" nil) (const :tag "Guess preference" auto))