1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-27 07:30:59 -08:00
Commit graph

149304 commits

Author SHA1 Message Date
Eli Zaretskii
8b44740a6a Fix arg-out-of-range errors in 'line-number-at-pos'
* src/fns.c (Fline_number_at_pos): Pass character position to
args_out_of_range.  Suggested by Andreas Schwab
<schwab@linux-m68k.org>.  Call args_out_of_range_3 to show both
ends of the accessible portion.
2021-05-20 12:01:40 +03:00
Eli Zaretskii
328efb47d0 Make sure gmalloc's hybrid_free preserves errno
* src/gmalloc.c (hybrid_free_1): New function, with the body of
the previous 'hybrid_free'.
(hybrid_free): Call 'hybrid_free_1' while preserving the value of
'errno'.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
2021-05-20 11:44:54 +03:00
Eli Zaretskii
b2eed2ae56 Clean up the fix for unexec build on GNU/Linux
* src/conf_post.h [HYBRID_MALLOC || DARWIN_OS && HAVE_UNEXEC]:
Include <stdlib.h> here, before redirecting 'malloc' and friends
to their hybrid_* and unexec_* equivalents.  #undef malloc and
friends before redefining.  Provide prototypes for the
replacements.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
* src/gmalloc.c [HYBRID_MALLOC]: Remove declarations of 'malloc'
and friends, as they are now redundant: we include <stdlib.h> in
conf_post.h before redefining 'malloc' etc., and that provides
prototypes from system headers.

