Merge from origin/emacs-26

2670cbf (origin/emacs-26) ; * configure.ac: Remove outdated comment (...
3b71bef admin.el: respect environment settings for makeinfo etc
3764ab4 * etc/PROBLEMS: New entry about GTK+ 3 crash with some X serv...
9d61344 Index profiler commands in elisp manual
f088817 Fix math-imaginary-i check
fca935e ; Let pre-commit git hook check merged in changes (Bug#29197)
fe06fcc Avoid infinite hscrolling loops when line numbers are displayed
63e59c8 Avoid crashes in malformed defvar
785682c * configure.ac (emacs_config_features): Add GLIB, XDBE, XIM.
2695b7e * configure.ac: Doc fixes related to --with-xim.
d0d162c Small checkdoc quoting fix (bug#32546)

Conflicts:
	configure.ac
This commit is contained in:
Glenn Morris 2018-08-29 08:24:03 -07:00
commit d8bef4b519
9 changed files with 68 additions and 33 deletions

View file

@ -352,13 +352,22 @@ Optional argument TYPE is type of output (nil means all)."
(manual-html-mono texi (expand-file-name (concat name ".html")
html-mono-dir))))
(defvar manual-makeinfo (or (getenv "MAKEINFO") "makeinfo")
"The `makeinfo' program to use.")
(defvar manual-texi2pdf (or (getenv "TEXI2PDF") "texi2pdf")
"The `texi2pdf' program to use.")
(defvar manual-texi2dvi (or (getenv "TEXI2DVI") "texi2dvi")
"The `texi2dvi' program to use.")
(defun manual-html-mono (texi-file dest)
"Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
This function also edits the HTML files so that they validate as
HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
the @import directive."
(make-directory (or (file-name-directory dest) ".") t)
(call-process "makeinfo" nil nil nil
(call-process manual-makeinfo nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
@ -386,7 +395,7 @@ the @import directive."
(unless (file-exists-p texi-file)
(user-error "Manual file %s not found" texi-file))
(make-directory dir t)
(call-process "makeinfo" nil nil nil
(call-process manual-makeinfo nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
@ -425,7 +434,7 @@ the @import directive."
"Run texi2pdf on TEXI-FILE, emitting PDF output to DEST."
(make-directory (or (file-name-directory dest) ".") t)
(let ((default-directory (file-name-directory texi-file)))
(call-process "texi2pdf" nil nil nil
(call-process manual-texi2pdf nil nil nil
"-I" "../emacs" "-I" "../misc"
texi-file "-o" dest)))
@ -435,7 +444,7 @@ the @import directive."
(let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi"))
(default-directory (file-name-directory texi-file)))
;; FIXME: Use `texi2dvi --ps'? --xfq
(call-process "texi2dvi" nil nil nil
(call-process manual-texi2dvi nil nil nil
"-I" "../emacs" "-I" "../misc"
texi-file "-o" dvi-dest)
(call-process "dvips" nil nil nil dvi-dest "-o" dest)

View file

@ -28,7 +28,7 @@ exec >&2
# When doing a two-way merge, ignore problems that came from the other
# side of the merge.
head=HEAD
if test -r "$GIT_DIR"/MERGE_HEAD; then
if test -r "$GIT_DIR"/MERGE_HEAD && test "$GIT_MERGE_CHECK_OTHER" != true; then
merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit
for merge_head in $merge_heads; do
case $head in
@ -42,15 +42,10 @@ if test -r "$GIT_DIR"/MERGE_HEAD; then
fi
git_diff='git diff --cached --name-only --diff-filter=A'
ok_chars='\0+[=-=]./0-9A-Z_a-z'
nbadchars=`$git_diff -z $head | tr -d "$ok_chars" | wc -c`
if test "$nbadchars" -ne 0; then
echo "File name does not consist of -+./_ or ASCII letters or digits."
exit 1
fi
for new_name in `$git_diff $head`; do
# 'git diff' will backslash escape tabs and newlines, so we don't have
# to worry about word splitting here.
$git_diff $head | sane_egrep 'ChangeLog|^-|/-|[^-+./_0-9A-Z_a-z]' | while IFS= read -r new_name; do
case $new_name in
-* | */-*)
echo "$new_name: File name component begins with '-'."
@ -58,6 +53,9 @@ for new_name in `$git_diff $head`; do
ChangeLog | */ChangeLog)
echo "$new_name: Please use git commit messages, not ChangeLog files."
exit 1;;
*)
echo "$new_name: File name does not consist of -+./_ or ASCII letters or digits."
exit 1;;
esac
done

View file

@ -363,7 +363,7 @@ OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping])
OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
OPTION_DEFAULT_ON([xim],[at runtime, default X11 XIM to off])
AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns],
[use Nextstep (macOS Cocoa or GNUstep) windowing system.
On by default on macOS.])],[],[with_ns=maybe])
@ -1557,7 +1557,6 @@ case $opsys in
LIB_MATH=
SYSTEM_TYPE=windows-nt
;;
dnl NB this may be adjusted below.
netbsd | openbsd )
SYSTEM_TYPE=berkeley-unix
;;
@ -3170,11 +3169,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])],
HAVE_XIM=no)
dnl '--with-xim' now controls only the initial value of use_xim at run time.
dnl Note this is non-standard. --with-xim does not control whether
dnl XIM support is compiled in, it only affects the runtime default of
dnl use_xim in xterm.c.
if test "${with_xim}" != "no"; then
AC_DEFINE(USE_XIM, 1,
[Define to 1 if we should use XIM, if it is available.])
[Define to 1 to default runtime use of XIM to on.])
fi
@ -5429,12 +5429,13 @@ Configured for '${canonical}'.
optsep=
emacs_config_features=
for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 NS MODULES \
THREADS XWIDGETS LIBSYSTEMD JSON CANNOT_DUMP LCMS2 GMP; do
GCONF GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 XDBE XIM \
NS MODULES THREADS XWIDGETS LIBSYSTEMD JSON CANNOT_DUMP LCMS2 GMP; do
case $opt in
CANNOT_DUMP) eval val=\${$opt} ;;
GLIB) val=${emacs_cv_links_glib} ;;
NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
THREADS) val=${threads_enabled} ;;

View file

@ -983,6 +983,9 @@ the execution time. If you find that one particular function is
responsible for a significant portion of the execution time, you can
start looking for ways to optimize that piece.
@findex profiler-start
@findex profiler-report
@findex profiler-stop
Emacs has built-in support for this. To begin profiling, type
@kbd{M-x profiler-start}. You can choose to profile by processor
usage, memory usage, or both. Then run the code you'd like to speed

View file

@ -205,6 +205,26 @@ result in an endless loop.
If you need Emacs to be able to recover from closing displays, compile
it with the Lucid toolkit instead of GTK.
** Emacs compiled with GTK+ 3 crashes when run under some X servers.
This happens when the X server does not provide certain display
features that the underlying GTK+ 3 toolkit assumes. For example, this
issue has been seen with remote X servers like X2Go. The symptoms
are an Emacs crash, possibly triggered by the mouse entering the Emacs
window, or an attempt to resize the Emacs window. The crash backtrace
contains a call to XQueryPointer.
This issue was fixed in the GTK+ 3 toolkit in commit 4b1c0256 in February 2018.
If your GTK+ 3 is still affected, you can avoid the issue by recompiling
Emacs with a different X toolkit, eg --with-toolkit=gtk2.
References:
https://gitlab.gnome.org/GNOME/gtk/commit/4b1c02560f0d8097bf5a11932e52fb72f3e9e94b
https://debbugs.gnu.org/24280
https://bugs.debian.org/901038
https://bugzilla.redhat.com/1483942
https://access.redhat.com/solutions/3410101
** Emacs compiled with GTK crashes at startup due to X protocol error.
This is known to happen on elementary OS GNU/Linux systems.

View file

@ -273,8 +273,8 @@
(or (eq (car-safe val) 'special-const)
(equal val '(cplx 0 1))
(and (eq (car-safe val) 'polar)
(eq (nth 1 val) 0)
(Math-equal (nth 1 val) (math-quarter-circle nil))))))
(eq (nth 1 val) 1)
(Math-equal (nth 2 val) (math-quarter-circle nil))))))
;;; Extract the real or complex part of a complex number. [R N] [Public]
;;; Also extracts the real part of a modulo form.

View file

@ -1837,7 +1837,7 @@ Replace with \"%s\"? " original replace)
(if (checkdoc-autofix-ask-replace
(match-beginning 1) (+ (match-beginning 1)
(length ms))
msg (format-message "`%s'" ms) t)
msg (format "`%s'" ms) t)
(setq msg nil)
(setq msg
(format-message

View file

@ -787,7 +787,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
LOADHIST_ATTACH (sym);
}
else if (!NILP (Vinternal_interpreter_environment)
&& !XSYMBOL (sym)->u.s.declared_special)
&& (SYMBOLP (sym) && !XSYMBOL (sym)->u.s.declared_special))
/* A simple (defvar foo) with lexical scoping does "nothing" except
declare that var to be dynamically scoped *locally* (i.e. within
the current file or let-block). */

View file

@ -21185,8 +21185,12 @@ maybe_produce_line_number (struct it *it)
an L2R paragraph. */
tem_it.bidi_it.resolved_level = 2;
/* We must leave space for 2 glyphs for continuation and truncation,
and at least one glyph for buffer text. */
int width_limit =
tem_it.last_visible_x - tem_it.first_visible_x
- 3 * FRAME_COLUMN_WIDTH (it->f);
/* Produce glyphs for the line number in a scratch glyph_row. */
int n_glyphs_before;
for (const char *p = lnum_buf; *p; p++)
{
/* For continuation lines and lines after ZV, instead of a line
@ -21210,18 +21214,18 @@ maybe_produce_line_number (struct it *it)
else
tem_it.c = tem_it.char_to_display = *p;
tem_it.len = 1;
n_glyphs_before = scratch_glyph_row.used[TEXT_AREA];
/* Make sure these glyphs will have a "position" of -1. */
SET_TEXT_POS (tem_it.position, -1, -1);
PRODUCE_GLYPHS (&tem_it);
/* Stop producing glyphs if we don't have enough space on
this line. FIXME: should we refrain from producing the
line number at all in that case? */
if (tem_it.current_x > tem_it.last_visible_x)
/* Stop producing glyphs, and refrain from producing the line
number, if we don't have enough space on this line. */
if (tem_it.current_x >= width_limit)
{
scratch_glyph_row.used[TEXT_AREA] = n_glyphs_before;
break;
it->lnum_width = 0;
it->lnum_pixel_width = 0;
bidi_unshelve_cache (itdata, false);
return;
}
}