Paul Eggert [Wed, 4 Apr 2018 17:59:09 +0000 (10:59 -0700)]
Improve GC+Cairo workaround
Suggested by Eli Zaretskii (Bug#20890#31).
* src/font.h (font_data_structures_may_be_ill_formed): New function.
* src/ftfont.c (ftfont_close):
* src/ftcrfont.c (ftcrfont_close): Use it.
Eli Zaretskii [Fri, 4 Jan 2019 13:40:43 +0000 (15:40 +0200)]
Improve documentation of 'server-name'
* doc/emacs/misc.texi (Emacs Server, TCP Emacs server)
(emacsclient Options):
* lisp/server.el (server-name): Document the usage of
'server-name' to specify the server file as an absolute file
name. Do not merge to master. (Bug#33934)
Eli Zaretskii [Sat, 29 Dec 2018 15:34:57 +0000 (17:34 +0200)]
Improve documentation of 'file-local-name' and related APIs
* doc/lispref/files.texi (Unique File Names)
(Magic File Names, File Name Expansion): Improve documentation
of the "local part" of a remote file name.
* doc/lispref/processes.texi (Synchronous Processes)
(Asynchronous Processes): State explicitly that program and
file names passed to functions that start remote processes
need to be relative or obtained by 'file-local-name'.
* lisp/files.el (file-local-name):
* lisp/simple.el (start-file-process, process-file): Improve
the documentation of the "local part" of a remote file name,
and its use in APIs that start remote processes.
Paul Eggert [Thu, 27 Dec 2018 20:52:45 +0000 (12:52 -0800)]
Improve accept-process-process doc
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output):
Document that (accept-process-output P) can return non-nil
even after P has exited, and that it can return nil even if P
is still running (Bug#33839).
Improve process doc. with respect to handling of large input (Bug#33191)
* src/process.c (Fprocess_send_region, Fprocess_send_string):
Document that process input longer than the process input
buffer may be split into bunches. Remove an outdated
reference to a 500 character split boundary.
* doc/lispref/processes.texi (Asynchronous Processes): Remove
mention of "stray character injections" in PTY processes. See
also the comment about ICANON in src/sysdep.c, function
child_setup_tty.
Alan Mackenzie [Thu, 20 Dec 2018 12:21:16 +0000 (12:21 +0000)]
Check result from c-backward-token-2 to avoid infinite loop
This fixes bug #33784.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): While moving back
over enclosing parentheses, check that c-backward-token-2 actually moves.
Paul Eggert [Wed, 19 Dec 2018 21:42:21 +0000 (13:42 -0800)]
cl-make-random-state was not copying its arg
Problem reported by Xu Chunyang (Bug#33731).
* lisp/emacs-lisp/cl-extra.el (cl-make-random-state):
Use copy-sequence, not copy-tree, so that the record is copied.
* test/lisp/emacs-lisp/cl-extra-tests.el:
(cl-extra-test-cl-make-random-state): New test.
Glenn Morris [Wed, 19 Dec 2018 20:06:18 +0000 (15:06 -0500)]
Skip a vc-bzr test if run as root
* test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads):
Skip this test when run as root. This works around a race
condition in root-specific code in vc-mode-line when deleting a file.
; Do not merge to master, instead fix vc-mode-line there.
* src/keyboard.c (read_char): Events put into `unread-command-events'
with the form (t . EVENT) should always have the t stripped when read
out.
* test/src/keyboard-tests.el: New tests for `unread-command-events'.
Glenn Morris [Wed, 19 Dec 2018 02:18:31 +0000 (21:18 -0500)]
Restrict downcasing in elisp xref tests (bug#25534)
The tests happen to not fail at the moment because find-library-name
now has an extra feature, find-library--from-load-history, which
happens to do a case-insensitive regexp match; but still it seems
better not to rely on this.
* test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive):
New variable.
(xref-elisp-test-run, emacs-test-dir): Only downcase if the
filesystem seems to be case-insensitive.
Rob Browning [Tue, 18 Dec 2018 20:34:01 +0000 (15:34 -0500)]
Avoid test failures if directory name looks like a regexp
Taken from <https://sources.debian.org/patches/emacs/1:26.1+1-1>
* test/lisp/ibuffer-tests.el (ibuffer-filter-inclusion-3):
* test/lisp/net/tramp-tests.el (tramp-test42-remote-load-path):
Regexp-quote file names to avoid failures with directory names
of the form "build/emacs-i87jK3/emacs-26.1+1/...".
Paul Eggert [Mon, 17 Dec 2018 16:11:55 +0000 (08:11 -0800)]
More porting to GCC 8 of --enable-gcc-warnings
Backport from master.
I ran into this when building Emacs 26 with GCC 8 on Fedora 29 x86.
* lwlib/lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu):
* lwlib/lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance):
* lwlib/lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]:
No longer const.
* src/emacs-module.c: Ignore -Wcast-function-type.
Eli Zaretskii [Fri, 14 Dec 2018 08:43:37 +0000 (10:43 +0200)]
Fix display of line numbers in empty lines beyond EOB
* src/xdisp.c (maybe_produce_line_number): When the current
line is at EOB, use the 'line-number-current-line' face only
on that single line, but not on the rest of empty lines beyond
EOB. (Bug#33732)
Eli Zaretskii [Tue, 11 Dec 2018 10:32:11 +0000 (12:32 +0200)]
Fix redisplay when a window's scroll bar or fringes are changed
* src/window.c (set_window_fringes, set_window_scroll_bars):
Set windows_or_buffers_changed flag to cause immediate
thorough redisplay of a window when scroll bars or fringes are
changed. (Bug#33694)
Alan Mackenzie [Mon, 10 Dec 2018 14:30:40 +0000 (14:30 +0000)]
CC Mode: stop extra parens on expression causing false fontification as type
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): recognize
arithmetic operator followed by several open parentheses, not just one, as not
being an argument list.
Alan Mackenzie [Mon, 10 Dec 2018 12:12:02 +0000 (12:12 +0000)]
CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer to type a"
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When testing for an
identifier after "a *", on failure additionally check for a digit, setting a
new flag variable got-number if one is found. In the test for CASE 18, check
this flag.
Raimon Grau [Sun, 9 Dec 2018 23:42:41 +0000 (01:42 +0200)]
Guard occur against an undefined orig-line
; Not to be merged to master
* lisp/replace.el (occur-engine): Avoid inserting the current line if
orig-line is nil. This happens, for example, when reverting an occur
buffer with `list-matching-lines-jump-to-current-line' set to t.
(Bug#33476)
Eli Zaretskii [Sun, 2 Dec 2018 18:04:05 +0000 (20:04 +0200)]
Revert "Revert "Fix infloop in GC mark_kboards""
This reverts commit c418c85617babbe7b63730fefb71e2c87a0141af.
This reinstates the original fix, as it had nothing to do
with the behavior reported in bug#33571, which seems to be
the expected behavior.
Eli Zaretskii [Tue, 27 Nov 2018 08:09:55 +0000 (10:09 +0200)]
Improve documentation of Ediff wordwise commands
* lisp/vc/ediff.el (ediff-windows-wordwise)
(ediff-windows-linewise, ediff-regions-wordwise): Update and
clarify the doc strings.
* doc/misc/ediff.texi (Major Entry Points): Update and clarify
the documentation of 'ediff-windows-wordwise' and
'ediff-regions-wordwise'. See the discussion starting at
https://lists.gnu.org/archive/html/help-gnu-emacs/2018-11/msg00197.html
for the details.
Eli Zaretskii [Mon, 26 Nov 2018 17:31:24 +0000 (19:31 +0200)]
Support Hunspell 1.7.0 in ispell.el
* lisp/textmodes/ispell.el
(ispell-find-hunspell-dictionaries): Invoke Hunspell with an
additional command-line argument, to work around a misfeature
in Hunspell 1.7.0 that prevents it from reporting the loaded
dictionary. (Bug#33493)
Alan Third [Mon, 29 Oct 2018 15:37:35 +0000 (15:37 +0000)]
Fix more drawing bugs in NS port (bug#32932)
* src/nsterm.m (ns_row_rect): New function.
(ns_clip_to_row): Remove function.
(ns_copy_bits): Fix mistake.
(ns_shift_glyphs_for_insert): Mark the frame as dirty instead of
directly copying.
(ns_draw_fringe_bitmap): Stop using ns_clip_to_row.
(ns_draw_window_cursor): Stop using ns_clip_to_row and perform a
display when not in redisplay.
(ns_update_window_begin): Remove redundant code that never executes.
([EmacsView drawRect:]): Show the rectangle being exposed in NSTRACE.
* src/xdisp.c (expose_window_tree) [HAVE_NS]:
(expose_frame) [HAVE_NS]: Redraw even if the frame is garbaged.
Alan Mackenzie [Sat, 24 Nov 2018 10:31:53 +0000 (10:31 +0000)]
Fix bug #33416, where typing a ) in a comment at EOB caused a loop (CC Mode).
* lisp/progmodes/cc-mode.el (c-fl-decl-start): A c-forward-syntactic-ws leaves
point inside whitespace when moving over a comment at EOB which has no
terminating LF. Check this possibility and correct for it.
Ulrich Müller [Sat, 17 Nov 2018 10:43:06 +0000 (11:43 +0100)]
Update the calc units table
On 2018-11-16, the 26th meeting of the General Conference on Weights
and Measures (CGPM) has redefined the International System of Units by
adopting fixed values for the Planck constant, the elementary charge,
the Boltzmann constant, and the Avogadro constant:
https://www.bipm.org/utils/en/pdf/CGPM/Draft-Resolution-A-EN.pdf
* lisp/calc/calc-units.el (math-standard-units): Update according
to redefinition of the SI in 2018. (Bug#33412)
Eli Zaretskii [Sat, 24 Nov 2018 08:00:55 +0000 (10:00 +0200)]
Improve indexing in the ELisp manual
* doc/lispref/control.texi (Control Structures, Sequencing)
(Conditionals, Iteration, Catch and Throw, Handling Errors)
(Cleanups):
* doc/lispref/eval.texi (Self-Evaluating Forms)
(Symbol Forms, Function Forms, Macro Forms, Special Forms)
(Quoting, Backquote): Add index entries that begin with
"forms". (Bug#33440)