* lisp/icomplete.el (icomplete--vertical-prospects) : New functions to
assert format and correct number of candidates in vertical format.
(icomplete--horizontal-prospects) : New functions to assert format and
correct number of candidates in horizontal format.
(icomplete-minibuffer-setup-hook) : Conditionally initialize the
variables for vertical format.
(icomplete-completions) : Simplify to separate some calculations
unneeded in vertical format. Moved part of its code to
icomplete--horizontal-prospects.
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>: ...
df04f3e755 Fix a rare segfault in syntax.c fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a ... fcd599bbea Minor copyedits of doc of 'with-silent-modifications' 759399cdb1 Improve documentation of 'max-mini-window-height' 3223302aa2 Use modern constant names for the NS pasteboard 985703d380 Fix doc string of 'toggle-menu-bar-mode-from-frame' 184a4977c7 Make vc-bzr tests work with brz 3.1 (bug#43314)
Fix infloop when folding difficult headers in Message
* lisp/mail/rfc2047.el (rfc2047-fold-field): Return the end point.
* lisp/gnus/message.el (message--fold-long-headers): Use that to
reliably achieve progress.
Alan Mackenzie [Sun, 20 Sep 2020 19:57:05 +0000 (19:57 +0000)]
C++ Mode: Modernize the fontification of "using"
Since "using" is now used in three distinct ways in C++, write a special
function to handle these rather than attempting to adapt the old regular
expressions.
* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Amend to allow the
argument TYPES to be a face. This face is given to the declarator being
processed.
(c-font-lock-single-decl): Make an argument to c-font-lock-declarators nil or
t, not merely nil or non-nil.
(c-complex-decl-matchers): Include c-font-lock-c++-using in the C++ value of
this variable.
(c-font-lock-c++-using): New function.
* lisp/progmodes/cc-langs.el (c-using-kwds, c-using-key): New lang
consts/vars.
(c-modifier-kwds): Remove "using" from the C++ value.
Michael Albinus [Sun, 20 Sep 2020 14:44:17 +0000 (16:44 +0200)]
Make D-Bus properties type safe
* doc/misc/dbus.texi (Properties and Annotations):
Precise dbus-get-property and dbus-set-property.
(Type Conversion): Explain :byte and :boolean type conversion.
(Errors and Events): dbus-ignore-errors returns nil when there is
a D-Bus error. Remove dbus-show-dbus-errors.
* etc/NEWS: Some D-Bus relevant changes.
* lisp/net/dbus.el (dbus-show-dbus-errors): Remove.
(dbus-ignore-errors): Replay implamentation without that variable.
(dbus-check-arguments): New defun.
(dbus-list-activatable-names, dbus-list-names)
(dbus-list-queued-owners, dbus-get-name-owner, dbus-introspect)
(dbus-get-all-properties, dbus-get-all-managed-objects): Don't debug.
(dbus-get-property, dbus-set-property): Propagate errors.
(dbus-register-property): Check for valid VALUE.
(dbus-property-handler): Simplify.
* lisp/dired-aux.el (dired-isolated-string-re): Use explicitly
numbered groups.
(dired--star-or-qmark-p): Add START parameter. Make sure to
return the first isolated match.
(dired--need-confirm-positions, dired--mark-positions)
(dired--highlight-no-subst-chars, dired--no-subst-explain)
(dired--no-subst-ask, dired--no-subst-confirm): New functions.
(dired-do-shell-command): Use them (bug#28969, bug#35564).
* test/lisp/dired-aux-tests.el (dired-test-bug27496): Adapt to
new prompt.
(dired-test--check-highlighting): New test helper.
(dired-test-highlight-metachar): New tests.
* doc/emacs/files.texi (Reverting): Document the new command and the
new variable.
* etc/NEWS: Mention the new command and the new variable.
* lisp/files.el (revert-buffer-with-fine-grain): New command. Revert
a buffer trying to be non-destructive, by using replace-buffer-contents.
(revert-buffer-insert-file-contents-delicately): New function, alternative
to revert-buffer-insert-file-contents-function--default-function.
(revert-buffer-with-fine-grain-max-seconds): New variable. Passed as
argument MAX-SECS of replace-buffer-contents.
* test/lisp/files-tests.el (files-tests-lao files-tests-tzu): Helper
variables, taken from diffutils manual, to test reverting a buffer.
(files-tests-revert-buffer)
(files-tests-revert-buffer-with-fine-grain): New tests (bug#18).
Extend process-lines to allow exit status handling
* subr.el (process-lines-handling-status): Extension of the old
process-lines, with more flexible handling of the exit status.
(process-lines): Old API implemented using the new function.
(process-lines-ignore-status): Another use of the new function -
return the output lines regardless of the exit status (bug#1321).
* src/nsterm.m ([EmacsView keyDown:]): Call
[NSCursor setHiddenUntilMouseMoves:] with the correct argument, depending on
variable make-pointer-invisible.