]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years ago; * doc/lispref/searching.texi (Search and Replace): Rephrase
Mattias Engdegård [Mon, 28 Sep 2020 10:04:10 +0000 (12:04 +0200)]
; * doc/lispref/searching.texi (Search and Replace): Rephrase

4 years agoFix pcomplete completion of things like `xargs` and `sudo` (bug#16197)
Stefan Monnier [Mon, 28 Sep 2020 02:07:14 +0000 (22:07 -0400)]
Fix pcomplete completion of things like `xargs` and `sudo` (bug#16197)

* lisp/pcmpl-unix.el (pcomplete/xargs): Don't `pcomplete-this` around
`pcomplete-command-completion-function`.
(pcomplete/sudo): Make it an alias for `pcomplete/xargs`.

* lisp/shell.el (shell-command-completion-function): Return the
names from `exec-path` when the command name has no `/`.

4 years agoDocument D-Bus monitoring
Michael Albinus [Sun, 27 Sep 2020 16:59:04 +0000 (18:59 +0200)]
Document D-Bus monitoring

* doc/misc/dbus.texi: Replace "symbol" by "keyword" where appropriate.
(Alternative Buses): Adapt dbus-init-bus description.
(Errors and Events): Adapt dbus-event structure.  New defuns
dbus-event-destination-name, dbus-event-handler and dbus-event-arguments.
(Monitoring Events): New node.

* lisp/net/dbus.el: Replace "symbol" by "keyword" where appropriate.
(cl-lib): Require.
(dbus-register-monitor): Adapt the argument list.
(dbus-monitor-handler): Extend.
(dbus-init-bus): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types):
Skip if needed.  Extend test.

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 27 Sep 2020 16:37:10 +0000 (09:37 -0700)]
Merge from origin/emacs-27

0b78785a9b (origin/emacs-27) Minor copyedits in the Emacs user manual
0dfc6fdc1f Followup to a recent change in menu-bar.el
767713682c Enable "Continue Tags Search" menu item only when it can b...
4bb7532163 Fix soap-client URL

