1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-29 00:31:01 -08:00
Commit graph

159126 commits

Author SHA1 Message Date
Alan Mackenzie
629f980fad Enhance safe_run_hooks_1 and safe_run_hook_funcall to handle more arguments
This fixes bug #57179.

* src/keyboard.c (safe_run_hooks_1, safe_run_hook_funcall): Enhance these
functions so that nargs == 3 or 4 is handled as well as nargs == 2.  This
allows them to be used to call hooks with 1 or 2 arguments.
2022-08-15 12:18:01 +00:00
Yury Kholodkov
d5ee49c25c Fix variable types in warnings-suppress
* lisp/emacs-lisp/warnings.el (warnings-suppress): The type of
these user options is a list of lists of symbols, not a list of
symbols (bug#57183).

Copyright-paperwork-exempt: yes
2022-08-15 09:36:06 +02:00
Lars Ingebrigtsen
20b8ac5723 Make eshell-mode more resilient towards `mode-line-format'
* lisp/eshell/esh-mode.el (eshell-mode): `mode-line-format' can be
a string (bug#57185).  In that case, don't alter anything.
2022-08-15 09:27:13 +02:00
Matt Armstrong
79c0e78460 Pacify warnings from gcc 12 in encode_coding_object
* src/coding.c (encode_coding_object): Mark saved_pt_byte with UNINIT
to silence a false alarm from -Wmaybe-uninitialized.  This was already
done in decode_coding_object.  The fix is correct because saved_pt is
used as a sentinel before saved_pt_byte is used (bug#57219).
2022-08-15 08:56:57 +02:00
Lars Ingebrigtsen
ead4b914ca Fix up the exclusion logic in loaddefs-generate
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Allow
excluding files completely (bug#57144).
2022-08-15 08:29:28 +02:00
Lars Ingebrigtsen
d33a6b9069 Tweak autoloads of defsubsts containing spaces/control chars
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Escape control chars in bodies so that we don't end up with
trailing spaces if we're autoloading a defsubst containing
"\\`[ \t\n\r]*\\'".
2022-08-15 08:24:29 +02:00
Lars Ingebrigtsen
f2a592ea2f Regenerated ldefs-boot.el 2022-08-15 08:22:30 +02:00
Lars Ingebrigtsen
af3ec6b8e6 Remove Gnus Compatibility manual section
* doc/misc/gnus.texi (Compatibility): Remove outdated section
(bug#57178).
2022-08-15 08:01:02 +02:00
Lars Ingebrigtsen
90b4ee6575 Further lisp-current-defun-name tweaks
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Further
tweaks to make (autoload 'foo) work again.  Perhaps this should
all be reverted to the original version and then given a new rething.
2022-08-15 07:30:25 +02:00
Lars Ingebrigtsen
97da8eeb7c Make update-directory-autoloads available by default again
* lisp/subr.el (make-directory-autoloads)
(update-directory-autoloads): Make available by default again
(bug#57200).

* lisp/obsolete/autoload.el (make-directory-autoloads): Add
obsoletion form.
(batch-update-autoloads): Fix warning.
2022-08-15 07:30:25 +02:00
Stefan Kangas
75372c6c4e Merge from origin/emacs-28
9d0dba44da ; * doc/lispintro/emacs-lisp-intro.texi: Fix typo.
0e336fa51f ; Improve documentation of minibuffer history wrt completion
2022-08-15 06:30:29 +02:00
Po Lu
4bee89b73f Fix uninitialized variable false-positives
* src/xterm.c (xm_setup_dnd_targets):
(x_dnd_free_toplevels): Mark dpy and recs UNINIT, since GCC
thinks they can be used uninitialized.  (bug#57208)
2022-08-15 08:55:26 +08:00
Stefan Kangas
0a8e88fd83 Make message-mark-active-p obsolete in favor of mark-active
* lisp/gnus/message.el (message-mark-active-p): Make obsolete in
favor of 'mark-active'.  Update callers.
2022-08-15 00:32:46 +02:00
Stefan Kangas
6137ebd5a4 Make gnus-uu-view-with-metamail obsolete
The metamail package was last released in 1994, and has been removed
from most GNU/Linux distributions due to being buggy and unmaintained.

* lisp/gnus/gnus-uu.el (gnus-uu-view-with-metamail): Make obsolete.
* doc/misc/gnus.texi (Other Decode Variables): Don't document
above obsolete variable.
2022-08-14 23:46:33 +02:00
Stefan Kangas
d5174ed4ea Don't use obsolete library as example in Elisp Intro
* doc/lispintro/emacs-lisp-intro.texi (Several files recursively)
(Sorting, Files List): Don't use obsolete library makesum.el as
example.
2022-08-14 23:46:33 +02:00
Stefan Kangas
005585f6bd Make gnus-iswitchb-completing-read obsolete
* lisp/gnus/gnus-util.el (gnus-iswitchb-completing-read): Make
obsolete.  It depends on the obsolete library iswitchb.el.
(gnus-completing-read-function): Don't advertise above obsolete
function.
2022-08-14 23:46:33 +02:00
Stefan Kangas
57259773b4 ; * lisp/org/org.el: Delete unnecessary declarations. 2022-08-14 23:46:33 +02:00
Stefan Kangas
ecc647d011 Don't advertise obsolete library html2text.el
* doc/misc/emacs-mime.texi (Display Customization):
* doc/misc/gnus-faq.texi (FAQ 4-7):
* doc/misc/gnus.texi (Article Washing):
* doc/misc/mh-e.texi (HTML):
* lisp/gnus/mm-decode.el (mm-text-html-renderer): Don't advertise
obsolete library html2text.el.
2022-08-14 23:46:33 +02:00
Paul Eggert
a64fe6f319 Improve timefns speed on integers
* src/timefns.c (decode_lisp_time) [FASTER_TIMEFNS]:
Speed up when SPECIFIED_TIME is an integer.
(time_cmp) [FASTER_TIMEFNS]: Speed up when comparing integers.
2022-08-14 13:49:33 -07:00
Paul Eggert
15aba5e644 Decode time conses before floats
* src/timefns.c (decode_lisp_time): Test for conses before floats,
as conses are more common.
2022-08-14 13:49:33 -07:00
Paul Eggert
23561f9665 Work around Bug#57211
* src/buffer.c (Fgenerate_new_buffer_name): Allocate a bigger buffer.
2022-08-14 13:49:33 -07:00
Paul Eggert
664c42df46 * doc/lispref/functions.texi: Fix capitalization. 2022-08-14 11:17:30 -07:00
Paul Eggert
9664b8c8e1 Fix selection preservation bug when USE_XCB
* src/xterm.c (x_preserve_selections) [USE_XCB]: Fix bug: use of
wrong ‘tem’ value.  Found by GCC -Wanalyzer-use-of-uninitialized-value.
Move decl of local to make the (former) bug more obvious.
2022-08-14 11:14:17 -07:00
Eli Zaretskii
48ac40e60e ; Fix last change. 2022-08-14 20:50:56 +03:00
Eli Zaretskii
9239be8e76 ; Fix documentation of 'compiled-function-p' (bug#56648)
* etc/NEWS: Fix a typo and expand the description of
'compiled-function-p'.

* doc/lispref/functions.texi (What Is a Function): Fix wording of
the documentation of 'compiled-function-p'.
2022-08-14 19:45:32 +03:00
Stefan Monnier
3a9c803f24 * lisp/emacs-lisp/ring.el (ring): Define as a type 2022-08-14 12:30:06 -04:00
Stefan Monnier
1faeef7924 (compiled-function-p): New function (bug#56648)
* lisp/subr.el (compiled-function-p): New function.

* test/lisp/international/ucs-normalize-tests.el (ucs-normalize-part1):
* lisp/gnus/gnus.el (gnus):
* lisp/mh-e/mh-e.el (mh-version):
* lisp/emacs-lisp/macroexp.el (emacs-startup-hook):
* lisp/emacs-lisp/cl-macs.el (compiled-function):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition)
(byte-compile, display-call-tree):
* lisp/emacs-lisp/byte-opt.el (<toplevel-end>):
* lisp/emacs-lisp/advice.el (ad-compiled-p):
* lisp/cedet/semantic/bovine.el (semantic-bovinate-stream):
* lisp/loadup.el (macroexpand-all):
* admin/unidata/unidata-gen.el (unidata--ensure-compiled): Use it.

* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add entries for it.
(pcase--split-pred): Use it.

* lisp/help-fns.el (help-fns-function-description-header): Use `functionp`.
(help-fns--var-safe-local): Use `compiled-function-p`.
2022-08-14 12:30:05 -04:00
Michael Albinus
1d3fe25690 Tramp code cleanup
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Use it.

* lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region):
New defalias.

* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file-name):
Fix root filename for cache.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Adapt check for proper remote command.

* lisp/net/tramp-sh.el (tramp-open-shell): Add sanity check for
shell prompt.
(tramp-get-ls-command): Check, that argument "--color=never" has
the intended effect.
2022-08-14 17:01:25 +02:00
Michael Albinus
9d52617935 ; * etc/NEWS: Fix typos. 2022-08-14 17:01:00 +02:00
Stefan Monnier
423b113797 * lisp/cedet/ede/emacs.el (ede-emacs-load): Delete obsolete name arg 2022-08-14 10:45:24 -04:00
Stefan Kangas
9d0dba44da ; * doc/lispintro/emacs-lisp-intro.texi: Fix typo. 2022-08-14 16:44:29 +02:00
Stefan Monnier
397fdc22eb * lisp/calendar/time-date.el (seconds-to-time): Use the original arg list 2022-08-14 10:41:40 -04:00
Stefan Kangas
d28f1677c3 ; Delete commented out manual section on emulation
This section has been commented out for close to a decade already.  It
mostly deals with obsolete libraries, and there are separate manuals
for viper and edt.

* doc/emacs/misc.texi (Recursive Edit): Delete commented out section
on emulation.
2022-08-14 16:20:57 +02:00
Stefan Kangas
096c081e51 * src/Makefile.in (elnlisp): Delete autoload.eln from list. 2022-08-14 16:06:06 +02:00
Stefan Kangas
7dc4ab6e89 Make Gnus FAQ more contemporary
* doc/misc/gnus-faq.texi (FAQ - Introduction): Fix timeline.
(FAQ - Changes): Delete outdated section.
(FAQ 5-5): Update to reflect that ispell.el and flyspell.el is
distributed with Emacs.
(FAQ 4-1, FAQ 4-7, FAQ 4-8, FAQ 4-14, FAQ 5-8, FAQ 5-10, FAQ 6-3)
(FAQ 7-2): Delete references to ancient versions of Gnus.
(FAQ 6-3): Delete reference to obsolete library nnir.el.
(FAQ - Glossary): Remove "Emacs" entry.  This is self-explanatory, and
risks causing confusion; our docs never mean anything but "GNU Emacs"
when we say "Emacs".
2022-08-14 15:54:02 +02:00
Mattias Engdegård
1d8712bcc9 Strength-reduce apply with (list ...) as tail argument
* lisp/emacs-lisp/byte-opt.el (byte-optimize-apply):
Transform (apply F ... (list X ...)) -> (funcall F ... X ...)
2022-08-14 15:43:12 +02:00
Mattias Engdegård
e99d7c4d62 Simplify code using take, ntake and butlast
* lisp/calc/calc-vec.el (calcFunc-rhead):
* lisp/calc/calc.el (calc-top-list, calc-pop):
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Simplify.
2022-08-14 15:43:12 +02:00
Stefan Kangas
7ece1c4840 ; * doc/misc/gnus-faq.texi (FAQ 1-3): Fix recent change.
It
2022-08-14 15:16:47 +02:00
Eli Zaretskii
a71c05b44d Further speedups of redisplay of long and truncated lines
* src/xdisp.c (mode_line_update_needed, redisplay_window)
(decode_mode_spec): Don't avoid calling current_column, as it is
now fast enough.
(redisplay_window) <optional_new_start>: Don't call 'move_it_to'
if its result will not be used.
(Flong_line_optimizations_p): New primitive.
* src/indent.c (Fcurrent_column): Doc fix.
(current_column, scan_for_column): When in a buffer with long
and/or truncated lines, quickly return an approximate value.
* src/window.c (Frecenter): Use the old text-mode code when the
buffer has very long lines.

* lisp/simple.el (line-move): Avoid costly calls to
'line-move-partial' and 'line-move-visual' when lines are
truncated and/or very long.
(move-beginning-of-line): Call 'line-beginning-position' instead
of the slower 'skip-chars-backward'.

* etc/NEWS: Announce 'long-line-optimizations-p'.
2022-08-14 15:49:37 +03:00
Štěpán Němec
b93e14fa0f ; advice--interactive-form: Fix a typo introduced in recent change
* lisp/emacs-lisp/nadvice.el (advice--interactive-form): Fix a typo.
2022-08-14 10:23:29 +02:00
Eli Zaretskii
0df8f481dd ; * src/xdisp.c (display_line): Fix a typo. 2022-08-14 09:34:37 +03:00
Eli Zaretskii
0e336fa51f ; Improve documentation of minibuffer history wrt completion
* doc/emacs/mini.texi (Minibuffer History): Mention explicitly
that minibuffer history is related also to completion candidates.
Improve indexing.  (Bug#57163)
2022-08-14 08:51:44 +03:00
Po Lu
47e23ad7a8 More fixes to MPX drag-and-drop interaction
* src/xterm.c (x_dnd_begin_drag_and_drop): Also initialize the
keyboard device used for drag-and-drop.
(handle_one_xevent): Verify deviceid in more places; also test
keyboard device before swallowing F1.
2022-08-14 09:39:08 +08:00
Philip Kaludercic
15c20cb4fe
; * etc/NEWS: Fix typo. 2022-08-13 22:33:46 +02:00
Basil L. Contovounesios
864847bf3c Document time-convert FORM argument as mandatory
This is a followup to commit b70369c557 of 2022-08-05
"time-convert): Deprecate calls without an explicit FORM arg".

* doc/lispref/os.texi (Time Conversion):
* src/timefns.c (Ftime_convert): Describe FORM argument as required
as per the advertised calling convention.
2022-08-13 21:59:39 +03:00
Stefan Kangas
0a93759385 Improve time-convert docstring formatting for readability
* src/timefns.c (Ftime_convert): Doc fix; improve formatting for
readability.
2022-08-13 20:30:12 +02:00
Stefan Monnier
dd2973bf50 nadvice.el: Avoid exponential blow up in interactive-form recursion
* lisp/emacs-lisp/nadvice.el (advice--interactive-form): Sink the call
to `commandp` into the autoloaded function case since it's redundant in
the other branch.
(advice--make-interactive-form): Take just the interactive forms rather
than the actual functions as arguments.
(oclosure-interactive-form): Use `advice--interactive-form` rather than
`commandp` since we'd call `advice--interactive-form` afterwards anyway.
2022-08-13 12:04:29 -04:00
Eli Zaretskii
a1cf3b96f8 ; Fix documentation of 'deactivate-mark'
* src/keyboard.c (syms_of_keyboard):
* etc/NEWS: Fix the documentation of 'deactivate-mark' and its new
value 'dont-save'.  (Bug#57147)
2022-08-13 18:52:46 +03:00
Stefan Kangas
f289a17c06 Update Gnus Installation FAQ
* doc/misc/gnus-faq.texi (FAQ 1-1, FAQ 1-2, FAQ 1-3, FAQ 1-4)
(FAQ 1-5): Update to reflect that Gnus is no longer released
separately from Emacs.  Delete FAQ on Gnus 5.10, released in May 2003.
2022-08-13 17:45:16 +02:00
Stefan Kangas
9d6d3b0edb Make many gnus version variables obsolete
Many haven't been bumped since 1997, others not since 2004.
* lisp/gnus/deuglify.el (gnus-outlook-deuglify-version):
* lisp/gnus/gnus-diary.el (gnus-diary-version):
* lisp/gnus/nnagent.el (nnagent-version):
* lisp/gnus/nnbabyl.el (nnbabyl-version):
* lisp/gnus/nndiary.el (nndiary-version):
* lisp/gnus/nndir.el (nndir-version):
* lisp/gnus/nndoc.el (nndoc-version):
* lisp/gnus/nndraft.el (nndraft-version):
* lisp/gnus/nneething.el (nneething-version):
* lisp/gnus/nnfolder.el (nnfolder-version):
* lisp/gnus/nnmaildir.el (nnmaildir-version):
* lisp/gnus/nnmbox.el (nnmbox-version):
* lisp/gnus/nnmh.el (nnmh-version):
* lisp/gnus/nnml.el (nnml-version):
* lisp/gnus/nnrss.el (nnrss-version):
* lisp/gnus/nnspool.el (nnspool-version):
* lisp/gnus/nntp.el (nntp-version):
* lisp/gnus/nnvirtual.el (nnvirtual-version): Make obsolete in
favor of emacs-version.
2022-08-13 17:29:36 +02:00