Andrea Corallo [Fri, 2 Oct 2020 07:52:40 +0000 (09:52 +0200)]
Clean-up testsuite for vanilla builds
Tag all native compiler tests and skip them in vanilla builds
* test/Makefile.in (SELECTOR_DEFAULT, SELECTOR_EXPENSIVE)
(SELECTOR_ALL): Define selectors for vanilla or nativecomp builds.
* test/src/comp-tests.el: Do not native compile test files on
vanilla.
(comp-deftest): New macro to define tests tagging as :nativecomp.
Give better error feedback on wrong password in .gpg files
* lisp/epa-file.el (epa-file--find-file-not-found-function): Do a
user-error when there's a wrong password (bug#43704).
(epa--wrong-password-p): New function.
(epa-file-insert-file-contents): Use it, and stash the error away
for later signalling.
* lisp/net/soap-client.el (soap-decode-date-time): Add support for
Emacs versions that support fractional seconds. Make DATATYPE
optional. Remove FIXME comment.
Fix emacsclient -c foo.txt behaviour with many frames
* lisp/server.el (server-execute): Pass in whether we opened a new
frame or not (bug#43645).
(server-switch-buffer): Use this to switch to the requested buffer
in the new frame if we have "emacsclient -c foo.txt", and retain
the old behaviour if it's "emacsclient foo.txt".
Michael Albinus [Mon, 28 Sep 2020 12:47:46 +0000 (14:47 +0200)]
Improve D-Bus monitor
* lisp/net/dbus.el (dbus-monitor-method-call)
(dbus-monitor-method-return, dbus-monitor-error)
(dbus-monitor-signal): New defconsts.
(dbus-monitor-goto-serial): New defun.
(dbus-monitor-handler): Use them. Add timestamp. Make also links
between D-Bus messages with the same serial.
Harald Jörg [Mon, 28 Sep 2020 12:13:01 +0000 (14:13 +0200)]
cperl-mode: Add compatibility for Emacs 26.1
* lisp/progmodes/cperl-mode.el (cperl--time-convert): New
compatibility helper for time-convert (available in Emacs
27.1)
(cperl--format-prompt): New compatibility helper for
format-prompt (available in Emacs 28)
(cperl-info-on-command): use cperl--format-prompt
(cperl-perldoc): use cperl--format-prompt
(cperl-time-fontification): use cperl--time-convert (bug#43652)
Jan Tatarik [Mon, 28 Sep 2020 11:08:32 +0000 (13:08 +0200)]
Fix Gnus parsing of weekly recurring icalendar events
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:recurring-interval): Fix parsing of weekly
recurring events (bug#43669).
Example: in the absence of explicit INTERVAL value in the calendar
event, a weekly event with occurrences scheduled for Mondays and
Wednesdays should receive the default recurring interval of "1" and the
org mode timestamp repeater should be "+1w".
Due to a bug in the current code we receive "WEEKLY" and "+WEEKLYw"
instead. The patch fixes the issue.
Stefan Monnier [Mon, 28 Sep 2020 02:07:14 +0000 (22:07 -0400)]
Fix pcomplete completion of things like `xargs` and `sudo` (bug#16197)
* lisp/pcmpl-unix.el (pcomplete/xargs): Don't `pcomplete-this` around
`pcomplete-command-completion-function`.
(pcomplete/sudo): Make it an alias for `pcomplete/xargs`.
* lisp/shell.el (shell-command-completion-function): Return the
names from `exec-path` when the command name has no `/`.
Michael Albinus [Sun, 27 Sep 2020 16:59:04 +0000 (18:59 +0200)]
Document D-Bus monitoring
* doc/misc/dbus.texi: Replace "symbol" by "keyword" where appropriate.
(Alternative Buses): Adapt dbus-init-bus description.
(Errors and Events): Adapt dbus-event structure. New defuns
dbus-event-destination-name, dbus-event-handler and dbus-event-arguments.
(Monitoring Events): New node.
* lisp/net/dbus.el: Replace "symbol" by "keyword" where appropriate.
(cl-lib): Require.
(dbus-register-monitor): Adapt the argument list.
(dbus-monitor-handler): Extend.
(dbus-init-bus): Adapt docstring.
* test/lisp/net/dbus-tests.el (dbus-test01-compound-types):
Skip if needed. Extend test.
0b78785a9b (origin/emacs-27) Minor copyedits in the Emacs user manual 0dfc6fdc1f Followup to a recent change in menu-bar.el 767713682c Enable "Continue Tags Search" menu item only when it can b... 4bb7532163 Fix soap-client URL
f31c6792ab Fix support for Zip64 zip files ba635a19fb * lisp/hi-lock.el (hi-lock-auto-select-face): Doc fix. (B... cc8fef2bdd Avoid infinite recursion with 'relative' line numbers display 395f10cb98 ; Fix more trivial typos bf4accb65e ; Fix some trivial typos
* src/fns.c (Fstring_search): Perform cheap all-ASCII checks before more
expensive ones. Use a faster loop when searching for non-ASCII
non-raw bytes.
* test/src/fns-tests.el (string-search): Add more test cases.
Eli Zaretskii [Sun, 27 Sep 2020 06:09:27 +0000 (09:09 +0300)]
Minor copyedits in the Emacs user manual
* doc/emacs/emacs.texi (Top): Remove "real-time" from the Emacs
description; add "advanced", to be consistent with what we say in
the Introduction section. (Bug#43633)
Eli Zaretskii [Sun, 27 Sep 2020 05:57:17 +0000 (08:57 +0300)]
Improve documentation of the 'abbrev-suggest' feature
* lisp/abbrev.el (abbrev-suggest, abbrev-suggest-hint-threshold)
(abbrev-suggest-show-report): Improve wording of the doc strings.
* doc/emacs/abbrevs.texi (Abbrevs Suggestions): Fix the typo in
the node name. Improve wording.
* doc/emacs/emacs.texi (Top): Add the new node in the @detailmenu
section.
* etc/NEWS: Improve wording of the NEWS entry for
'abbrev-suggest'.
Eli Zaretskii [Sun, 27 Sep 2020 05:26:56 +0000 (08:26 +0300)]
Improve display of raw bytes in the echo-area
* src/print.c (print_object): When printing a unibyte string,
convert non-ASCII bytes to their character code, before sending
them to 'printchar'. (Bug#43632)
* lisp/subr.el (string-replace): Rename from replace-in-string
since that clashes with XEmacs' replace-in-string which is
equivalent to the Emacs replace-regexp-in-string (bug#43598).
Abbrev suggestions helps users remember to use defined abbrevs
* lisp/abbrev.el (abbrev-suggest): New defcustom.
(abbrev-suggest-hint-threshold): New defcustom.
(abbrev--suggest-get-active-tables-including-parents): New defun.
(abbrev--suggest-get-active-abbrev-expansions): New defun.
(abbrev--suggest-count-words): New defun.
(abbrev--suggest-get-previous-words): New defun.
(abbrev--suggest-above-threshold): New defun.
(abbrev--suggest-saved-recommendations): New defvar.
(abbrev--suggest-inform-user): New defun.
(abbrev--suggest-shortest-abbrev): New defun.
(abbrev--suggest-maybe-suggest): New defun.
(abbrev--suggest-get-totals): New defun.
(abbrev-suggest-show-report): New defun.
(expand-abbrev): If the previous word was not an abbrev, maybe
suggest an abbrev to the user.
* doc/emacs/abbrevs.texi (Abbrev suggestions): New section.
* etc/NEWS: Announce abbrev suggestions.
Display some character widget values in a more user-friendly way
* lisp/wid-edit.el (widget-character--escape-sequences-alist): New
variable.
(widget-character--change-character-display): New function. Use the new
variable.
(widget-character-notify): New function, to keep track of the changes
in the character widget, and display characters like tab,
newline and spaces better.
(character widget): Use widget-character-notify as the notify
function. Use widget-character--change-character-display for the
internal representation of value (bug#15925).
* lisp/wid-edit.el (widget-button-click): Remove a
newly-introduced check that made mouse highlights no longer work
(bug#43612). It's unclear what the check was trying to fix.
Harald Jörg [Sat, 26 Sep 2020 13:51:15 +0000 (15:51 +0200)]
cperl-mode: Delete conditional code where conditions evaluate to nil
* lisp/progmodes/cperl-mode.el (cperl-force-face): This
macro's single effect is now inlined, and the macro is gone.
(cperl-problems): The reference to choose-color.el, which
is no longer available for download, is deleted.
(no function): A list of unnecessary empty variable
definitions is gone. They were needed for Emacs v19 and
below.
(cperl-init-faces-weak): This function does no longer do
anything and is therefore deleted.
(cperl-init-faces): Some bodies of conditional code is deleted
because as of today the conditions evaluate to constants. The
face cperl-nonoverridable-face is no longer available as
variable and needs to be doubly-quoted in one place (bug#43622).
Stefan Kangas [Sat, 26 Sep 2020 09:27:48 +0000 (11:27 +0200)]
Repurpose libxml test for obsolete argument
* test/src/xml-tests.el (libxml-tests): Move half this test for the
recently obsoleted fourth argument to libxml-parse-xml-region...
* test/lisp/xml-tests.el (xml-tests--remove-comments): ...to a new
test here for xml-remove-comments.
* test/src/xml-tests.el (libxml-tests--data-comments-discarded):
Move test data from here...
* test/lisp/xml-tests.el (xml-tests--data-with-comments): ...to here.
Michael Albinus [Sat, 26 Sep 2020 09:38:23 +0000 (11:38 +0200)]
Add D-Bus monitor
* lisp/net/dbus.el (dbus-interface-monitoring): New defconst.
(dbus-call-method, dbus-call-method-asynchronously)
(dbus-send-signal, dbus-method-return-internal)
(dbus-method-error-internal, dbus-check-arguments): Accept also
:system-private and :session-private.
(dbus-check-event, dbus-event-path-name)
(dbus-event-interface-name)
(dbus-event-member-name, dbus-property-handler)
(dbus-handle-bus-disconnect): Adapt according to new structure.
(dbus-handle-event): Handle also monitor events.
(dbus-event-destination-name, dbus-event-handler)
(dbus-event-arguments, dbus-register-monitor, dbus-monitor-handler):
New defuns.
* src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS, xd_remove_watch)
(Fdbus__init_bus): Accept also :system-private and :session-private.
(xd_read_message_1): Add destination and error_name to
dbus-event. Handle monitor events.
(syms_of_dbusbind): Declare QCsystem_private, QCsession_private
and QCmonitor.
(dbus-registered-objects-table): Fix docstring.
Eli Zaretskii [Sat, 26 Sep 2020 08:50:15 +0000 (11:50 +0300)]
Enable "Continue Tags Search" menu item only when it can be used
* lisp/menu-bar.el (menu-bar-search-menu) <tags-continue>: Enable
only when there was a previous tags search. (Bug#43569)
(menu-bar-replace-menu) <tags-repl-continue>: Enable only when
there was a previous tags-replace.
Paul Eggert [Sat, 26 Sep 2020 07:31:17 +0000 (00:31 -0700)]
Fix soap-client URL
* lisp/net/soap-client.el (soap-create-envelope):
Fix URL that I broke in 2019-09-23T06:53:30Z!eggert@cs.ucla.edu.
Problem reported by Thomas Fitzsimmons.
Paul Eggert [Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)]
Fix out-of-source ‘make check’ emacs-module-tests
Problem reported by Koki Fukuda in:
https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
* test/Makefile.in (MODULE_CFLAGS):
Include from the same directories included from in ../src.
* test/src/emacs-module-tests.el (module/describe-function-1):
Strip path to source directory.
Alan Third [Fri, 25 Sep 2020 16:12:51 +0000 (17:12 +0100)]
Tidy up NS color handling
* src/nsimage.m (COLORSPACE_NAME): New macro to find the current
colorspace.
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]):
([EmacsImage initForXPMWithDepth:width:height:]): Use the current
colorspace.
* src/nsterm.h (NSAppKitVersionNumber10_7):
(NSAppKitVersionNumber10_10): Define for macOS version checks.
* src/nsterm.m ([NSColor colorForEmacsRed:green:blue:alpha:]): Tidy up
the version checking.
([NSColor colorUsingDefaultColorSpace]): Tidy the version checking and
use [NSColor colorUsingColorSpace:] with GNUstep.
Alan Third [Wed, 23 Sep 2020 12:57:50 +0000 (13:57 +0100)]
Implement internal border colors on NS (bug#41071)
* src/nsterm.m (ns_clear_under_internal_border): New function.
(ns_after_update_window_line): Use the correct background color.
(ns_redisplay_interface): Add ns_clear_under_internal_border.
* lisp/whitespace.el (whitespace-space-after-tab-regexp)
(whitespace-indentation-regexp): The first string here isn't a
regexp, it's a string (that's expanded with format to be a regexp).