Stefan Kangas [Sat, 2 May 2020 14:08:33 +0000 (16:08 +0200)]
Rename 'display-time-world' to 'world-clock' (Bug#40863)
* lisp/time.el (world-clock-list, world-clock-time-format)
(world-clock-buffer-name, world-clock-timer-enable)
(world-clock-timer-second, world-clock-label, world-clock-mode)
(world-clock-display, world-clock, world-clock-update): Rename
from 'display-time-world-*' and update all uses.
(world-clock): New defgroup.
(zoneinfo-style-world-list, legacy-style-world-list): Use :group
'world-clock'.
(display-time-world-list, display-time-world-time-format)
(display-time-world-buffer-name)
(display-time-world-timer-enable)
(display-time-world-timer-second): Make into obsolete variable
aliases for the new names.
* lisp/time.el (display-time-world-mode)
(display-time-world-display, display-time-world)
(display-time-world-timer): Make into obsolete function aliases
for the new names.
Stefan Kangas [Tue, 18 Aug 2020 18:16:06 +0000 (20:16 +0200)]
Remove the "Recent message" section from the bug reports
* lisp/mail/emacsbug.el (report-emacs-bug): Don't include "Recent
messages" since it has privacy implications. Problem reported by
Lars Ingebrigtsen in:
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg01099.html
(bug#39185).
* test/lisp/cedet/srecode-utest-template.el
(srecode-utest-project): Set the current directory in the project
so that we'll find it later (bug#42533). The in-project directory
is /tmp, which is not actually what it is on many machines that
have the temporary directory somewhere else.
Pip Cet [Tue, 18 Aug 2020 16:27:05 +0000 (18:27 +0200)]
Fix minor bugs in image.c
* test/src/image-tests.el (image-test-circular-specs): New file.
* src/image.c (parse_image_spec): Return failure for circular lists.
(valid_image_p): Don't look at odd-numbered list elements expecting to
find a property name.
(image_spec_value): Handle circular lists.
(equal_lists): Introduce.
(search_image_cache): Use `equal_lists' (bug#36403).
Glenn Morris [Tue, 18 Aug 2020 14:51:08 +0000 (07:51 -0700)]
Merge from origin/emacs-27
362ca83a3b (origin/emacs-27) Let Emacs start even if curdir is inacce... dd989c0ea0 * etc/NEWS: Mention GnuPG 2.0 through 2.1.5 issue (Bug#428... 4542b750cc Fix bug with ~/Emacs file not being read at init 9b403d624e ; Fix last change 6bff65a626 ; * doc/lispref/sequences.texi (Sequence Functions): Typo ... 3c4edfd85e Prevent from frozen frame after `C-z' in Lucid builds 98e8241992 Document the 'flex' completion style 19fa8b7ca3 Note that Emacs needs systemd support if systemd is used t...
* lisp/image/gravatar.el (gravatar-automatic-caching): Made obsolete.
(gravatar-cache-ttl): Ditto.
(gravatar--cache): New variable to cache gravatars in-memory.
(gravatar-retrieve): Maintain the cache.
(gravatar--prune-cache): Remove old entries.
(gravatar-retrieved): Remove use of the old-style cache (bug#40355).
Stefan Kangas [Tue, 18 Aug 2020 10:43:16 +0000 (12:43 +0200)]
Rename new option to flyspell-use-mouse-3-for-menu
* lisp/textmodes/flyspell.el (flyspell-use-mouse-3-for-menu): Rename
from 'flyspell-correct-on-mouse-3'. The previous name did not make it
clear that it's about opening a menu. (Bug#11680)
(flyspell--set-use-mouse-3-for-menu): Rename from
'flyspell--set-correct-on-mouse-3'. Bind menu to 'down-mouse-3'
instead of 'mouse-3' to be more in line with user expectations.
(flyspell-mode): Use the above new names.
* doc/emacs/fixit.texi (Spelling):
* etc/NEWS: Update documentation to use the new name.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
Paul Eggert [Tue, 18 Aug 2020 00:54:44 +0000 (17:54 -0700)]
Fix glitch uncovered by gcc -fsanitize=undefined
* src/ccl.c (ccl_driver): Defend against signed integer
overflow (Bug#42660). Perhaps some of this is unnecessary,
but it is safe and ccl.c is low-priority these days.
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).
Eli Zaretskii [Mon, 17 Aug 2020 16:30:02 +0000 (09:30 -0700)]
Fix assertion violation in pdumper.c
* src/pdumper.c (pdumper_find_object_type_impl): When checking
last_mark_bits, require the offset to be less than
discardable_start, not cold_start. This fixes a typo introduced in
2020-08-14T21:33:21Z!eggert@cs.ucla.edu (Bug#42832).
* lisp/simple.el (read--expression): No longer bind
read--expression-try-read here.
* lisp/simple.el (read-expression-map): Bind
read--expression-try-read here (bug#42893).
This new specialized command was recently added in [1: 4a6dd13fa4].
It reestablishes the bindings every time `read--expression' is
invoked, which is wrong because it makes it impossible for users
to remove these bindings.
Stefan Kangas [Sat, 15 Aug 2020 00:53:35 +0000 (02:53 +0200)]
Add new option flyspell-correct-on-mouse-3
* lisp/textmodes/flyspell.el
(flyspell-correct-on-mouse-3): New option to bind
'flyspell-correct-word' to 'mouse-3'.
(flyspell--set-correct-on-mouse-3): New function to update option.
(flyspell-mode): Update 'flyspell-mouse-map' if above option is
set.
* doc/emacs/fixit.texi (Spelling): Mention the new option.
* etc/NEWS: Announce the new option.
Stefan Kangas [Sat, 15 Aug 2020 02:55:35 +0000 (04:55 +0200)]
Mark XEmacs compat alias as obsolete
* lisp/subr.el (user-original-login-name): Mark as obsolete. This
XEmacs compat alias was obsoleted even by XEmacs, so there is no point
in keeping it around.
Steven Allen [Sun, 16 Aug 2020 12:31:27 +0000 (14:31 +0200)]
Set the current buffer in esh-mode before running filter functions
* lisp/eshell/esh-mode.el: (eshell-output-filter): Match
current-buffer behavior of comint-output-filter (bug#42870).
This change (a) sets the current buffer to the process-buffer when
invoking preoutput filter functions and (b) only invokes them when the
process-buffer is live. Otherwise, the preoutput filter functions be
invoked in whatever buffer happens to be focused, breaking hooks that
read buffer-local variables.
Stefan Monnier [Sat, 15 Aug 2020 21:30:11 +0000 (17:30 -0400)]
* lisp/net/eudc-bob.el: Use lexical-binding; Misc simplifications
(eudc-bob-generic-keymap, eudc-bob-image-keymap)
(eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap):
Move initialization into declaration. Use RET rather than `return`.
(eudc-jump-to-event): Delete; use `mouse-set-point` instead.
(eudc-bob-save-object): Rewrite using `write-region`.
(eudc-bob-popup-menu): Use `popup-menu`.
Paul Eggert [Sat, 15 Aug 2020 19:32:56 +0000 (12:32 -0700)]
Fix recently-introduced Fdelete bug
Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00444.html
* src/fns.c (Fdelete): Fix correctness bug via a simpler (though more
memory-intensive) approach. It’s probably not worth optimizing
the memory usage yere.
* test/src/fns-tests.el (test-vector-delete): Add test for the bug.
Paul Eggert [Sat, 15 Aug 2020 17:48:37 +0000 (10:48 -0700)]
Minimize ‘equal’ calls in (delete x vector)
* src/fns.c (Fdelete): When deleting from a vector, call Fequal
only once per vector element. This is faster when Fequal is slow,
and avoids the need to preinitialize the vector result. Finish
when the result is exhausted, not when the input is exhausted;
the two are equivalent but the former may be faster.
* test/src/fns-tests.el (test-vector-delete): New test.
Paul Eggert [Sat, 15 Aug 2020 17:48:36 +0000 (10:48 -0700)]
Prefer Fvector to make_uninit_vector
Fvector is less error-prone than make_uninit_vector, as it
avoids the possibility of a GC crash due to an uninitialized
vector. So prefer Fvector to make_uninit_vector when this is
easy (and when there's no significant performance difference).
Inspired by a suggestion by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00313.html
* src/ccl.c (Fregister_ccl_program):
* src/ccl.c (Fregister_ccl_program):
* src/charset.c (Fdefine_charset_internal):
* src/font.c (Fquery_font, Ffont_info, syms_of_font):
* src/fontset.c (font_def_new, Fset_fontset_font):
* src/ftfont.c (ftfont_shape_by_flt):
* src/hbfont.c (hbfont_shape):
* src/macfont.m (macfont_shape):
* src/search.c (Fnewline_cache_check):
* src/xfaces.c (Fx_family_fonts):
* src/xfns.c (Fx_window_property_attributes):
Prefer Fvector to make_uninit_vector when either is easy.
* src/fontset.c (font_def_new): Now a function with one less
arg instead of a do-while macro, and renamed from FONT_DEF_NEW.
All uses changed.
Paul Eggert [Sat, 15 Aug 2020 17:48:36 +0000 (10:48 -0700)]
Fix GC bugs related to uninitialized vectors
Avoid problems if GC occurs while initializing a vector.
Problem with Fdelete reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00313.html
I looked for similar problems elsewhere and found quite a few.
* src/coding.c (make_subsidiaries):
* src/composite.c (syms_of_composite):
* src/font.c (build_style_table, Ffont_get_glyphs):
* src/nsselect.m (clean_local_selection_data):
* src/nsxwidget.m (js_to_lisp):
* src/syntax.c (init_syntax_once):
* src/window.c (Fcurrent_window_configuration):
* src/xselect.c (selection_data_to_lisp_data)
(clean_local_selection_data):
Use make_nil_vector instead of make_uninit_vector.
* src/fns.c (Fdelete):
* src/xwidget.c (webkit_js_to_lisp):
Use allocate_nil_vector instead of allocate_vector.
* src/search.c (Fnewline_cache_check):
Use make_vector instead of make_uninit_vector.
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.
* doc/misc/gnus.texi (Searching for Articles): Document moved M-s
(bug#39706).
* lisp/gnus/gnus-sum.el (gnus-summary-mode-map): Move
gnus-summary-search-article-forward to M-s M-s, and add M-s M-r
for gnus-summary-search-article-backward.
Eli Zaretskii [Sat, 15 Aug 2020 10:23:58 +0000 (13:23 +0300)]
Don't wrap lines at NBSP when nobreak-char-display is t
* src/xdisp.c (get_next_display_element): When
nobreak-char-display is t, display NBSP and non-ASCII hyphens as
themselves, not as their ASCII counterparts, just with the
nobreak-space/nobreak-hyphen face. (Bug#42811)
Jari Aalto [Sat, 15 Aug 2020 10:11:41 +0000 (12:11 +0200)]
Add support for ffap guessing at file names containing spaces
* lisp/ffap.el (ffap-file-name-with-spaces): New variable (bug#8439).
(ffap-search-backward-file-end, ffap-search-forward-file-end)
(ffap-dir-separator-near-point): New functions.
(ffap-string-at-point): Use the variable and the new functions to
guess at files containing strings.
Paul Eggert [Sat, 15 Aug 2020 02:29:14 +0000 (19:29 -0700)]
Pacify Apple clang 11 __builtin_assume
Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00300.html
* src/lisp.h (bool_vector_bitref, bool_vector_set):
Use eassert instead of eassume for bool_vector_size checks.
Amin Bandali [Sat, 15 Aug 2020 01:54:48 +0000 (21:54 -0400)]
Add `message' to erc-match.el highlight types
* lisp/erc/erc-match.el (erc-current-nick-highlight-type,
erc-pal-highlight-type, erc-fool-highlight-type,
erc-keyword-highlight-type, erc-dangerous-host-highlight-type): Add
`message' type for highlighting the entire message but not the
sender's nick.
(erc-match-message): Check for the new `message' highlight type and
propertize the message (not including the nick) accordingly.
* etc/NEWS: Announce the addition of the `message' highlight type.
Paul Eggert [Fri, 14 Aug 2020 21:33:21 +0000 (14:33 -0700)]
Fix bus error on Debian bullseye
Problem reported by Lars Ingebrigtsen, and problem diagnosis
and most of this patch by Pip Cet (Bug#42832).
* src/pdumper.c (dump_bitsets_init): Rename from dump_bitset_init.
All callers changed. Initialize two bitsets with a single malloc
call.
(struct pdumper_loaded_dump_private): New member last_mark_bits.
(pdumper_find_object_type_impl): Return PDUMPER_NO_OBJECT if
the last_mark_bits’ bit is clear.
(pdumper_set_marked_impl): Assert that the last_mark_bits’
bit is set.
(pdumper_clear_marks_impl): Save mark_bits into
last_mark_bits before clearing mark_bits. Co-authored-by: Pip Cet <pipcet@gmail.com>
Noam Postavsky [Fri, 14 Aug 2020 17:31:16 +0000 (19:31 +0200)]
Make configure say so if we have "--with-json" but no jansson support
* configure.ac (OPTION_DEFAULT_IFAVAILABLE): New macro. Use it to
define the --with-json option. Add with_json and HAVE_JSON to the
'MISSING' checks (bug#39953).
* doc/emacs/maintaining.texi (Project Buffer Commands): Update
project-kill-buffers-ignores that was renamed recently
(bug#41868) (in 2ab66c9f9be923350f123fdea05b5b3ce8283d8a).
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>
Stefan Kangas [Fri, 14 Aug 2020 14:47:57 +0000 (16:47 +0200)]
Comment to postpone deletion of c-subword-mode
* lisp/progmodes/subword.el (c-subword-mode): Clarify that this
obsolete function alias should not be removed just yet. There is a
copy of this definition in cc-cmds.el, obsolete since 24.3, and it is
better to delete both at the same time.
* test/lisp/progmodes/cperl-mode-tests.el: Adjust for `perl-mode`.
(cperl-test-ppss): Rename from `cperl-test-face` and change return value.
(cperl-mode-test-bug-42168): Test the `syntax-ppss` state rather than
the font-lock faces, so it works for both `perl-mode` and `cperl-mode`.