* configure.ac (HYBRID_MALLOC): Remove kludge to avoid replacement
of 'free' by Gnulib.  (Bug#36649)
2021-05-20 11:26:00 +03:00
Eli Zaretskii
d68f2b8681 ; * src/fns.c (Fline_number_at_pos): Fix doc string and comments. 2021-05-20 09:55:28 +03:00
Tassilo Horn
6ae3f7e889 Add a section about bug-reference-mode.
* doc/emacs/maintaining.texi (Maintaining): Add a section about
bug-reference-mode.
* doc/emacs/emacs.texi (Top): Link to the new section about
bug-reference-mode.
2021-05-19 21:21:03 +02:00
Juri Linkov
1f0f922ef2 * lisp/simple.el (yank-from-kill-ring-rotate): New defcustom (bug#48478).
(read-from-kill-ring, yank-from-kill-ring): Use it.
2021-05-19 19:30:33 +03:00
Eli Zaretskii
171dbe7048 Fix rare failures in 'window-default-font-height'
* lisp/window.el (window-default-font-height): Avoid signaling an
error when a client TTY frame happens to have an X-style 'display'
parameter.  (Bug#48408)
2021-05-19 19:01:07 +03:00
Eli Zaretskii
eb9f48bfad * lisp/startup.el (command-line-1): Avoid byte-compiler warning. 2021-05-19 18:56:27 +03:00
Glenn Morris
e100ee84e3 Fix custom type of recent dired-aux additions
* lisp/dired-aux.el (dired-compress-file-default-suffix)
(dired-compress-directory-default-suffix): Fix :type.
2021-05-19 08:28:35 -07:00
Stefan Monnier
b4e1fdfe21 * lisp/kmacro.el (kmacro-lambda-form): Fix bug#48523
Re-add `counter` and `format` arguments, since they are used in
`insert-kbd-macro`.
2021-05-19 11:19:10 -04:00
Eli Zaretskii
5e1a8d5654 Fix the unexec build on GNU/Linux
The unexec build on GNU/Linux must use HYBRID_MALLOC (gmalloc.c) and
sheap.c.  This was inadvertently disabled because a configure-time
test for 'sbrk' was moved as side effect of an unrelated change.

* configure.ac: Test for 'sbrk' before using the result in the
decision about SYSTEM_MALLOC and HYBRID_MALLOC.
(HYBRID_MALLOC): Prevent Gnulib from redirecting 'free' to its
replacement 'rpl_free'.

* lib/Makefile.in (not_emacs_OBJECTS): Add mallooc/%.o and free.o.
2021-05-19 17:42:50 +03:00
Ingo Lohmar
dac694b8bb * lisp/progmodes/sql.el: `sql-postgres-statement-starters' defcustom
Recognize common table expression as statement start in Postgres.
2021-05-19 15:07:52 +02:00
Mauro Aranda
61291e06cc Lift restriction for finding theme summary line
* lisp/cus-theme.el (custom-theme-summary): Don't limit the file to
having the deftheme form as the very first form, rather look for the
deftheme form explicitly.
2021-05-19 09:57:46 -03:00
Martin Rudalics
567c31121f Fix recently introduced misbehavior of `quit-restore-window' (Bug#48493)
* lisp/window.el (quit-restore-window): Unconditionally call
`switch-to-prev-buffer' (Bug#48493).
2021-05-19 09:17:37 +02:00
Stefan Monnier
1276ba75eb * lisp/progmodes/js.el (js--make-framework-matcher): Use a closure 2021-05-18 20:30:08 -04:00
Stefan Monnier
942cbc4dea * lisp/progmodes/gud.el (gud-tooltip-tips): Use proper closures
Also prefer #' to quote function names.

(jdb): Fix $ => \'.
2021-05-18 20:21:51 -04:00
Stefan Monnier
09ed51b9c8 * lisp/org/org-timer.el (org-timer--run-countdown-timer): Use closures 2021-05-18 19:54:38 -04:00
Stefan Monnier
5746fd57ab * lisp/org/org-mouse.el: Make use of lexical scoping
(org-mouse-todo-menu): Simplify by eta-reduction.
(org-mouse-popup-global-menu): Remove redundant `eval`.
(org-mouse-keyword-menu, org-mouse-keyword-replace-menu)
(org-mouse-tag-menu, org-mouse-match-closure): Use proper closures.
2021-05-18 19:51:26 -04:00
Stefan Monnier
4e240bf096 * lisp/org/org-colview.el (org-columns-map): Use proper closures
Also prefer #' to quote function names.

(org-columns-map): Use derived-mode-p.
2021-05-18 19:36:54 -04:00
Stefan Monnier
af68b49565 * lisp/org/org-clock.el (org-clock-get-table-data): Use proper closures
Also, prefer #' to quote function names
2021-05-18 19:32:35 -04:00
Stefan Monnier
25bb250e29 * lisp/net/sieve-manage.el (sieve-sasl-auth): Use proper closures 2021-05-18 19:23:54 -04:00
Stefan Monnier
26041ec8d5 * lisp/net/shr.el (shr-image-displayer): Use proper closures 2021-05-18 19:15:04 -04:00
Stefan Monnier
5e7b57ad8f * lisp/net/imap.el (imap-mailbox-close): Use proper closures
Also, remove redundant `:group` args, and prefer #' to quote function names
2021-05-18 19:12:11 -04:00
Stefan Monnier
db8266b0b2 * lisp/net/eudc.el (eudc-menu): Use proper closures 2021-05-18 19:06:54 -04:00
Stefan Monnier
e61bb6f6fe * lisp/net/browse-url.el: Avoid `(lambda ..)
(browse-url-netscape, browse-url-mozilla, browse-url-galeon)
(browse-url-epiphany, browse-url-elinks): Use proper closures.
2021-05-18 19:05:29 -04:00
Stefan Monnier
abedac0909 * lisp/misearch.el (multi-isearch-push-state): Use proper closures 2021-05-18 19:03:06 -04:00
Stefan Monnier
41efaa54c5 * lisp/menu-bar.el: Avoid `(lambda
(menu-bar-buffer-vector, menu-bar-update-buffers): Use proper closures.
2021-05-18 19:01:49 -04:00
Stefan Monnier
de4dcd8d10 * lisp/info.el (Info-isearch-push-state): Use proper closures 2021-05-18 18:13:28 -04:00
Stefan Monnier
0ccd712ad2 * lisp/imenu.el (imenu--create-keymap): Use proper closures 2021-05-18 18:11:08 -04:00
Stefan Monnier
2520a163cb * lisp/find-dired.el (find-dired): Use a proper closure 2021-05-18 18:06:15 -04:00
Stefan Monnier
49c5299bbb * lisp/facemenu.el (facemenu-add-new-face): Use :documentation 2021-05-18 18:05:05 -04:00
Stefan Monnier
f57b0f08b4 * lisp/eshell/em-pred.el: Take advantage of lexical scoping
Also remove redundant `:group` arguments.

(eshell-parse-modifiers): Make sure we pass a function value.
(eshell-parse-arg-modifier, eshell-parse-modifiers)
(eshell-add-pred-func, eshell-pred-user-or-group)
(eshell-pred-file-time, eshell-pred-file-type, eshell-pred-file-mode)
(eshell-pred-file-links, eshell-pred-file-size)
(eshell-pred-substitute, eshell-include-members, eshell-join-members)
(eshell-split-members): Use proper closures.
2021-05-18 17:53:44 -04:00
Juri Linkov
39b67c3ffe * doc/emacs/basic.texi (Repeating): Document repeat-exit-timeout (bug#48472). 2021-05-19 00:15:30 +03:00
Stefan Monnier
2c47eaa18a * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Use a closure 2021-05-18 17:13:52 -04:00
Juri Linkov
0fa959db20 * lisp/repeat.el (repeat-exit-timeout): New defcustom (bug#48472).
(repeat-exit-timer): New variable.
(repeat-post-hook): Run idle timer with an "exit function"
returned from set-transient-map.
Suggested by Gustavo Barros <gusbrs.2016@gmail.com>.

(repeat-echo-message): Remove own previous message when input arg is nil.

* lisp/window.el (display-buffer-override-next-command): Return exitfun.
2021-05-19 00:02:42 +03:00
Stefan Monnier
48744903de * lisp/calendar/cal-menu.el (cal-menu-holidays-menu): Use a proper closure 2021-05-18 16:59:08 -04:00
Juri Linkov
502e3ce614 * lisp/emacs-lisp/lisp-mode.el (lisp-outline-level): Fix imprecise numbers.
(lisp-outline-level): Return right levels starting from 1 instead of 5.
Suggested by Howard Melman <hmelman@gmail.com> in bug#46878.
2021-05-18 23:35:57 +03:00
Juri Linkov
83be3e9598 * lisp/simple.el (read-from-kill-ring): Add new arg PROMPT (bug#48478).
* lisp/simple.el (yank-pop, yank-from-kill-ring):
* lisp/isearch.el (isearch-yank-from-kill-ring):
Use arg PROMPT in the call read-from-kill-ring.
2021-05-18 23:23:50 +03:00
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