aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2018-08-29 08:24:03 -0700
committerGlenn Morris2018-08-29 08:24:03 -0700
commitd8bef4b519624de20baa1428dd103f61dfb220fa (patch)
treeed458e2d88b9a0a422fd46e50c1d2654d24b07a9
parentb28d5333e0144acc7385339578d907196c4b6f3e (diff)
parent2670cbf9a87eb498d73770c381ca51657d390a1e (diff)
downloademacs-d8bef4b519624de20baa1428dd103f61dfb220fa.tar.gz
emacs-d8bef4b519624de20baa1428dd103f61dfb220fa.zip
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
-rw-r--r--admin/admin.el17
-rwxr-xr-xbuild-aux/git-hooks/pre-commit16
-rw-r--r--configure.ac17
-rw-r--r--doc/lispref/debugging.texi3
-rw-r--r--etc/PROBLEMS20
-rw-r--r--lisp/calc/calc-cplx.el4
-rw-r--r--lisp/emacs-lisp/checkdoc.el2
-rw-r--r--src/eval.c2
-rw-r--r--src/xdisp.c20
9 files changed, 68 insertions, 33 deletions
diff --git a/admin/admin.el b/admin/admin.el
index 3cb5dbc2d92..1cad7ae2776 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -352,13 +352,22 @@ Optional argument TYPE is type of output (nil means all)."
352 (manual-html-mono texi (expand-file-name (concat name ".html") 352 (manual-html-mono texi (expand-file-name (concat name ".html")
353 html-mono-dir)))) 353 html-mono-dir))))
354 354
355(defvar manual-makeinfo (or (getenv "MAKEINFO") "makeinfo")
356 "The `makeinfo' program to use.")
357
358(defvar manual-texi2pdf (or (getenv "TEXI2PDF") "texi2pdf")
359 "The `texi2pdf' program to use.")
360
361(defvar manual-texi2dvi (or (getenv "TEXI2DVI") "texi2dvi")
362 "The `texi2dvi' program to use.")
363
355(defun manual-html-mono (texi-file dest) 364(defun manual-html-mono (texi-file dest)
356 "Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST. 365 "Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
357This function also edits the HTML files so that they validate as 366This function also edits the HTML files so that they validate as
358HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using 367HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
359the @import directive." 368the @import directive."
360 (make-directory (or (file-name-directory dest) ".") t) 369 (make-directory (or (file-name-directory dest) ".") t)
361 (call-process "makeinfo" nil nil nil 370 (call-process manual-makeinfo nil nil nil
362 "-D" "WWW_GNU_ORG" 371 "-D" "WWW_GNU_ORG"
363 "-I" (expand-file-name "../emacs" 372 "-I" (expand-file-name "../emacs"
364 (file-name-directory texi-file)) 373 (file-name-directory texi-file))
@@ -386,7 +395,7 @@ the @import directive."
386 (unless (file-exists-p texi-file) 395 (unless (file-exists-p texi-file)
387 (user-error "Manual file %s not found" texi-file)) 396 (user-error "Manual file %s not found" texi-file))
388 (make-directory dir t) 397 (make-directory dir t)
389 (call-process "makeinfo" nil nil nil 398 (call-process manual-makeinfo nil nil nil
390 "-D" "WWW_GNU_ORG" 399 "-D" "WWW_GNU_ORG"
391 "-I" (expand-file-name "../emacs" 400 "-I" (expand-file-name "../emacs"
392 (file-name-directory texi-file)) 401 (file-name-directory texi-file))
@@ -425,7 +434,7 @@ the @import directive."
425 "Run texi2pdf on TEXI-FILE, emitting PDF output to DEST." 434 "Run texi2pdf on TEXI-FILE, emitting PDF output to DEST."
426 (make-directory (or (file-name-directory dest) ".") t) 435 (make-directory (or (file-name-directory dest) ".") t)
427 (let ((default-directory (file-name-directory texi-file))) 436 (let ((default-directory (file-name-directory texi-file)))
428 (call-process "texi2pdf" nil nil nil 437 (call-process manual-texi2pdf nil nil nil
429 "-I" "../emacs" "-I" "../misc" 438 "-I" "../emacs" "-I" "../misc"
430 texi-file "-o" dest))) 439 texi-file "-o" dest)))
431 440
@@ -435,7 +444,7 @@ the @import directive."
435 (let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi")) 444 (let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi"))
436 (default-directory (file-name-directory texi-file))) 445 (default-directory (file-name-directory texi-file)))
437 ;; FIXME: Use `texi2dvi --ps'? --xfq 446 ;; FIXME: Use `texi2dvi --ps'? --xfq
438 (call-process "texi2dvi" nil nil nil 447 (call-process manual-texi2dvi nil nil nil
439 "-I" "../emacs" "-I" "../misc" 448 "-I" "../emacs" "-I" "../misc"
440 texi-file "-o" dvi-dest) 449 texi-file "-o" dvi-dest)
441 (call-process "dvips" nil nil nil dvi-dest "-o" dest) 450 (call-process "dvips" nil nil nil dvi-dest "-o" dest)
diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit
index 5e42dab233b..c0455fb2fa2 100755
--- a/build-aux/git-hooks/pre-commit
+++ b/build-aux/git-hooks/pre-commit
@@ -28,7 +28,7 @@ exec >&2
28# When doing a two-way merge, ignore problems that came from the other 28# When doing a two-way merge, ignore problems that came from the other
29# side of the merge. 29# side of the merge.
30head=HEAD 30head=HEAD
31if test -r "$GIT_DIR"/MERGE_HEAD; then 31if test -r "$GIT_DIR"/MERGE_HEAD && test "$GIT_MERGE_CHECK_OTHER" != true; then
32 merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit 32 merge_heads=`cat "$GIT_DIR"/MERGE_HEAD` || exit
33 for merge_head in $merge_heads; do 33 for merge_head in $merge_heads; do
34 case $head in 34 case $head in
@@ -42,15 +42,10 @@ if test -r "$GIT_DIR"/MERGE_HEAD; then
42fi 42fi
43 43
44git_diff='git diff --cached --name-only --diff-filter=A' 44git_diff='git diff --cached --name-only --diff-filter=A'
45ok_chars='\0+[=-=]./0-9A-Z_a-z'
46nbadchars=`$git_diff -z $head | tr -d "$ok_chars" | wc -c`
47 45
48if test "$nbadchars" -ne 0; then 46# 'git diff' will backslash escape tabs and newlines, so we don't have
49 echo "File name does not consist of -+./_ or ASCII letters or digits." 47# to worry about word splitting here.
50 exit 1 48$git_diff $head | sane_egrep 'ChangeLog|^-|/-|[^-+./_0-9A-Z_a-z]' | while IFS= read -r new_name; do
51fi
52
53for new_name in `$git_diff $head`; do
54 case $new_name in 49 case $new_name in
55 -* | */-*) 50 -* | */-*)
56 echo "$new_name: File name component begins with '-'." 51 echo "$new_name: File name component begins with '-'."
@@ -58,6 +53,9 @@ for new_name in `$git_diff $head`; do
58 ChangeLog | */ChangeLog) 53 ChangeLog | */ChangeLog)
59 echo "$new_name: Please use git commit messages, not ChangeLog files." 54 echo "$new_name: Please use git commit messages, not ChangeLog files."
60 exit 1;; 55 exit 1;;
56 *)
57 echo "$new_name: File name does not consist of -+./_ or ASCII letters or digits."
58 exit 1;;
61 esac 59 esac
62done 60done
63 61
diff --git a/configure.ac b/configure.ac
index 31750ef66a7..85ac932688c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -363,7 +363,7 @@ OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping])
363 363
364OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars]) 364OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
365OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d]) 365OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
366OPTION_DEFAULT_ON([xim],[don't use X11 XIM]) 366OPTION_DEFAULT_ON([xim],[at runtime, default X11 XIM to off])
367AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns], 367AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns],
368[use Nextstep (macOS Cocoa or GNUstep) windowing system. 368[use Nextstep (macOS Cocoa or GNUstep) windowing system.
369On by default on macOS.])],[],[with_ns=maybe]) 369On by default on macOS.])],[],[with_ns=maybe])
@@ -1557,7 +1557,6 @@ case $opsys in
1557 LIB_MATH= 1557 LIB_MATH=
1558 SYSTEM_TYPE=windows-nt 1558 SYSTEM_TYPE=windows-nt
1559 ;; 1559 ;;
1560 dnl NB this may be adjusted below.
1561 netbsd | openbsd ) 1560 netbsd | openbsd )
1562 SYSTEM_TYPE=berkeley-unix 1561 SYSTEM_TYPE=berkeley-unix
1563 ;; 1562 ;;
@@ -3170,11 +3169,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3170 AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])], 3169 AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])],
3171 HAVE_XIM=no) 3170 HAVE_XIM=no)
3172 3171
3173dnl '--with-xim' now controls only the initial value of use_xim at run time. 3172dnl Note this is non-standard. --with-xim does not control whether
3174 3173dnl XIM support is compiled in, it only affects the runtime default of
3174dnl use_xim in xterm.c.
3175if test "${with_xim}" != "no"; then 3175if test "${with_xim}" != "no"; then
3176 AC_DEFINE(USE_XIM, 1, 3176 AC_DEFINE(USE_XIM, 1,
3177 [Define to 1 if we should use XIM, if it is available.]) 3177 [Define to 1 to default runtime use of XIM to on.])
3178fi 3178fi
3179 3179
3180 3180
@@ -5429,12 +5429,13 @@ Configured for '${canonical}'.
5429optsep= 5429optsep=
5430emacs_config_features= 5430emacs_config_features=
5431for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \ 5431for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
5432 GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \ 5432 GCONF GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
5433 LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 NS MODULES \ 5433 LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 XDBE XIM \
5434 THREADS XWIDGETS LIBSYSTEMD JSON CANNOT_DUMP LCMS2 GMP; do 5434 NS MODULES THREADS XWIDGETS LIBSYSTEMD JSON CANNOT_DUMP LCMS2 GMP; do
5435 5435
5436 case $opt in 5436 case $opt in
5437 CANNOT_DUMP) eval val=\${$opt} ;; 5437 CANNOT_DUMP) eval val=\${$opt} ;;
5438 GLIB) val=${emacs_cv_links_glib} ;;
5438 NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;; 5439 NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
5439 TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;; 5440 TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
5440 THREADS) val=${threads_enabled} ;; 5441 THREADS) val=${threads_enabled} ;;
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 9b3ba6cf7ee..89927db21ec 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -983,6 +983,9 @@ the execution time. If you find that one particular function is
983responsible for a significant portion of the execution time, you can 983responsible for a significant portion of the execution time, you can
984start looking for ways to optimize that piece. 984start looking for ways to optimize that piece.
985 985
986@findex profiler-start
987@findex profiler-report
988@findex profiler-stop
986Emacs has built-in support for this. To begin profiling, type 989Emacs has built-in support for this. To begin profiling, type
987@kbd{M-x profiler-start}. You can choose to profile by processor 990@kbd{M-x profiler-start}. You can choose to profile by processor
988usage, memory usage, or both. Then run the code you'd like to speed 991usage, memory usage, or both. Then run the code you'd like to speed
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index a1fae225742..b863572e040 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -205,6 +205,26 @@ result in an endless loop.
205If you need Emacs to be able to recover from closing displays, compile 205If you need Emacs to be able to recover from closing displays, compile
206it with the Lucid toolkit instead of GTK. 206it with the Lucid toolkit instead of GTK.
207 207
208** Emacs compiled with GTK+ 3 crashes when run under some X servers.
209This happens when the X server does not provide certain display
210features that the underlying GTK+ 3 toolkit assumes. For example, this
211issue has been seen with remote X servers like X2Go. The symptoms
212are an Emacs crash, possibly triggered by the mouse entering the Emacs
213window, or an attempt to resize the Emacs window. The crash backtrace
214contains a call to XQueryPointer.
215
216This issue was fixed in the GTK+ 3 toolkit in commit 4b1c0256 in February 2018.
217
218If your GTK+ 3 is still affected, you can avoid the issue by recompiling
219Emacs with a different X toolkit, eg --with-toolkit=gtk2.
220
221References:
222https://gitlab.gnome.org/GNOME/gtk/commit/4b1c02560f0d8097bf5a11932e52fb72f3e9e94b
223https://debbugs.gnu.org/24280
224https://bugs.debian.org/901038
225https://bugzilla.redhat.com/1483942
226https://access.redhat.com/solutions/3410101
227
208** Emacs compiled with GTK crashes at startup due to X protocol error. 228** Emacs compiled with GTK crashes at startup due to X protocol error.
209 229
210This is known to happen on elementary OS GNU/Linux systems. 230This is known to happen on elementary OS GNU/Linux systems.
diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el
index 4a453a73d72..35cd31dfb4f 100644
--- a/lisp/calc/calc-cplx.el
+++ b/lisp/calc/calc-cplx.el
@@ -273,8 +273,8 @@
273 (or (eq (car-safe val) 'special-const) 273 (or (eq (car-safe val) 'special-const)
274 (equal val '(cplx 0 1)) 274 (equal val '(cplx 0 1))
275 (and (eq (car-safe val) 'polar) 275 (and (eq (car-safe val) 'polar)
276 (eq (nth 1 val) 0) 276 (eq (nth 1 val) 1)
277 (Math-equal (nth 1 val) (math-quarter-circle nil)))))) 277 (Math-equal (nth 2 val) (math-quarter-circle nil))))))
278 278
279;;; Extract the real or complex part of a complex number. [R N] [Public] 279;;; Extract the real or complex part of a complex number. [R N] [Public]
280;;; Also extracts the real part of a modulo form. 280;;; Also extracts the real part of a modulo form.
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 1b3b23d8871..83929beb1e0 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1837,7 +1837,7 @@ Replace with \"%s\"? " original replace)
1837 (if (checkdoc-autofix-ask-replace 1837 (if (checkdoc-autofix-ask-replace
1838 (match-beginning 1) (+ (match-beginning 1) 1838 (match-beginning 1) (+ (match-beginning 1)
1839 (length ms)) 1839 (length ms))
1840 msg (format-message "`%s'" ms) t) 1840 msg (format "`%s'" ms) t)
1841 (setq msg nil) 1841 (setq msg nil)
1842 (setq msg 1842 (setq msg
1843 (format-message 1843 (format-message
diff --git a/src/eval.c b/src/eval.c
index 8745ba9ef99..50de60c936c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -787,7 +787,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
787 LOADHIST_ATTACH (sym); 787 LOADHIST_ATTACH (sym);
788 } 788 }
789 else if (!NILP (Vinternal_interpreter_environment) 789 else if (!NILP (Vinternal_interpreter_environment)
790 && !XSYMBOL (sym)->u.s.declared_special) 790 && (SYMBOLP (sym) && !XSYMBOL (sym)->u.s.declared_special))
791 /* A simple (defvar foo) with lexical scoping does "nothing" except 791 /* A simple (defvar foo) with lexical scoping does "nothing" except
792 declare that var to be dynamically scoped *locally* (i.e. within 792 declare that var to be dynamically scoped *locally* (i.e. within
793 the current file or let-block). */ 793 the current file or let-block). */
diff --git a/src/xdisp.c b/src/xdisp.c
index 11b14e2cf95..04033665d76 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21185,8 +21185,12 @@ maybe_produce_line_number (struct it *it)
21185 an L2R paragraph. */ 21185 an L2R paragraph. */
21186 tem_it.bidi_it.resolved_level = 2; 21186 tem_it.bidi_it.resolved_level = 2;
21187 21187
21188 /* We must leave space for 2 glyphs for continuation and truncation,
21189 and at least one glyph for buffer text. */
21190 int width_limit =
21191 tem_it.last_visible_x - tem_it.first_visible_x
21192 - 3 * FRAME_COLUMN_WIDTH (it->f);
21188 /* Produce glyphs for the line number in a scratch glyph_row. */ 21193 /* Produce glyphs for the line number in a scratch glyph_row. */
21189 int n_glyphs_before;
21190 for (const char *p = lnum_buf; *p; p++) 21194 for (const char *p = lnum_buf; *p; p++)
21191 { 21195 {
21192 /* For continuation lines and lines after ZV, instead of a line 21196 /* For continuation lines and lines after ZV, instead of a line
@@ -21210,18 +21214,18 @@ maybe_produce_line_number (struct it *it)
21210 else 21214 else
21211 tem_it.c = tem_it.char_to_display = *p; 21215 tem_it.c = tem_it.char_to_display = *p;
21212 tem_it.len = 1; 21216 tem_it.len = 1;
21213 n_glyphs_before = scratch_glyph_row.used[TEXT_AREA];
21214 /* Make sure these glyphs will have a "position" of -1. */ 21217 /* Make sure these glyphs will have a "position" of -1. */
21215 SET_TEXT_POS (tem_it.position, -1, -1); 21218 SET_TEXT_POS (tem_it.position, -1, -1);
21216 PRODUCE_GLYPHS (&tem_it); 21219 PRODUCE_GLYPHS (&tem_it);
21217 21220
21218 /* Stop producing glyphs if we don't have enough space on 21221 /* Stop producing glyphs, and refrain from producing the line
21219 this line. FIXME: should we refrain from producing the 21222 number, if we don't have enough space on this line. */
21220 line number at all in that case? */ 21223 if (tem_it.current_x >= width_limit)
21221 if (tem_it.current_x > tem_it.last_visible_x)
21222 { 21224 {
21223 scratch_glyph_row.used[TEXT_AREA] = n_glyphs_before; 21225 it->lnum_width = 0;
21224 break; 21226 it->lnum_pixel_width = 0;
21227 bidi_unshelve_cache (itdata, false);
21228 return;
21225 } 21229 }
21226 } 21230 }
21227 21231