1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00
Commit Graph

142992 Commits

Author SHA1 Message Date
Michael Albinus
7e45ed3a96 More strict D-Bus type checking
* lisp/net/dbus.el (dbus-register-monitor): Register proper key.
(dbus-monitor-handler): Adapt docstring.  Use grave text-quoting-style.

* src/dbusbind.c (xd_signature, xd_append_arg): More strict tests.
(syms_of_dbusbind): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Extend test.
2020-09-29 19:43:02 +02:00
Lars Ingebrigtsen
7f2c35d028 Fix emacsclient -c foo.txt behaviour with many frames
* lisp/server.el (server-execute): Pass in whether we opened a new
frame or not (bug#43645).
(server-switch-buffer): Use this to switch to the requested buffer
in the new frame if we have "emacsclient -c foo.txt", and retain
the old behaviour if it's "emacsclient foo.txt".
2020-09-29 16:21:17 +02:00
Lars Ingebrigtsen
07f748da43 Make M-x compile skip the header when looking for errors etc
* lisp/progmodes/compile.el (compilation--ensure-parse): Skip the
header when parsing (bug#43651).
(compilation-start): Mark the end.
2020-09-29 15:59:50 +02:00
Lars Ingebrigtsen
da40e5ecd7 Fix space parsing in gnus-base64-repad
* lisp/gnus/gnus-util.el (gnus-base64-repad): Get the separator
regexp right -- there will often be spaces around the newlines.
2020-09-29 15:36:46 +02:00
Mattias Engdegård
511c9d02b7 * lisp/gnus/smime.el (smime-openssl-program): Allow nil value. 2020-09-29 12:33:50 +02:00
Mattias Engdegård
4d57124fc8 Fix custom-tests with non-GNU grep
* admin/cus-test.el (cus-test-get-lisp-files): Add path argument required
by standard grep (BSD, for instance).
2020-09-29 11:24:38 +02:00
Stefan Monnier
9f30a6b1a4 * src/eval.c (Fapply): Simplify last change 2020-09-28 23:14:03 -04:00
Michael Albinus
9f1ca64ffe Improve D-Bus monitor
* lisp/net/dbus.el (dbus-monitor-method-call)
(dbus-monitor-method-return, dbus-monitor-error)
(dbus-monitor-signal): New defconsts.
(dbus-monitor-goto-serial): New defun.
(dbus-monitor-handler): Use them.  Add timestamp.  Make also links
between D-Bus messages with the same serial.
2020-09-28 14:47:46 +02:00
Earl
27e1649977 Suggest region contents in highlight-regexp when region active
* lisp/hi-lock.el (hi-lock-face-buffer): Use the region in the
prompt if the region is active in transient-mark-mode (bug#43641).
2020-09-28 14:16:22 +02:00
Harald Jörg
3a95f4fc12 cperl-mode: Add compatibility for Emacs 26.1
* lisp/progmodes/cperl-mode.el (cperl--time-convert): New
compatibility helper for time-convert (available in Emacs
27.1)
(cperl--format-prompt): New compatibility helper for
format-prompt (available in Emacs 28)
(cperl-info-on-command): use cperl--format-prompt
(cperl-perldoc): use cperl--format-prompt
(cperl-time-fontification): use cperl--time-convert (bug#43652)
2020-09-28 14:13:01 +02:00
Alex Bochannek
eaf224f88d Repad the Face header in Gnus
* lisp/gnus/gnus-fun.el (gnus-convert-face-to-png): Use it.

* lisp/gnus/gnus-util.el (gnus-base64-repad): New function (bug#43441).
2020-09-28 14:09:07 +02:00
Jan Tatarik
232382415d Fix Gnus parsing of weekly recurring icalendar events
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:recurring-interval): Fix parsing of weekly
recurring events (bug#43669).

Example: in the absence of explicit INTERVAL value in the calendar
event, a weekly event with occurrences scheduled for Mondays and
Wednesdays should receive the default recurring interval of "1" and the
org mode timestamp repeater should be "+1w".

Due to a bug in the current code we receive "WEEKLY" and "+WEEKLYw"
instead. The patch fixes the issue.
2020-09-28 13:08:37 +02:00
Mattias Engdegård
fc1e8b3659 ; * etc/NEWS: Put related items together and fix grammar 2020-09-28 12:04:49 +02:00
Mattias Engdegård
f679bcbb39 ; * doc/lispref/searching.texi (Search and Replace): Rephrase 2020-09-28 12:04:10 +02:00
Stefan Monnier
ba42f79324 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 `/`.
2020-09-27 22:07:14 -04:00
Michael Albinus
4155ca273a 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.
2020-09-27 18:59:04 +02:00
Glenn Morris
f2a6bbefa9 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
2020-09-27 09:37:10 -07:00
Glenn Morris
c8f295f503 ; Merge from origin/emacs-27
The following commit was skipped:

cc7f971485 Fix out-of-source ‘make check’ emacs-module-tests
2020-09-27 09:37:10 -07:00
Glenn Morris
2e8c9ede15 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
2020-09-27 09:37:10 -07:00
Pip Cet
a492013d07 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.
2020-09-27 17:40:07 +02:00
Pip Cet
433b6fc53d 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).
2020-09-27 16:59:00 +02:00
Pip Cet
8d241e8840 Avoid 1s sleep-for before sending the startfile to a comint process
* lisp/comint.el (comint-exec): Simplify startup file code.
(Bug#41640).
2020-09-27 15:07:34 +02:00
Eli Zaretskii
c2da21c4cc ; * doc/emacs/building.texi (Grep Searching): Fix a typo. 2020-09-27 16:00:39 +03:00
Simon Lang
cea06818a1 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.
2020-09-27 14:55:29 +02:00
Mattias Engdegård
8bd233a7eb 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.
2020-09-27 14:28:07 +02:00
Mattias Engdegård
583cb264ad 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.
2020-09-27 14:24:36 +02:00
Mattias Engdegård
72e9ec96d0 ; * test/lisp/subr-tests.el (string-replace): Add more test cases 2020-09-27 13:32:27 +02:00
Eli Zaretskii
0b78785a9b 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)
2020-09-27 09:09:27 +03:00
Eli Zaretskii
c37370a7a0 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'.
2020-09-27 08:57:17 +03:00
Eli Zaretskii
768676f74f 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)
2020-09-27 08:26:56 +03:00
Lars Ingebrigtsen
8c569683f2 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).
2020-09-27 02:01:03 +02:00
Lars Ingebrigtsen
8a148c5976 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.
2020-09-27 00:50:39 +02:00
Lars Ingebrigtsen
104688feb4 Add tiny optimization for string-search
* src/fns.c (Fstring_search): Add tiny optimization for needles
that are longer than the haystack (bug#43598).
2020-09-27 00:35:11 +02:00
Lars Ingebrigtsen
baf331e40c 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).
2020-09-27 00:24:50 +02:00
Lars Ingebrigtsen
13e75e620b Fix gnus-faq example
* doc/misc/gnus-faq.texi (FAQ 6-2): replace-in-string was the XEmacs
name for the function.
2020-09-27 00:20:03 +02:00
Lars Ingebrigtsen
53cf5936c1 Slight replace-in-string optimization
* lisp/subr.el (replace-in-string): Optimize to return the
original string if nothing was replaced (bug#43598).
2020-09-27 00:17:58 +02:00
Mathias Dahl
f43d9d94aa 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.
2020-09-26 16:01:59 -04:00
Lars Ingebrigtsen
e7012148c0 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.
2020-09-26 17:38:38 +02:00
Eli Zaretskii
0dfc6fdc1f 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.
2020-09-26 18:35:00 +03:00
Lars Ingebrigtsen
20da487d8b message-add-action doc string fix
* lisp/gnus/message.el (message-add-action): Document types.
2020-09-26 17:33:08 +02:00
Mauro Aranda
6cc0ff19dd 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).
2020-09-26 17:09:22 +02:00
Lars Ingebrigtsen
9b6f564227 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).
2020-09-26 17:05:17 +02:00
Lars Ingebrigtsen
6a06782960 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).
2020-09-26 17:02:52 +02:00
Lars Ingebrigtsen
18718fee72 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.
2020-09-26 16:36:31 +02:00
Harald Jörg
2de618ed5d 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).
2020-09-26 15:51:15 +02:00
Stefan Kangas
e00936bf9f 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.
2020-09-26 12:03:07 +02:00
Stefan Kangas
2dff3ea073 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.
2020-09-26 11:48:09 +02:00
Michael Albinus
a3a845b0e0 * etc/NEWS: Add new D-Bus monitor functionality. Fix typos. 2020-09-26 11:38:53 +02:00
Michael Albinus
c540f3323d 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.
2020-09-26 11:38:23 +02:00
Eli Zaretskii
767713682c 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.
2020-09-26 11:50:15 +03:00