emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 957090b: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master 957090b: Merge from origin/emacs-26
Date: Fri, 18 Jan 2019 10:55:24 -0500 (EST)

branch: master
commit 957090b79531fbd7729e5d28c3496b9114c1f543
Merge: 5e3b0f5 b6d78a0
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    b6d78a0 (origin/emacs-26) Fix a typo in ELisp manual
    c9f6f86 Prevent redrawing if frame is garbaged
    00ba226 Attempt to fix hangs on MS-Windows due to C-g
    b26d637 Fix Calc graph output on MS-Windows
    03818b0 Fix a minor mistake in ELisp manual
    6ac5985 ; Fix some trivial doc typos
    21b9026 * etc/tutorials/TUTORIAL: Fix typo (bug#34049)
    d223727 Fix UI of Buffer-menu
    0f71655 Reinitialize ispell-really-enchant when changing the speller
    9845044 Speed up loading css-mode
---
 doc/emacs/ChangeLog.1     |  2 +-
 doc/lispref/buffers.texi  |  3 ++-
 doc/lispref/nonascii.texi |  5 ++---
 etc/tutorials/TUTORIAL    |  2 +-
 lisp/ChangeLog.12         |  2 +-
 lisp/ChangeLog.7          |  2 +-
 lisp/buff-menu.el         |  8 ++++----
 lisp/calc/calc-graph.el   | 35 ++++++++++++++++++++++-------------
 lisp/calc/calc.el         | 11 +++++++++--
 lisp/dired.el             |  2 +-
 lisp/erc/ChangeLog.1      |  2 +-
 lisp/textmodes/ispell.el  |  1 +
 src/ChangeLog.11          |  2 +-
 src/ChangeLog.4           |  2 +-
 src/nsterm.m              |  8 ++++++++
 src/w32uniscribe.c        |  6 ++++++
 src/xdisp.c               | 45 +++++++++++++++++++--------------------------
 17 files changed, 81 insertions(+), 57 deletions(-)

diff --git a/doc/emacs/ChangeLog.1 b/doc/emacs/ChangeLog.1
index 5be61ae..b9f7e49 100644
--- a/doc/emacs/ChangeLog.1
+++ b/doc/emacs/ChangeLog.1
@@ -83,7 +83,7 @@
 
 2014-12-08  Eric S. Raymond  <address@hidden>
 
-       * maintaining.texi: Suopport fo Arch has been moved to obosolete,
+       * maintaining.texi: Support for Arch has been moved to obsolete,
        remove references that imply otherwise.
 
 2014-11-29  Paul Eggert  <address@hidden>
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 29f542b..e6e03ac 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -658,7 +658,8 @@ visiting a file or if the time has been explicitly cleared 
by
 too.  For instance, in a Dired buffer listing a directory, it returns
 the last modification time of that directory, as recorded by Dired.
 
-If the buffer is not visiting a file, this function returns @minus{}1.
+If the buffer is visiting a file that doesn't exist, this function
+returns @minus{}1.
 @end defun
 
 @defun set-visited-file-modtime &optional time
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index c734a99..56d96cf 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -287,12 +287,11 @@ unibyte string, it is returned unchanged.  Use this 
function for
 characters.
 @end defun
 
address@hidden FIXME: Should '@var{character}' be '@var{byte}'?
 @defun byte-to-string byte
 @cindex byte to string
 This function returns a unibyte string containing a single byte of
-character data, @var{character}.  It signals an error if
address@hidden is not an integer between 0 and 255.
+character data, @var{byte}.  It signals an error if @var{byte} is not
+an integer between 0 and 255.
 @end defun
 
 @defun multibyte-char-to-unibyte char
diff --git a/etc/tutorials/TUTORIAL b/etc/tutorials/TUTORIAL
index 48ba5db..3f5f116 100644
--- a/etc/tutorials/TUTORIAL
+++ b/etc/tutorials/TUTORIAL
@@ -704,7 +704,7 @@ Emacs deletes its auto save file.
 If the computer crashes, you can recover your auto-saved editing by
 finding the file normally (the file you were editing, not the auto
 save file) and then typing M-x recover-this-file <Return>.  When it
-asks fo confirmation, type yes<Return> to go ahead and recover the
+asks for confirmation, type yes<Return> to go ahead and recover the
 auto-save data.
 
 
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12
index 3b72cb6..0c0349c 100644
--- a/lisp/ChangeLog.12
+++ b/lisp/ChangeLog.12
@@ -8873,7 +8873,7 @@
 2006-06-06  Nick Roberts  <address@hidden>
 
        * progmodes/gud.el (gud-running): Fix doc string.
-       (gud-menu-map): Use :visible instead fo :enable for debugger test.
+       (gud-menu-map): Use :visible instead of :enable for debugger test.
        (gud-tooltip-modes): Add python-mode.
        (gud-tooltip-print-command): Add pdb.  Remove perldb.
 
diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7
index 68452d9..b8e0f10 100644
--- a/lisp/ChangeLog.7
+++ b/lisp/ChangeLog.7
@@ -12376,7 +12376,7 @@
        when turning on Encoded-kbd mode, and recover it when turning off
        Encoded-kbd mode.  Set encoded-kbd-iso2022-designations correctly.
        (encoded-kbd-self-insert-iso2022-7bit): Call charset-dimension
-       instead fo charset-bytes.
+       instead of charset-bytes.
        (encoded-kbd-self-insert-iso2022-8bit): Likewise.
 
        * language/china-util.el (setup-chinese-gb-environment): Do not
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index f0b96b0..5f88986 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -475,10 +475,10 @@ Buffers marked with 
\\<Buffer-menu-mode-map>`\\[Buffer-menu-delete]' are deleted
                           (save-buffer))
                         (tabulated-list-set-col 2 " " t))
                     (error (warn "Error saving %s" buffer))))
-                (if delete
-                    (unless (eq buffer (current-buffer))
-                      (kill-buffer buffer)
-                      (tabulated-list-delete-entry))
+                (if (and delete
+                         (not (eq buffer (current-buffer)))
+                          (kill-buffer buffer))
+                     (tabulated-list-delete-entry)
                   (forward-line 1)))))))))
 
 (defun Buffer-menu-select ()
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index ff7f12d..317f403 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -65,6 +65,9 @@
 (defvar calc-graph-no-wait nil)
 (defvar calc-gnuplot-trail-mark)
 
+(defsubst calc-graph-w32-p ()
+  (eq system-type 'windows-nt))
+
 (defun calc-graph-fast (many)
   (interactive "P")
   (let ((calc-graph-no-auto-view t))
@@ -376,8 +379,13 @@
                    ;; Check MS-Windows before X, in case they have
                    ;; $DISPLAY set for some reason (e.g., Cygwin or
                    ;; whatever)
-                   ((string= calc-gnuplot-name "pgnuplot")
-                    "windows")
+                    ((string= calc-gnuplot-name "pgnuplot")
+                     "windows")
+                    ;; Versions of gnuplot that come without pgnuplot
+                    ;; only work on MS-Windows with "qt" as the
+                    ;; terminal, for some reason.
+                   ((calc-graph-w32-p)
+                    "qt")
                    ((or (eq window-system 'x) (getenv "DISPLAY"))
                     "x11")
                    ((>= calc-gnuplot-version 3)
@@ -1321,14 +1329,13 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
    (calc-graph-init)
    (calc-graph-view-trail)
    (calc-gnuplot-command cmd)
-   (or (string= calc-gnuplot-name "pgnuplot")
+   (or (calc-graph-w32-p)
        (progn
         (accept-process-output)
         (calc-graph-view-trail)))))
 
 (defun calc-graph-kill (&optional no-view)
   (interactive)
-  (calc-graph-delete-temps)
   (if (calc-gnuplot-alive)
       (calc-wrapper
        (or no-view (calc-graph-view-trail))
@@ -1337,7 +1344,8 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
        (sit-for 1)
        (if (process-status calc-gnuplot-process)
           (delete-process calc-gnuplot-process))
-       (setq calc-gnuplot-process nil))))
+       (setq calc-gnuplot-process nil)))
+  (calc-graph-delete-temps))
 
 (defun calc-graph-quit ()
   (interactive)
@@ -1404,7 +1412,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
 (defun calc-gnuplot-command (&rest args)
   (calc-graph-init)
   (let ((cmd (concat (mapconcat 'identity args " ") "\n")))
-    (or (string= calc-gnuplot-name "pgnuplot")
+    (or (calc-graph-w32-p)
        (accept-process-output))
     (with-current-buffer calc-gnuplot-buffer
       (calc-gnuplot-check-for-errors)
@@ -1416,7 +1424,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
       (process-send-string calc-gnuplot-process cmd)
       (if (get-buffer-window calc-gnuplot-buffer)
          (calc-graph-view-trail))
-      (or (string= calc-gnuplot-name "pgnuplot")
+      (or (calc-graph-w32-p)
          (accept-process-output (and (not calc-graph-no-wait)
                                      calc-gnuplot-process)))
       (calc-gnuplot-check-for-errors)
@@ -1445,8 +1453,9 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
          (setq origin (point)))
        (setq calc-graph-last-device nil)
        (setq calc-graph-last-output nil)
-       (if (string= calc-gnuplot-name "pgnuplot")
-           (let ((version-str (shell-command-to-string "pgnuplot -V")))
+       (if (calc-graph-w32-p)
+           (let ((version-str
+                   (shell-command-to-string (concat calc-gnuplot-name " -V"))))
              (if (string-match "gnuplot \\([0-9]+\\)\\." version-str)
                  (setq calc-gnuplot-version (string-to-number
                                              (substring version-str
@@ -1457,11 +1466,11 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
            (let ((args (append (and calc-gnuplot-display
                                     (not (equal calc-gnuplot-display
                                                 (getenv "DISPLAY")))
-                                    (not (string= calc-gnuplot-name 
"pgnuplot"))
+                                     (not (calc-graph-w32-p))
                                     (list "-display"
                                           calc-gnuplot-display))
                                (and calc-gnuplot-geometry
-                                    (not (string= calc-gnuplot-name 
"pgnuplot"))
+                                    (not (calc-graph-w32-p))
                                     (list "-geometry"
                                           calc-gnuplot-geometry)))))
              (setq calc-gnuplot-process
@@ -1475,7 +1484,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
           (error "Sorry, can't find \"%s\" on your system"
                  calc-gnuplot-name)))
        (with-current-buffer calc-gnuplot-buffer
-         (while (and (not (string= calc-gnuplot-name "pgnuplot"))
+         (while (and (not (calc-graph-w32-p))
                      (not (save-excursion
                             (goto-char origin)
                             (search-forward "gnuplot> " nil t)))
@@ -1483,7 +1492,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
            (accept-process-output calc-gnuplot-process))
          (or (memq (process-status calc-gnuplot-process) '(run stop))
              (error "Unable to start GNUPLOT process"))
-         (if (not (string= calc-gnuplot-name "pgnuplot"))
+         (if (not (calc-graph-w32-p))
              (if (save-excursion
                    (goto-char origin)
                    (re-search-forward
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index c1f23cc..7390ea3 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -395,10 +395,17 @@ This is not required to be present for user-written mode 
annotations."
                                   (string :tag "Closing annotation 
delimiter"))))
 
 (defcustom calc-gnuplot-name
-  (if (eq system-type 'windows-nt) "pgnuplot" "gnuplot")
+  (if (and (eq system-type 'windows-nt)
+           ;; Gnuplot v4.x on MS-Windows came with a special
+           ;; pipe-enabled gnuplot executable for batch-mode
+           ;; execution; newer versions allow using gnuplot.exe.
+           (executable-find "pgnuplot"))
+      "pgnuplot"
+    "gnuplot")
   "Name of GNUPLOT program, for calc-graph features."
   :group 'calc
-  :type '(string))
+  :type '(string)
+  :version "26.2")
 
 (defcustom calc-gnuplot-plot-command
   nil
diff --git a/lisp/dired.el b/lisp/dired.el
index f52227e..3cb645e 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1747,7 +1747,7 @@ Do so according to the former subdir alist 
OLD-SUBDIR-ALIST."
 
     ;; Make menu bar items.
 
-    ;; No need to fo this, now that top-level items are fewer.
+    ;; No need to do this, now that top-level items are fewer.
     ;;;;
     ;; Get rid of the Edit menu bar item to save space.
     ;(define-key map [menu-bar edit] 'undefined)
diff --git a/lisp/erc/ChangeLog.1 b/lisp/erc/ChangeLog.1
index fbb64ea..97b5d3f 100644
--- a/lisp/erc/ChangeLog.1
+++ b/lisp/erc/ChangeLog.1
@@ -11443,7 +11443,7 @@
        * erc.el: * Added command-names to completion (erc-command-table)
        * New variable erc-auto-query. When set, every arriving message to you
        will open a query buffer for that sender if not already open.
-       * Compatibility function fo non-existing line-beginning|end-position 
functions in XEmacs.
+       * Compatibility function for non-existing line-beginning|end-position 
functions in XEmacs.
 
 2001-10-03  Mario Lang  <address@hidden>
 
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 418901d..f3436c6 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -726,6 +726,7 @@ Otherwise returns the library directory name, if that is 
defined."
        ;; Make sure these variables are (re-)initialized to the default value
        (setq ispell-really-aspell nil
               ispell-really-hunspell nil
+              ispell-really-enchant nil
              ispell-encoding8-command nil)
 
        (goto-char (point-min))
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index cdc119e..46ab8b9 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -23186,7 +23186,7 @@
        Delete argument prop_index.
        (font_property_table): Change arguments to validator.  Change Callers.
        (font_lispy_object): Delete.
-       (font_at): Use font_find_object instead fo font_lispy_object.
+       (font_at): Use font_find_object instead of font_lispy_object.
 
 2008-02-01  Kenichi Handa  <address@hidden>
 
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4
index 02da8c0..ab2807c 100644
--- a/src/ChangeLog.4
+++ b/src/ChangeLog.4
@@ -5135,7 +5135,7 @@
        (BSTRING): Deleted because they are stubs to the memory funcs.
        (memmove): Defined as safe_bcopy since memcpy is not safe.
        (HAVE_X_WINDOWS): Does not conditionally define anything any more.
-       Added support fo the GNU C compiler bundled with R3V7.
+       Added support for the GNU C compiler bundled with R3V7.
 
 1993-07-26  Richard Stallman  (address@hidden)
 
diff --git a/src/nsterm.m b/src/nsterm.m
index 29aa621..2bf3e00 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8155,6 +8155,14 @@ not_in_argv (NSString *arg)
 }
 
 
+- (void)viewWillDraw
+{
+  /* If the frame has been garbaged there's no point in redrawing
+     anything.  */
+  if (FRAME_GARBAGED_P (emacsframe))
+    [self setNeedsDisplay:NO];
+}
+
 - (void)drawRect: (NSRect)rect
 {
   const NSRect *rectList;
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index c214784..72b524f 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -178,6 +178,11 @@ uniscribe_otf_capability (struct font *font)
   Lisp_Object features;
 
   f = XFRAME (selected_frame);
+  /* Prevent quitting while we cons the lists in otf_features.
+     That's because get_frame_dc acquires the critical section, so we
+     cannot quit before we release it in release_frame_dc.  */
+  Lisp_Object prev_quit = Vinhibit_quit;
+  Vinhibit_quit = Qt;
   context = get_frame_dc (f);
   old_font = SelectObject (context, FONT_HANDLE (font));
 
@@ -188,6 +193,7 @@ uniscribe_otf_capability (struct font *font)
 
   SelectObject (context, old_font);
   release_frame_dc (f, context);
+  Vinhibit_quit = prev_quit;
 
   return capability;
 }
diff --git a/src/xdisp.c b/src/xdisp.c
index 8649507..867e5db 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -25747,22 +25747,28 @@ dump_glyph_string (struct glyph_string *s)
    face-override for drawing S.  */
 
 #ifdef HAVE_NTGUI
-#define OPTIONAL_HDC(hdc)  HDC hdc,
-#define DECLARE_HDC(hdc)   HDC hdc;
-#define ALLOCATE_HDC(hdc, f) hdc = get_frame_dc ((f))
-#define RELEASE_HDC(hdc, f)  release_frame_dc ((f), (hdc))
-#endif
-
-#ifndef OPTIONAL_HDC
-#define OPTIONAL_HDC(hdc)
-#define DECLARE_HDC(hdc)
-#define ALLOCATE_HDC(hdc, f)
-#define RELEASE_HDC(hdc, f)
+/* We set inhibit-quit here due to paranoia: get_frame_dc acquires the
+   critical section, and we cannot QUIT while we hold the critical
+   section.  If any of the code run by callers of ALLOCATE_HDC happens
+   to call Lisp (might be possible due to all the hooks lying around),
+   we must prevent it from quitting.  */
+# define ALLOCATE_HDC(hdc, f)                  \
+  Lisp_Object prev_quit = Vinhibit_quit;       \
+  Vinhibit_quit = Qt;                          \
+  HDC hdc = get_frame_dc ((f))
+# define RELEASE_HDC(hdc, f)                   \
+  release_frame_dc ((f), (hdc));               \
+  Vinhibit_quit = prev_quit
+#else
+# define ALLOCATE_HDC(hdc, f)
+# define RELEASE_HDC(hdc, f)
 #endif
 
 static void
 init_glyph_string (struct glyph_string *s,
-                  OPTIONAL_HDC (hdc)
+#ifdef HAVE_NTGUI
+                  HDC hdc,
+#endif
                   XChar2b *char2b, struct window *w, struct glyph_row *row,
                   enum glyph_row_area area, int start, enum draw_glyphs_face 
hl)
 {
@@ -26802,7 +26808,6 @@ draw_glyphs (struct window *w, int x, struct glyph_row 
*row,
   struct glyph_string *clip_head = NULL, *clip_tail = NULL;
   int i, j, x_reached, last_x, area_left = 0;
   struct frame *f = XFRAME (WINDOW_FRAME (w));
-  DECLARE_HDC (hdc);
 
   ALLOCATE_HDC (hdc, f);
 
@@ -32405,14 +32410,7 @@ expose_window_tree (struct window *w, XRectangle *r)
 #endif
   bool mouse_face_overwritten_p = false;
 
-  /* NS toolkits may have aleady modified the frame in expectation of
-     a successful redraw, so don't bail out here if the frame is
-     garbaged.  */
-  while (w
-#if !defined (HAVE_NS)
-         && !FRAME_GARBAGED_P (f)
-#endif
-         )
+  while (w && !FRAME_GARBAGED_P (f))
     {
       mouse_face_overwritten_p
        |= (WINDOWP (w->contents)
@@ -32440,16 +32438,11 @@ expose_frame (struct frame *f, int x, int y, int w, 
int h)
 
   TRACE ((stderr, "expose_frame "));
 
-#if !defined (HAVE_NS)
-  /* No need to redraw if frame will be redrawn soon except under NS
-     where the toolkit may have already modified the frame in
-     expectation of us redrawing it.  */
   if (FRAME_GARBAGED_P (f))
     {
       TRACE ((stderr, " garbaged\n"));
       return;
     }
-#endif
 
   /* If basic faces haven't been realized yet, there is no point in
      trying to redraw anything.  This can happen when we get an expose



reply via email to

[Prev in Thread] Current Thread [Next in Thread]