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.
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).
(ruby-mode-map, ruby-mode-menu): Don't use ruby-for/backward-sexp any more.
(ruby-mode-variables): Always setup SMIE navigation.
Still obey `ruby-use-smie` for indentation.
(ruby-forward-sexp, ruby-backward-sexp): Mark as obsolete.
Juri Linkov [Thu, 24 Sep 2020 19:25:03 +0000 (22:25 +0300)]
Horizontal scrolling for mouse wheel with Shift modifier (bug#43568)
* lisp/mwheel.el (mouse-wheel-scroll-amount): Change 'shift' default value
from 5 to 'hscroll'. Add new option "Scroll horizontally" for 'hscroll'.
(mwheel-scroll): Handle value 'hscroll' and call mwheel-scroll-left-function
or mwheel-scroll-right-function.
* doc/emacs/frames.texi (Mouse Commands): Update for horizontal scrolling
with Shift modifier.
* lisp/mwheel.el (mouse-wheel-scroll-amount): Change default value 5 to 1
and shift default value from 1 to 5.
Default value is changed as discussed in etc/TODO.
* src/process.c (update_process_mark): Make into its own function.
(Fmake_process, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket): Use it.
Eric Abrahamsen [Wed, 23 Sep 2020 23:01:38 +0000 (16:01 -0700)]
Write Gnus active files with quotes around group names
* lisp/gnus/gnus-util.el (gnus-write-active-file): In case of group
names with spaces in them (see Bug#42823). Names are later read with
`read', so this should be quite robust.
Juri Linkov [Wed, 23 Sep 2020 19:39:32 +0000 (22:39 +0300)]
New command goto-line-relative (bug#5042, bug#9917)
* lisp/simple.el (goto-line-read-args): New function with code from goto-line.
(goto-line): New arg RELATIVE. Also use 'widen-automatically' to
leave all lines accessible in the narrowed buffer.
(goto-line-relative): New command.
* lisp/info.el (Info-mode-map): Remap 'goto-line' to 'goto-line-relative'.
Stefan Kangas [Wed, 23 Sep 2020 18:53:06 +0000 (20:53 +0200)]
Remove TODO to convert files to unit tests
* test/lisp/textmodes/css-mode-tests.el:
* test/lisp/progmodes/ruby-mode-tests.el: Remove TODO to convert test
files into unit tests. The files are still useful for debugging.
Ref: https://lists.gnu.org/r/emacs-devel/2020-09/msg01906.html
Don't signal scan-error when moving by sexp interactively
* lisp/emacs-lisp/lisp.el (forward-sexp, backward-sexp, forward-list)
(backward-list, down-list, up-list, mark-sexp, kill-sexp)
(backward-kill-sexp): Remove unsightly scan-error when running
interactively and no further movement by sexp can be made (bug#43489).
Allow the newline character in the character widget (Bug#15925)
* lisp/wid-edit.el (widget-specify-field): Extend check for adding the
boundary overlay. Plus, a minor comment indentation fix.
(character widget): Tweak the valid-regexp to allow the newline
character.
* test/lisp/wid-edit-tests.el (widget-test-character-widget-value)
(widget-test-editable-field-widget-value): New tests (bug#15925).
Andrew G Cohen [Wed, 23 Sep 2020 11:47:15 +0000 (19:47 +0800)]
Improve mark handling in gnus nnselect
* lisp/gnus/nnselect.el (numbers-by-group,
nnselect-request-update-info, nnselect-push-info): Handle all three
mark types ('tuple, 'range, 'list) and general speedups.
* lisp/net/shr.el (shr-insert): Speed up regularising spaces --
the vast majority of the spaces are already OK, so transforming
" " to " " just takes time.
Eli Zaretskii [Tue, 22 Sep 2020 13:52:18 +0000 (16:52 +0300)]
Fix cursor display in mini-window under icomplete-mode
* src/xdisp.c (resize_mini_window): When we show only part of the
mini-window's contents, make sure the window-start position is at
the beginning of a screen line. (Bug#43519)
Stefan Kangas [Mon, 21 Sep 2020 22:54:54 +0000 (00:54 +0200)]
Remove some unnecessary compat code
* test/lisp/emacs-lisp/ert-x-tests.el (ert-test-describe-test):
* test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01):
Remove unnecessary compat code; these tests should never need to run
on older versions of Emacs.
* doc/emacs/search.texi (Search Customizations): Adjust
documentation.
* lisp/isearch.el (search-highlight-submatches): Be a boolean.
(isearch-group-{6-9}): New faces.
(isearch-highlight): Use the variable as a boolean.
02a31c9632 (origin/emacs-27) Minor improvement in the ELisp manual's ... f750def778 Mention in PROBLEMS the problems with fonts and Uniscribe 082d8a21b1 Minor copyedits in 'line-height' documentation 5b23393bcc ; * src/frame.c (syms_of_frame) <make-pointer-invisible>: ...