From 7a608fc6f3ded3e615e7accb29f16bfd290d80a1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 14 Apr 2019 18:45:35 -0400 Subject: [PATCH 1/6] * lisp/progmodes/python.el: Be more careful about temp file removal (python-shell-prompt-detect): Use unwind-protect to try and not leave file behind in case of error. --- lisp/progmodes/python.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 27d31abaf5b..38dcc823d06 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2266,15 +2266,16 @@ detection and just returns nil." ;; carriage returns in unbuffered mode. (let ((inhibit-eol-conversion (getenv "PYTHONUNBUFFERED"))) (python-shell--save-temp-file code)))) - ;; Use `process-file' as it is remote-host friendly. - (process-file - interpreter - code-file - '(t nil) - nil - interpreter-arg) - ;; Try to cleanup - (delete-file code-file))) + (unwind-protect + ;; Use `process-file' as it is remote-host friendly. + (process-file + interpreter + code-file + '(t nil) + nil + interpreter-arg) + ;; Try to cleanup + (delete-file code-file)))) (buffer-string))) (prompts (catch 'prompts From 70ec3928666353b69efae1bdc831d704fa505e72 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 15 Apr 2019 18:05:52 +0300 Subject: [PATCH 2/6] Fix the MSDOS build when running under CWSDPMI * src/msdos.c (the_only_tty_output): Define. * src/msdos.h (the_only_tty_output): Declare. * src/frame.c (make_terminal_frame) [MSDOS]: * src/dispnew.c (init_display) [MSDOS]: Set up f->output_data.tty pointer using the_only_tty_output, before dereferencing the pointer. This prevents crashes with DPMI servers that provide NULL pointer protection. --- src/dispnew.c | 1 + src/frame.c | 1 + src/msdos.c | 3 +++ src/msdos.h | 1 + 4 files changed, 6 insertions(+) diff --git a/src/dispnew.c b/src/dispnew.c index 03fac54e05b..15a58cc2f57 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6117,6 +6117,7 @@ init_display (void) t->reference_count++; #ifdef MSDOS + f->output_data.tty = &the_only_tty_output; f->output_data.tty->display_info = &the_only_display_info; #else if (f->output_method == output_termcap) diff --git a/src/frame.c b/src/frame.c index 4ed140d7d08..08925308f9c 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1117,6 +1117,7 @@ make_terminal_frame (struct terminal *terminal) f->terminal = terminal; f->terminal->reference_count++; #ifdef MSDOS + f->output_data.tty = &the_only_tty_output; f->output_data.tty->display_info = &the_only_display_info; if (!inhibit_window_system && (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)) diff --git a/src/msdos.c b/src/msdos.c index 3645dc8bb30..4367da4714d 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -420,6 +420,9 @@ static unsigned short outside_cursor; /* The only display since MS-DOS does not support multiple ones. */ struct tty_display_info the_only_display_info; +/* The only tty_output, since MS-DOS supports only 1 display. */ +struct tty_output the_only_tty_output; + /* Support for DOS/V (allows Japanese characters to be displayed on standard, non-Japanese, ATs). Only supported for DJGPP v2 and later. */ diff --git a/src/msdos.h b/src/msdos.h index ff756f8f634..0d15df7a331 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -93,6 +93,7 @@ typedef int XRectangle; typedef struct tty_display_info Display_Info; extern struct tty_display_info the_only_display_info; +extern struct tty_output the_only_tty_output; #define FRAME_X_DISPLAY(f) ((Display *) 0) #define FRAME_FONT(f) ((f)->output_data.tty->font) From 0f5568ea7c1e6952986dd03ef642a20e87736138 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 16 Apr 2019 18:27:37 +0300 Subject: [PATCH 3/6] Fix confusing wording in the user manual * doc/emacs/maintaining.texi (VC Undo): Remove a potentially inaccurate, outdated, and/or confusing sentence. (Bug#35290) --- doc/emacs/maintaining.texi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index cddffd6f2a5..93dbce47595 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1084,8 +1084,7 @@ started editing, and asks for confirmation for discarding the changes. If you agree, the fileset is reverted. If you don't want @kbd{C-x v u} to show a diff, set the variable @code{vc-revert-show-diff} to @code{nil} (you can still view the diff directly with @kbd{C-x v =}; -@pxref{Old Revisions}). Note that @kbd{C-x v u} cannot be reversed -with the usual undo commands (@pxref{Undo}), so use it with care. +@pxref{Old Revisions}). On locking-based version control systems, @kbd{C-x v u} leaves files unlocked; you must lock again to resume editing. You can also use From 23ccba0cf95db9815296ac82c56d0b6bcb499fd8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 16 Apr 2019 18:32:18 +0300 Subject: [PATCH 4/6] Mention the assignment form in "Copyright Assignment" * doc/emacs/trouble.texi (Copyright Assignment): Mention the copyright assignment form explicitly. Suggested by Konstantin Kharlamov . --- doc/emacs/trouble.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 1bdd9fa0141..2fe54878058 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1400,9 +1400,10 @@ to the FSF@. For the reasons behind this, see @url{https://www.gnu.org/licenses/why-assign.html}. Copyright assignment is a simple process. Residents of some countries -can do it entirely electronically. We can help you get started, and -answer any questions you may have (or point you to the people with the -answers), at the @email{emacs-devel@@gnu.org} mailing list. +can do it entirely electronically. We can help you get started, +including sending you the forms you should fill, and answer any +questions you may have (or point you to the people with the answers), +at the @email{emacs-devel@@gnu.org} mailing list. (Please note: general discussion about why some GNU projects ask for a copyright assignment is off-topic for emacs-devel. From d0f745f67ac36b4acc452deaa3a63d36c1c580a7 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 16 Apr 2019 18:07:31 +0200 Subject: [PATCH 5/6] Document some compilation-mode faces * doc/emacs/building.texi (Compilation Mode): Describe faces available to affect appearance of compilation-mode buffers. --- doc/emacs/building.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 7ce62498b8e..31acfc827bf 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -151,6 +151,20 @@ with the mouse (@pxref{Mouse References}), to visit the @dfn{locus} of the error message in a separate window. The locus is the specific position in a file where that error occurred. +@cindex compilation mode faces +@vindex compilation-error +@vindex compilation-warning + The appearance of the @file{*compilation*} buffer can be controlled +by customizing the faces which are used to highlight parts of the +@file{*compilation*} buffer, e.g., @code{compilation-error} or +@code{compilation-warning}, for error and warning messages +respectively. Note that since those faces inherit from the +@code{error} and @code{warning} faces, it is also possible to +customize the parent face directly instead. + + Use @w{@kbd{M-x customize-group RET compilation}} to see the entire +list of customization variables and faces. + @findex compile-goto-error @vindex compilation-auto-jump-to-first-error If you change the variable From a1c53d4294550380de76d6a6c4e29e9e8f6f9133 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 16 Apr 2019 14:33:24 -0700 Subject: [PATCH 6/6] * admin/admin.el (make-manuals-dist--1): Update for incompatible copy-file change re "directories". --- admin/admin.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/admin.el b/admin/admin.el index 41b1854c90d..c1f6174874b 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -696,6 +696,7 @@ style=\"text-align:left\">") (if (file-directory-p stem) (delete-directory stem t)) (make-directory stem) + (setq stem (file-name-as-directory stem)) (copy-file "../doc/misc/texinfo.tex" stem) (unless (equal type "emacs") (copy-file "../doc/emacs/emacsver.texi" stem) @@ -718,7 +719,7 @@ style=\"text-align:left\">") (setq ats t) (message "Unexpanded: %s" (match-string 0))) (if ats (error "Unexpanded configure variables in Makefile?"))) - (write-region nil nil (expand-file-name (format "%s/Makefile" stem)) + (write-region nil nil (expand-file-name (format "%sMakefile" stem)) nil 'silent)) (call-process "tar" nil nil nil "-cf" tarfile stem) (delete-directory stem t)