Eli Zaretskii [Fri, 22 Jan 2021 07:57:19 +0000 (09:57 +0200)]
Improve documentation of sendmail.el defcustom's
* lisp/mail/sendmail.el (mail-archive-file-name)
(mail-default-reply-to, mail-self-blind, mail-default-headers):
Say in the doc string that 'message-default-mail-headers' shall be
customized when using 'message-mode' for email composition.
(Bug#46029)
Martin Rudalics [Sun, 10 Jan 2021 10:20:56 +0000 (11:20 +0100)]
Fix assertion failure in window_box_height (Bug#45737)
* lisp/window.el (window-sizable): Don't try to grow a mini window
when the root window's minimum height is already larger than its
actual height (Bug#45737).
Eli Zaretskii [Fri, 8 Jan 2021 07:35:05 +0000 (09:35 +0200)]
Fix inhibiting the default.el loading in user init file
* lisp/startup.el (startup--load-user-init-file): Test the value
of 'inhibit-default-init', not just the LOAD-DEFAULTS argument,
because loading the user's init file could have set the value of
the former.
(command-line): Call 'startup--load-user-init-file' with last arg
t: there's no longer any need to test the value of
'inhibit-default-init' here, as it will be tested by the called
function. (Bug#45708)
Fix problem with 8bit content-transfer-encoding in nndoc mbox files
* lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): If we're
reading an mbox file, it may contain messages that use
content-transfer-encoding 8bit, which means that we have to treat
the file as a sequence of byte (bug#42951). This avoids
double-decoding -- once by Emacs when inserting the mbox into the
buffer, and once by Gnus when displaying the articles.
Mauro Aranda [Mon, 4 Jan 2021 12:58:10 +0000 (09:58 -0300)]
Update two user option names in the Widget manual
* doc/misc/widget.texi (Basic Types): The user options
widget-glyph-directory and widget-glyph-enable were renamed long ago
to widget-image-directory and widget-image-enable, but the manual
kept calling them by their old names. Update the names.
Paul Eggert [Sun, 3 Jan 2021 19:19:48 +0000 (11:19 -0800)]
Fix broken build on AIX 7.2
Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
symbol: BC’. This is because -lcurses does not define BC etc.
* configure.ac: When building terminfo.o, define
TERMINFO_DEFINES_BC if the library defines BC etc.
* src/terminfo.c (UP, BC, PC): Define depending on
TERMINFO_DEFINES_BC, not on TERMINFO.
Eli Zaretskii [Thu, 31 Dec 2020 20:27:30 +0000 (22:27 +0200)]
Improve documentation of 'network-lookup-address-info'
* src/process.c (Fnetwork_lookup_address_info):
* doc/lispref/processes.texi (Misc Network): Document the error
message emitted by 'network-lookup-address-info' when it fails.
Eli Zaretskii [Mon, 14 Dec 2020 18:09:04 +0000 (20:09 +0200)]
Fix point location when completing in gdb-mi.el
* lisp/progmodes/gdb-mi.el (def-gdb-auto-update-handler): Don't
force window-start position, so that redisplay doesn't move point
when popping completion window below the GUD one. (Bug#45052)
Alan Third [Sat, 31 Oct 2020 15:14:34 +0000 (15:14 +0000)]
Fix crash in ns_mouse_position (bug#44313)
* src/nsterm.m (ns_destroy_window): Close the window before freeing
the frame resources so we don't end up accessing the frame struct
after it's been freed.
Alan Third [Sat, 5 Dec 2020 19:40:08 +0000 (19:40 +0000)]
Fix crash when using XRender and restoring image from X (bug#44930)
* src/dispextern.h (struct image): Add original dimension elements.
* src/image.c (image_set_transform): Store the original dimensions.
(image_get_x_image): If we're using transforms use the original
dimensions with XGetImage.
Tassilo Horn [Fri, 11 Dec 2020 09:24:58 +0000 (10:24 +0100)]
Bind k to image-kill-buffer in doc-view-mode-map.
* lisp/doc-view.el (doc-view-mode-map): Bind k to image-kill-buffer.
The binding k -> doc-view-kill-proc-and-buffer has been removed in
2015 and the function been made an obsolete function alias to
image-kill-buffer (bug#45157).
Eli Zaretskii [Mon, 30 Nov 2020 18:44:11 +0000 (20:44 +0200)]
Don't show in 'view-lossage' responses to xterm feature queries
* lisp/term/xterm.el (xterm--read-event-for-query): Prevent
recording the characters read as the xterm response to a query,
so as not to show them in 'view-lossage'. (Bug#44908)
Karl Fogel [Sun, 29 Nov 2020 00:17:46 +0000 (18:17 -0600)]
Save bookmarks by using `write-file' (bug#12507)
Go back to using `write-file' to save bookmarks, instead of using
`write-region'. This means numbered backups of the bookmark file may
get made again, depending on the value of `bookmark-version-control'.
Thanks especially to Drew Adams and Eli Zaretskii for their
persistence in tracking down information relevant to this change.
Eli Zaretskii [Sat, 28 Nov 2020 17:05:18 +0000 (19:05 +0200)]
Fix filing messages when 'rmail-output-reset-deleted-flag' is non-nil
* lisp/mail/rmailout.el (rmail-output): Fix off-by-one error in
deciding when to advance to the next message under non-nil
'rmail-output-reset-deleted-flag'. (Bug#44839)
Eli Zaretskii [Sat, 28 Nov 2020 07:21:33 +0000 (09:21 +0200)]
Revert "Fix incorrect handling of module runtime and environment pointers."
This reverts commit cdc632fbe6e149318147a98cccf1b7af191f2ce8.
Those changes are too significant and non-trivial to be
suitable for a release branch at this time.
Philipp Stephani [Fri, 27 Nov 2020 18:08:55 +0000 (19:08 +0100)]
Fix incorrect handling of module runtime and environment pointers.
We used to store module runtime and environment pointers in the static
lists Vmodule_runtimes and Vmodule_environments. However, this is
incorrect because these objects have to be kept per-thread. With this
naive approach, interleaving module function calls in separate threads
leads to environments being removed in the wrong order, which in turn
can cause local module values to be incorrectly garbage-collected.
Instead, turn Vmodule_runtimes and Vmodule_environments into
hashtables keyed by the thread objects. The fix is relatively
localized and should therefore be safe enough for the release branch.
Module assertions now have to walk the pointer list for the current
thread, which is more correct since they now only find environments
for the current thread.
Also add a unit test that exemplifies the problem. It interleaves two
module calls in two threads so that the first call ends while the
second one is still active. Without this change, this test triggers
an assertion failure.
* src/emacs-module.c (Fmodule_load, initialize_environment)
(finalize_environment, finalize_runtime_unwind): Store runtime and
environment pointers in per-thread lists.
(syms_of_module): Initialize runtimes and environments hashtables.
(module_assert_runtime, module_assert_env, value_to_lisp): Consider
only objects for the current thread.
(module_gc_hash_table_size, module_hash_push, module_hash_pop): New
generic hashtable helper functions.
(module_objects, module_push_pointer, module_pop_pointer): New helper
functions to main thread-specific lists of runtime and environment
pointers.
(mark_modules): Mark all environments in all threads.
* test/data/emacs-module/mod-test.c (Fmod_test_funcall): New test
function.
(emacs_module_init): Bind it.
* test/src/emacs-module-tests.el (emacs-module-tests--variable): New
helper type to guard access to state in a thread-safe way.
(emacs-module-tests--wait-for-variable)
(emacs-module-tests--change-variable): New helper functions.
(emacs-module-tests/interleaved-threads): New unit test.
Alan Mackenzie [Thu, 26 Nov 2020 11:37:38 +0000 (11:37 +0000)]
CC Mode: Fix error in cache handling. This fixes bug #43481
* lisp/progmodes/cc-engine.el (c-full-pp-to-literal): Handle correctly END
being before HERE by using parse-partial-sexp to get the end of the literal
containing HERE.
Martin Rudalics [Wed, 25 Nov 2020 08:58:21 +0000 (09:58 +0100)]
Revert extra focus redirection in do_switch_frame (Bug#24803)
* src/frame.c (do_switch_frame): Do not also redirect frame
focus when FRAME has its minibuffer window on the selected
frame which was intended to fix Bug#24500. It may cause
Bug#24803 and lead to a nasty state where no active cursor is
shown on any frame, see
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01137.html.
For discussion, see the following emacs-devel thread:
https://lists.gnu.org/r/emacs-devel/2020-11/msg00734.html
* lisp/custom.el (custom-declare-variable): Delay call to
make-variable-buffer-local until after user option has been
initialized with a value. Otherwise the user option may be
initialized to nil.
* test/lisp/custom-tests.el (custom--test-local-option)
(custom--test-permanent-option): New :local user options.
(custom-test-local-option): New test for defcustom :local keyword.
Michael Albinus [Sat, 21 Nov 2020 15:00:17 +0000 (16:00 +0100)]
Fix Bug#44481
* lisp/net/tramp.el (tramp-system-name): New defconst.
(tramp-default-host, tramp-restricted-shell-hosts-alist)
(tramp-local-host-regexp):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it. (Bug#44481)
Eli Zaretskii [Sat, 21 Nov 2020 08:14:55 +0000 (10:14 +0200)]
Make ignoring modifiers on IME input optional
By default, ignore modifier keys on IME input, but add
a variable to get back old behavior.
* src/w32fns.c (syms_of_w32fns): New variable
w32-ignore-modifiers-on-IME-input.
(w32_wnd_proc): Use it to ignore modifier keys when IME input is
used. (Bug#44641)
* etc/NEWS: Announce the change and the new variable.
Glenn Morris [Mon, 16 Nov 2020 17:43:40 +0000 (09:43 -0800)]
; * INSTALL: Correct a recent change.
Debian stopped including the major version number in the emacs package
name after version 25, so there is no 'emacs27-dbg' package.
We may as well drop this clause altogether, since Debian stable has
version 26.
No need to merge to master (where this information is in etc/PROBLEMS
in any case).
Alan Mackenzie [Sun, 15 Nov 2020 13:23:15 +0000 (13:23 +0000)]
Make the invocation of combine-change-calls in comment-region valid
This fixes bug #44581. The problem was that whitespace outside of the (BEG
END) region was being deleted, and this made the invocation of
combine-change-calls with (BEG END) invalid.
* lisp/newcomment.el (comment-region-default): Amend the second argument to
combine-change-calls.
Eli Zaretskii [Sat, 14 Nov 2020 13:55:35 +0000 (15:55 +0200)]
Update the various INSTALL files
* nt/INSTALL.W64:
* nt/INSTALL:
* INSTALL: Update the installation information, in particular the
fact that HarfBuzz is now preferred as the shaping library.
Eli Zaretskii [Sat, 14 Nov 2020 13:20:30 +0000 (15:20 +0200)]
Fix input method translation near read-only text
* lisp/international/quail.el (quail-input-method): Don't disable
input method when the character after point has the read-only
property. Suggested by Evgeny Zajcev <lg.zevlg@gmail.com>
(Bug#44466)
* doc/emacs/mule.texi (Input Methods): Document that input methods
are inhibited in read-only text.