While equal is symmetric, member is not; in the latter case the
arguments must be a variable and a constant list, in that order.
Reported by Ikumi Keita.
* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix):
Don't treat equality and member predicates in the same way; only
the former are symmetric in their arguments.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Add test cases.
Paul Eggert [Mon, 17 Aug 2020 23:21:36 +0000 (16:21 -0700)]
Let Emacs start even if curdir is inaccessible
* lisp/startup.el (normal-top-level): Also delete PWD if
file-attributes fails for either $PWD or default-directory,
instead of failing out of the top level.
This fixes a regression from Emacs 26 (Bug#42903).
Tino Calancha [Sat, 15 Aug 2020 14:18:03 +0000 (16:18 +0200)]
Prevent from frozen frame after `C-z' in Lucid builds
Some WMs (e.g. mutter in Gnome Shell) don't unmap iconized windows,
thus we won't get a MapNotify when deconifying them.
Check if we are deconifying a window elsewhere (Bug#42655).
- src/xterm.c (handle_one_xevent):
Check for window deconify when receiving a FocusIn signal.
Note that Emacs needs systemd support if systemd is used to stop/start
* etc/NEWS: Note that Emacs needs to be built with systemd support
systemd is used to stop/start Emacs (bug#42242). Change suggested by
Bhavin Gandhi <bhavin7392@gmail.com>
Eli Zaretskii [Thu, 30 Jul 2020 13:56:36 +0000 (16:56 +0300)]
Fix face extension past EOL in overlay strings
* src/xdisp.c (face_at_pos): Pass ATTR_FILTER to
face_for_overlay_string.
* src/xfaces.c (face_for_overlay_string): Accept an additional
argument ATTR_INDEX and pass it to merge_face_ref for merging the
face at POS. This ensures a face from buffer text will not be
merged unless it specifies the :extend attribute. (Bug#42552)
* src/dispextern.h (face_for_overlay_string): Adjust prototype.
Phil Sainty [Sun, 8 Dec 2019 10:28:06 +0000 (23:28 +1300)]
lisp/so-long.el: Improve support for major mode hooks
* lisp/so-long.el (so-long-remember-all, so-long-disable-minor-modes)
(so-long-override-variables): Store and use the `so-long-minor-modes'
and `so-long-variable-overrides' values seen by the original major
mode, so that buffer-local changes made in the major mode hook will be
respected.
Add documentation of this and other major mode hook usage.
Phil Sainty [Sat, 11 Jul 2020 07:40:27 +0000 (19:40 +1200)]
; lisp/so-long.el: Prevent potential error if comment-use-syntax is nil
* lisp/so-long.el (so-long-detected-long-line-p): Ensure that
`comment-start-skip' and `comment-end-skip' are both set if
`comment-use-syntax' is nil, as `comment-forward' requires them
to be bound in this scenario.
Phil Sainty [Fri, 3 Jul 2020 13:43:08 +0000 (01:43 +1200)]
; * lisp/so-long.el: Byte-compilation bug fix
As this `require' is not at the top-level (it is only conditionally
evaluated, when loading the library over the top of an earlier
version), we need `eval-and-compile' to ensure that both macros and
functions from advice.el are accounted for.
Please refer to the comments on spelling at the end of the library.
M-x ispell-buffer should find no misspellings in the documentation.
See also test/lisp/so-long-tests/spelling-tests.el
(The current spelling will persist while so-long.el is maintained in
its own Savannah repository, to avoid unnecessary conflicts between
the two versions. If in the future it is maintained solely in the
Emacs repository, changing the spelling would become an option.)
Note that "mitigations" (plural) is intentional -- this library
identifies a collection of different performance mitigations,
multiple of which will typically be in effect together.
Grégory Mounié [Sun, 2 Aug 2020 13:56:33 +0000 (15:56 +0200)]
Avoid segfaults if XIM is set but not xim_styles
Emacs segfaults at the X11 initialization if XIM is set
and xim_styles is NULL. This patch avoids the crash.
* src/xfns.c: Check also if FRAME_X_XIM_STYLES(f) is NULL.
(Bug#42676) (Bug#42673) (Bug#42677)
Philipp Stephani [Sat, 25 Jul 2020 21:04:05 +0000 (23:04 +0200)]
Backport: Fix subtle bug when checking liveness of module values.
We can't simply look up the Lisp object in the global reference table
because an invalid local and a valid global reference might refer to
the same object. Instead, we have to test the address of the global
reference against the stored references.
* src/emacs-module.c (module_global_reference_p): New helper function.
(value_to_lisp): Use it.
Philipp Stephani [Thu, 23 Jul 2020 11:48:43 +0000 (13:48 +0200)]
Backport: Fix memory leak for global module objects (Bug#42482).
Instead of storing the global values in a global 'emacs_value_storage'
object, store them as hash values alongside the reference counts.
That way the garbage collector takes care of cleaning them up.
* src/emacs-module.c (global_storage): Remove.
(struct module_global_reference): New pseudovector type.
(XMODULE_GLOBAL_REFERENCE): New helper function.
(module_make_global_ref, module_free_global_ref): Use
'module_global_reference' struct for global reference values.
(value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of
'global_storage'.
Pip Cet [Fri, 5 Jun 2020 12:54:01 +0000 (12:54 +0000)]
Fix Arabic shaping when column-number-mode is in effect
* src/indent.c (scan_for_column, compute_motion): Pass -1,
instead of NEUTRAL_DIR, to 'composition_reseat_it'.
* src/composite.c (composition_reseat_it): Interpret negative
value of BIDI_LEVEL to mean the caller doesn't know what is the
bidi direction of the text. (Bug#41005)
Robert Pluim [Tue, 21 Jul 2020 14:37:59 +0000 (16:37 +0200)]
Run custom-magic-reset in the customize buffer
If the user has navigated away from the customize buffer, then
clicking on a widget in the customize buffer applies changes in the
selected buffer rather than in the customize buffer. Pass the
customize buffer to 'custom-magic-reset' to avoid this.
* lisp/cus-edit.el (custom-magic-reset): Add optional buffer argument,
apply changes in that buffer.
(custom-notify): Pass the buffer containing the widget to
'custom-magic-reset'. (Bug#40788)
* lisp/allout-widgets.el (allout-item-icon-keymap,
allout-item-body-keymap, allout-cue-span-keymap, allout-widgets-mode):
Inherit from both (current-local-map) and (current-global-map). This
provides for missing global bindings when inheriting from
just (current-local-map), eg Esc-<.
Ken Manheimer [Mon, 6 Jul 2020 17:19:11 +0000 (13:19 -0400)]
Backport: Provide missing let definition to prevent background void-variable error.
* lisp/allout-widgets.el (allout-widgets-exposure-change-processor)
Let-declare handled-conceal, for reference through `(symbol-value)'
within the let body. (Because the error happens in an
after-change-functions hook, so it is caught and reported as a message
by allout-widgets-hook-error-handler.)
Eli Zaretskii [Sat, 18 Jul 2020 08:17:31 +0000 (11:17 +0300)]
Revert "Fix filename completion in shell mode buffers"
This reverts commit e4d17d8cb479ffeeb7dfb7320a1432722ac8df75.
Per bug#42383 discussions, the fix for bug#34330 probably
just works around the real issue, which is in pcomplete.el.
Eli Zaretskii [Sat, 18 Jul 2020 07:02:28 +0000 (10:02 +0300)]
Update systems using GnuTLS certificate files
* lisp/net/gnutls.el (gnutls-trustfiles): Update the names of the
systems in the comments. Reported by Richard Stallman <rms@gnu.org>
in
https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00455.html.
Eli Zaretskii [Thu, 16 Jul 2020 16:51:19 +0000 (19:51 +0300)]
Fix interrupt-process on MS-Windows
* src/w32proc.c (sys_kill): Test the status of the left Ctrl key
for the purpose of restoring it after simulating Ctrl-C. This
avoids leaving the left Ctrl key status in depressed state when
the user actually pressed the right Ctrl key. (Bug#42350)
* doc/lispref/strings.texi (Creating Strings): 'concat' does not
necessarily return a newly allocated string. This has been the case
at least since 1997 (Emacs 20.3).
Eli Zaretskii [Sun, 5 Jul 2020 15:30:21 +0000 (18:30 +0300)]
Clarify the documentation of 'left/right-fringe' display spec
* doc/lispref/display.texi (Other Display Specs, Fringe Bitmaps):
Clarify how the optional FACE parameter of the left-fringe and
right-fringe display spec is used. Reported by Gregory Heytings
<ghe@sdf.org>.
Eli Zaretskii [Fri, 26 Jun 2020 07:41:09 +0000 (10:41 +0300)]
Improve documentation of Info node movement commands
* lisp/info.el (Info-next, Info-prev, Info-forward-node)
(Info-backward-node): More detailed descriptions of what each
commands does with respect to child and parent nodes. (Bug#42050)