Import erc-bbdb.el, erc-chess.el, erc-nicklist.el, and erc-speak.el
* lisp/erc/erc-bbdb.el, lisp/erc/erc-chess.el,
lisp/erc/erc-nicklist.el, lisp/erc/erc-speak.el: Import these files
from commit 9497cc92bf1feb63c24425c46b1e033265c2cea9 of
https://git.savannah.gnu.org/cgit/erc.git, the old ERC repository
outside the GNU Emacs source tree. These FSF-copyrighted files were
part of ERC before erc.git was (for the most part) folded into
emacs.git, but they were left out largely due to depending on packages
outside Emacs. It is worth noting that their dependencies are all
free software, and bbdb and chess are actually available on GNU ELPA.
Set `generated-autoload-file' in erc-status-sidebar.el
* lisp/erc/erc-status-sidebar.el: Set `generated-autoload-file' to
ERC's dedicated "erc-loaddefs.el", since we don't need this file's
autoloaded functions to be available before ERC itself is loaded.
* doc/emacs/trouble.texi (Checklist): Mention the new command.
* doc/lispref/intro.texi (Caveats): Ditto.
* lisp/mail/emacsbug.el (emacs-bug--system-description): Factor
out into own function.
(report-emacs-bug): ... from here.
(submit-emacs-patch): New command.
Andrew G Cohen [Wed, 9 Sep 2020 09:01:44 +0000 (17:01 +0800)]
Make Gnus cache work with nnselect
* lisp/gnus/gnus-cache.el (gnus-cache-possibly-enter-article)
(gnus-cache-possibly-remove-articles)
(gnus-cache-possibly-remove-article): Use originating article info for
nnselect groups.
Andrew G Cohen [Wed, 9 Sep 2020 01:58:39 +0000 (09:58 +0800)]
Add Gnus function to make a persistent group from a search result
* lisp/gnus/gnus-sum.el (gnus-summary-make-group-from-search): New
command (bound to C-c C-p in summary buffers).
* doc/misc/gnus.texi (What is nnir?): Document it. Correct previous
errors.
* etc/NEWS (Gnus): Mention it.
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.
* lisp/minibuffer.el (format-prompt): Allow DEFAULT to be a list
(and use the first element). This is how many of the prompting
functions interpret their default parameters.
Daniel Martín [Tue, 8 Sep 2020 12:18:17 +0000 (14:18 +0200)]
Use mouse-wheel-up-event in mwheel-tests.el
Enabling mouse-wheel-mode binds two different mouse events, depending
on the operating system. The correct way to check for those events is
by checking mouse-wheel-up-event, as explained in the ELisp manual.
* test/lisp/mwheel-tests.el (mwheel-test-enable/disable): Check
mouse-wheel-up-event instead of mouse-4 to make the test work
irrespective of the platform it's running.
Michael Albinus [Tue, 8 Sep 2020 14:24:11 +0000 (16:24 +0200)]
Implement typed D-Bus properties (Bug#43252)
* doc/misc/dbus.texi (Properties and Annotations)
(Receiving Method Call): Document optional type symbol in
`dbus-set-property' and `dbus-register-property'.
* lisp/net/dbus.el (dbus-error-unknown-interface)
(dbus-error-unknown-method, dbus-error-unknown-object)
(dbus-error-unknown-property): New defconsts.
(dbus-peer-handler): Improve error handling.
(dbus-introspect-get-signature): Handle also properties.
(dbus-set-property, dbus-register-property): Allow optional TYPE
symbol for VALUE. (Bug#43252)
(dbus-property-handler): Implement property types. Improve error
handling.
Alex Bochannek [Tue, 8 Sep 2020 09:47:28 +0000 (11:47 +0200)]
Introduce a new Gnus scoring method (for article age)
* doc/misc/gnus.texi (Score File Format): Document it.
* lisp/gnus/gnus-score.el (gnus-score-check-syntax): Add support
for the new date methods < and > (bug#43270).
(gnus-score-date): Allow scoring on dates by age.
Reuben Thomas [Mon, 7 Sep 2020 19:56:58 +0000 (20:56 +0100)]
Fix Enchant dictionary finding routine
* lisp/textmodes/ispell.el (ispell-find-enchant-dictionaries): Don’t
pass `buffer-string' to enchant-lsmod. Remove zero-length substrings
from the split output of `enchant-lsmod`, as the output ends with a
separator. Pass the current language to
`ispell--get-extra-word-characters', so we get the result for the
current language, not the default language. (Patch from Jorge P. de
Morais Neto.)
* test/lisp/custom-tests.el (custom--test-theme-variables): "make
check" in the main directory didn't work because the path was
wrong. Use EMACS_TEST_DIRECTORY to find the test directory
instead.
Daniel Martín [Mon, 7 Sep 2020 15:10:30 +0000 (17:10 +0200)]
Add support for horizontal scrolling in tab-line
* lisp/tab-line.el ([tab-line wheel-left]): Bind left and right tab
line scrolling to the 'wheel-left' and 'wheel-right' mouse events.
([tab-line S-wheel-right]): Analogous change for the functions that
switch tabs.
* etc/NEWS: Announce the new feature (bug#43224).
Copyright-paperwork-exempt: yes
Show the status of signed + encrypted S/MIME messages in Gnus
* lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): Use the
data to tell the caller (i.e., Gnus) something about the
validation of signed + encrypted S/MIME messages.
* lisp/gnus/mm-view.el (mm-view-pkcs7-verify): Pass along details
about whether we could validate the signature or not (bug#42637).
Andrew G Cohen [Mon, 7 Sep 2020 00:58:42 +0000 (08:58 +0800)]
Add aliases for recent Gnus nnselect changes
* lisp/org/ol-gnus.el (org-gnus-store-link): Change 'nnir to
'nnselect.
* lisp/gnus/gnus-group.el: Define obsolete function alias for
'gnus-group-make-nnir-group to
'gnus-group-read-ephemeral-search-group.
* lisp/gnus/gnus-sum.el: Define obsolete variable alias for
'gnus-refer-thread-use-nnir to 'gnus-refer-thread-use-search.
* lisp/gnus/nnselect.el: Define obsolete variable alias for
'nnir-retrieve-headers-override-function to
'nnselect-retrieve-headers-override-function.
* lisp/gnus/nnir.el: Restore definition of 'nnir-summary-line-format
and mark obsolete.
* lisp/net/eww.el (eww--limit-string-pixelwise)
(eww--pixel-column): New functions.
(eww-update-header-line-format): Use variable pitch fonts in the
header line.
* lisp/progmodes/prolog.el (prolog-help-on-predicate):
* lisp/cmuscheme.el (scheme-trace-procedure):
* lisp/calendar/todo-mode.el (todo-convert-legacy-files): Use
format-prompt in some read-string calls (that have default values).
* lisp/printing.el (pr-interactive-regexp): No need to use "" as
the default value, because that's the default default value.
(pr-interactive-n-up): Use read-number instead of read-string and
then parsing the string.
Use format-prompt in calls to read-from-minibuffer with default value
* lisp/tab-bar.el (tab-bar-rename-tab)
(tab-bar-rename-tab-by-name):
* lisp/simple.el (next-matching-history-element): Use
format-prompt in calls to read-from-minibuffer with at default
value.
Stefan Kangas [Sun, 6 Sep 2020 15:56:26 +0000 (17:56 +0200)]
Add autoload cookie to eshell-bookmark-jump
* lisp/eshell/esh-mode.el (eshell-bookmark-jump): Add autoload
cookie, so we can jump to bookmarks before having used eshell.
Problem noted by Stefan Monnier.
Michael Albinus [Sun, 6 Sep 2020 18:45:29 +0000 (20:45 +0200)]
More work on D-Bus error messages
* lisp/net/dbus.el (dbus-get-property): Adapt docstring.
(dbus-set-property): Handle case of `:write' access type.
(dbus-get-other-registered-properties): Rename from
`dbus-get-other-registered-property'.
(dbus-property-handler): Fix thinkos.
* src/dbusbind.c (xd_read_message_1): Add error_name to event args
in case of DBUS_MESSAGE_TYPE_ERROR.
* test/lisp/net/dbus-tests.el (dbus--test-enabled-session-bus)
(dbus--test-enabled-system-bus): Make them defconst.
(dbus--test-service, dbus--test-path, dbus--test-interface):
New defconst. Replace all occurences of `dbus-service-emacs' by
`dbus--test-service'.
(dbus--test-method-handler): New defun.
(dbus-test04-register-method, dbus-test05-register-property): New tests.
Use format-prompt in calls to completing-read with a default value
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/tab-bar.el (tab-bar-switch-to-tab):
* lisp/profiler.el (profiler-start):
* lisp/frame.el (set-frame-font):
* lisp/erc/erc.el (erc-join-channel):
* lisp/emacs-lock.el (emacs-lock--set-mode):
* lisp/emacs-lisp/elp.el (elp-set-master):
* lisp/emacs-lisp/checkdoc.el ()
(checkdoc-this-string-valid-engine):
* lisp/calendar/todo-mode.el (todo-find-filtered-items-file):
* lisp/calendar/calendar.el (calendar-set-date-style): Use
`format-prompt' in calls to completing-read that has a default
value, but didn't mention that in the prompt.
* lisp/net/eww.el (eww-change-select): Use a popup menu for the
select (bug#43218).
(eww--form-items): New utility function.
(eww-select-map): Allow using a mouse to click on select buttons.
Make C-h S in Customize buffers work more reliably
* lisp/cus-edit.el (custom-unlispify-menu-entry): Put a property
on the returned string so that we can determine what the symbol
was after the fact.
* lisp/info-look.el (info-lookup-guess-default*): Allow lambda
forms as rules.
(:mode): Use the stored symbol.
(info-lookup-guess-custom-symbol): No longer used; mark as
obsolete (bug#41905).
João Távora [Sun, 6 Sep 2020 07:35:53 +0000 (08:35 +0100)]
Don't resort Icomplete candidates when default already on top
Fixes: bug#43222
Icomplete mode re-sorts candidates, bubbling the default to top if
it's found somewhere down the list. This is done according to two
criteria: exact match and prefix match. Before this fix, it didn't
take into account the possibility that the exact match for the default
would already be on top, and would incorrectly bubble a prefixing
completion down the list to the top. This commit fixes that.
Paul Eggert [Sat, 5 Sep 2020 19:13:32 +0000 (12:13 -0700)]
Reinstall recent GC-related changes
The report that they broke macOS was a false alarm, as the
previous commit was also broken (Bug#43152#62).
* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding):
Count only pointers that point to a struct component,
or are a tagged pointer to the start of the struct.
Exception: for non-bool-vector pseudovectors,
count any pointer past the header, since it’s too much
of a pain to write code for every pseudovector.
(live_float_holding, live_vector_pointer):
New functions, which are similar about counting pointers.
(live_float_p, live_large_vector_holding)
(live_small_vector_pointer, mark_maybe_pointer): Use them.
(mark_maybe_object, mark_maybe_objects): Remove,
and remove all callers; mark_maybe_pointer now suffices.
(mark_objects): New function.
* src/alloc.c (mark_vectorlike, mark_face_cache):
* src/eval.c (mark_specpdl):
* src/fringe.c (mark_fringe_data):
* src/keyboard.c (mark_kboards):
Simplify by using mark_objects.
* src/lisp.h (SAFE_ALLOCA_LISP_EXTRA):
Clear any Lisp_Object arrays large enough to not fit into the stack,
so that GC need not worry about whether they contain objects.
info-lookup-symbol: Fix the suggested default value in Custom buffers
* lisp/info-look.el (info-lookup-maybe-add-help 'Custom-mode): Don't
pass info-lookup-guess-custom-symbol as the :parse-rule, since we
don't need it anymore. (Bug#41905)
(info-lookup-guess-custom-symbol): Now unused, mark as obsolete.
(info-lookup-interactive-arguments): Get rid of text properties before
passing the default value to completing-read.
* lisp/progmodes/cperl-mode.el (cperl-init-faces): Fontify hashes
and arrays (%foo and @foo) before the keywords, since the keyword
regexps are "wider" and the hash/array regexp just match those two
things (bug#22867).
Preserve user customizations after disabling a theme
* lisp/custom.el (enable-theme): Since we are enabling the theme, bind
custom--inhibit-theme-enable to nil. Then rely on custom-push-theme
to do the right thing with the theme settings and prior user settings,
instead of manipulating the property here. This way, when disabling a
theme, we restore user preferences, even when the values were changed
outside of customize.
(disable-theme): Call custom-push-theme instead of handling theme
settings directly.
(custom-push-theme): Avoid another instance of Bug#28904: we don't
need the changed theme when the value recorded for it is going to be
the same as the recorded for the user theme.
* test/lisp/custom-tests.el (custom--test-theme-variables): Get rid of
a portion of the test that will always fail, because the user theme
has priority over every other theme. Expect the test to pass now that
we preserve user customizations after disabling a theme (bug#34027).
Andrew G Cohen [Sat, 5 Sep 2020 08:47:06 +0000 (16:47 +0800)]
; Document new gnus-summary-line-format items
* lisp/gnus/gnus.el (gnus-summary-line-format): Include %Z, %G, and %g
in the docstring.
* doc/misc/gnus.texi (Summary Buffer Lines): Document %Z, %G, and %g
specifications.
Andrew G Cohen [Sat, 5 Sep 2020 00:46:43 +0000 (08:46 +0800)]
Introduce nnselect backend for gnus
This new backend allows gnus to handle arbitrary sets of messages
spanning multiple groups, even when these groups are from different
backends and different servers. All gnus glue is removed from
nnir (leaving only the backend search functions) and gnus
search-related processing is done through nnselect. In appropriate
places 'nnir' has been replaced by 'nnselect' or 'search'.
* etc/NEWS: Document the change.
* doc/misc/gnus.texi: New documentation for nnselect and update
searching and thread-referral sections.
* lisp/gnus/nnselect.el: New file.
* lisp/gnus/nnir.el: Remove all gnus glue, leaving only searching
capability. Improve documentation strings.
* lisp/gnus/gnus-group.el (gnus-group-read-ephemeral-search-group,
gnus-group-make-search-group): New functions.
* lisp/gnus/gnus-msg.el (gnus-setup-message, gnus-group-news,
gnus-summary-news-other-window): Update to work for nnselect. Fix
gnus-newsgroup-name wrangling.
*lisp/gnus/gnus-registry.el
(gnus-registry-action,gnus-registry-ignore-group-p): Make work from nnselect.
* lisp/gnus/nnheader.el (nnheader-parse-head, nnheader-parse-nov):
Rework and consolidate header parsing.
* lisp/gnus/gnus-agent.el (gnus-agent-regenerate-group):
* lisp/gnus/gnus-cache.el (gnus-possibly-enter-article):
* lisp/gnus/gnus-cloud.el (gnus-cloud-available-chunks):
* lisp/gnus/gnus-msg.el (gnus-inews-yank-articles):
* lisp/gnus/gnus-sum. (gnus-get-newsgroup-headers):
* lisp/gnus/nndiary.el (nndiary-parse-head):
* lisp/gnus/nnfolder.el (nnfolder-parse-head):
* lisp/gnus/nnmaildir.el (nnmaildir--update-nov):
* lisp/gnus/nnml.el (nnml-parse-head):
* lisp/gnus/nnspool.el (nnspool-insert-nov-head):
Use new header parsing.
* lisp/gnus/gnus-start.el (gnus-read-active-for-groups): Rescan on
activation by default.
* lisp/gnus/gnus-sum.el (gnus-summary-line-format-alist): New specs
for virtual groups.
(gnus-article-sort-by-rsv, gnus-thread-sort-by-rsv): New functions to
allow sorting by search RSV.
Alan Mackenzie [Fri, 4 Sep 2020 19:10:17 +0000 (19:10 +0000)]
C++ Mode: handle comma separated brace initializers.
This includes both indentation and fontification.
* lisp/progmodes/cc-engine.el (c-do-declarators): Handle brace initializers
without = correctly.
(c-looking-at-or-maybe-in-bracelist): Use c-do-declarators with a simple
inline function to check that after-type-id-pos points to the start of a
declarator.
* lisp/progmodes/cc-langs.el (c-recognize-bare-brace-inits): New lang
const/variable.
Do not remove unbound variables or faces when modifying a custom-theme
* lisp/cus-theme.el (custom-theme-write-variables
custom-theme-write-faces): Remove check for a bound symbol or for a
face name, so saving a theme does not remove not yet defined variables
or faces (bug#24727).