4 years ago; Merge from origin/emacs-27
Glenn Morris [Sun, 27 Sep 2020 16:37:10 +0000 (09:37 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

cc7f971485 Fix out-of-source ‘make check’ emacs-module-tests

4 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 27 Sep 2020 16:37:10 +0000 (09:37 -0700)]
Merge from origin/emacs-27

f31c6792ab Fix support for Zip64 zip files
ba635a19fb * lisp/hi-lock.el (hi-lock-auto-select-face): Doc fix.  (B...
cc8fef2bdd Avoid infinite recursion with 'relative' line numbers display
395f10cb98 ; Fix more trivial typos
bf4accb65e ; Fix some trivial typos

# Conflicts:
# etc/NEWS
# lisp/arc-mode.el

4 years agoFix more single-byte accesses caused by bytepos/charpos confusion
Pip Cet [Sun, 27 Sep 2020 15:40:07 +0000 (17:40 +0200)]
Fix more single-byte accesses caused by bytepos/charpos confusion

* src/cmds.c (internal_self_insert): Use FETCH_BYTE, not
FETCH_CHAR, for a decremented byte position (bug#41520).

* src/xdisp.c (Fwindow_text_pixel_size, trailing_whitespace_p): Ditto.

4 years agoHandle single-argument `apply' consistently (bug#40968)
Pip Cet [Sun, 27 Sep 2020 14:59:00 +0000 (16:59 +0200)]
Handle single-argument `apply' consistently (bug#40968)

* src/eval.c (Fapply): Handle (apply nil) without crashing.
Document single-argument form.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-apply): Don't attempt
to optimize single-argument apply.
* doc/lispref/functions.texi (Calling Functions): Document
single-argument apply.  Provide example (bug#40968).

4 years agoAvoid 1s sleep-for before sending the startfile to a comint process
Pip Cet [Sun, 27 Sep 2020 13:07:34 +0000 (15:07 +0200)]
Avoid 1s sleep-for before sending the startfile to a comint process

* lisp/comint.el (comint-exec): Simplify startup file code.
(Bug#41640).

4 years ago; * doc/emacs/building.texi (Grep Searching): Fix a typo.
Eli Zaretskii [Sun, 27 Sep 2020 13:00:39 +0000 (16:00 +0300)]
; * doc/emacs/building.texi (Grep Searching): Fix a typo.

4 years agoAdd a new grep-match-regexp variable
Simon Lang [Sun, 27 Sep 2020 12:55:22 +0000 (14:55 +0200)]
Add a new grep-match-regexp variable

* doc/emacs/building.texi (Grep Searching): Document it.

* lisp/progmodes/grep.el (grep-match-regexp): New variable (bug#41766).
(grep-filter): Use it.

4 years agoMinor string-search optimisations (bug#43598)
Mattias Engdegård [Sun, 27 Sep 2020 12:28:07 +0000 (14:28 +0200)]
Minor string-search optimisations (bug#43598)

* src/fns.c (Fstring_search): Perform cheap all-ASCII checks before more
expensive ones.  Use a faster loop when searching for non-ASCII
non-raw bytes.
* test/src/fns-tests.el (string-search): Add more test cases.

4 years agoImprove accuracy in string-replace description (bug#43598)
Mattias Engdegård [Sun, 27 Sep 2020 12:24:36 +0000 (14:24 +0200)]
Improve accuracy in string-replace description (bug#43598)

* doc/lispref/searching.texi (Search and Replace): More careful
description; string-replace does not necessarily return a copy.

4 years ago; * test/lisp/subr-tests.el (string-replace): Add more test cases
Mattias Engdegård [Sun, 27 Sep 2020 11:32:27 +0000 (13:32 +0200)]
; * test/lisp/subr-tests.el (string-replace): Add more test cases

4 years agoMinor copyedits in the Emacs user manual
Eli Zaretskii [Sun, 27 Sep 2020 06:09:27 +0000 (09:09 +0300)]
Minor copyedits in the Emacs user manual

* doc/emacs/emacs.texi (Top): Remove "real-time" from the Emacs
description; add "advanced", to be consistent with what we say in
the Introduction section.  (Bug#43633)

4 years agoImprove documentation of the 'abbrev-suggest' feature
Eli Zaretskii [Sun, 27 Sep 2020 05:57:17 +0000 (08:57 +0300)]
Improve documentation of the 'abbrev-suggest' feature

* lisp/abbrev.el (abbrev-suggest, abbrev-suggest-hint-threshold)
(abbrev-suggest-show-report): Improve wording of the doc strings.

* doc/emacs/abbrevs.texi (Abbrevs Suggestions): Fix the typo in
the node name.  Improve wording.
* doc/emacs/emacs.texi (Top): Add the new node in the @detailmenu
section.

* etc/NEWS: Improve wording of the NEWS entry for
'abbrev-suggest'.

4 years agoImprove display of raw bytes in the echo-area
Eli Zaretskii [Sun, 27 Sep 2020 05:26:56 +0000 (08:26 +0300)]
Improve display of raw bytes in the echo-area

* src/print.c (print_object): When printing a unibyte string,
convert non-ASCII bytes to their character code, before sending
them to 'printchar'.  (Bug#43632)

4 years agoFix searching for multibyte needles in unibyte haystacks
Lars Ingebrigtsen [Sun, 27 Sep 2020 00:01:03 +0000 (02:01 +0200)]
Fix searching for multibyte needles in unibyte haystacks

* src/fns.c (Fstring_search): Make this work better when searching
unibyte haystacks for multibyte needles (bug#43598).

4 years agoMake dired-replace-in-string obsolete
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:50:39 +0000 (00:50 +0200)]
Make dired-replace-in-string obsolete

* lisp/dired.el (dired-insert-directory):
* lisp/dired-aux.el (dired-rename-subdir, dired-rename-subdir-2)
(dired-insert-subdir): Adjust callers.

* lisp/dired.el (dired-replace-in-string): Make obsolete.

4 years agoAdd tiny optimization for string-search
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:35:11 +0000 (00:35 +0200)]
Add tiny optimization for string-search

* src/fns.c (Fstring_search): Add tiny optimization for needles
that are longer than the haystack (bug#43598).

4 years agoRename replace-in-string to string-replace
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:24:50 +0000 (00:24 +0200)]
Rename replace-in-string to string-replace

* doc/lispref/searching.texi (Search and Replace): Update.
* lisp/bindings.el (mode-line-position): Update callers.

* lisp/subr.el (string-replace): Rename from replace-in-string
since that clashes with XEmacs' replace-in-string which is
equivalent to the Emacs replace-regexp-in-string (bug#43598).

4 years agoFix gnus-faq example
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:20:03 +0000 (00:20 +0200)]
Fix gnus-faq example

* doc/misc/gnus-faq.texi (FAQ 6-2): replace-in-string was the XEmacs
name for the function.

4 years agoSlight replace-in-string optimization
Lars Ingebrigtsen [Sat, 26 Sep 2020 22:17:58 +0000 (00:17 +0200)]
Slight replace-in-string optimization

* lisp/subr.el (replace-in-string): Optimize to return the
original string if nothing was replaced (bug#43598).

4 years agoAbbrev suggestions helps users remember to use defined abbrevs
Mathias Dahl [Sat, 26 Sep 2020 19:03:58 +0000 (15:03 -0400)]
Abbrev suggestions helps users remember to use defined abbrevs

    * lisp/abbrev.el (abbrev-suggest): New defcustom.
    (abbrev-suggest-hint-threshold): New defcustom.
    (abbrev--suggest-get-active-tables-including-parents): New defun.
    (abbrev--suggest-get-active-abbrev-expansions): New defun.
    (abbrev--suggest-count-words): New defun.
    (abbrev--suggest-get-previous-words): New defun.
    (abbrev--suggest-above-threshold): New defun.
    (abbrev--suggest-saved-recommendations): New defvar.
    (abbrev--suggest-inform-user): New defun.
    (abbrev--suggest-shortest-abbrev): New defun.
    (abbrev--suggest-maybe-suggest): New defun.
    (abbrev--suggest-get-totals): New defun.
    (abbrev-suggest-show-report): New defun.
    (expand-abbrev): If the previous word was not an abbrev, maybe
    suggest an abbrev to the user.
    * doc/emacs/abbrevs.texi (Abbrev suggestions): New section.
    * etc/NEWS: Announce abbrev suggestions.

4 years agoFix the patch tagging in submit-emacs-patch
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:38:38 +0000 (17:38 +0200)]
Fix the patch tagging in submit-emacs-patch

* lisp/mail/emacsbug.el (submit-emacs-patch): Put the tags in the
debbugs pseudo-headers because X-Debbugs-Tags is not a thing that
exists.

4 years agoFollowup to a recent change in menu-bar.el
Eli Zaretskii [Sat, 26 Sep 2020 15:35:00 +0000 (18:35 +0300)]
Followup to a recent change in menu-bar.el

* lisp/fileloop.el (fileloop--operate-function): Mention in a
comment that menu-bar.el relies on the default value.

4 years agomessage-add-action doc string fix
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:33:08 +0000 (17:33 +0200)]
message-add-action doc string fix

* lisp/gnus/message.el (message-add-action): Document types.

4 years agoDisplay some character widget values in a more user-friendly way
Mauro Aranda [Sat, 26 Sep 2020 15:09:22 +0000 (17:09 +0200)]
Display some character widget values in a more user-friendly way

* lisp/wid-edit.el (widget-character--escape-sequences-alist): New
variable.
(widget-character--change-character-display): New function.  Use the new
variable.
(widget-character-notify): New function, to keep track of the changes
in the character widget, and display characters like tab,
newline and spaces better.
(character widget): Use widget-character-notify as the notify
function.  Use widget-character--change-character-display for the
internal representation of value (bug#15925).

4 years agoMake macroexpand of `push' slightly less confusing
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:05:17 +0000 (17:05 +0200)]
Make macroexpand of `push' slightly less confusing

* lisp/subr.el (push): Use a symbol with a different name to make
macroexpand look slightly less confusing (bug#43601).

4 years agoFix defcustom types of some variables defined in C
Lars Ingebrigtsen [Sat, 26 Sep 2020 15:02:52 +0000 (17:02 +0200)]
Fix defcustom types of some variables defined in C

* lisp/cus-start.el (standard): Fix the defcustom type of a number
of variables defined in C (bug#43611).

4 years agoFix mouse highlighting in Customize buffers
Lars Ingebrigtsen [Sat, 26 Sep 2020 14:36:31 +0000 (16:36 +0200)]
Fix mouse highlighting in Customize buffers

* lisp/wid-edit.el (widget-button-click): Remove a
newly-introduced check that made mouse highlights no longer work
(bug#43612).  It's unclear what the check was trying to fix.

4 years agocperl-mode: Delete conditional code where conditions evaluate to nil
Harald Jörg [Sat, 26 Sep 2020 13:51:15 +0000 (15:51 +0200)]
cperl-mode: Delete conditional code where conditions evaluate to nil

* lisp/progmodes/cperl-mode.el (cperl-force-face): This
macro's single effect is now inlined, and the macro is gone.
(cperl-problems): The reference to choose-color.el, which
is no longer available for download, is deleted.
(no function): A list of unnecessary empty variable
definitions is gone.  They were needed for Emacs v19 and
below.
(cperl-init-faces-weak): This function does no longer do
anything and is therefore deleted.
(cperl-init-faces): Some bodies of conditional code is deleted
because as of today the conditions evaluate to constants.  The
face cperl-nonoverridable-face is no longer available as
variable and needs to be doubly-quoted in one place (bug#43622).

4 years agoSilence some byte-compiler warnings
Stefan Kangas [Sat, 26 Sep 2020 09:34:20 +0000 (11:34 +0200)]
Silence some byte-compiler warnings

* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
* test/lisp/custom-tests.el (cus-test-opts):
* test/lisp/help-fns-tests.el (foo-test-map)
(help-fns-test--describe-keymap-foo):
* test/src/fns-tests.el (w32-collate-ignore-punctuation)
(fns-tests-func-arity): Silence byte-compiler warnings.

4 years agoRepurpose libxml test for obsolete argument
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.

4 years ago* etc/NEWS: Add new D-Bus monitor functionality. Fix typos.
Michael Albinus [Sat, 26 Sep 2020 09:38:53 +0000 (11:38 +0200)]
* etc/NEWS: Add new D-Bus monitor functionality.  Fix typos.

4 years agoAdd D-Bus monitor
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.

4 years agoEnable "Continue Tags Search" menu item only when it can be used
Eli Zaretskii [Sat, 26 Sep 2020 08:50:15 +0000 (11:50 +0300)]
Enable "Continue Tags Search" menu item only when it can be used

* lisp/menu-bar.el (menu-bar-search-menu) <tags-continue>: Enable
only when there was a previous tags search.  (Bug#43569)
(menu-bar-replace-menu) <tags-repl-continue>: Enable only when
there was a previous tags-replace.

4 years agoFix byte-compiler warning in CEDET
Stefan Kangas [Sat, 26 Sep 2020 08:50:12 +0000 (10:50 +0200)]
Fix byte-compiler warning in CEDET

* lisp/cedet/semantic/lex.el (semantic-lex-catch-errors): Fix
byte-compiler warning by removing obsolete variable.

4 years agoFix soap-client URL
Paul Eggert [Sat, 26 Sep 2020 07:31:17 +0000 (00:31 -0700)]
Fix soap-client URL

* lisp/net/soap-client.el (soap-create-envelope):
Fix URL that I broke in 2019-09-23T06:53:30Z!eggert@cs.ucla.edu.
Problem reported by Thomas Fitzsimmons.

4 years agosoap-client.el: Prevent some invalid encoding warnings
Thomas Fitzsimmons [Sat, 26 Sep 2020 02:57:25 +0000 (22:57 -0400)]
soap-client.el: Prevent some invalid encoding warnings

* lisp/net/soap-client.el (soap-encode-xs-complex-type): Do not
warn about missing non-nillable slot if type iself is optional.

4 years agoFix out-of-tree make check
Glenn Morris [Fri, 25 Sep 2020 18:01:14 +0000 (11:01 -0700)]
Fix out-of-tree make check

* test/lisp/custom-tests.el (custom-test-admin-cus-test): New const.
(check-for-wrong-custom-types): Use it.

4 years agoFix out-of-source ‘make check’ emacs-module-tests
Paul Eggert [Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)]
Fix out-of-source ‘make check’ emacs-module-tests

Problem reported by Koki Fukuda in:
https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
* test/Makefile.in (MODULE_CFLAGS):
Include from the same directories included from in ../src.
* test/src/emacs-module-tests.el (module/describe-function-1):
Strip path to source directory.

(cherry picked from commit c86f3fe0d023cdd25edbbce91c5b32654f2b734e)

4 years agoTidy up NS color handling
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.

4 years agoRemove obsolete macOS support for NS font backend
Alan Third [Fri, 25 Sep 2020 13:32:56 +0000 (14:32 +0100)]
Remove obsolete macOS support for NS font backend

The ns font backend is has been disabled on macOS for a long time and
doesn't work correctly even if re-enabled.

* src/nsfont.m:
(ns_char_width):
(ns_ascii_average_width):
(ns_get_covering_families):
(nsfont_open):
(nsfont_close):
(nsfont_draw):
(ns_uni_to_glyphs):
(ns_glyph_metrics):
(EmacsGlyphStorage): Remove all Cocoa only code.
* src/nsterm.h (EmacsGlyphStorage): Remove.
(struct nsfont_info): Make GNUstep only.
* src/nsterm.m (ns_compute_glyph_string_overhangs): Remove GNUstep
only code from Cocoa builds.

4 years agoImplement internal border colors on NS (bug#41071)
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.

4 years agostring-search robustness and documentation improvement (bug#43598)
Mattias Engdegård [Fri, 25 Sep 2020 15:00:17 +0000 (17:00 +0200)]
string-search robustness and documentation improvement (bug#43598)

* src/fns.c (Fstring_search): Check START-POS argument range.
Simplify logic.  Improve doc string.
* test/src/fns-tests.el (string-search): Add test cases.
* doc/lispref/strings.texi (Text Comparison): Elaborate.
* lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.

4 years agoFix support for Zip64 zip files
Eli Zaretskii [Fri, 25 Sep 2020 14:11:11 +0000 (17:11 +0300)]
Fix support for Zip64 zip files

* lisp/arc-mode.el (archive-zip-summarize): Fix detection of Zip64
central directory.  Support 64-bit file size field used by Zip64.
(Bug#43597)

4 years ago* CONTRIBUTE: Don't recommend action stamps
Noam Postavsky [Fri, 25 Sep 2020 14:10:56 +0000 (16:10 +0200)]
* CONTRIBUTE: Don't recommend action stamps

* CONTRIBUTE: Remove mention of the "action stamp" thing (bug#20609).

4 years agoPartially revert previous prolog.el cleanup
Lars Ingebrigtsen [Fri, 25 Sep 2020 14:06:35 +0000 (16:06 +0200)]
Partially revert previous prolog.el cleanup

* lisp/progmodes/prolog.el (prolog-font-lock-keywords): Partially
revert previous patch -- we want the prolog-warning-face symbol,
not its value.

4 years agoFix defcustom type in sql.el for sql-postgres-login-params
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:42:35 +0000 (15:42 +0200)]
Fix defcustom type in sql.el for sql-postgres-login-params

* lisp/progmodes/sql.el (sql-login-params): Fix defcustom type to
match sql-postgres-login-params value.

4 years agoFix a defcustom type in gdb-mi.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:38:53 +0000 (15:38 +0200)]
Fix a defcustom type in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-display-source-buffer-action): Fix
defcustom type to match the value.

4 years agoFix defcustom type in whitespace.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:35:23 +0000 (15:35 +0200)]
Fix defcustom type in whitespace.el

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

4 years agoFix the defcustom type fix in python.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:17:36 +0000 (15:17 +0200)]
Fix the defcustom type fix in python.el

* lisp/progmodes/python.el (python-pdbtrack-exit-command): Fix
defcustom type (bug#30990).

4 years agoFix some defcustom types
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:15:21 +0000 (15:15 +0200)]
Fix some defcustom types

* lisp/whitespace.el (whitespace-style):
* lisp/gnus/message.el (message-screenshot-command):
* lisp/progmodes/compile.el (compilation-transform-file-match-alist):
* lisp/progmodes/gdb-mi.el (gdb-default-window-configuration-file):
* lisp/progmodes/python.el (python-pdbtrack-exit-command): Fix the
defcustom types.
* lisp/progmodes/sql.el (sql-password-wallet): Fix the value.

4 years agoAdd an expensive test for defcustom types
Lars Ingebrigtsen [Fri, 25 Sep 2020 12:46:36 +0000 (14:46 +0200)]
Add an expensive test for defcustom types

* admin/cus-test.el (cus-test-opts): Return the tests.

* test/lisp/custom-tests.el (check-for-wrong-custom-types): Test
custom types (bug#30990).

4 years agoMark string-search as being side effect free
Lars Ingebrigtsen [Fri, 25 Sep 2020 12:30:13 +0000 (14:30 +0200)]
Mark string-search as being side effect free

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add
string-search.

4 years agoMake the Man completion code work better if man -k fails
Noam Postavsky [Fri, 25 Sep 2020 11:39:24 +0000 (13:39 +0200)]
Make the Man completion code work better if man -k fails

* lisp/man.el (Man-completion-table): Check the return code for
"man -k" and assume it failed if there's a non-zero exit code
(bug#16722).

4 years agoUse the char history in zap-up-to-char
Tino Calancha [Fri, 25 Sep 2020 11:25:08 +0000 (13:25 +0200)]
Use the char history in zap-up-to-char

* lisp/misc.el (zap-up-to-char): Use read-char-from-minibuffer
(bug#39154).

4 years agoFix replace-in-string infloop with empty pattern string (bug#43598)
Mattias Engdegård [Fri, 25 Sep 2020 11:15:42 +0000 (13:15 +0200)]
Fix replace-in-string infloop with empty pattern string (bug#43598)

* lisp/subr.el (replace-in-string): Raise an error if FROMSTRING is
empty.
* test/lisp/subr-tests.el (replace-in-string): Add test case.

4 years agoTweak updating the process mark in set-process-buffer
Lars Ingebrigtsen [Fri, 25 Sep 2020 09:47:59 +0000 (11:47 +0200)]
Tweak updating the process mark in set-process-buffer

* src/process.c (Fset_process_buffer): Only update the process
mark if we actually change the buffer.

4 years ago* lisp/hi-lock.el (hi-lock-auto-select-face): Doc fix. (Bug#43600)
Eli Zaretskii [Fri, 25 Sep 2020 09:41:54 +0000 (12:41 +0300)]
* lisp/hi-lock.el (hi-lock-auto-select-face): Doc fix.  (Bug#43600)

4 years agoRemove more compat code from prolog.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 09:37:45 +0000 (11:37 +0200)]
Remove more compat code from prolog.el

* lisp/progmodes/prolog.el (prolog-font-lock-keywords): Remove
compat test for a face that's always defined.

4 years agoAvoid infinite recursion with 'relative' line numbers display
Eli Zaretskii [Fri, 25 Sep 2020 08:55:51 +0000 (11:55 +0300)]
Avoid infinite recursion with 'relative' line numbers display

* src/xdisp.c (display_count_lines_visually): Bind
'display-line-numbers' to 'relative' around 'start_display' as
well, since that can invoke 'move_it_to' internally, thus
causing infinite recursion.  (Bug#43589)

4 years ago* lisp/progmodes/ruby-mode.el (ruby-use-smie): Declare obsolete
Stefan Monnier [Fri, 25 Sep 2020 03:02:06 +0000 (23:02 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-use-smie): Declare obsolete

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

4 years agoRemove some XEmacs compat code from prolog.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 01:46:59 +0000 (03:46 +0200)]
Remove some XEmacs compat code from prolog.el

* lisp/progmodes/prolog.el (prolog-replace-in-string): Remove XEmacs
compat code and make obsolete.
(prolog-guess-fill-prefix): Adjust callers.
(prolog-uncomment-region): Make obsolete.
(prolog-mode-syntax-table): syntax-propertize-rules is always defined.
(prolog-syntax-propertize-function): Ditto.
(prolog-face-name-p): Make into obsolete alias.
(prolog-font-lock-keywords): Adjust callers.

4 years agoClean up replace-in-string slightly
Lars Ingebrigtsen [Fri, 25 Sep 2020 00:27:01 +0000 (02:27 +0200)]
Clean up replace-in-string slightly

* lisp/subr.el (replace-in-string): Clean up previous fix slightly.

4 years agoFix previous replace-in-string rewrite
Lars Ingebrigtsen [Fri, 25 Sep 2020 00:07:05 +0000 (02:07 +0200)]
Fix previous replace-in-string rewrite

* lisp/subr.el (replace-in-string): Fix logic errors in previous
patch.

4 years agoFix replace-in-string multibyteness problems with string-search
Lars Ingebrigtsen [Thu, 24 Sep 2020 23:53:07 +0000 (01:53 +0200)]
Fix replace-in-string multibyteness problems with string-search

* lisp/subr.el (replace-in-string): Simplify by using the new
string-search function (bug#43598).

4 years agoAdd a new function 'string-search'
Lars Ingebrigtsen [Thu, 24 Sep 2020 23:52:10 +0000 (01:52 +0200)]
Add a new function 'string-search'

* doc/lispref/strings.texi (Text Comparison): Document it.
* src/fns.c (Fstring_search): New function.

4 years ago* lisp/help-fns.el (help-fns--first-release): Use etc/NEWS as well
Stefan Monnier [Thu, 24 Sep 2020 22:15:39 +0000 (18:15 -0400)]
* lisp/help-fns.el (help-fns--first-release): Use etc/NEWS as well

4 years agoUpdate a failing lisp test
Glenn Morris [Thu, 24 Sep 2020 18:56:09 +0000 (11:56 -0700)]
Update a failing lisp test

* test/lisp/emacs-lisp/lisp-tests.el (up-list-no-cross-string):
Update for recent "Don't signal scan-error" change.

4 years agoHorizontal scrolling for mouse wheel with Shift modifier (bug#43568)
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.

4 years agoSet mwheel default scroll value to 1 (bug#43380)
Theodor Thornhill [Thu, 24 Sep 2020 18:59:30 +0000 (21:59 +0300)]
Set mwheel default scroll value to 1 (bug#43380)

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

4 years ago* lisp/simple.el (goto-line-read-args): More relevant default line number.
Juri Linkov [Thu, 24 Sep 2020 18:52:22 +0000 (21:52 +0300)]
* lisp/simple.el (goto-line-read-args): More relevant default line number.

4 years agoAdd skip condition for some dbus tests
Glenn Morris [Thu, 24 Sep 2020 18:47:11 +0000 (11:47 -0700)]
Add skip condition for some dbus tests

* test/lisp/net/dbus-tests.el (dbus-test01-type-conversion)
(dbus-test01-basic-types): Add skip for hydra.nixos.org failures.
; Standardize license notice

4 years agoMake set-process-buffer also update the process mark
Lars Ingebrigtsen [Thu, 24 Sep 2020 15:14:25 +0000 (17:14 +0200)]
Make set-process-buffer also update the process mark

* src/process.c (Fset_process_buffer): Update the process mark
(bug#43573).

4 years agoRefactor process mark setting
Lars Ingebrigtsen [Thu, 24 Sep 2020 15:08:30 +0000 (17:08 +0200)]
Refactor process mark setting

* src/process.c (update_process_mark): Make into its own function.
(Fmake_process, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket): Use it.

4 years agoAdd sanity check for Gnus groups that belong to no topic
dickmao [Thu, 24 Sep 2020 14:48:11 +0000 (16:48 +0200)]
Add sanity check for Gnus groups that belong to no topic

* lisp/gnus/gnus-topic.el (gnus-topic-change-level): Do not change
gnus-topic-alist when group is outside "topology" (bug#43582).

4 years agoFix last change in resize_mini_window
Eli Zaretskii [Thu, 24 Sep 2020 14:13:43 +0000 (17:13 +0300)]
Fix last change in resize_mini_window

* src/xdisp.c (resize_mini_window): Prevent recentering the
mini-window once its start position is computed.  (Bug#43572)

4 years agoFix recent simple.el compilation warning
Lars Ingebrigtsen [Thu, 24 Sep 2020 13:50:25 +0000 (15:50 +0200)]
Fix recent simple.el compilation warning

* lisp/simple.el (goto-line-relative): Suppress byte compilation
warning about goto-line.

4 years agoMinor Tramp cleanup
Michael Albinus [Thu, 24 Sep 2020 08:17:03 +0000 (10:17 +0200)]
Minor Tramp cleanup

* doc/misc/tramp.texi: Some stylistic changes.
(Frequently Asked Questions): Mention ProxyCommand and ProxyJump.

* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Fix docstring.

4 years agoWrite Gnus active files with quotes around group names
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.

4 years agoNew command goto-line-relative (bug#5042, bug#9917)
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'.

* doc/emacs/basic.texi (Moving Point):
* doc/emacs/display.texi (Optional Mode Line): Mention goto-line-relative.

4 years agoRemove TODO to convert files to unit tests
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

4 years agoConvert some completion.el tests to ERT
Stefan Kangas [Wed, 23 Sep 2020 17:41:59 +0000 (19:41 +0200)]
Convert some completion.el tests to ERT

* test/lisp/completion-tests.el: New file.
* lisp/completion.el: Move commented out tests to completion-tests.el.

4 years agoConvert allout unit tests to ERT
Stefan Kangas [Wed, 23 Sep 2020 16:14:54 +0000 (18:14 +0200)]
Convert allout unit tests to ERT

* test/lisp/allout-tests.el: New file.
* lisp/allout.el (allout-run-unit-tests-on-load)
(allout-run-unit-tests): Remove.
(allout-tests-obliterate-variable)
(allout-tests-globally-unbound, allout-tests-globally-true)
(allout-tests-locally-true, allout-test-resumptions): Move to
allout-tests.el

* test/lisp/allout-widgets-tests.el: New file.
* lisp/allout-widgets.el (allout-widgets-run-unit-tests-on-load)
(allout-widgets-run-unit-tests): Remove.
(allout-test-range-overlaps): Move to allout-widgets-tests.el.

4 years ago* lisp/repeat.el: Remove obsolete comment.
Stefan Kangas [Wed, 23 Sep 2020 14:22:49 +0000 (16:22 +0200)]
* lisp/repeat.el: Remove obsolete comment.

4 years ago* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Adapt test.
Michael Albinus [Wed, 23 Sep 2020 17:57:03 +0000 (19:57 +0200)]
* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Adapt test.

4 years ago; * lisp/emacs-lisp/lisp.el: rename parameter in last change
Mattias Engdegård [Wed, 23 Sep 2020 16:08:32 +0000 (18:08 +0200)]
; * lisp/emacs-lisp/lisp.el: rename parameter in last change

4 years agoDon't signal scan-error when moving by sexp interactively
Mattias Engdegård [Fri, 18 Sep 2020 10:49:33 +0000 (12:49 +0200)]
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).

4 years agoAllow the newline character in the character widget (Bug#15925)
Mauro Aranda [Wed, 23 Sep 2020 13:45:29 +0000 (15:45 +0200)]
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).

4 years agoImprove mark handling in gnus nnselect
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.

4 years agoHandle escaped comment enders correctly in syntax.c, fixing bug #43558
Alan Mackenzie [Wed, 23 Sep 2020 08:50:11 +0000 (08:50 +0000)]
Handle escaped comment enders correctly in syntax.c, fixing bug #43558

This fixes forward-comment, scan-lists, and parse-partial-sexp.

* src/syntax.c (forw_comment): Detect and skip an escaped comment ender
(e.g. \*/ in C) when comment-end-can-be-escaped is non-nil.

4 years agoRun gnus-parse-headers-hook when retrieving nnselect headers
Andrew G Cohen [Wed, 23 Sep 2020 08:46:36 +0000 (16:46 +0800)]
Run gnus-parse-headers-hook when retrieving nnselect headers

* lisp/gnus/nnselect.el (nnselect-retrieve-headers): Run the
gnus-parse-headers-hook when retrieving headers in nnselect, just like
in a real group.

4 years agotest/src/xdisp-tests.el: New file
Stefan Monnier [Wed, 23 Sep 2020 03:55:45 +0000 (23:55 -0400)]
test/src/xdisp-tests.el: New file

4 years agoUse gnus-extra-headers in nnselect header parsing
Andrew G Cohen [Wed, 23 Sep 2020 00:25:56 +0000 (08:25 +0800)]
Use gnus-extra-headers in nnselect header parsing

* lisp/gnus/nnselect.el (nnselect-retrieve-headers): Bind
nnmail-extra-headers to gnus-extra-headers before parsing retrieved
headers.

4 years agoEnsure that the game directory exists before trying to write to it
Lars Ingebrigtsen [Tue, 22 Sep 2020 15:32:51 +0000 (17:32 +0200)]
Ensure that the game directory exists before trying to write to it

* lisp/play/gamegrid.el (gamegrid-add-score-insecure): Make the
directory if it doesn't exist (bug#37836).

4 years agoMake delete-pair only delete pairs that are part of insert-pair-alist
martin rudalics [Tue, 22 Sep 2020 14:44:15 +0000 (16:44 +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 agoFix off-by-one error in eldoc--handle-docs
Lars Ingebrigtsen [Tue, 22 Sep 2020 14:20:05 +0000 (16:20 +0200)]
Fix off-by-one error in eldoc--handle-docs

* lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): We have one extra
line to use if we don't show the truncation message (bug#43543).

4 years agoSpeed up shr-insert slightly
Lars Ingebrigtsen [Tue, 22 Sep 2020 14:02:37 +0000 (16:02 +0200)]
Speed up shr-insert slightly

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