Alan Mackenzie [Sun, 15 Aug 2021 19:43:58 +0000 (19:43 +0000)]
C++ Mode: Don't confuse the pointer operator -> with the type indicating ->
This fixes bug #47468.
* lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): While searching
backwards for "->" which is a type indicating operator, disallow also commas.
Alan Mackenzie [Sun, 15 Aug 2021 18:08:25 +0000 (18:08 +0000)]
CC Mode: Fix unstable fontification of doc strings.
Also optimize a loop over several line doc-comments.
* lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): New variable
comment-mid, used as the starting point for applying c-doc-face-name in a
line comments. In block comments, apply this face not from `comment-beg' but
from `region-beg', no earlier than the start of the fontification region.
ERC right stamps: also use latest buffer's window's width (Bug#44140)
* lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Use latest
buffer's window's width to position the timestamp, if both
`erc-timestamp-right-column' and `erc-fill-column' are not set (or
`erc-fill-mode' is off). This is what the documentation says, but was
not implemented. Also fix the bug of using selected window's width
instead of the (or some) window showing the buffer. The latest
window's width is saved in `erc-timestamp-last-window-width' and used
when the buffer is no more shown. In case the buffer was never shown,
which I'm not sure can happen, either use `fill-column' if set, or
give up on aligning and just output the timestamp (modulo the kludge)
right after message text. While here, fix the off by one calculation
of point start when the reference is the window's width.
* lisp/erc/erc-ibuffer.el (erc-modified): Don't use `length' on dotted
lists (and not even to test if there is more than one element, for
that matter). Use `cdr' instead.
Update IRC-related references to point to Libera.Chat
Per GNU and FSF's announcements [0, 1] of moving official IRC channels
to the Libera.Chat IRC network, as well as several Emacs-related
channels following suit [2], update IRC-related references to reflect
the migration.
Eli Zaretskii [Thu, 1 Jul 2021 08:28:05 +0000 (11:28 +0300)]
Update doc/emacs/ for a new printing of the Emacs Manual book
* doc/emacs/book-spine.texi: New file: the printed book spine.
* doc/emacs/back.texi: New file: the backcover text for the
printed book.
* doc/emacs/emacs.texi: Update ISBN.
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)