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
This commit is contained in:
Glenn Morris 2019-01-18 07:50:47 -08:00
commit 957090b795
17 changed files with 81 additions and 57 deletions

View file

@ -83,7 +83,7 @@
2014-12-08 Eric S. Raymond <esr@snark.thyrsus.com>
* 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 <eggert@cs.ucla.edu>

View file

@ -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

View file

@ -287,12 +287,11 @@ unibyte string, it is returned unchanged. Use this function for
characters.
@end defun
@c 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
@var{character} 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

View file

@ -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.

View file

@ -8873,7 +8873,7 @@
2006-06-06 Nick Roberts <nickrob@snap.net.nz>
* 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.

View file

@ -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

View file

@ -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 ()

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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 <mlang@delysid.org>

View file

@ -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))

View file

@ -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 <handa@ni.aist.go.jp>

View file

@ -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 (rms@mole.gnu.ai.mit.edu)

View file

@ -8155,6 +8155,14 @@ - (instancetype)toggleToolbar: (id)sender
}
- (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;

View file

@ -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;
}

View file

@ -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