Amos Bird [Thu, 25 Mar 2021 06:50:46 +0000 (14:50 +0800)]
Fix preeditarea reporting wrong spot.
This patch adjust the x position of preeditarea with both left fringe
and left margin, which prevents IME preedit box (such as fcitx) from
placing at the wrong position in GUI emacs.
* src/xfns.c (xic_set_preeditarea): Adjust X for left margin width.
(Bug#47377)
Paul Eggert [Mon, 22 Mar 2021 01:08:13 +0000 (18:08 -0700)]
Fix replace-buffer-contents undefined behavior
* src/editfns.c (Freplace_buffer_contents): Avoid undefined
behavior with competing side effects in parallel subexpressions.
Problem reported by Apple clang version 12.0.0 (clang-1200.0.32.29).
Michael Albinus [Thu, 25 Mar 2021 14:36:33 +0000 (15:36 +0100)]
Fix filenotify-tests.el for Solaris (bug#47262), do not merge
* test/lisp/filenotify-tests.el (file-notify--test-read-event):
Check also for GFamDirectoryMonitor.
(file-notify--test-timeout): Increase cygwin timeout.
(file-notify--test-monitor): Use `alist-get'.
(file-notify--test-event-actions): New defun.
(file-notify--test-with-actions-explainer): Use it.
(file-notify--test-with-actions-check): Use it. If
file-notify-debug is non-nil, trace received events instead of
checking them.
(file-notify-test03-events, file-notify-test05-file-validity)
(file-notify-test07-many-events, file-notify-test08-backup)
(file-notify-test09-watched-file-in-watched-dir):
Handle GFamFileMonitor and GFamDirectoryMonitor.
Include tab bar in frame's inner height in non-GUI builds that don't
define tab-bar-height. This is consistent with the inclusion of the
menu bar in the calculated height. It is also consistent with TTY
frames of GUI builds, for which tab-bar-height is always zero
anyway (bug#47234). Fix suggested by Eli Zaretskii <eliz@gnu.org>.
* lisp/frame.el (frame-inner-height): Don't assume tab-bar-height is
defined in builds --without-x.
Document that `buffer-string' retains text properties
* doc/lispref/text.texi (Buffer Contents): Mention text properties
in the `buffer-string' documentation.
* src/editfns.c (Fbuffer_string): Mention text properties in the
doc string (bug#47220).
This reverts commit 02a5cfce471613f671722b35536d2a78f17b0429.
That commit breaks because of a missing patch to `parse_modifiers_uncached`
in `src/keyboard.c`. IOW, too risky for `emacs-27`.
This functionality was broken by commit 3d5e31eceb9dc1fb62b2b2,
the problem being that we end up considering as distinct the events
`down-double-mouse-1` and `double-down-mouse-1`.
Reported by Eyal Soha <eyalsoha@gmail.com>
(mouse--click-1-maybe-follows-link): Make sure the last element of
the list passed to `event-convert-list` is indeed a "basic" event.
Stefan Monnier [Fri, 5 Mar 2021 17:39:27 +0000 (12:39 -0500)]
* lisp/emacs-lisp/gv.el (edebug-after): Don't run the getter in the setter
This fixes bug#46573 which was introduced by commit d79cf638f278e50c22feb53d6ba556f5ce9d7853.
The new code is a middle ground, which makes sure the instrumentation
point is used (so the coverage checker won't have ghost unreachable
instrumentation points) yet without artificially running the getter
when we only need to run the setter.
Eli Zaretskii [Sat, 27 Feb 2021 07:26:55 +0000 (09:26 +0200)]
Avoid crashes in Mew due to corrupted tool-bar label
* src/gtkutil.c (update_frame_tool_bar): Don't keep around a
'char *' pointer to a Lisp string's contents when calling Lisp,
because that could relocate string data; keep the Lisp string
itself instead. This avoids crashes in Mew. (Bug#46791)
Ryan Prior [Thu, 18 Feb 2021 11:48:28 +0000 (12:48 +0100)]
Allow newlines in password prompts again in comint
* lisp/comint.el (comint-password-prompt-regexp): Match all
whitespace (including newline) at the end of the passphrase, not
just space and \t (bug#46609).
(comint-watch-for-password-prompt): Remove trailing newlines from
the prompt (bug#46609).
Eli Zaretskii [Tue, 16 Feb 2021 16:20:06 +0000 (18:20 +0200)]
Avoid point movement when visiting image files
* lisp/image-mode.el (image-toggle-display-image): Preserve point
around the call to exif-parse-buffer, to prevent it from moving
into the image data. (Bug#46552)
Eli Zaretskii [Sun, 7 Feb 2021 15:52:30 +0000 (17:52 +0200)]
Fix language-environment and font selection on MS-Windows
These changes improve setting the language-environment and font
selection when MS-Windows returns useless "ZZZ" as the "language
name", which then disrupts all the setup of the locale-dependent
stuff, and in particular font selection.
* lisp/w32-fns.el (w32-charset-info-alist): Add an element for
"iso8859-5", in case LANG is set to something unusable, like
"ZZZ". This allows fonts capable of displaying Cyrillic
characters to be used even when language preferences are screwed.
* src/w32.c (init_environment): If GetLocaleInfo returns "ZZZ" as
the "language name" for LOCALE_USER_DEFAULT, try again with locale
ID based on what GetUserDefaultUILanguage returns. (Bug#39286)
Clarify how transient indentation modes are exited in the manual
* doc/emacs/indent.texi (Indentation Commands): Clarify that the
other keys don't just exit the transient mode, but are also
handled as normally (bug#46296).
Dmitry Gutov [Thu, 4 Feb 2021 23:17:09 +0000 (01:17 +0200)]
Fix the previous change
* lisp/progmodes/project.el (project-find-regexp):
Fix the previous change (project-root is not defined in this version).
(project-or-external-find-regexp): Same.
Dmitry Gutov [Thu, 4 Feb 2021 01:38:27 +0000 (03:38 +0200)]
Bind default-directory to the project root
* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.
Dmitry Gutov [Sat, 9 Jan 2021 00:08:59 +0000 (02:08 +0200)]
Make sure default-directory relates to the originating buffer
* lisp/progmodes/xref.el (xref--show-xref-buffer):
Pick up default-directory value from the caller
(https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00551.html).
(xref-show-definitions-buffer-at-bottom): Same.
Fix problem with non-ASCII characters in nnmaildir
* lisp/gnus/nnmaildir.el (nnmaildir-request-article): Enable
multipart 8bit-content-transfer-encoded files to be displayed
correctly by reading as `raw-text' instead of having Emacs
(incorrectly) decode the files (bug#44307).
Eli Zaretskii [Wed, 27 Jan 2021 15:15:46 +0000 (17:15 +0200)]
Improve documentation of 'read-regexp' and friends
* doc/emacs/glossary.texi (Glossary): Add "Tag" to the Glossary.
* doc/emacs/maintaining.texi (Xref): Mention that identifiers are
also known as "tags".
Eli Zaretskii [Sat, 23 Jan 2021 09:28:32 +0000 (11:28 +0200)]
Fix last change
* doc/lispref/text.texi (Undo): Add a cross-reference to the
description of 'undo-amalgamate-change-group'.
(Atomic Changes): Expand and improve the description of
'undo-amalgamate-change-group'. (Bug#42303)
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.