Alan Mackenzie [Sun, 27 Jun 2021 12:59:18 +0000 (12:59 +0000)]
C++ Mode: Handle new keywords static_cast, etc., wrt angle brackets
* lisp/progmodes/cc-langs.el (c-<>-arglist-kwds): Add const_cast,
dynamic_cast, reinterpret_cast and static_cast into this lang const.
* lisp/progmodes/cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props)
(c-clear-<-pair-props-if-match-after, c-clear->-pair-props-if-match-before)
(c-forward-<>-arglist-recur):
Invalidate caches with c-trunctate-lit-pos-cache.
(c-forward-<>-arglist-recur): If in a matching <...> expression, the < has a
syntax-table property, but the > not, remove that property.
This was mistakenly applied to NEWS.27 on the master branch in
2021-05-09 "; Fix decoded-time-set-defaults typo in NEWS.27."
but that has now been reverted (bug#48298).
Eli Zaretskii [Sun, 9 May 2021 07:59:08 +0000 (10:59 +0300)]
Fix compilation errors with latest w32 API headers
* src/w32common.h: Rename OS_* to OS_SUBTYPE__*, as w32 API
headers started defining OS_NT, which breaks the use of the
enumeration. All users changed. (Bug#48303)
Eli Zaretskii [Sat, 24 Apr 2021 12:17:40 +0000 (15:17 +0300)]
Minor update for make-tarball.txt
* admin/make-tarball.txt (UPDATING THE EMACS WEB PAGES AFTER A
RELEASE): Update and enhance the section to make it easier to find
the banner and verify the updated pages are in place.
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).