1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

148366 commits

Author SHA1 Message Date
Philipp Stephani
63e4ed1c8f Recreate symptom of Bug#42701.
The fix to Bug#48489 (commit 9676d41b83)
has masked the symptom of Bug#42701 for 'if-let'.  Create a helper
macro that still exemplifies the bug.

* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests--duplicate-symbol-backtrack): New helper macro.
(edebug-tests-duplicate-symbol-backtrack): Use it instead of 'if-let'.
2021-05-18 18:43:11 +02:00
Lars Ingebrigtsen
68f5718c0a Fix some regressions introduced by the previous dired-aux change
* lisp/dired-aux.el (dired-compress-file): Check that the file
we're compressing exists.  Also work outside the current directory.
2021-05-18 17:49:10 +02:00
Basil L. Contovounesios
33c0994c7c Look for ElDoc buffer in all visible frames
* lisp/emacs-lisp/eldoc.el (eldoc--echo-area-prefer-doc-buffer-p):
Look for a window displaying the ElDoc documentation buffer in all
visible frames, as promised by the user option
eldoc-echo-area-prefer-doc-buffer (bug#48278).
2021-05-18 16:31:19 +01:00
Miha Rihtaršič
304a3b9ee8 Fix problem with focusing in `C-o' in ibuffer in some circumstances
* lisp/ibuffer.el (ibuffer-visit-buffer-other-window-noselect):
Use display-buffer instead of pop-to-buffer and selecting the old
window.  `pop-to-buffer' focuses the new frame, but
`select-window' usually fails to focus the original frame.  This
simple patch fixes that (bug#48218).
2021-05-18 17:08:58 +02:00
Gong Qijian
ab20f385a7 Fix `custom-delayed-init-variables' problem when re-dumping emacs
* lisp/startup.el (command-line): Don't bug out on redumping Emacs
(bug#48492).

Copyright-paperwork-exempt: yes
2021-05-18 16:38:05 +02:00
Stefan Monnier
6a7e503cca * lisp/kmacro.el: Fix test cases broken by last change
(kmacro-lambda-form): Remove unused args `counter` and `format`.
Arrange to be able to extract `mac` from the function.
(kmacro-extract-lambda): Use this new extraction instead of digging
into the guts of a function's code.
2021-05-18 10:37:57 -04:00
Alexandr Vityazev
2c90aa93a9 Fix the length= shortdoc example
* lisp/emacs-lisp/shortdoc.el (list): Fix the length= example
(bug#48495).

Copyright-paperwork-exempt: yes
2021-05-18 15:36:25 +02:00
Eli Zaretskii
cbd3a3b87d Revert "* lisp/bookmark.el: make bookmark-fontify nil default value"
This reverts commit ed8c3303f9.
2021-05-18 15:00:04 +03:00
Mattias Engdegård
be9db2b94d Fix pcase 'rx' patterns with a single named submatch (bug#48477)
pcase 'rx' patterns with a single named submatch, like

  (rx (let x "a"))

would always succeed because of an over-optimistic transformation.
Patterns with 0 or more than 1 named submatches were not affected.

Reported by Philipp Stephani.

* lisp/emacs-lisp/rx.el (rx--pcase-macroexpander):
Special case for a single named submatch.
* test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add tests.
2021-05-18 12:34:30 +02:00
Paul W. Rankin
ed8c3303f9 * lisp/bookmark.el: make bookmark-fontify nil default value 2021-05-18 18:24:25 +10:00
Philipp Stephani
9676d41b83 * lisp/emacs-lisp/subr-x.el (if-let): Swap &or branches (Bug#48489) 2021-05-18 09:26:49 +02:00
Stefan Monnier
7124598068 * lisp/kmacro.el: Avoid the dynbound dialect of ELisp
(kmacro-call-macro, kmacro-lambda-form): Use proper closures.
(kmacro-keymap): Prefer #' top quote function names.
2021-05-17 22:16:54 -04:00
Dmitry Gutov
d83db639d3 Visually truncate excessively long lines in Xref
* lisp/progmodes/xref.el (xref-truncation-width): New option.
(xref--apply-truncation): New function.
(xref--insert-xrefs): Use it (bug#46859).
2021-05-18 03:36:40 +03:00
Eli Zaretskii
f572735c51 Fix the etags test suite
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adjust to addition test.rs.
2021-05-17 19:39:45 +03:00
Eli Zaretskii
8ac093ce6f Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2021-05-17 19:34:53 +03:00
Eli Zaretskii
78156292c5 ; * admin/notes/years: Mention that etags test files need to be updated. 2021-05-17 19:33:40 +03:00
Lars Ingebrigtsen
e72dfe9669 Add an etags test for Rust (bug#46055) 2021-05-17 18:25:08 +02:00
Eli Zaretskii
2becaf8624 Update the etags/ctags test files
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adjust to current codebase.
2021-05-17 19:06:56 +03:00
Sun Lin
dac20f08fa Allow specifying the default archive types to compress to in Dired
* lisp/dired-aux.el (dired-compress-file-default-suffix):
(dired-compress-directory-default-suffix): New user options
(bug#47119).
(dired-compress-file-alist): New variable.

* lisp/dired-aux.el (dired-compress-file): Use them.
(dired-compress-file-suffixes): Remove the directory item.
2021-05-17 18:03:55 +02:00
Pierre-Antoine Rouby
ec870f8986 Add support for Rust in etags
* lib-src/etags.c (Rust_functions): New function to make tags for rust
files.
(Rust_help, Rust_suffixes): New constant.
* doc/emacs/maintaining.texi (Tag Syntax): Add Rust item.
* doc/man/etags.1: Add Rust (bug#46055).
2021-05-17 17:24:04 +02:00
Eli Zaretskii
eb75826207 Avoid crashes in condition-case
* src/eval.c (internal_lisp_condition_case): Don't take XCAR
without making sure the value is a cons cell.  (Bug#48479)
2021-05-17 18:10:49 +03:00
Lars Ingebrigtsen
cbeaf28c5e Mention *-nov-is-evil in the Extra Headers Gnus manual section
* doc/misc/gnus.texi (To From Newsgroups): Mention nov-is-evil.
2021-05-17 16:30:01 +02:00
Eli Zaretskii
7828d561c1 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2021-05-17 15:19:46 +03:00
Eli Zaretskii
7b82584c69 Improve documentation of new behavior of 'M-y'
* lisp/minibuffer.el (minibuffer-local-map): Switch the order of
'\r' and '\n' bindings.
* lisp/simple.el (yank-pop, read-from-kill-ring)
(yank-from-kill-ring): Doc fixes.

* doc/emacs/search.texi (Isearch Yank):
* doc/emacs/killing.texi (Yanking): Improve the description of the
new functionality of 'M-y'.
* doc/lispref/text.texi (Yank Commands): Remove inaccurate
description of 'M-y' in Isearch.

* etc/NEWS: Improve the wording of 'M-y' entry.
2021-05-17 15:17:57 +03:00
Philipp Stephani
e477b5ee12 Add a unit test to reproduce Bug#48471.
* test/lisp/progmodes/project-tests.el (project-tests--trivial)
(project-root, project-ignores): New test project type.
(project-ignores): New unit test.
2021-05-17 10:43:54 +02:00
Philipp Stephani
42950e9e46 Fix a few Edebug specifications where code is wrapped in lambdas.
As the Info node `(elisp) Specification List' explains, it is not
correct to use `body' or t for a piece of code that the macro wraps in
a `lambda' form.  These should use `def-body' instead.

* lisp/info-xref.el (info-xref-with-file):
* lisp/subr.el (subr--with-wrapper-hook-no-warnings, track-mouse)
(combine-change-calls, with-eval-after-load):
* lisp/emacs-lisp/bytecomp.el (displaying-byte-compile-warnings):
* lisp/emacs-lisp/cl-macs.el (cl-do-symbols, cl-progv):
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer):
* lisp/emacs-lisp/gv.el (gv-letplace):
* lisp/emacs-lisp/nadvice.el (define-advice):
* lisp/emacs-lisp/thunk.el (thunk-delay):
* lisp/vc/vc-dispatcher.el (vc-run-delayed): Use 'def-body' instead of
t or 'body' where applicable.

* lisp/emacs-lisp/package.el (package--with-response-buffer): Remove
evaluation of the body altogether.  I have no idea how to write it
correctly in this case.
2021-05-17 10:09:43 +02:00
Eric Abrahamsen
e761e12498 Add a 'silent option for native-comp-async-report-warnings-errors
* lisp/emacs-lisp/comp.el (native-comp-async-report-warnings-errors):
Set to 'silent to log warnings, but not pop up the *Warnings* buffer.
* lisp/emacs-lisp/comp.el (comp-accept-and-process-async-output):
Check value.
2021-05-16 14:27:53 -07:00
Eric Abrahamsen
0212fb180a Use condition-case-unless-debug in nnselect-run
* lisp/gnus/nnselect.el (nnselect-run): This is confusing for users,
make it more yielding to common debugging strategies.
2021-05-16 10:22:22 -07:00
Eric Abrahamsen
10a14f6ac3 Fix function signature for gnus-search-indexed-parse-output
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Generic
function arg list didn't match the method arglist, which made for
confusing function help.
2021-05-16 10:22:22 -07:00
Lars Ingebrigtsen
c14e0da361 mouse-wheel-progressive-speed doc string clarification
* lisp/mwheel.el (mouse-wheel-progressive-speed): Doc string
improvement (bug#45322).
2021-05-16 17:59:54 +02:00
Ingo Lohmar
5a82d4ce5a prepend newline in sqli buffer
(sql-remove-continuation-prompt, sql-send-string): Move newline
insertion.

Previously, the preoutput filter `sql-remove-continuation-prompt'
inserted a leading newline in the interactive SQL buffer if it decided
that is has to remove continuation prompts and that it had found all
it was looking for.

1) This filter function was a doubtful place to do that (arguably, its
   name does not suggest any action like this).
2) The behavior worked inconsistently, eg, when sending a single-line
   "SELECT" statement, because it only ran when the filter function
   needed to remove any prompts (for example, not when sending a
   region without newlines).

   This can lead to misaligned table headers, which explains why
   emacswiki and stackoverflow both present several fixes to this
   behavior.
2021-05-16 16:32:10 +02:00
Tassilo Horn
b6d02dc376 Add bug-reference-mode-force-auto-setup
* lisp/progmodes/bug-reference.el
(bug-reference-try-setup-from-rmail): Match the Rmail mbox filename
against GROUP-REGEXP in bug-reference-setup-from-mail-alist.
(bug-reference-mode-force-auto-setup): New function which forces
auto-setup even if bug-reference-bug-regexp and
bug-reference-url-format are already set.
2021-05-16 16:19:57 +02:00
Dario Gjorgjevski
069c2fb17a Add more completion tests
* test/lisp/minibuffer-tests.el (completion--pcm-score)
(completion--pcm-first-difference-pos): New helpers.
(completion-pcm-test-1, completion-pcm-test-2)
(completion-pcm-test-3, completion-pcm-test-4)
(completion-pcm-test-5, completion-pcm-test-6)
(completion-substring-test-1, completion-substring-test-2)
(completion-substring-test-3, completion-substring-test-4)
(completion-flex-test-1, completion-flex-test-2)
(completion-flex-test-3): New tests (bug#42149)
2021-05-16 15:50:41 +02:00
Sebastian Urban
bf8b8cc6c5 Improve some quotation quoting in the Emacs manual
* doc/emacs/text.texi (Quotation Marks, Quotation Marks):
* doc/emacs/display.texi (Text Display): Fix some issues when
quoting quote marks and the like (bug#35885).

* doc/emacs/emacs.texi: Switch on double-sided printing headings.

Copyright-paperwork-exempt: yes
2021-05-16 15:29:39 +02:00
Noam Postavsky
487498e497 Remove unreliable test for match data clobbering
* src/search.c (Freplace_match): Don't test for change in search_regs
start and end, this is unreliable if change hooks modify text earlier
in the buffer (bug#35264).
2021-05-16 15:19:57 +02:00
Philipp Stephani
01bd4d1a82 Optimize calls to 'eql', 'memql' and similar for fixnums.
It's good practice to compare integers using 'eql' because two bignum
objects representing the same integer might not be 'eq'.  However,
'eql' is slower and doesn't have its own byte code.  Therefore,
replace it with 'eq' if one argument is guaranteed to be a fixnum on
all platforms.

* lisp/emacs-lisp/byte-opt.el (byte-optimize--fixnump): New helper
function.
(byte-optimize-equal, byte-optimize-member, byte-optimize-assoc): Use
it to optimize 'eql' etc. to 'eq' if it will always compare fixnums.
2021-05-16 14:45:18 +02:00
Michael Albinus
4f510f63a8 Fix handling of stderr buffer in Tramp's make-process (Bug#47861)
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Reimplement stderr buffer handling.  (Bug#47861)
(tramp-maybe-open-connection): Improve traces.

* test/lisp/net/tramp-tests.el (tramp-test30-make-process):
Rework for stderr buffer.
2021-05-16 12:08:09 +02:00
Tassilo Horn
1b8f013d17 Bug reference auto-setup for Rmail
* lisp/progmodes/bug-reference.el
(bug-reference-try-setup-from-rmail): New function setting up
`bug-reference-mode' from the current Rmail message.
2021-05-16 09:21:48 +02:00
Dmitry Gutov
b6e0b66e0e Update CSS completion tests
* test/lisp/textmodes/css-mode-tests.el (css-test-complete-pseudo-class)
(css-test-complete-pseudo-element): Update the tests for recent changes.
2021-05-15 23:46:30 +03:00
Tassilo Horn
de61b0b25f Refactor bug-reference setup functions into a defvar
* lisp/progmodes/bug-reference.el
(bug-reference-auto-setup-functions): New defvar so that other
packages can add their own auto-setup functions to it.
* lisp/progmodes/bug-reference.el (bug-reference--run-auto-setup): Use
the new variable instead of hard-coding the 4 functions we've had
already.
2021-05-15 21:19:55 +02:00
Eli Zaretskii
b5e6dba05f Fix segfaults when byte-compiling with native-compilation
* src/emacs.c (main): Call 'set_initial_minibuffer_mode' before
entering recursive-exit.
* src/minibuf.c (init_minibuf_once_for_pdumper): Don't call
'set_minibuffer_mode' here...
(set_initial_minibuffer_mode): ... set it in this new function.
(Bug#48446)
* src/lisp.h: Add prototype for 'set_initial_minibuffer_mode'.
2021-05-15 20:44:40 +03:00
Alan Mackenzie
46e4704e2a Miscellaneous corrections to src/minibuf.c for bug #48337
* src/minibuf.c (read_minibuf): Call get_minibuffer before incrementing
minibuf_level, in case a hook function calls Factive_minibuffer_window.
(init_minibuf_once_for_pdumper): Create  *Minibuf-0* here (moved from
init_minibuf_once), and set its mode, so that clicking in the mini-window
immediately after start up works (thanks, Eli Z.).
2021-05-15 11:49:49 +00:00
Eli Zaretskii
248ec838aa Fix launching net-utils on MS-Windows
* lisp/net/net-utils.el (net-utils-run-simple): Bind
coding-system-for-read around the code which starts the process.
(Bug#48375)
2021-05-15 12:38:01 +03:00
pillule
0a68159026 Fix `quit-restore-window' when all previous buffers got killed (Bug#48367)
* lisp/window.el (quit-restore-window): Simplify calculation of
WINDOW's previous buffer.  Avoid that killing WINDOW's previous
buffers results in a state where `quit-window' has no more
effect, by simply deleting WINDOW in that case (Bug#48367).

Copyright-paperwork-exempt: yes
2021-05-15 10:47:07 +02:00
Daniel Semyonov
b00796ee36 Mairix: use 'mairix-search-options' as documented
* lisp/net/mairix.el (mairix-call-mairix): Append
'mairix-search-options' to the arguments passed to mairix.

Copyright-paperwork-exempt: yes
2021-05-15 11:12:00 +03:00
Daniel Semyonov
b1ac6797c5 Mairix: autoload main interactive functions
* lisp/net/mairix.el (mairix-search, mairix-use-saved-search)
(mairix-edit-saved-searches-customize, mairix-search-from-this-article)
(mairix-search-thread-this-article, mairix-widget-search-based-on-article)
(mairix-edit-saved-searches, mairix-widget-search, mairix-update-database):
Add magic autoload comment.

Copyright-paperwork-exempt: yes
2021-05-15 11:11:49 +03:00
Eli Zaretskii
63d259cc0d Improve doc string of 'log-edit-generate-changelog-from-diff'
* lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff):
Improve the doc string.  (Bug#48269)
2021-05-15 11:06:41 +03:00
Martin Rudalics
c18403302d Have X builds handle VisibilityNotify events (Bug#48268, Bug#48413)
* src/xterm.c (handle_one_xevent): Handle VisibilityNotify
events (Bug#48268, Bug#48413).
2021-05-15 09:20:50 +02:00
Dmitry Gutov
48b37c3ef0 Add :company-kind support to nxml-mode completion
* lisp/nxml/rng-nxml.el (rng-complete-tag)
(rng-complete-attribute-name, rng-complete-attribute-value):
Support :company-kind.
2021-05-15 04:18:42 +03:00
Dmitry Gutov
efea3a02f5 Add :company-kind support to sh-mode completion
* lisp/progmodes/sh-script.el (sh--completion-keywords):
New variable.
(sh--cmd-completion-table): Extracted from here.
(sh-completion-at-point-function): Add :company-kind.
2021-05-15 03:44:16 +03:00