From 25d44d27dad78d55adfd5905bb9344a8521a18dd Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 8 Jun 2019 09:02:45 +0200 Subject: [PATCH 1/7] * nt/addpm.c (main): Fix buffer overflow --- nt/addpm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nt/addpm.c b/nt/addpm.c index f71ce5f2385..a8bcd4a5c73 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -219,8 +219,9 @@ main (int argc, char *argv[]) { int result; - char msg[ MAX_PATH ]; - sprintf (msg, "Install Emacs at %s?\n", emacs_path); + const char install_msg[] = "Install Emacs at %s?\n"; + char msg[ MAX_PATH + sizeof (install_msg) ]; + sprintf (msg, install_msg, emacs_path); result = MessageBox (NULL, msg, "Install Emacs", MB_OKCANCEL | MB_ICONQUESTION); if (result != IDOK) From 48422af0f327f3df45b6dc518708f36b4ed5f9d8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 8 Jun 2019 11:24:47 +0300 Subject: [PATCH 2/7] Tiny improvement of documentation of major mode conventions * doc/lispref/modes.texi (Major Mode Conventions): More accurate advice regarding customization of 'C-M-a' by major modes. --- doc/lispref/modes.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index e8a8eb35e97..b6b9b58c71c 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -363,7 +363,9 @@ it provides a command that does the same job in a way better suited to the text this mode is used for. For example, a major mode for editing a programming language might redefine @kbd{C-M-a} to move to the beginning of a function in a way that works better for -that language. +that language. The recommended way of tailoring @kbd{C-M-a} to the +needs of a major mode is to set @code{beginning-of-defun-function} +(@pxref{List Motion}) to invoke the function specific to the mode. It is also legitimate for a major mode to rebind a standard key sequence whose standard meaning is rarely useful in that mode. For From b58ecafcdc8e13537b21860a222d13c73c851e7c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 8 Jun 2019 18:48:33 +0300 Subject: [PATCH 3/7] Minor copyedits in efaq-w32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/misc/efaq-w32.texi (Grep, Recursive grep): More accurate description of using 'findstr' as a poor-man's replacement for 'grep'. Reported by 范凯 --- doc/misc/efaq-w32.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi index 8e067a7a269..cdd01e47f00 100644 --- a/doc/misc/efaq-w32.texi +++ b/doc/misc/efaq-w32.texi @@ -1820,7 +1820,8 @@ If you want a quick solution without installing extra tools, a poor substitute that works for simple text searches is to specify the built in Windows command @command{findstr} as the command to run at the @kbd{M-x grep} prompt. Normally you will want to use the @option{/n} -argument to @command{findstr}. +argument to @command{findstr}, to have it print the line numbers for +each hit. @menu * Recursive grep:: @@ -1860,7 +1861,8 @@ path to the findutils @command{find} command. An alternative if you have a recent version of grep is to customize @code{grep-find-command} to use @samp{grep -r} instead of both find and grep. Another alternative if you don't need the full capabilities -of grep is to use @samp{findstr /n /r}. +of grep is to use @samp{findstr /n /r}; add the @samp{/s} option if +you want a recursive search. @c ------------------------------------------------------------ @node Developing with Emacs From 4cc4b5d6d7b4990f9a51b14126a7f7aa30ad6101 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 9 Jun 2019 05:02:39 +0200 Subject: [PATCH 4/7] ; * src/keyboard.c (tool_bar_items): Fix a typo. (Bug#36143) --- src/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keyboard.c b/src/keyboard.c index 282eac72b92..aa3448439b4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8035,7 +8035,7 @@ tool_bar_items (Lisp_Object reuse, int *nitems) { /* No, so use major and minor mode keymaps and keymap property. Note that tool-bar bindings in the local-map and keymap - properties may not work reliable, as they are only + properties may not work reliably, as they are only recognized when the tool-bar (or mode-line) is updated, which does not normally happen after every command. */ ptrdiff_t nminor = current_minor_maps (NULL, &tmaps); From 4904fb352c14539e1c6927e8c893abb037bca8a0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 9 Jun 2019 11:28:36 +0300 Subject: [PATCH 5/7] More quotation fixes (Bug#35885) * doc/emacs/text.texi (Quotation Marks): Fix a typo. * doc/emacs/modes.texi (Minor Modes): Fix another case of showing quotations. --- doc/emacs/modes.texi | 2 +- doc/emacs/text.texi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 4505bb5dc2d..e01dfa2677b 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -207,7 +207,7 @@ amount of work you can lose in case of a crash. @xref{Auto Save}. @item Electric Quote mode automatically converts quotation marks. For -example, it requotes text typed @t{`like this'} to text @t{‘like +example, it requotes text typed @kbd{`like this'} to text @t{‘like this’}. You can control what kind of text it operates in, and you can disable it entirely in individual buffers. @xref{Quotation Marks}. diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index bd8a1f59acc..900f743ea9e 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -429,7 +429,7 @@ this"}. Another common way is the curved quote convention, which uses left and right single or double quotation marks `@t{like this}' or ``@t{like this}''@footnote{ The curved single quote characters are U+2018 @sc{left single quotation -mark} and U+2018 @sc{right single quotation mark}; the curved double quotes +mark} and U+2019 @sc{right single quotation mark}; the curved double quotes are U+201C @sc{left double quotation mark} and U+201D @sc{right double quotation mark}. On text terminals which cannot display these characters, the Info reader might show them as the typewriter ASCII From 1877b7b4d79b3434379fd5a4abd85906c25df00c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 10 Jun 2019 12:34:38 +0200 Subject: [PATCH 6/7] Don't mark main_thread (Bug#36155) * thread.c (mark_threads_callback): Don't mark main_thread. --- src/thread.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/thread.c b/src/thread.c index 0cd1ae33dc2..e2158019839 100644 --- a/src/thread.c +++ b/src/thread.c @@ -645,7 +645,10 @@ mark_threads_callback (void *ignore) Lisp_Object thread_obj; XSETTHREAD (thread_obj, iter); - mark_object (thread_obj); + /* Don't mark main_thread, since it is not allocated + dynamically, thus nothing would unmark it. */ + if (iter != &main_thread) + mark_object (thread_obj); mark_one_thread (iter); } } From 758e9a8ed49c15f7069a67cf0c2ce3c6f9a3f7e1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 10 Jun 2019 12:52:21 +0200 Subject: [PATCH 7/7] Revert "Don't mark main_thread (Bug#36155)" This reverts commit 1877b7b4d79b3434379fd5a4abd85906c25df00c. --- src/thread.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/thread.c b/src/thread.c index e2158019839..0cd1ae33dc2 100644 --- a/src/thread.c +++ b/src/thread.c @@ -645,10 +645,7 @@ mark_threads_callback (void *ignore) Lisp_Object thread_obj; XSETTHREAD (thread_obj, iter); - /* Don't mark main_thread, since it is not allocated - dynamically, thus nothing would unmark it. */ - if (iter != &main_thread) - mark_object (thread_obj); + mark_object (thread_obj); mark_one_thread (iter); } }