]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoMake xterm-mouse-event check whether the click event is valid
Lars Ingebrigtsen [Sun, 20 Sep 2020 21:32:45 +0000 (23:32 +0200)]
Make xterm-mouse-event check whether the click event is valid

* lisp/xt-mouse.el (xterm-mouse-event): Defensively check against
a situation that shouldn't happen (but does) (bug#17378).

4 years agoC++ Mode: Modernize the fontification of "using"
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.

4 years agoRestore the previous minimum-width specs in the line/column mode lines
Lars Ingebrigtsen [Sun, 20 Sep 2020 19:43:01 +0000 (21:43 +0200)]
Restore the previous minimum-width specs in the line/column mode lines

* lisp/bindings.el (mode-line-position-line-format)
(mode-line-position-column-format)
(mode-line-position-column-line-format, mode-line-position):
Restore the previous min-width specs (bug#28648).

4 years agoMake (let ((:key 'foo)) :key) signal an error in lexical elisp, too
Lars Ingebrigtsen [Sun, 20 Sep 2020 19:30:54 +0000 (21:30 +0200)]
Make (let ((:key 'foo)) :key) signal an error in lexical elisp, too

* src/lread.c (intern_sym): Mark keywords as special (bug#38872).

4 years agoFix typo in dbus.texi
Lars Ingebrigtsen [Sun, 20 Sep 2020 17:20:57 +0000 (19:20 +0200)]
Fix typo in dbus.texi

* doc/misc/dbus.texi (Type Conversion): Remove spurious { character.

4 years agoMake D-Bus properties type safe
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.

* src/dbusbind.c (Fdbus_message_internal): Adapt docstring.
Handle DBUS_MESSAGE_TYPE_INVALID.

* test/lisp/net/dbus-tests.el (dbus-show-dbus-errors): Don't declare.
(dbus-test06-register-property)
(dbus-test06-register-property-emits-signal): Adapt tests.

4 years agoImprove documentation of a recently-added feature
Eli Zaretskii [Sun, 20 Sep 2020 14:16:38 +0000 (17:16 +0300)]
Improve documentation of a recently-added feature

* lisp/isearch.el (search-highlight-submatches): Improve the doc
string.

* doc/emacs/search.texi (Search Customizations): Improve the
documentation of 'search-highlight-submatches'.

* etc/NEWS: Minor change of the entry for
'search-highlight-submatches'.

4 years agoHighlight regexp sub-expressions
Juri Linkov [Sun, 20 Sep 2020 13:46:19 +0000 (15:46 +0200)]
Highlight regexp sub-expressions

* doc/emacs/search.texi (Search Customizations): Document it.

* lisp/isearch.el (search-highlight-submatches): New variable.
(isearch-group-1, isearch-group-2, isearch-group-3)
(isearch-group-4, isearch-group-5): New faces.
(isearch-highlight): Use them.
(isearch-dehighlight): Ditto (bug#6227).

4 years agoTweak dired warning about "wildcard" characters
Kévin Le Gouguec [Sun, 20 Sep 2020 12:16:19 +0000 (14:16 +0200)]
Tweak dired warning about "wildcard" characters

* 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.

4 years agoFix bug out when indenting inserted images in shr
Lars Ingebrigtsen [Sun, 20 Sep 2020 11:03:20 +0000 (13:03 +0200)]
Fix bug out when indenting inserted images in shr

* lisp/net/shr.el (shr-fill-line): We may not have a
shr-indentation text property here.  In that case, default to the
dynamically bound value.

4 years agoRemove code checked in to lread.c by mistake
Lars Ingebrigtsen [Sun, 20 Sep 2020 10:57:53 +0000 (12:57 +0200)]
Remove code checked in to lread.c by mistake

* src/lread.c (intern_sym): Remove code under development
inadvertently checked in.

4 years agoTerminate `comint-password-function' tests
dickmao [Sun, 20 Sep 2020 10:43:37 +0000 (12:43 +0200)]
Terminate `comint-password-function' tests

* test/lisp/comint-tests.el (comint-test-no-password-function)
(comint-test-password-function-with-value)
(comint-test-password-function-with-nil): refactor
(comint-tests/test-password-function): actually test
`comint-send-invisible' and inhibit inadvertent interactive query
(bug#38825).

4 years agoTweak a hash table print test
Lars Ingebrigtsen [Sun, 20 Sep 2020 10:26:29 +0000 (12:26 +0200)]
Tweak a hash table print test

4 years agoFix printing of hash tables with removed elements
Pip Cet [Sun, 20 Sep 2020 10:24:16 +0000 (12:24 +0200)]
Fix printing of hash tables with removed elements

* src/print.c (print_vectorlike): Keep track of the actual number
of elements printed rather than attempting to use hash bucket
indices (bug#38892).

4 years agoDon't have vc-git-stash-list bug out on the .git directory
Dmitry Gutov [Sun, 20 Sep 2020 10:12:36 +0000 (12:12 +0200)]
Don't have vc-git-stash-list bug out on the .git directory

* lisp/vc/vc-git.el (vc-git-stash-list): Don't bug out when
running on the .git directory itself (bug#39285).

4 years ago; * doc/lispref/processes.texi (Synchronous Processes): Fix typo.
Michael Albinus [Sun, 20 Sep 2020 09:48:56 +0000 (11:48 +0200)]
; * doc/lispref/processes.texi (Synchronous Processes): Fix typo.

4 years agoAdd new tab command `C-x t C-r'
Earl [Sun, 20 Sep 2020 09:36:52 +0000 (11:36 +0200)]
Add new tab command `C-x t C-r'

* doc/emacs/misc.texi (FFAP): Document new commands (bug#43503).

* lisp/ffap.el (ffap-read-only-other-tab): New command.

* lisp/tab-bar.el (find-file-read-only-other-tab): New command and
keystroke.

4 years agoFix slow python-mode inserts when there's a lot of strings
Noam Postavsky [Sun, 20 Sep 2020 08:46:16 +0000 (10:46 +0200)]
Fix slow python-mode inserts when there's a lot of strings

* lisp/progmodes/python.el (python-info-docstring-p): Doing more
than two repetitions here doesn't improve indentation (bug#39598).

4 years agoNew command: revert-buffer-with-fine-grain
Mauro Aranda [Sat, 19 Sep 2020 23:04:39 +0000 (01:04 +0200)]
New command: revert-buffer-with-fine-grain

* 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).

4 years agoMake a gud error message more informative
Nick Roberts [Sat, 19 Sep 2020 22:27:26 +0000 (00:27 +0200)]
Make a gud error message more informative

* lisp/progmodes/gud.el (gud-jdb-marker-filter): Make the error
message more informative (bug#1282).

4 years agoExtend process-lines to allow exit status handling
Peder O. Klingenberg [Sat, 19 Sep 2020 22:16:36 +0000 (00:16 +0200)]
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).

4 years agoAdd a new variable 'gnus-global-groups'
Lars Ingebrigtsen [Sat, 19 Sep 2020 19:16:35 +0000 (21:16 +0200)]
Add a new variable 'gnus-global-groups'

* doc/misc/gnus.texi (HTML): Document it.

* lisp/gnus/gnus-art.el (gnus-global-groups): New variable.
(gnus-block-private-groups): Use it.

4 years agoHonor make-pointer-invisible on macOS
bug-gnu-emacs@gnu.org [Sat, 19 Sep 2020 18:31:05 +0000 (20:31 +0200)]
Honor make-pointer-invisible on macOS

* src/nsterm.m ([EmacsView keyDown:]): Call
[NSCursor setHiddenUntilMouseMoves:] with the correct argument, depending on
variable make-pointer-invisible.

4 years ago* doc/misc/eww.texi: Document the `w' key's double function
Gregor Zattler [Sat, 19 Sep 2020 17:25:24 +0000 (19:25 +0200)]
* doc/misc/eww.texi: Document the `w' key's double function

* doc/misc/eww.texi (Basics): Describe what the `w' command does
in eww (bug#43517).

4 years agoPut files in mhtml-mode when they have <!DOCTYPE, case-insensitive
Daniel Martín [Sat, 19 Sep 2020 17:15:48 +0000 (19:15 +0200)]
Put files in mhtml-mode when they have <!DOCTYPE, case-insensitive

* lisp/files.el (magic-fallback-mode-alist): Match "DOCTYPE" in a
case-insensitive way before putting files in mhtml-mode. See
https://html.spec.whatwg.org/multipage/syntax.html#the-doctype for the
standard reference.
* test/lisp/files-tests.el (files-test-magic-mode-alist-doctype): Add
a test (bug#43511).

4 years agoFix problem with spurious extra paragraphs in shr
Lars Ingebrigtsen [Sat, 19 Sep 2020 17:11:09 +0000 (19:11 +0200)]
Fix problem with spurious extra paragraphs in shr

* lisp/net/shr.el (shr-ensure-paragraph): Don't regard <div
id=foo></div> (empty placeholders) as occupying any space (bug#43510).

4 years agoDocument and extend menu-bar-make-toggle some
Drew Adams [Sat, 19 Sep 2020 16:23:27 +0000 (18:23 +0200)]
Document and extend menu-bar-make-toggle some

2020-09-19  Lars Ingebrigtsen  <larsi@gnus.org>

* lisp/menu-bar.el (menu-bar-showhide-fringe-menu): Adjust caller.
(menu-bar-search-options-menu): Ditto.
(menu-bar-options-menu): Ditto.
(menu-bar-options-menu): Ditto.

* lisp/progmodes/gdb-mi.el (menu): Ditto.

* lisp/emacs-lisp/find-func.el (find-function-regexp): Add
menu-bar-make-toggle-command.

* lisp/menu-bar.el (menu-bar-make-toggle): Compatibility wrapper.

2020-09-19  Drew Adams  <drew.adams@oracle.com>

* lisp/menu-bar.el (menu-bar-make-toggle-command): Add doc string
and allow setting all keywords (bug#17954).

4 years agoAllow reveal mode to not automatically re-hide revealed text
Lennart Borgman [Sat, 19 Sep 2020 15:43:42 +0000 (17:43 +0200)]
Allow reveal mode to not automatically re-hide revealed text

* lisp/reveal.el (reveal-hide-revealed): New command (bug#7101).
(reveal-auto-hide): New defcustom.
(reveal-post-command): Use it.

4 years agoAllow customizing hooks defined via define-minor-mode
Lars Ingebrigtsen [Sat, 19 Sep 2020 15:21:02 +0000 (17:21 +0200)]
Allow customizing hooks defined via define-minor-mode

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Allow using
Customize on the hooks (bug#10773).

4 years agoFix gnus-summary-catchup-from-here edge case
Alex Bochannek [Sat, 19 Sep 2020 14:49:38 +0000 (16:49 +0200)]
Fix gnus-summary-catchup-from-here edge case

* lisp/gnus/gnus-sum.el (gnus-summary-catchup-from-here): Make the
command work in the final line in the buffer, too (bug#43496).

4 years agoDocument Gnus body matching quirks
Lars Ingebrigtsen [Sat, 19 Sep 2020 14:46:26 +0000 (16:46 +0200)]
Document Gnus body matching quirks

* doc/misc/gnus.texi (Summary Score Commands): Document body
match quirks (bug#43502).

4 years agoDisplay the language in the Flyspell mode line
Lars Ingebrigtsen [Sat, 19 Sep 2020 14:05:55 +0000 (16:05 +0200)]
Display the language in the Flyspell mode line

* lisp/textmodes/flyspell.el (flyspell-mode): Display the language
in the mode line (bug#14957).

4 years agoFix typo in project-kill-buffers
Stefan Kangas [Fri, 18 Sep 2020 18:30:00 +0000 (20:30 +0200)]
Fix typo in project-kill-buffers

* lisp/progmodes/project.el (project-kill-buffers): Fix typo.
Reported by Manuel Uberti <manuel.uberti@inventati.org>

4 years agoSave and restore point in ewoc-invalidate
Andrii Kolomoiets [Sat, 5 Sep 2020 19:18:59 +0000 (22:18 +0300)]
Save and restore point in ewoc-invalidate

* lisp/emacs-lisp/ewoc.el (ewoc--refresh-node): Save and restore point line
and column offset.
(eowc-map) (ewoc--invalidate) (ewoc-set-hf): Don't use save-excursion
* lisp/vc/vc-dir.el (vc-dir-update): Don't save/restore point on calling
'ewoc-invalidate'.

4 years agoMake emacs-uptime insert at point with prefix arg
Adam Sjøgren [Fri, 18 Sep 2020 14:22:55 +0000 (16:22 +0200)]
Make emacs-uptime insert at point with prefix arg

* lisp/time.el (emacs-uptime): Insert at point when called with prefix
argument.  (Bug#20112)

4 years agoDoc fix in directory-free-space-program
Stefan Kangas [Fri, 18 Sep 2020 12:43:34 +0000 (14:43 +0200)]
Doc fix in directory-free-space-program

* lisp/files.el (directory-free-space-program): Doc fix; there is no
need to repeat that its obsolete here since it will be shown by
customize, describe-variable, etc. automatically.

4 years agoFix the defcustom type of eww-retrieve-command
Lars Ingebrigtsen [Fri, 18 Sep 2020 13:03:03 +0000 (15:03 +0200)]
Fix the defcustom type of eww-retrieve-command

* lisp/net/eww.el (eww-retrieve-command): The type is a list of
strings.

4 years agoUse a widget for the face link in Customize buffers
Lars Ingebrigtsen [Fri, 18 Sep 2020 11:28:12 +0000 (13:28 +0200)]
Use a widget for the face link in Customize buffers

* doc/lispref/customize.texi (Common Keywords): Document it.

* lisp/cus-edit.el (custom-face-value-create): Use a widget
instead of a button so that TAB works (bug#20664).

* lisp/wid-edit.el (face-link): New widget.
(widget-face-link-action): New action.

4 years agoFix error in D-Bus test
Michael Albinus [Fri, 18 Sep 2020 09:17:42 +0000 (11:17 +0200)]
Fix error in D-Bus test

* test/lisp/net/dbus-tests.el (dbus-test04-register-method):
Do not check for error message text.
(dbus--test-signal-handler): Fix docstring.
(dbus--test-timeout-handler): New defun.
(dbus-test05-register-signal)
(dbus-test06-register-property-emits-signal): Use it.

4 years ago* lisp/progmodes/cperl-mode.el (cperl-set-style): Fix docstring.
Michael Albinus [Fri, 18 Sep 2020 09:17:17 +0000 (11:17 +0200)]
* lisp/progmodes/cperl-mode.el (cperl-set-style): Fix docstring.

4 years agoFix typo, reported by Manuel Uberti
Dmitry Gutov [Fri, 18 Sep 2020 09:15:46 +0000 (12:15 +0300)]
Fix typo, reported by Manuel Uberti

* lisp/progmodes/project.el (project-kill-buffer-conditions):
Fix typo.

4 years agoMinor cleanup of last change
Eli Zaretskii [Fri, 18 Sep 2020 08:43:12 +0000 (11:43 +0300)]
Minor cleanup of last change

* src/termchar.h (struct tty_display_info):
* src/term.c (turn_on_face, tty_capable_p): Reformat new code.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Fri, 18 Sep 2020 08:34:38 +0000 (11:34 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years agoTTY Support for ECMA-48 strike-through graphic rendition
Mike Hamrick [Sun, 13 Sep 2020 22:52:24 +0000 (15:52 -0700)]
TTY Support for ECMA-48 strike-through graphic rendition

* term.c: Support strike-through in capable terminals.
(no_color_bit): Replace unused NC_INVIS with
NC_STRIKE_THROUGH.
(turn_on_face): Output via TS_enter_strike_through_mode
if available.
(turn_off_face): Handle strike-through case.
(tty_capable_p, init_tty): Support strike-through.
* termchar.h (struct tty_display_info): Add field for
strike-through.
* xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
Handle strike-through case.
* dispextern.h: Add TTY_CAP_STRIKE_THROUGH definition.
(struct face): Add field tty_strike_through_p.

4 years ago* lisp/tab-bar.el (tab-bar-new-tab-to): Fix tabs not reappearing (bug#42052)
James N. V. Cash [Fri, 18 Sep 2020 08:27:07 +0000 (11:27 +0300)]
* lisp/tab-bar.el (tab-bar-new-tab-to): Fix tabs not reappearing (bug#42052)

Copyright-paperwork-exempt: yes

4 years agoUpdate TUTORIAL.he
Eli Zaretskii [Fri, 18 Sep 2020 07:59:26 +0000 (10:59 +0300)]
Update TUTORIAL.he

* etc/tutorials/TUTORIAL.he: Adapt to latest changes in the
English TUTORIAL.

4 years agoDocument easy ways of typing undo key on TTY frames
Richard Stallman [Thu, 17 Sep 2020 03:52:48 +0000 (23:52 -0400)]
Document easy ways of typing undo key on TTY frames

* doc/emacs/basic.texi (Basic Undo): Document the easiest way to
type the undo key.

* etc/tutorials/TUTORIAL: Describe typing C-_ without the Shift
key.

4 years agoRevert "Make delete-pair only delete pairs that are part of insert-pair-alist"
Lars Ingebrigtsen [Thu, 17 Sep 2020 23:11:40 +0000 (01:11 +0200)]
Revert "Make delete-pair only delete pairs that are part of insert-pair-alist"

This reverts commit 82de8ecc080d91dd05f2432d2d07feb2955aeec4.

This patch breaks doing `M-x delete-pair' on "foo" in text-mode.

4 years agoRemove mention of C-u M-. from the refcards
Lars Ingebrigtsen [Thu, 17 Sep 2020 22:20:38 +0000 (00:20 +0200)]
Remove mention of C-u M-. from the refcards

The "find next tags" command no longer exists, as the machinery has
been replaced by xref.

4 years agoFix recent change in wid-edit
Mauro Aranda [Thu, 17 Sep 2020 21:46:24 +0000 (23:46 +0200)]
Fix recent change in wid-edit

* lisp/wid-edit.el (widget-button--check-and-call-button): Record the
ending position of event, because we might need it when
the :mouse-down-action function returns non-nil (bug#20664).

4 years agoDoc string typo fix for mode-line-position-column-format
Lars Ingebrigtsen [Thu, 17 Sep 2020 18:48:29 +0000 (20:48 +0200)]
Doc string typo fix for mode-line-position-column-format

* lisp/bindings.el (mode-line-position-column-format): Fix typo in
doc string.

4 years agoMake face names clickable in Customize buffers
Oleh Krehel [Thu, 17 Sep 2020 18:43:34 +0000 (20:43 +0200)]
Make face names clickable in Customize buffers

* lisp/cus-edit.el (custom-face-value-create): Make the face name
a clickable button (bug#20664).

4 years agoRefactor a very long wid-edit function and add additional checking
Lars Ingebrigtsen [Thu, 17 Sep 2020 18:42:03 +0000 (20:42 +0200)]
Refactor a very long wid-edit function and add additional checking

* lisp/wid-edit.el (widget-button--check-and-call-button): Factor
out a too-long condition/call...
(widget-button-click): From here.

4 years agoAllow binding keys in `query-replace-map'
Juri Linkov [Thu, 17 Sep 2020 18:10:17 +0000 (20:10 +0200)]
Allow binding keys in `query-replace-map'

* lisp/replace.el (perform-replace): Allow binding keys in
`query-replace-map' (bug#20687).

4 years ago; * src/keyboard (make_lispy_event): Fix a typo.
Eli Zaretskii [Thu, 17 Sep 2020 18:41:58 +0000 (21:41 +0300)]
; * src/keyboard (make_lispy_event): Fix a typo.

4 years agoFix up previous autoload-find-generated-file change
Lars Ingebrigtsen [Thu, 17 Sep 2020 16:09:01 +0000 (18:09 +0200)]
Fix up previous autoload-find-generated-file change

* lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Use
the correct name for find-file-hook.

4 years agoMake package install not bug out on weird stuff in find-file-hooks
Lars Ingebrigtsen [Thu, 17 Sep 2020 16:02:44 +0000 (18:02 +0200)]
Make package install not bug out on weird stuff in find-file-hooks

* lisp/emacs-lisp/autoload.el (autoload-find-generated-file):
Users may have read-only-mode in find-file-hooks (bug#43460) so
just disable all the hooks here.

4 years agocperl-mode: Add new value "PBP" for 'cperl-set-style'
Harald Jörg [Thu, 17 Sep 2020 15:35:04 +0000 (17:35 +0200)]
cperl-mode: Add new value "PBP" for 'cperl-set-style'

* lisp/progmodes/cperl-mode.el (cperl-style-alist)
(cperl-set-style): Add indentation style recommended by Damian Conway's
book "Perl Best Practices".

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-test-indent-styles): Add a test to verify indentation
and unraveling of conditionals (bug#43457).

4 years agoFix documentation of a recent change
Eli Zaretskii [Thu, 17 Sep 2020 15:24:22 +0000 (18:24 +0300)]
Fix documentation of a recent change

* src/keyboard.c (update_recent_keys): Fix commentary.
(Flossage_size): Fix doc string.

* etc/NEWS: Move and fix wording of the recently added entry.

4 years agoetc/refcards/refcard.tex: Fix some grouping regexps
Masahiro Nakamura [Thu, 17 Sep 2020 15:15:05 +0000 (17:15 +0200)]
etc/refcards/refcard.tex: Fix some grouping regexps

* etc/refcards/refcard.tex (section{Regular Expressions}): Fix the
shy/numbered grouping examples (bug#43429).

4 years agoWork on D-Bus properties etc
Michael Albinus [Thu, 17 Sep 2020 15:13:55 +0000 (17:13 +0200)]
Work on D-Bus properties etc

* lisp/net/dbus.el (seq, subr-x): Require.
(dbus-error-disconnected, dbus-error-service-unknown): New defconst.
(dbus-set-property, dbus-register-property): Use `keywordp'.  Fix
proper value sending a signal.

* test/lisp/net/dbus-tests.el (dbus-test04-register-method):
Extend test.
(dbus--test-signal-received): New defvar.
(dbus--test-signal-handler): New defun.
(dbus-test05-register-signal)
(dbus-test06-register-property-emits-signal): New tests.
(dbus-test06-register-property)
(dbus-test06-register-property-several-paths): Rename tests.

4 years agoAllow user-defined scoring in Gnus
Alex Bochannek [Thu, 17 Sep 2020 15:02:48 +0000 (17:02 +0200)]
Allow user-defined scoring in Gnus

* lisp/gnus/gnus-score.el (gnus-score-func): New function (bug#43413).
* doc/misc/gnus.texi (Score File Format): Document it.

4 years agoMake delete-pair only delete pairs that are part of insert-pair-alist
martin rudalics [Thu, 17 Sep 2020 14:43:45 +0000 (16:43 +0200)]
Make delete-pair only delete pairs that are part of insert-pair-alist

* lisp/emacs-lisp/lisp.el (delete-pair): Only delete pairs that
are part of `insert-pair-alist' (bug#4136).

4 years agoGive Lisp control on the lossage size
Tino Calancha [Sat, 12 Sep 2020 12:14:45 +0000 (14:14 +0200)]
Give Lisp control on the lossage size

Add a command 'lossage-size' to set the maximum
number or recorded keystrokes (Bug#38796).

* src/keyboard.c (lossage_limit):
Static variable with the current lossage size limit.
(MIN_NUM_RECENT_KEYS): Renamed from NUM_RECENT_KEYS.
Set it as 100 and use it as the minimum value for lossage_limit.
Keep the same default for the vector size as before (300).
(lossage-size): New command.
(update_recent_keys): Helper function.
(command_loop_1)
(record_char)
(recent-keys)
(syms_of_keyboard): Use lossage_limit as the vector size.

* lisp/help.el (view-lossage): Mention the new command in the docstring.
* etc/NEWS (Changes in Emacs 28.1): Announce this change.
* doc/emacs/help.texi (Misc Help): Update manual.
* test/src/keyboard-tests.el (keyboard-lossage-size): Add test.

4 years agoFix up previous change for column/line spec mechanism in the mode line
Lars Ingebrigtsen [Thu, 17 Sep 2020 14:09:30 +0000 (16:09 +0200)]
Fix up previous change for column/line spec mechanism in the mode line

* lisp/bindings.el (column-number-indicator-zero-based): Make
obsolete (bug#28648).
(mode-line-position-column-line-format): New variable.
(mode-line-position--column-line-properties): New const.
(mode-line-position): Use it.

4 years agoRemove pointless use of intern
Andreas Schwab [Thu, 17 Sep 2020 08:54:09 +0000 (10:54 +0200)]
Remove pointless use of intern

* lisp/mwheel.el (mouse-wheel-left-event)
(mouse-wheel-right-event): Replace use of intern with quoted
symbol.
* lisp/profiler.el (profiler-calltree-build-unified): Likewise.
* lisp/vc/ediff-util.el (ediff-debug-info): Likewise.

4 years agoD-Bus: keep type information in D-Bus events
Michael Albinus [Wed, 16 Sep 2020 12:32:57 +0000 (14:32 +0200)]
D-Bus: keep type information in D-Bus events

* doc/misc/dbus.texi (Errors and Events):
* etc/NEWS: D-Bus events keep the type information of their arguments.

* lisp/net/dbus.el (dbus-check-event): Fix docstring.
(dbus-delete-types, dbus-flatten-types): New defuns.
(dbus-handle-event, dbus-register-property, dbus-property-handler):
Handle type information.
(dbus-set-property): Fix thinko.

* src/dbusbind.c (XD_BASIC_DBUS_TYPE): Simplify.
(xd_dbus_type_to_symbol): New function.
(xd_retrieve_arg): Return type information for the arguments.
(xd_read_message_1):  Return type information for the error name.
(dbus-registered-objects-table): Fix docstring.

4 years agoFix problem with previous dired.el change
Lars Ingebrigtsen [Wed, 16 Sep 2020 11:34:58 +0000 (13:34 +0200)]
Fix problem with previous dired.el change

* lisp/dired.el (dired-get-filename): dired-current-directory
can't be called before the dired buffer has been set up.
(add-hook 'dired-mode-hook 'dired-sort-toggle) calls
dired-get-filename in a way that exposes this problem, so avoid
it.

4 years agoTweak previous report-emacs-bug-hook change
Lars Ingebrigtsen [Wed, 16 Sep 2020 11:25:10 +0000 (13:25 +0200)]
Tweak previous report-emacs-bug-hook change

* lisp/mail/emacsbug.el (report-emacs-bug-hook): Add to the hook
locally so sending stuff from Message afterwards won't trigger the
same question.

4 years ago; Minor fix for nsxwidget patch
Masahiro Nakamura [Tue, 15 Sep 2020 06:35:32 +0000 (15:35 +0900)]
; Minor fix for nsxwidget patch

* lisp/xwdget.el (xwidget-webkit-download-dir)
(xwidget-webkit-save-as-file): Set version to 28.1 because the patch
was introduced in Emacs 28.0.50.

* src/nsxwidget.m: Fix typo.

4 years agoMake sgml-validate not bug out from buffers not visiting a file
Lars Ingebrigtsen [Tue, 15 Sep 2020 16:11:28 +0000 (18:11 +0200)]
Make sgml-validate not bug out from buffers not visiting a file

* lisp/textmodes/sgml-mode.el (sgml-validate): Don't bug out when
running from a buffer that's not visiting a file (bug#22906).

4 years ago; * etc/NEWS: Fix wording of a recently added entry.
Eli Zaretskii [Tue, 15 Sep 2020 16:08:55 +0000 (19:08 +0300)]
; * etc/NEWS: Fix wording of a recently added entry.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 15 Sep 2020 16:06:23 +0000 (19:06 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years ago; * src/font.c (syms_of_font) <query-all-font-backends>: Doc fix.
Eli Zaretskii [Tue, 15 Sep 2020 16:05:53 +0000 (19:05 +0300)]
; * src/font.c (syms_of_font) <query-all-font-backends>: Doc fix.

4 years agoUse a square root character in calc displays
Lars Ingebrigtsen [Tue, 15 Sep 2020 16:03:50 +0000 (18:03 +0200)]
Use a square root character in calc displays

* lisp/calc/calccomp.el (math-compose-sqrt): Use a square root
character, if possible (bug#22919).  Suggested by Zephyr Pellerin
<zephyr.pellerin@gmail.com>.

4 years agoAvoid aborts in display_mode_element
Eli Zaretskii [Tue, 15 Sep 2020 15:44:01 +0000 (18:44 +0300)]
Avoid aborts in display_mode_element

* src/xdisp.c (display_mode_element): Use parse_str_as_multibyte,
not multibyte_chars_in_text, to determine whether mode-line spec
shall be displayed as a multibyte or unibyte string.  We cannot
use multibyte_chars_in_text here because it aborts when it finds
raw bytes in the spec string.  (Bug#43409)

4 years ago; Fix grammar of previous commit
Robert Pluim [Tue, 15 Sep 2020 15:35:53 +0000 (17:35 +0200)]
; Fix grammar of previous commit

* doc/lispref/modes.texi (Mode Line Variables): Fix grammar
of mode-line-position-{line,column}-format descriptions.

4 years agoStop querying for fonts as soon as a match is found
Robert Pluim [Fri, 11 Sep 2020 08:29:24 +0000 (10:29 +0200)]
Stop querying for fonts as soon as a match is found

Scanning through fonts can be very slow, especially with the 'x' font
backend, and the result is almost always not used.  Stop looking for a
font as soon as one is found rather than scanning all the backends.

* src/font.c (font_list_entities): Stop scanning through the font
backends as soon as we find a match unless
'query-all-font-backends is set (Bug#43177).
(syms_of_font): New variable 'query-all-font-backends', default
false.

4 years agoFix up previous replace-in-string commit
Lars Ingebrigtsen [Tue, 15 Sep 2020 15:36:36 +0000 (17:36 +0200)]
Fix up previous replace-in-string commit

* lisp/subr.el (replace-in-string): Fix thinko in implementation.

4 years agoAllow controlling the look of the line/column indicators
Lars Ingebrigtsen [Tue, 15 Sep 2020 15:07:31 +0000 (17:07 +0200)]
Allow controlling the look of the line/column indicators

* doc/lispref/modes.texi (Mode Line Variables): Document them.

* lisp/bindings.el (mode-line-position-line-format): New variable
(bug#28648).
(mode-line-position-column-format): Ditto.
(mode-line-position): Use them.

* lisp/simple.el (column-number-mode): Mention them.
(line-number-mode): Ditto.

4 years agoAdd new, simple `replace-in-string' function
Lars Ingebrigtsen [Tue, 15 Sep 2020 14:50:44 +0000 (16:50 +0200)]
Add new, simple `replace-in-string' function

* lisp/subr.el (replace-in-string): New, side-effect-free function.

* doc/lispref/searching.texi (Search and Replace): Document it.

4 years ago* lisp/window.el: Add provide statement
Stefan Kangas [Tue, 15 Sep 2020 13:38:24 +0000 (15:38 +0200)]
* lisp/window.el: Add provide statement

* lisp/window.el (window): Put a `provide' form to help with the
popular `use-package' external package (bug#37053).

4 years agoFix MS-Windows compilation of Gnulib with old versions of MinGW
Eli Zaretskii [Tue, 15 Sep 2020 15:09:03 +0000 (18:09 +0300)]
Fix MS-Windows compilation of Gnulib with old versions of MinGW

* nt/inc/ms-w32.h (_WIN32_WINNT_WIN2K, _WIN32_WINNT_WINXP)
(_WIN32_WINNT_WS03, _WIN32_WINNT_VISTA, _WIN32_WINNT_WIN7,
_WIN32_WINNT_WIN8, _WIN32_WINNT_WINBLUE, _WIN32_WINNT_WIN10)
[__MINGW32__]: Define if any of these is not defined.  Reported by
martin rudalics <rudalics@gmx.at>.

4 years agoMerge branch 'feature/uniquify-as-function' into master
Jimmy Aguilar Mena [Tue, 15 Sep 2020 14:18:02 +0000 (16:18 +0200)]
Merge branch 'feature/uniquify-as-function' into master

4 years agoDocument use of uniquify-buffer-name-style as a function.
Jimmy Aguilar Mena [Tue, 15 Sep 2020 11:19:13 +0000 (13:19 +0200)]
Document use of uniquify-buffer-name-style as a function.

4 years agoEnable uniquify-buffer-name-style to be a function.
Jimmy Aguilar Mena [Tue, 15 Sep 2020 10:50:33 +0000 (12:50 +0200)]
Enable uniquify-buffer-name-style to be a function.

* lisp/uniquify.el (uniquify-buffer-name-style) : Add "Other" custom
option
(uniquify-get-proposed-name) : Add condition for when
uniquify-buffer-name-style is a function.

4 years agoFix mailclient-send-it after recent browse-url rewrite
Lars Ingebrigtsen [Tue, 15 Sep 2020 13:27:46 +0000 (15:27 +0200)]
Fix mailclient-send-it after recent browse-url rewrite

* lisp/mail/mailclient.el (mailclient-send-it): Make this function
work again after the browse-url machinery was changed to use
browse-url-default-handlers instead.

4 years agoFix regression in non-querying about mail addresses in "emacs -Q"
Lars Ingebrigtsen [Tue, 15 Sep 2020 13:26:55 +0000 (15:26 +0200)]
Fix regression in non-querying about mail addresses in "emacs -Q"

* lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't query about
the mail address if using an external mailer (bug#43386).

4 years agoCheck that the buffer in diff-buffer-with-file is visiting a file
Daniel Martín [Tue, 15 Sep 2020 12:56:10 +0000 (14:56 +0200)]
Check that the buffer in diff-buffer-with-file is visiting a file

* lisp/vc/diff.el (diff-buffer-with-file): Signal a specific error
when the buffer passed to diff-buffer-with-file is not visiting a
file (bug#43401).

4 years ago* test/lisp/emacs-lisp/find-func-tests.el: New file (for bug#43393)
Stefan Monnier [Mon, 14 Sep 2020 20:04:22 +0000 (16:04 -0400)]
* test/lisp/emacs-lisp/find-func-tests.el: New file (for bug#43393)

* lisp/emacs-lisp/ert-x.el (ert-simulate-keys): New macro.

* test/lisp/international/mule-tests.el
(mule-cmds--test-universal-coding-system-argument): Use it and enable
the test also in batch mode.

4 years agoTweak the `C-x v =' command when done from a diff buffer
Kevin Ryde [Mon, 14 Sep 2020 13:40:07 +0000 (15:40 +0200)]
Tweak the `C-x v =' command when done from a diff buffer

* lisp/vc/vc.el (vc-diff): Offer to save the relevant buffer(s)
when doing `C-x v =' from a diff buffer (bug#5773).

4 years agoDon't retry reading after receiving EINVAL
Pip Cet [Mon, 14 Sep 2020 13:18:52 +0000 (15:18 +0200)]
Don't retry reading after receiving EINVAL

* src/process.c (wait_reading_process_output): Don't retry reading
from an fd after an unknown error (bug#6074).

4 years agoFix problem of marking files with hidden subdirs
Stephen Berman [Mon, 14 Sep 2020 12:55:52 +0000 (14:55 +0200)]
Fix problem of marking files with hidden subdirs

* lisp/dired.el (dired-unhide-subdir):
(dired-subdir-hidden-p):
(dired-subdir-min): Moved from subr-x.
(dired-get-filename): Get the correct filename when directories
are hidden (bug#8484).

4 years agoAllow preserving (some) text properties from completion tables
Lars Ingebrigtsen [Mon, 14 Sep 2020 12:22:06 +0000 (14:22 +0200)]
Allow preserving (some) text properties from completion tables

* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.

* lisp/minibuffer.el (completion--replace): Preserve text
properties on completed items (bug#43218).

4 years agoAllow hitting RET on info node names with multiple whitespace chars
Lars Ingebrigtsen [Mon, 14 Sep 2020 11:49:04 +0000 (13:49 +0200)]
Allow hitting RET on info node names with multiple whitespace chars

* lisp/info.el (info--node-canonicalize-whitespace): New function
(bug#10784).
(Info-extract-menu-node-name): Use it.
(Info-find-node): Use it.

4 years agoRevert "Fix completion in `read-library-name'"
Lars Ingebrigtsen [Mon, 14 Sep 2020 11:26:17 +0000 (13:26 +0200)]
Revert "Fix completion in `read-library-name'"

This reverts commit ed44217d3245ddc8f2cf75c9499d5bb37848cfd7.

This commit broke the use case of `M-x load-library RET o/or TAB' to
expand to org/org.

4 years agoFurther fixups in minibuffer-default--in-prompt-regexps
Lars Ingebrigtsen [Mon, 14 Sep 2020 11:14:21 +0000 (13:14 +0200)]
Further fixups in minibuffer-default--in-prompt-regexps

* lisp/minibuf-eldef.el (minibuffer-default--in-prompt-regexps):
Really allow shortening the default prompt format to [foo] (if
requested) (bug#12443).

4 years agoSupport build of Emacs on ARM Macos machines
Lars Ingebrigtsen [Mon, 14 Sep 2020 10:34:56 +0000 (12:34 +0200)]
Support build of Emacs on ARM Macos machines

* configure.ac: Add support for aarch64-* on Macos (i.e., 64-bit
ARM) (bug#43369).

4 years agoCalc: fix binomial coefficients for negative arguments (bug#16999)
Mattias Engdegård [Fri, 11 Sep 2020 09:43:15 +0000 (11:43 +0200)]
Calc: fix binomial coefficients for negative arguments (bug#16999)

For some values outside integers 0≤k≤n, (n choose k) gave wrong
results, entered infinite recursion or used unreasonably amounts of
stack space.  This change fixes that and extends the function to all
integer arguments using the definitions from M. J. Kronenburg
(https://arxiv.org/abs/1105.3689).

* lisp/calc/calc-comb.el (calcFunc-choose):
Fix sign error to prevent infinite recursion and extend function to
handle all integer arguments.
(math-choose-iter, math-choose-float-iter): Rewrite in iterative form;
no TCO in elisp yet.
* test/lisp/calc/calc-tests.el (calc-tests--fac, calc-tests--choose)
(calc-tests--check-choose, calc-tests--explain-choose)
(calc-tests--calc-to-number): New helper functions.
(calc-choose): New test.

4 years ago* lisp/simple.el (undo-redo): Rephrase error message.
Mattias Engdegård [Mon, 14 Sep 2020 09:17:49 +0000 (11:17 +0200)]
* lisp/simple.el (undo-redo): Rephrase error message.