]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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.

4 years agoFix builds without modules
Glenn Morris [Mon, 14 Sep 2020 00:19:19 +0000 (17:19 -0700)]
Fix builds without modules

* src/data.c (Finteractive_form):
* src/eval.c (Fcommandp): Fix builds without modules.

4 years agoFix up report-emacs-bug action on invalid From headers
Lars Ingebrigtsen [Sun, 13 Sep 2020 23:23:25 +0000 (01:23 +0200)]
Fix up report-emacs-bug action on invalid From headers

* lisp/mail/emacsbug.el (report-emacs-bug-hook): Move point to the
From header if the user has to edit the From header.

4 years agoFix compilation-mode-map doc string
akater [Sun, 13 Sep 2020 23:08:26 +0000 (01:08 +0200)]
Fix compilation-mode-map doc string

* lisp/progmodes/compile.el (compilation-mode-map): Remove mention of
compilation-minor-mode-map (bug#43382).

As the comment in the body says:

;; Don't inherit from compilation-minor-mode-map,
;; because that introduces a menu bar item we don't want.
;; That confuses C-down-mouse-3.

and the map actually inherits from special-mode-map.

Copyright-paperwork-exempt: yes

4 years agoAdd facility to make module functions interactive (Bug#23486).
Philipp Stephani [Sun, 13 Sep 2020 18:21:41 +0000 (20:21 +0200)]
Add facility to make module functions interactive (Bug#23486).

* src/module-env-28.h: Add field for 'make_interactive' function.

* src/emacs-module.c (Lisp_Module_Function): Add new field holding the
interactive form.
(allocate_module_function): Adapt to structure layout change.
(module_make_interactive, module_function_interactive_form): New
functions.
(initialize_environment): Use them.

* src/eval.c (Fcommandp):
* src/data.c (Finteractive_form): Also handle interactive module
functions.

* test/data/emacs-module/mod-test.c (Fmod_test_identity): New test
function.
(emacs_module_init): Create two interactive module test functions.

* test/src/emacs-module-tests.el (module/interactive/return-t)
(module/interactive/return-t-int, module/interactive/identity):
New unit tests.

* doc/lispref/internals.texi (Module Functions): Document new
function.  Rework paragraph about wrapping module functions, as the
example no longer applies.

* etc/NEWS: Document new facility.

4 years agoEscape ampersand in table.el LaTeX output
Reuben Thomas [Sun, 13 Sep 2020 17:05:47 +0000 (18:05 +0100)]
Escape ampersand in table.el LaTeX output

* lisp/textmodes/table.el (table--generate-source-scan-lines): Add
  ampersand '&' to the list of characters to escape in LaTeX output.

4 years agoFurther fixups of the variable-pitch eww header line change
Lars Ingebrigtsen [Sun, 13 Sep 2020 16:51:44 +0000 (18:51 +0200)]
Further fixups of the variable-pitch eww header line change

* lisp/net/eww.el (eww-update-header-line-format): Protect against
:url not being set.

4 years agoImprove wording of cua-mode menu entry
Stefan Kangas [Sun, 13 Sep 2020 16:30:45 +0000 (18:30 +0200)]
Improve wording of cua-mode menu entry

* lisp/menu-bar.el (menu-bar-options-menu): Improve wording of the
cua-mode menu entry.  (Bug#43323)

4 years agoImprove frame-title-format and icon-title-format
Stefan Kangas [Sun, 13 Sep 2020 16:24:31 +0000 (18:24 +0200)]
Improve frame-title-format and icon-title-format

* src/xdisp.c (syms_of_xdisp): Replace 'invocation-name' with the text
"%b - GNU Emacs" and replace "@" with " at ".  (Bug#41147)
* etc/NEWS: Announce the above change.

4 years agoFix punctuation in EWW manual
Eli Zaretskii [Sun, 13 Sep 2020 15:35:54 +0000 (18:35 +0300)]
Fix punctuation in EWW manual

* doc/misc/eww.texi (Advanced): Fix punctuation of a recent
change.

4 years ago; * etc/NEWS: Document a recent change.
Eli Zaretskii [Sun, 13 Sep 2020 15:32:31 +0000 (18:32 +0300)]
; * etc/NEWS: Document a recent change.

4 years ago; * lisp/tab-line.el (tab-line-switch-cycling): Fix last change.
Eli Zaretskii [Sun, 13 Sep 2020 15:27:44 +0000 (18:27 +0300)]
; * lisp/tab-line.el (tab-line-switch-cycling): Fix last change.

4 years agoMake diff--refine-hunk bug out less on broken patches
Lars Ingebrigtsen [Sun, 13 Sep 2020 15:25:08 +0000 (17:25 +0200)]
Make diff--refine-hunk bug out less on broken patches

* lisp/vc/diff-mode.el (diff--refine-hunk): Don't bug out on
broken patches where we can't find the middle.

4 years agoMake the eww header work again even if the title is nil
Lars Ingebrigtsen [Sun, 13 Sep 2020 15:06:35 +0000 (17:06 +0200)]
Make the eww header work again even if the title is nil

* lisp/net/eww.el (eww-update-header-line-format): Don't bug out
if the title isn't set at all.

4 years agoMake ERC desktop notifications lenient to invalid XML characters
Dario Gjorgjevski [Sun, 13 Sep 2020 14:49:00 +0000 (16:49 +0200)]
Make ERC desktop notifications lenient to invalid XML characters

* lisp/xml.el (xml-invalid-characters-re): New constant.

* lisp/erc/erc-desktop-notifications.el
(erc-notifications-notify): Strip IRC control codes and invalid
XML characters before notifying (bug#43328).

4 years agoDon't eagerly store articles in the Agent by default
Lars Ingebrigtsen [Sun, 13 Sep 2020 14:46:11 +0000 (16:46 +0200)]
Don't eagerly store articles in the Agent by default

* lisp/gnus/gnus-agent.el (gnus-agent-store-article): Made
obsolete.

* lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Don't
call it.

* lisp/gnus/gnus-async.el (gnus-async-article-callback): Ditto
(bug#43356).

This partially reverts f3b146e943cd733fb716c75048f24b73826e5f30, which
in was response to what appears to be an erroneous feature-request -
bug#8502.

Instead this should be done instead:

“If I read an article while plugged, do they get entered into the
Agent?”

     *No*. If you want this behavior, add
     ‘gnus-agent-fetch-selected-article’ to
     ‘gnus-select-article-hook’.

4 years agoKill gpg-agents started by mml-sec-tests (bug#43358)
Lars Ingebrigtsen [Sun, 13 Sep 2020 14:05:19 +0000 (16:05 +0200)]
Kill gpg-agents started by mml-sec-tests (bug#43358)

4 years agoUpdate .gitignore with ccls files
Brian Leung [Sun, 13 Sep 2020 13:48:06 +0000 (15:48 +0200)]
Update .gitignore with ccls files

* .gitignore: Ignore files used by ccls, a language server for C
(bug#43365).

Copyright-paperwork-exempt: yes

4 years agoDoc string clarification in file-directory-p
Lars Ingebrigtsen [Sun, 13 Sep 2020 13:33:58 +0000 (15:33 +0200)]
Doc string clarification in file-directory-p

* src/fileio.c (Ffile_directory_p): Mention that "" is a special
case (bug#43375).

4 years agoClarify when tab-line-switch-cycling is used
Kiso Katsuyuki [Sun, 13 Sep 2020 13:23:25 +0000 (15:23 +0200)]
Clarify when tab-line-switch-cycling is used

* lisp/tab-line.el (tab-line-switch-cycling): Clarify when the
variable is used.
Copyright-paperwork-exempt: yes

4 years ago* lisp/time.el (display-time-world): Make obsolete.
Stefan Kangas [Sun, 13 Sep 2020 13:09:20 +0000 (15:09 +0200)]
* lisp/time.el (display-time-world): Make obsolete.

4 years agoMake M-x show what aliases point to (Bug#43300)
Stefan Kangas [Wed, 9 Sep 2020 23:42:53 +0000 (01:42 +0200)]
Make M-x show what aliases point to (Bug#43300)

* lisp/simple.el (read-extended-command--annotation): Show an
annotation for aliases saying what it points to.

4 years agoMake M-x show obsolete commands (Bug#43300)
Stefan Kangas [Wed, 9 Sep 2020 23:32:24 +0000 (01:32 +0200)]
Make M-x show obsolete commands (Bug#43300)

* lisp/simple.el (read-extended-command): Don't hide obsolete
commands.
(read-extended-command--annotation): Show an annotation for obsolete
commands that says what their new name is.

4 years agoRevert "Use format-prompt in read-file-name calls that have a default"
Lars Ingebrigtsen [Sun, 13 Sep 2020 12:58:24 +0000 (14:58 +0200)]
Revert "Use format-prompt in read-file-name calls that have a default"

This reverts commit de4f347901adffd07bc9bff028dc073fb3c6df33.

read-file-name already displays a long path when given a default
(like INITIAL in many other prompting functions), so using
format-prompt here is superfluous.

4 years agoMake `ascii' a coding system alias for `us-ascii'
Lars Ingebrigtsen [Sun, 13 Sep 2020 12:37:54 +0000 (14:37 +0200)]
Make `ascii' a coding system alias for `us-ascii'

* lisp/international/mule-conf.el (ascii): Define `ascii' as a
coding system alias to `us-ascii' (bug#43351).

4 years agoFix a conversion failure in tramp-archive-tests (Bug#43353)
Michael Albinus [Sun, 13 Sep 2020 11:25:52 +0000 (13:25 +0200)]
Fix a conversion failure in tramp-archive-tests (Bug#43353)

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-file-archive-hexlified): New defun.
(tramp-archive-test02-file-name-dissect): Use it.  (Bug#43353)

4 years agoDon't force LC_ALL=C upon make check (bug#43353)
Glenn Morris [Sun, 13 Sep 2020 03:22:37 +0000 (20:22 -0700)]
Don't force LC_ALL=C upon make check (bug#43353)

* test/Makefile.in (TEST_LOCALE): Remove.
(emacs): Don't force LC_ALL=C, since it causes problems with
non-ascii directories.  This mirrors a 7-year old lisp/Makefile change.

4 years agoMark some diff tests as failing in nonascii directories
Glenn Morris [Sun, 13 Sep 2020 02:44:06 +0000 (19:44 -0700)]
Mark some diff tests as failing in nonascii directories

* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
(diff-mode-test-font-lock-syntax-one-line):
Expect failure in non-ascii directories.

; * lisp/vc/diff-mode.el (diff-hunk-file-names): Comment.

4 years agoClean up eww error buffer
Lars Ingebrigtsen [Sat, 12 Sep 2020 23:02:00 +0000 (01:02 +0200)]
Clean up eww error buffer

* lisp/net/eww.el (eww-retrieve): Clean up error buffer after exiting.

4 years agoFix up example code from previous eww.texi commit
Lars Ingebrigtsen [Sat, 12 Sep 2020 22:44:20 +0000 (00:44 +0200)]
Fix up example code from previous eww.texi commit

* doc/misc/eww.texi (Advanced): Simplify example command (and
"--virtual-time-budget=3000" makes Chromium unstable).

4 years agoAdd a way to use an external command to download HTML in eww
Lars Ingebrigtsen [Sat, 12 Sep 2020 22:12:33 +0000 (00:12 +0200)]
Add a way to use an external command to download HTML in eww

* doc/misc/eww.texi (Advanced): Document it.

* lisp/net/eww.el (eww-retrieve): New function.
(eww-reload): Use it.
(eww): Ditto.
(eww-retrieve-command): New variable.

4 years agoAdapt some tests for Emacs's excitingly variable quoting format
Glenn Morris [Sat, 12 Sep 2020 18:57:42 +0000 (11:57 -0700)]
Adapt some tests for Emacs's excitingly variable quoting format

* test/lisp/subr-tests.el (subr-test-version-parsing):
* test/lisp/emacs-lisp/gv-tests.el (gv-dont-define-expander-other-file):
* test/src/callint-tests.el (call-interactively/incomplete-multibyte-sequence):
* test/src/emacs-module-tests.el (module/describe-function-1):
Don't fail if curly quotes are in use, as they can be if LC_ALL != C.

4 years ago; Fix copyright years
Glenn Morris [Sat, 12 Sep 2020 17:52:50 +0000 (10:52 -0700)]
; Fix copyright years

4 years agoCleanup in dbus.el, dbus-tests.el
Michael Albinus [Sat, 12 Sep 2020 17:33:44 +0000 (19:33 +0200)]
Cleanup in dbus.el, dbus-tests.el

* lisp/net/dbus.el (dbus-error-no-reply): New defconst.
(dbus-call-method): Use it.
(dbus-call-method-asynchronously, dbus-register-signal): Fix docstring.
(dbus-unregister-object): Obey :serial entries in
`dbus-registered-objects-table'.

* test/lisp/net/dbus-tests.el (dbus-test04-register-method)
(dbus-test05-register-property): Extend tests.

4 years agoC++ Mode: handle __attribute__,etc. inside constructor argument lists
Alan Mackenzie [Sat, 12 Sep 2020 16:37:56 +0000 (16:37 +0000)]
C++ Mode: handle __attribute__,etc. inside constructor argument lists

This corrects both the fontification and indentation of these things, fixing
bug #42270.

* lisp/progmodes/cc-engine.el (c-do-declarators): Skip over "hangon keys" and
noise macros whilst scanning a putative C++ function.
(c-forward-decl-or-cast-1): When checking for typeless functions, skip over
"hangon keys" and noise macros.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): Deal with certain invalid
"nested declarators" by scanning over them with a recursive call of
c-fl-decl-end.

* lisp/progmodes/cc-vars.el (c-noise-macro-names)
(c-noise-macro-with-parens-names): State in the doc strings that if either of
these is a regexp, it must have a submatch 1 which matches the noise macro
exactly.

4 years agoSmall Texinfo markup fixes
Glenn Morris [Sat, 12 Sep 2020 16:06:10 +0000 (09:06 -0700)]
Small Texinfo markup fixes

* doc/misc/dbus.texi (Register Objects):
* doc/misc/gnus.texi (Searching): Texinfo markup fixes.

4 years agoFix compilation warning in cl-font-lock
Lars Ingebrigtsen [Sat, 12 Sep 2020 13:10:36 +0000 (15:10 +0200)]
Fix compilation warning in cl-font-lock

* lisp/progmodes/cl-font-lock.el (cl-font-lock-built-in-mode): Put
in the tools group to avoid a compilation warning.

4 years agoFix compilation warning in obsolete/complete.el
Lars Ingebrigtsen [Sat, 12 Sep 2020 13:08:41 +0000 (15:08 +0200)]
Fix compilation warning in obsolete/complete.el

* lisp/obsolete/complete.el (completion-base-size): Avoid
compilation warning.

4 years agoFix compilation warning in cl-lib.el
Lars Ingebrigtsen [Sat, 12 Sep 2020 13:06:58 +0000 (15:06 +0200)]
Fix compilation warning in cl-lib.el

* lisp/emacs-lisp/cl-lib.el (cl-old-struct-compat-mode): Put the
minor mode in the tools group (to avoid a compilation warning).

4 years agodired-omit-mode may not be defined in dired-jump
Lars Ingebrigtsen [Sat, 12 Sep 2020 13:01:32 +0000 (15:01 +0200)]
dired-omit-mode may not be defined in dired-jump

* lisp/dired.el (dired-jump): dired-omit-mode is in dired-x, so it
may not be defined in dired.

4 years agoSupport scoring on article age interactively in Gnus
Alex Bochannek [Sat, 12 Sep 2020 12:04:02 +0000 (14:04 +0200)]
Support scoring on article age interactively in Gnus

* lisp/gnus/gnus-score.el (gnus-summary-score-entry): Support
scoring on article age in interactive scoring (bug#43270).

4 years agoDefault Emacs to UTF-8 instead of Latin-1
Glenn Morris [Sat, 12 Sep 2020 11:37:23 +0000 (13:37 +0200)]
Default Emacs to UTF-8 instead of Latin-1

* doc/emacs/mule.texi (File Name Coding): Document it.

* lisp/international/mule-cmds.el (reset-language-environment):
Default to utf-8 instead of latin-1.

* lisp/mail/sendmail.el (default-sendmail-coding-system): Ditto.

* lisp/mh-e/mh-comp.el (mh-send-letter): Ditto.

4 years agoFix toggle-frame-fullscreen on w32 builds
Martin Rudalics [Fri, 11 Sep 2020 20:04:20 +0000 (16:04 -0400)]
Fix toggle-frame-fullscreen on w32 builds

* src/w32term.c (w32_read_socket): Set 'fullscreen' to 'maximized'
if Windows sends SIZE_MAXIMIZED and either the top or the left of
the frame is outside the screen.  (Bug#25542)

4 years agoFurther diff-no-select doc string clarification
Lars Ingebrigtsen [Sat, 12 Sep 2020 11:06:35 +0000 (13:06 +0200)]
Further diff-no-select doc string clarification

* lisp/vc/diff.el (diff-no-select): Doc string clarification.

4 years agoAvoid unneeded recentering when header-line is used
Eli Zaretskii [Sat, 12 Sep 2020 08:06:54 +0000 (11:06 +0300)]
Avoid unneeded recentering when header-line is used

* src/xdisp.c (try_window): Account for header-line height only in
the scroll-margin at the window's top, but not at its bottom.
(Bug#42653)

4 years agoMove dired-jump from dired-x to dired (Bug#21981)
Stefan Kangas [Sat, 12 Sep 2020 01:42:37 +0000 (03:42 +0200)]
Move dired-jump from dired-x to dired (Bug#21981)

* lisp/dired-x.el (dired-bind-jump): Change into defvar and make
obsolete.
(dired-extra-startup): Doc fix.
(dired-jump, dired-jump-other-window): Move from here...
* lisp/dired.el (dired-jump, dired-jump-other-window): ...to here.

* lisp/bindings.el (ctl-x-map, ctl-x-4-map): Bind 'C-j' to
'dired-jump' and 'dired-jump-other-window'.

* doc/misc/dired-x.texi (Features, Installation)
(Miscellaneous Commands): Remove documentation of 'dired-jump'.
* doc/emacs/dired.texi (Dired Enter): Document 'dired-jump' and
dired-jump-other-window.
* etc/NEWS: Announce the above changes.

* test/lisp/dired-tests.el (dired-autoload): Adjust test.

4 years agoAdd some eshell completion patterns
Stefan Kangas [Fri, 11 Sep 2020 20:04:24 +0000 (22:04 +0200)]
Add some eshell completion patterns

* lisp/eshell/em-cmpl.el (eshell-command-completions-alist):
Add 'gunzip', 'bunzip2' and 'unxz'.

4 years agoRemove cedet items obsolete since 23.2
Stefan Kangas [Fri, 14 Aug 2020 11:40:29 +0000 (13:40 +0200)]
Remove cedet items obsolete since 23.2

* lisp/cedet/semantic.el (semantic-toplevel-bovine-table)
(semantic-toplevel-bovine-cache)
(semantic-before-toplevel-bovination-hook)
(semantic-after-toplevel-bovinate-hook, semantic-init-hooks)
(semantic-init-mode-hooks, semantic-init-db-hooks)
(semantic-bovination-working-type, semantic-bovinate-toplevel)
(semantic-bovinate-region-until-error)
(semantic-bovinate-from-nonterminal-full):
* lisp/cedet/semantic/db-mode.el (semanticdb-mode-hooks):
* lisp/cedet/semantic/decorate/mode.el
(semantic-decorate-pending-decoration-hooks):
* lisp/cedet/semantic/edit.el
(semantic-edits-incremental-reparse-failed-hooks):
* lisp/cedet/semantic/fw.el (define-mode-overload-implementation):
* lisp/cedet/semantic/idle.el
(semantic-before-idle-scheduler-reparse-hooks)
(semantic-after-idle-scheduler-reparse-hooks):
(semantic-eldoc-current-symbol-info)
* lisp/cedet/semantic/imenu.el (semantic-imenu-expand-type-parts)
(semantic-imenu-bucketize-type-parts)
(semantic-imenu-expandable-token):
* lisp/cedet/semantic/java.el
(semantic-java-prototype-nonterminal):
* lisp/cedet/semantic/lex.el (semantic-flex-token-start)
(semantic-flex-token-end, semantic-flex-token-text)
(semantic-flex-make-keyword-table, semantic-flex-keyword-p)
(semantic-flex-keyword-put, semantic-flex-keyword-get)
(semantic-flex-map-keywords, semantic-flex-keywords)
(semantic-flex-buffer, semantic-flex-list, semantic-flex):
* lisp/cedet/semantic/tag-file.el (semantic-find-nonterminal)
(semantic-find-dependency):
* lisp/cedet/semantic/tag-ls.el (semantic-nonterminal-full-name)
(semantic-nonterminal-protection, semantic-nonterminal-abstract)
(semantic-nonterminal-leaf):
* lisp/cedet/semantic/tag.el (semantic-token-type-parent)
(semantic-tag-make-assoc-list, semantic-expand-nonterminal):
* lisp/cedet/semantic/util.el (semantic-file-token-stream)
(semantic-something-to-stream):
* lisp/cedet/semantic/wisent.el (wisent-lex-make-token-table):
Delete many items obsolete since Emacs 23.2.
* lisp/cedet/semantic.el (semantic--set-buffer-cache)
(semantic-fetch-tags): Don't run removed hooks
'semantic-after-toplevel-bovinate-hook' and
'semantic-before-toplevel-bovination-hook'.
* lisp/cedet/semantic/bovine/el.el: Remove reference to obsolete
variable 'define-mode-overload-implementation'.
* lisp/cedet/semantic/doc.el (semantic-doc-snarf-comment-for-tag):
Don't bind removed variable 'semantic-ignore-comments'.
* lisp/cedet/semantic/fw.el (semantic-overload-symbol-from-function)
(semantic-alias-obsolete, semantic-varalias-obsolete): Declare
obsolete in favor of standard Emacs 'define-obsolete-*-alias'.
* lisp/cedet/semantic/grammar.el (semantic-grammar-ASSOC): Don't
use obsolete names.
* lisp/cedet/semantic/tag-ls.el (semantic-tag-full-package)
(semantic-tag-full-name): Doc fixes.
* lisp/cedet/semantic/util.el (semantic-describe-buffer): Don't bind
removed variable 'semantic-after-toplevel-bovinate-hook'.
* lisp/cedet/semantic/lex.el (semantic-flex-tokens)
(semantic-flex-unterminated-syntax-end-function)
(semantic-flex-extensions, semantic-flex-syntax-modifications)
(semantic-ignore-comments, semantic-flex-enable-newlines)
(semantic-flex-enable-whitespace, semantic-flex-enable-bol)
(semantic-number-expression, semantic-flex-depth): Make unused
variables obsolete.
; * etc/NEWS: List removed items.

4 years agoGuard against faulty flow-filled emails
Lars Ingebrigtsen [Fri, 11 Sep 2020 14:45:12 +0000 (16:45 +0200)]
Guard against faulty flow-filled emails

* lisp/mail/flow-fill.el (fill-flowed): Don't bug out if there's a
space at the end of the buffer.  This is probably not allowed in
the flow-fill specification, but has been observed in the wild.

4 years agoCC Mode: Fix minor bugs in the string handling functions
Alan Mackenzie [Fri, 11 Sep 2020 14:18:43 +0000 (14:18 +0000)]
CC Mode: Fix minor bugs in the string handling functions

These sometimes gave rise to the tail of a buffer being "stringed out".

* lixp/progmodes/cc-defs.el (c-will-be-unescaped): New macro.

* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings): Fix bugs in the handling of string
fence syntax-table text properties.

4 years agoImprove help-echo of Undo and Redo menu items
Eli Zaretskii [Fri, 11 Sep 2020 14:13:44 +0000 (17:13 +0300)]
Improve help-echo of Undo and Redo menu items

* lisp/menu-bar.el (undo-redo, undo): Improve the wording of
help-echo strings.

4 years agoTweak previous mailcap patch (for external viewers)
Lars Ingebrigtsen [Fri, 11 Sep 2020 13:36:55 +0000 (15:36 +0200)]
Tweak previous mailcap patch (for external viewers)

* lisp/net/mailcap.el (mailcap-view-mime): Delete contents of the
buffer in the external case, too.

4 years agoD-Bus: Implement other compound types of properties
Michael Albinus [Fri, 11 Sep 2020 13:34:33 +0000 (15:34 +0200)]
D-Bus: Implement other compound types of properties

* doc/misc/dbus.texi (Errors and Events):
* etc/NEWS: Mention dbus-show-dbus-errors.

* lisp/net/dbus.el (dbus-compound-types): New defconst.
(dbus): New defgroup.
(dbus-show-dbus-errors): New defcustom.
(dbus-ignore-errors): Use it.
(dbus-set-property): Simplify.
(dbus-property-handler): Implement other compound types of properties.

* test/lisp/net/dbus-tests.el (dbus--test-register-service)
(dbus-test05-register-property): Extend tests.

4 years agoFix up eldef shortening of the minibuffer
Lars Ingebrigtsen [Fri, 11 Sep 2020 12:52:25 +0000 (14:52 +0200)]
Fix up eldef shortening of the minibuffer

* lisp/minibuf-eldef.el (minibuffer-default--in-prompt-regexps):
Don't include the ": " bit in the portion to be replaced
(bug#12443).

4 years agoImprove diff-no-select doc string
Lars Ingebrigtsen [Fri, 11 Sep 2020 12:26:15 +0000 (14:26 +0200)]
Improve diff-no-select doc string

* lisp/vc/diff.el (diff-no-select): Improve the doc string somewhat.

4 years agoFix viewing PDFs from eww with external viewers
Lars Ingebrigtsen [Fri, 11 Sep 2020 12:06:02 +0000 (14:06 +0200)]
Fix viewing PDFs from eww with external viewers

* lisp/net/mailcap.el (mailcap-view-mime): Most MIME viewers can't
take input on stdin (and in any case, "-" is not how many of them
designate stdin) (bug#43318).  So rewrite to put the data on a
file and feed the file name to the viewer.

4 years agoCalc: regularise test names
Mattias Engdegård [Fri, 11 Sep 2020 11:11:43 +0000 (13:11 +0200)]
Calc: regularise test names

* test/lisp/calc/calc-tests.el (calc-remove-units, calc-extract-units)
(calc-convert-units, calc-bug-23889, calc-trig, calc-format-radix)
(calc-calendar, calc-solve-linear-system):
Use a uniform naming convention (calc- prefix) to simplify test running.

4 years agoSimplify big integer constants in Calc
Mattias Engdegård [Fri, 11 Sep 2020 11:02:59 +0000 (13:02 +0200)]
Simplify big integer constants in Calc

* lisp/calc/calc-comb.el (math-small-factorial-table):
* lisp/calc/calc-funcs.el (math-bernoulli-b-cache):
* lisp/calc/calc.el (math-2-word-size, math-half-2-word-size):
No need for math-read-number-simple.

4 years agoFix calc tests when running noninteractively
Mattias Engdegård [Fri, 11 Sep 2020 10:54:00 +0000 (12:54 +0200)]
Fix calc tests when running noninteractively

This error was introduced in 8e1376a39125c3ffc0484077b502444d853eca79.

* lisp/calc/calc.el (calc--header-line): Prevent size from being negative.

4 years ago* lisp/simple.el (undo-redo): Doc fix.
Eli Zaretskii [Fri, 11 Sep 2020 05:56:51 +0000 (08:56 +0300)]
* lisp/simple.el (undo-redo): Doc fix.

4 years agoAllow an info structure as argument for gnus-group-get-parameter
Andrew G Cohen [Fri, 11 Sep 2020 02:31:47 +0000 (10:31 +0800)]
Allow an info structure as argument for gnus-group-get-parameter

* lisp/gnus/gnus.el (gnus-group-get-parameter): Allow the group
argument to be either a group name or a group info structure. This is
then parallel to gnus-group-set-parameter.

4 years ago* lisp/loadup.el ("button"): Move to after loaddefs.el
Stefan Monnier [Fri, 11 Sep 2020 02:10:02 +0000 (22:10 -0400)]
* lisp/loadup.el ("button"): Move to after loaddefs.el

4 years agoClean up group-finding in Gnus nnir search
Andrew G Cohen [Fri, 11 Sep 2020 01:02:09 +0000 (09:02 +0800)]
Clean up group-finding in Gnus nnir search

This is part of removing code from nnir.el that isn't related to
searching backends and therefore belongs somewhere else.

* lisp/gnus/gnus-group.el (gnus-group-make-search-group)
(gnus-group-read-ephemeral-search-group): Put the logic for
determining the groups to search here, rather than in nnir. Improve
documentation.
* lisp/gnus/gnus-int.el (gnus-server-get-active): Renamed from
'nnir-get-active.
* lisp/gnus/nnir.el (nnir-run-imap, nnir-run-find-grep): Use it.
(nnir-get-active): Remove.
(nnir-make-specs): Make obsolete.
* lisp/gnus/nnselect.el (nnselect-group-server):  Make obsolete in
favor of 'gnus-group-server.