]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoDon't look for long lines beyond the narrowed region
Eli Zaretskii [Tue, 16 Aug 2022 12:27:15 +0000 (15:27 +0300)]
Don't look for long lines beyond the narrowed region

* src/xdisp.c (redisplay_window): Don't scan for newlines outside
the current buffer's restriction.

2 years ago; Normalize my email
Stefan Kangas [Tue, 16 Aug 2022 11:41:08 +0000 (13:41 +0200)]
; Normalize my email

2 years ago; Don't mention obsolete libraries
Stefan Kangas [Tue, 16 Aug 2022 11:31:49 +0000 (13:31 +0200)]
; Don't mention obsolete libraries

* lisp/erc/erc-speedbar.el:
* etc/TODO (https): Don't mention obsolete libraries.

2 years agoModernize spam section in Gnus manual slightly
Stefan Kangas [Tue, 16 Aug 2022 08:14:52 +0000 (10:14 +0200)]
Modernize spam section in Gnus manual slightly

* doc/misc/gnus.texi (The problem of spam): Don't explain what
spam is; there is no need for that in 2022.  Don't explain
limitations of obsolete software TMDA; it's website has stopped
working but seems to have been updated last in 2007.
(Thwarting Email Spam, Anti-Spam Basics)
(Spam Package Configuration Examples): Prefer "spam" to "UCE".
(The problem of spam): Use example.org in example.
(SpamAssassin, Hashcash): Improve wording.

2 years ago; * doc/misc/url.texi: Don't mention obsolete library url-ns.
Stefan Kangas [Tue, 16 Aug 2022 08:08:39 +0000 (10:08 +0200)]
; * doc/misc/url.texi: Don't mention obsolete library url-ns.

2 years agoDelete implicit XEmacs references from Gnus manual
Stefan Kangas [Tue, 16 Aug 2022 06:03:22 +0000 (08:03 +0200)]
Delete implicit XEmacs references from Gnus manual

* doc/misc/gnus.texi (Group Buffer Format, Summary Buffer, RSS):
Delete some implicit references to XEmacs.
(RSS): Fix default value.

2 years agoMake the bookmark fringe icon look like a bookmark
Jim Porter [Tue, 2 Aug 2022 18:40:43 +0000 (11:40 -0700)]
Make the bookmark fringe icon look like a bookmark

* src/fringe.c (large_circle_bits): New variable.
(standard_bitmaps): Add large_circle_bits.

* lisp/fringe.el (fringe-bitmaps): Add 'large-circle'.
(fringe-custom-set-bitmap): New function.

* lisp/cus-edit.el (widget-fringe-bitmap-prompt-value-history): New
variable.
(fringe-bitmap): New widget.

* lisp/bookmark.el (bookmark-set-fringe-mark): Obsolete in favor of...
(bookmark-fringe-mark): ... this.
(bookmark-fringe-mark): Rename this fringe bitmap to...
(bookmark-mark): ... and change it to look like a bookmark.
(bookmark-face): Don't set the ':background' of the face.  Instead,
set ':distant-foreground'.
(bookmark--set-fringe-mark, bookmark--remove-fringe-mark)
(bookmark-store, bookmark--jump-via): Consult the
'bookmark-fringe-mark' option.

* doc/lispref/customize.texi (Simple Types): Document 'fringe-bitmap'
type.

* doc/lispref/display.texi (Fringe Bitmaps): Mention 'large-circle'.

* etc/NEWS: Announce this change (bug#56896).

2 years agoFix non-interactive use of conditionals in Eshell
Jim Porter [Sun, 14 Aug 2022 20:48:22 +0000 (13:48 -0700)]
Fix non-interactive use of conditionals in Eshell

* lisp/eshell/esh-cmd.el (eshell-rewrite-if-command): Fix misplaced
't' symbol; it should be passed to 'eshell-invokify-arg'.
(eshell-do-eval): Pass 'synchronous-p' to recursive calls in some
missing cases.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/if-statement,
(esh-cmd-test/if-else-statement)
(esh-cmd-test/if-else-statement-lisp-form)
(esh-cmd-test/if-else-statement-lisp-form-2)
(esh-cmd-test/if-else-statement-ext-cmd)
(esh-cmd-test/unless-statement)
(esh-cmd-test/unless-else-statement)
(esh-cmd-test/unless-else-statement-lisp-form)
(esh-cmd-test/unless-else-statement-ext-cmd): Use
'eshell-command-result-equal'.

2 years agoAdd 'eshell-command-result-equal' with an ERT explainer
Jim Porter [Sun, 14 Aug 2022 20:44:04 +0000 (13:44 -0700)]
Add 'eshell-command-result-equal' with an ERT explainer

* test/lisp/eshell/eshell-tests-helpers.el
(eshell-command-result--equal, eshell-command-result--equal-explainer)
(eshell-command-result-equal): New functions.

* test/lisp/eshell/em-basic-tests.el
* test/lisp/eshell/em-dirs-tests.el
* test/lisp/eshell/esh-cmd-tests.el
* test/lisp/eshell/esh-proc-tests.el
* test/lisp/eshell/esh-var-tests.el
* test/lisp/eshell/eshell-tests.el: Use 'eshell-command-result-equal'.

2 years agoProvide ERT explainer for 'eshell-match-command-output'
Jim Porter [Sun, 14 Aug 2022 03:31:11 +0000 (20:31 -0700)]
Provide ERT explainer for 'eshell-match-command-output'

This was formerly named 'eshell-command-result-p', but "result" isn't
quite the right terminology, since this function specifically tested
the output of a command, not its Lisp result (as
'eshell-command-result' would return).

* test/lisp/eshell/eshell-tests-helpers.el (eshell-insert-command):
Provide a more-complete docstring.
(eshell-match-result): Rename to...
(eshell-match-output): ... this.
(eshell-match-output--explainer): New function.
(eshell-command-result-p): Rename to...
(eshell-match-command-output): ... this.

* test/lisp/eshell/em-alias-tests.el
* test/lisp/eshell/em-dirs-tests.el
* test/lisp/eshell/em-extpipe-tests.el
* test/lisp/eshell/em-script-tests.el
* test/lisp/eshell/esh-cmd-tests.el
* test/lisp/eshell/esh-proc-tests.el
* test/lisp/eshell/esh-var-tests.el
* test/lisp/eshell/eshell-tests-helpers.el
* test/lisp/eshell/eshell-tests.el: Use 'eshell-match-command-output'.

2 years agoAvoid lowering child frames below scroll bars on X
Po Lu [Tue, 16 Aug 2022 01:30:08 +0000 (09:30 +0800)]
Avoid lowering child frames below scroll bars on X

* src/xterm.c (x_lower_frame_1): New function.
(x_lower_frame): Avoid calling XLowerFrame when there is a
parent with scroll bars.

2 years ago* doc/misc/gnus.texi (Troubleshooting): Update section.
Stefan Kangas [Tue, 16 Aug 2022 00:39:27 +0000 (02:39 +0200)]
* doc/misc/gnus.texi (Troubleshooting): Update section.

2 years ago* doc/lispref/functions.texi (What Is a Function): Improve further
Stefan Monnier [Mon, 15 Aug 2022 22:45:58 +0000 (18:45 -0400)]
* doc/lispref/functions.texi (What Is a Function): Improve further

2 years agoProduce TAGS in 'lib' as well and include them in src/TAGS
Eli Zaretskii [Mon, 15 Aug 2022 19:12:58 +0000 (22:12 +0300)]
Produce TAGS in 'lib' as well and include them in src/TAGS

* src/Makefile.in (TAGS): Include ../lib/TAGS.
($(lib)/TAGS): New target.
(tags): Depend on $(lib)/TAGS.

2 years agoFix tmpdir handling in Tramp for Android sshd
Michael Albinus [Mon, 15 Aug 2022 17:35:43 +0000 (19:35 +0200)]
Fix tmpdir handling in Tramp for Android sshd

* doc/misc/tramp.texi (Android shell setup): Rework.

* lisp/net/tramp.el (tramp-get-remote-tmpdir): Cache result in
temporary connection property.

2 years agoClean up message-sort-headers code slightly
Lars Ingebrigtsen [Mon, 15 Aug 2022 15:08:25 +0000 (17:08 +0200)]
Clean up message-sort-headers code slightly

* lisp/gnus/message.el (message-sort-headers): Simplify code by
removing always-true `if' statement.

2 years agoFix `python-nav-forward-block' moving backward under certain conditions
kobarity [Mon, 15 Aug 2022 14:30:23 +0000 (16:30 +0200)]
Fix `python-nav-forward-block' moving backward under certain conditions

* lisp/progmodes/python.el (python-nav-forward-block): Add check
for not moving backward (bug#57223).

2 years agoFix fix_command for non-symbol functions
Lars Ingebrigtsen [Mon, 15 Aug 2022 14:18:21 +0000 (16:18 +0200)]
Fix fix_command for non-symbol functions

* src/callint.c (fix_command): Don't bug out on commands that
aren't symbols (like lambdas, for instance).

2 years agoEnhance safe_run_hooks_1 and safe_run_hook_funcall to handle more arguments
Alan Mackenzie [Mon, 15 Aug 2022 12:18:01 +0000 (12:18 +0000)]
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.

2 years agoFix variable types in warnings-suppress
Yury Kholodkov [Mon, 15 Aug 2022 07:36:06 +0000 (09:36 +0200)]
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

2 years agoMake eshell-mode more resilient towards `mode-line-format'
Lars Ingebrigtsen [Mon, 15 Aug 2022 07:27:13 +0000 (09:27 +0200)]
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.

2 years agoPacify warnings from gcc 12 in encode_coding_object
Matt Armstrong [Mon, 15 Aug 2022 06:56:57 +0000 (08:56 +0200)]
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).

2 years agoFix up the exclusion logic in loaddefs-generate
Lars Ingebrigtsen [Mon, 15 Aug 2022 06:29:28 +0000 (08:29 +0200)]
Fix up the exclusion logic in loaddefs-generate

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Allow
excluding files completely (bug#57144).

2 years agoTweak autoloads of defsubsts containing spaces/control chars
Lars Ingebrigtsen [Mon, 15 Aug 2022 06:24:29 +0000 (08:24 +0200)]
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]*\\'".

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Mon, 15 Aug 2022 06:22:30 +0000 (08:22 +0200)]
Regenerated ldefs-boot.el

2 years agoRemove Gnus Compatibility manual section
Lars Ingebrigtsen [Mon, 15 Aug 2022 06:01:02 +0000 (08:01 +0200)]
Remove Gnus Compatibility manual section

* doc/misc/gnus.texi (Compatibility): Remove outdated section
(bug#57178).

2 years agoFurther lisp-current-defun-name tweaks
Lars Ingebrigtsen [Mon, 15 Aug 2022 05:30:11 +0000 (07:30 +0200)]
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.

2 years agoMake update-directory-autoloads available by default again
Lars Ingebrigtsen [Mon, 15 Aug 2022 05:29:22 +0000 (07:29 +0200)]
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.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 15 Aug 2022 04:30:29 +0000 (06:30 +0200)]
Merge from origin/emacs-28

9d0dba44da ; * doc/lispintro/emacs-lisp-intro.texi: Fix typo.
0e336fa51f ; Improve documentation of minibuffer history wrt completion

2 years agoFix uninitialized variable false-positives
Po Lu [Mon, 15 Aug 2022 00:54:23 +0000 (08:54 +0800)]
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)

2 years agoMake message-mark-active-p obsolete in favor of mark-active
Stefan Kangas [Sun, 14 Aug 2022 22:32:46 +0000 (00:32 +0200)]
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.

2 years agoMake gnus-uu-view-with-metamail obsolete
Stefan Kangas [Sun, 14 Aug 2022 15:15:23 +0000 (17:15 +0200)]
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.

2 years agoDon't use obsolete library as example in Elisp Intro
Stefan Kangas [Sun, 14 Aug 2022 14:53:33 +0000 (16:53 +0200)]
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.

2 years agoMake gnus-iswitchb-completing-read obsolete
Stefan Kangas [Sun, 14 Aug 2022 14:37:11 +0000 (16:37 +0200)]
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.

2 years ago; * lisp/org/org.el: Delete unnecessary declarations.
Stefan Kangas [Sun, 14 Aug 2022 14:33:24 +0000 (16:33 +0200)]
; * lisp/org/org.el: Delete unnecessary declarations.

2 years agoDon't advertise obsolete library html2text.el
Stefan Kangas [Sun, 14 Aug 2022 14:28:25 +0000 (16:28 +0200)]
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.

2 years agoImprove timefns speed on integers
Paul Eggert [Sun, 14 Aug 2022 20:48:11 +0000 (13:48 -0700)]
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.

2 years agoDecode time conses before floats
Paul Eggert [Sun, 14 Aug 2022 20:48:11 +0000 (13:48 -0700)]
Decode time conses before floats

* src/timefns.c (decode_lisp_time): Test for conses before floats,
as conses are more common.

2 years agoWork around Bug#57211
Paul Eggert [Sun, 14 Aug 2022 20:48:11 +0000 (13:48 -0700)]
Work around Bug#57211

* src/buffer.c (Fgenerate_new_buffer_name): Allocate a bigger buffer.

2 years ago* doc/lispref/functions.texi: Fix capitalization.
Paul Eggert [Sun, 14 Aug 2022 18:17:10 +0000 (11:17 -0700)]
* doc/lispref/functions.texi: Fix capitalization.

2 years agoFix selection preservation bug when USE_XCB
Paul Eggert [Sun, 14 Aug 2022 18:11:30 +0000 (11:11 -0700)]
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.

2 years ago; Fix last change.
Eli Zaretskii [Sun, 14 Aug 2022 17:50:56 +0000 (20:50 +0300)]
; Fix last change.

2 years ago; Fix documentation of 'compiled-function-p' (bug#56648)
Eli Zaretskii [Sun, 14 Aug 2022 16:45:32 +0000 (19:45 +0300)]
; 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'.

2 years ago* lisp/emacs-lisp/ring.el (ring): Define as a type
Stefan Monnier [Sun, 14 Aug 2022 16:29:17 +0000 (12:29 -0400)]
* lisp/emacs-lisp/ring.el (ring): Define as a type

2 years ago(compiled-function-p): New function (bug#56648)
Stefan Monnier [Sun, 14 Aug 2022 16:28:37 +0000 (12:28 -0400)]
(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`.

2 years agoTramp code cleanup
Michael Albinus [Sun, 14 Aug 2022 15:01:25 +0000 (17:01 +0200)]
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.

2 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Sun, 14 Aug 2022 15:01:00 +0000 (17:01 +0200)]
; * etc/NEWS: Fix typos.

2 years ago* lisp/cedet/ede/emacs.el (ede-emacs-load): Delete obsolete name arg
Stefan Monnier [Sun, 14 Aug 2022 14:45:24 +0000 (10:45 -0400)]
* lisp/cedet/ede/emacs.el (ede-emacs-load): Delete obsolete name arg

2 years ago; * doc/lispintro/emacs-lisp-intro.texi: Fix typo.
Stefan Kangas [Sun, 14 Aug 2022 14:43:58 +0000 (16:43 +0200)]
; * doc/lispintro/emacs-lisp-intro.texi: Fix typo.

2 years ago* lisp/calendar/time-date.el (seconds-to-time): Use the original arg list
Stefan Monnier [Sun, 14 Aug 2022 14:41:40 +0000 (10:41 -0400)]
* lisp/calendar/time-date.el (seconds-to-time): Use the original arg list

2 years ago; Delete commented out manual section on emulation
Stefan Kangas [Sun, 14 Aug 2022 14:17:31 +0000 (16:17 +0200)]
; 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.

2 years ago* src/Makefile.in (elnlisp): Delete autoload.eln from list.
Stefan Kangas [Sun, 14 Aug 2022 14:02:34 +0000 (16:02 +0200)]
* src/Makefile.in (elnlisp): Delete autoload.eln from list.

2 years agoMake Gnus FAQ more contemporary
Stefan Kangas [Sun, 14 Aug 2022 13:20:18 +0000 (15:20 +0200)]
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".

2 years agoStrength-reduce apply with (list ...) as tail argument
Mattias Engdegård [Fri, 12 Aug 2022 13:04:51 +0000 (15:04 +0200)]
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 ...)

2 years agoSimplify code using take, ntake and butlast
Mattias Engdegård [Fri, 12 Aug 2022 11:35:01 +0000 (13:35 +0200)]
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.

2 years ago; * doc/misc/gnus-faq.texi (FAQ 1-3): Fix recent change.
Stefan Kangas [Sun, 14 Aug 2022 13:16:11 +0000 (15:16 +0200)]
; * doc/misc/gnus-faq.texi (FAQ 1-3): Fix recent change.

It

2 years agoFurther speedups of redisplay of long and truncated lines
Eli Zaretskii [Sun, 14 Aug 2022 12:47:59 +0000 (15:47 +0300)]
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'.

2 years ago; advice--interactive-form: Fix a typo introduced in recent change
Štěpán Němec [Sun, 14 Aug 2022 08:23:29 +0000 (10:23 +0200)]
; advice--interactive-form: Fix a typo introduced in recent change

* lisp/emacs-lisp/nadvice.el (advice--interactive-form): Fix a typo.

2 years ago; * src/xdisp.c (display_line): Fix a typo.
Eli Zaretskii [Sun, 14 Aug 2022 06:34:37 +0000 (09:34 +0300)]
; * src/xdisp.c (display_line): Fix a typo.

2 years ago; Improve documentation of minibuffer history wrt completion
Eli Zaretskii [Sun, 14 Aug 2022 05:51:44 +0000 (08:51 +0300)]
; 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)

2 years agoMore fixes to MPX drag-and-drop interaction
Po Lu [Sun, 14 Aug 2022 01:39:08 +0000 (09:39 +0800)]
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.

2 years ago; * etc/NEWS: Fix typo.
Philip Kaludercic [Sat, 13 Aug 2022 20:33:46 +0000 (22:33 +0200)]
; * etc/NEWS: Fix typo.

2 years agoDocument time-convert FORM argument as mandatory
Basil L. Contovounesios [Sat, 13 Aug 2022 18:59:39 +0000 (21:59 +0300)]
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.

2 years agoImprove time-convert docstring formatting for readability
Stefan Kangas [Sat, 13 Aug 2022 18:30:12 +0000 (20:30 +0200)]
Improve time-convert docstring formatting for readability

* src/timefns.c (Ftime_convert): Doc fix; improve formatting for
readability.

2 years agonadvice.el: Avoid exponential blow up in interactive-form recursion
Stefan Monnier [Sat, 13 Aug 2022 16:03:22 +0000 (12:03 -0400)]
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.

2 years ago; Fix documentation of 'deactivate-mark'
Eli Zaretskii [Sat, 13 Aug 2022 15:52:46 +0000 (18:52 +0300)]
; 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)

2 years agoUpdate Gnus Installation FAQ
Stefan Kangas [Sat, 13 Aug 2022 15:40:17 +0000 (17:40 +0200)]
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.

2 years agoMake many gnus version variables obsolete
Stefan Kangas [Sat, 13 Aug 2022 15:29:36 +0000 (17:29 +0200)]
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.

2 years agojs.el: Tweak last change
Stefan Monnier [Sat, 13 Aug 2022 15:18:40 +0000 (11:18 -0400)]
js.el: Tweak last change

* lisp/progmodes/js.el (js-json-mode): Use a function as value of
`syntax-propertize-function`.

2 years agoSpeed up display of long lines under 'truncate-lines'
Eli Zaretskii [Sat, 13 Aug 2022 13:59:22 +0000 (16:59 +0300)]
Speed up display of long lines under 'truncate-lines'

* src/xdisp.c (partial_line_height): Return zero for long and
truncated lines.
(fast_move_it_horizontally): New function.
(hscroll_window_tree, display_line): Use
'fast_move_it_horizontally' in preference to
'move_it_in_display_line_to', when dealing with long and truncated
lines.
(redisplay_internal): Optimize "optimization 3" for long and
truncated lines.
* src/buffer.c (syms_of_buffer) <large-hscroll-threshold>: New
variable.

* etc/NEWS: Announce 'large-hscroll-threshold'.

2 years agoAdd new value `dont-save' to `deactivate-mark'
Po Lu [Sat, 13 Aug 2022 13:12:20 +0000 (21:12 +0800)]
Add new value `dont-save' to `deactivate-mark'

* etc/NEWS: Announce new value of `deactivate-mark'.

* lisp/simple.el (deactivate-mark): Handle new value.
(bug#57147)

* src/keyboard.c (syms_of_keyboard): Update doc string of
`deactivate-mark'.

2 years agoTweak outline symbol icons
Lars Ingebrigtsen [Sat, 13 Aug 2022 12:40:58 +0000 (14:40 +0200)]
Tweak outline symbol icons

* lisp/outline.el (outline-close, outline-open): Use icons of the
same size in Symbola.

2 years agoAllow EXCLUDED-FILES in loaddefs-generate to be relative
Lars Ingebrigtsen [Sat, 13 Aug 2022 12:07:41 +0000 (14:07 +0200)]
Allow EXCLUDED-FILES in loaddefs-generate to be relative

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Allow the
excluded files to be relative (bug#57144).

2 years agoDon't hide final dump in admin/emake
Lars Ingebrigtsen [Fri, 12 Aug 2022 20:41:30 +0000 (22:41 +0200)]
Don't hide final dump in admin/emake

2 years ago; * lisp/emulation/viper.el: Bump version to match variable.
Stefan Kangas [Sat, 13 Aug 2022 11:10:45 +0000 (13:10 +0200)]
; * lisp/emulation/viper.el: Bump version to match variable.

2 years agoMake ps-mode-version variable obsolete
Stefan Kangas [Sat, 13 Aug 2022 11:08:47 +0000 (13:08 +0200)]
Make ps-mode-version variable obsolete

* lisp/progmodes/ps-mode.el (ps-mode-version): Make obsolete.
(ps-mode-show-version, ps-mode-submit-bug-report): Don't use above
obsolete variable.

2 years agoMake htmlfontify-version variable obsolete
Stefan Kangas [Sat, 13 Aug 2022 11:00:46 +0000 (13:00 +0200)]
Make htmlfontify-version variable obsolete

* lisp/htmlfontify.el (htmlfontify-version): Make obolete.
(hfy-meta-tags): Don't use above obsolete variable.

2 years agoDelete many references to Emacs 23 or older from docs
Stefan Kangas [Sat, 13 Aug 2022 10:39:42 +0000 (12:39 +0200)]
Delete many references to Emacs 23 or older from docs

* doc/emacs/glossary.texi (Glossary):
* doc/emacs/msdos.texi (Windows Fonts):
* doc/lispref/loading.texi (Library Search):
* doc/lispref/processes.texi (Accepting Output):
* doc/misc/auth.texi (GnuPG and EasyPG Assistant Configuration):
* doc/misc/efaq-w32.texi (Font names):
* doc/misc/efaq.texi (Turning on syntax highlighting)
(Escape sequences in shell output):
* doc/misc/eshell.texi (Bugs and ideas):
* doc/misc/gnus.texi (nnmairix requirements):
* doc/misc/gnus-faq.texi (FAQ 1-5):
* doc/misc/idlwave.texi (Troubleshooting):
* doc/misc/message.texi (Using S/MIME):
* doc/misc/mh-e.texi (Preface, Incorporating Mail):
* doc/misc/viper.texi (Viper Specials): Delete references to Emacs 23
or older.

2 years ago; * etc/NEWS: Minor fixes. (Bug#57169)
Eli Zaretskii [Sat, 13 Aug 2022 10:40:00 +0000 (13:40 +0300)]
; * etc/NEWS: Minor fixes.  (Bug#57169)

2 years agoPrevent selection converter from signalling if buffer is narrowed
Po Lu [Sat, 13 Aug 2022 09:49:31 +0000 (17:49 +0800)]
Prevent selection converter from signalling if buffer is narrowed

* lisp/select.el (xselect-convert-to-string): If positions are
outside the accessible portion of the buffer, don't return
anything.

2 years agoFix a recently-added Eshell test on MS-Windows
Eli Zaretskii [Sat, 13 Aug 2022 06:58:44 +0000 (09:58 +0300)]
Fix a recently-added Eshell test on MS-Windows

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/last-result-var-ext-cmd): Fix the test on
MS-Windows by making sure the internal 'format' command
is invoked.  (Bug#57129)

2 years agoMake '$?' and '$$' variables more consistent in Eshell
Jim Porter [Wed, 10 Aug 2022 03:09:57 +0000 (20:09 -0700)]
Make '$?' and '$$' variables more consistent in Eshell

Previously, '$?' (last exit code) was only useful for external
commands, and '$$' (last result) was only useful for Lisp commands.

* lisp/eshell/esh-cmd.el (eshell-lisp-form-nil-is-failure): New
option.
(eshell-lisp-command): Set last exit code to 1 when the command
signals an error, and 2 if it returns nil (for Lisp forms only).

* lisp/eshell/esh-proc.el (eshell-sentinel): Set last result to t if
the command succeeded.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/while-loop-lisp-form, esh-cmd-test/until-loop-lisp-form)
(esh-cmd-test/if-else-statement-lisp-form)
(esh-cmd-test/if-else-statement-lisp-form-2)
(esh-cmd-test/unless-else-statement-lisp-form): New tests.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-status-var-lisp-form)
(esh-var-test/last-status-var-lisp-form-2)
(esh-var-test/last-status-var-ext-cmd)
(esh-var-test/last-status-var-ext-cmd): New tests.
(esh-var-test/last-result-var2): Rename from this...
( esh-var-test/last-result-var-twice): ... to this.

* doc/misc/eshell.texi (Variables): Update documentation about '$?'
and '$$'.
(Control Flow): Mention that '(lisp forms)' can be used as
conditionals.

* etc/NEWS: Announce this change (bug#57129).

2 years agoAllow using dollar expansions in Eshell conditionals
Jim Porter [Tue, 9 Aug 2022 04:24:27 +0000 (21:24 -0700)]
Allow using dollar expansions in Eshell conditionals

* lisp/eshell/esh-cmd.el (eshell-structure-basic-command): Forms
beginning with 'eshell-escape-arg' are "data-wise".

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/while-loop)
(esh-cmd-test/until-loop, esh-cmd-test/if-statement)
(esh-cmd-test/if-else-statement, esh-cmd-test/unless-statement)
(esh-cmd-test/unless-else-statement): Use variable interpolation.
(esh-cmd-test/while-loop-ext-cmd, esh-cmd-test/until-loop-ext-cmd)
(esh-cmd-test/if-else-statement-ext-cmd)
(esh-cmd-test/unless-else-statement-ext-cmd): New tests, adapted from
the existing ones.

* doc/misc/eshell.texi (Control Flow): Update documentation for
conditionals (bug#57129).

2 years agoOnly set Eshell execution result metavariables when non-nil
Jim Porter [Sat, 6 Aug 2022 20:37:28 +0000 (13:37 -0700)]
Only set Eshell execution result metavariables when non-nil

This simplifies usage of 'eshell-close-handles' in several places and
makes it work more like the docstring indicated it would.

* lisp/eshell/esh-io.el (eshell-close-handles): Only store EXIT-CODE
and RESULT if they're non-nil.  Also, use 'dotimes' and 'dolist' to
simplify the implementation.

* lisp/eshell/em-alias.el (eshell-write-aliases-list):
* lisp/eshell/esh-cmd.el (eshell-rewrite-for-command)
(eshell-structure-basic-command): Adapt calls to
'eshell-close-handles'.

* test/lisp/eshell/eshell-tests.el (eshell-test/simple-command-result)
(eshell-test/lisp-command, eshell-test/lisp-command-with-quote)
(eshell-test/for-loop, eshell-test/for-name-loop)
(eshell-test/for-name-shadow-loop, eshell-test/lisp-command-args)
(eshell-test/subcommand, eshell-test/subcommand-args)
(eshell-test/subcommand-lisp): Move from here...

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/simple-command-result, esh-cmd-test/lisp-command)
(esh-cmd-test/lisp-command-with-quote, esh-cmd-test/for-loop)
(esh-cmd-test/for-name-loop, esh-cmd-test/for-name-shadow-loop)
(esh-cmd-test/lisp-command-args, esh-cmd-test/subcommand)
(esh-cmd-test/subcommand-args, esh-cmd-test/subcommand-lisp): ... to
here.
(esh-cmd-test/and-operator, esh-cmd-test/or-operator)
(esh-cmd-test/for-loop-list, esh-cmd-test/for-loop-multiple-args)
(esh-cmd-test/while-loop, esh-cmd-test/until-loop)
(esh-cmd-test/if-statement, esh-cmd-test/if-else-statement)
(esh-cmd-test/unless-statement, esh-cmd-test/unless-else-statement):
New tests.

* doc/misc/eshell.texi (Invocation): Explain '&&' and '||'.
(for loop): Move from here...
(Control Flow): ... to here, and add documentation for other control
flow forms.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 13 Aug 2022 04:30:27 +0000 (06:30 +0200)]
Merge from origin/emacs-28

72fc7258bf Delete references to deleted library hilit19.el
e746fc2e7b Delete stale comments from Lisp Intro manual
77613b9217 ; Delete redundant installation instructions from ebnf2ps.el

2 years ago; * src/xfns.c (Fx_set_mouse_absolute_pixel_position): Fix typo.
Po Lu [Sat, 13 Aug 2022 02:36:54 +0000 (10:36 +0800)]
; * src/xfns.c (Fx_set_mouse_absolute_pixel_position): Fix typo.

2 years agoImprove MPX interaction with drag-and-drop
Po Lu [Sat, 13 Aug 2022 02:35:08 +0000 (10:35 +0800)]
Improve MPX interaction with drag-and-drop

* src/xfns.c (Fx_set_mouse_absolute_pixel_position): Use
internal client pointer record.
* src/xterm.c (x_dnd_cancel_dnd_early): New function.  Only used
on XI2 builds so far.
(x_dnd_begin_drag_and_drop): Set the pointer device used for DND
events.
(xi_disable_devices): Cancel the drag-and-drop operation if that
device is disabled.
(x_send_scroll_bar_event): Update outdated comment.
(handle_one_xevent): Only accept DND events from that device.
(frame_set_mouse_pixel_position): Use internal client pointer
record.

2 years ago; * lisp/cedet/ede.el: Bump version header to match variable.
Stefan Kangas [Fri, 12 Aug 2022 20:32:39 +0000 (22:32 +0200)]
; * lisp/cedet/ede.el: Bump version header to match variable.

2 years agoHide local variable section in emacs-news-modes
Stefan Kangas [Fri, 12 Aug 2022 20:22:17 +0000 (22:22 +0200)]
Hide local variable section in emacs-news-modes

* lisp/textmodes/emacs-authors-mode.el
(emacs-authors-mode--hide-local-variables): Move from here...
* lisp/emacs-lisp/subr-x.el (emacs-etc--hide-local-variables):
...to here.

* lisp/textmodes/emacs-authors-mode.el (subr-x): Require.
(emacs-authors-mode): Use above renamed function.

* lisp/textmodes/emacs-news-mode.el (subr-x): Require.
(emacs-news--mode-common): Call 'emacs-etc--hide-local-variables'
to hide local variables section.

2 years agoDon't update loaddefs.el timestamps uselessly in loaddefs-generate
Lars Ingebrigtsen [Fri, 12 Aug 2022 18:22:26 +0000 (20:22 +0200)]
Don't update loaddefs.el timestamps uselessly in loaddefs-generate

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Don't
re-write the loaddefs.el file when there's no reason to.

2 years agoSupport imenu in emacs-authors-mode
Stefan Kangas [Fri, 12 Aug 2022 16:33:34 +0000 (18:33 +0200)]
Support imenu in emacs-authors-mode

* lisp/textmodes/emacs-authors-mode.el
(emacs-authors-imenu-generic-expression): New variable.
(emacs-authors-mode): Add imenu support.

2 years agoRename etc-authors-mode to emacs-authors-mode
Stefan Kangas [Thu, 11 Aug 2022 11:49:15 +0000 (13:49 +0200)]
Rename etc-authors-mode to emacs-authors-mode

* emacs-authors-mode.el: Rename all symbols from 'etc-authors-*' to
'emacs-authors-*'.  Make most old names into obsolete compat aliases.
* admin/authors.el:  (Bug#57105)
* etc/AUTHORS: Use 'emacs-authors' instead of 'etc-authors'.

2 years agoRename etc-authors-mode.el to emacs-authors-mode.el
Stefan Kangas [Thu, 11 Aug 2022 11:36:33 +0000 (13:36 +0200)]
Rename etc-authors-mode.el to emacs-authors-mode.el

* lisp/textmodes/etc-authors-mode.el: Move from here...
* lisp/textmodes/emacs-authors-mode.el: ...to here.  (Bug#57105)

2 years ago; etc/PROBLEMS: Move Ubuntu 8.04 entry to legacy systems.
Stefan Kangas [Fri, 12 Aug 2022 16:09:22 +0000 (18:09 +0200)]
; etc/PROBLEMS: Move Ubuntu 8.04 entry to legacy systems.

2 years agoDelete references to deleted library hilit19.el
Stefan Kangas [Fri, 12 Aug 2022 15:48:30 +0000 (17:48 +0200)]
Delete references to deleted library hilit19.el

* doc/misc/gnus.texi (Compatibility):
* lisp/progmodes/f90.el:
* lisp/ps-print.el:
* lisp/vc/ediff.el: Delete references to hilit19.el.

2 years agoFix emacs-news-view-mode-map inheritance
Lars Ingebrigtsen [Fri, 12 Aug 2022 15:44:51 +0000 (17:44 +0200)]
Fix emacs-news-view-mode-map inheritance

* lisp/textmodes/emacs-news-mode.el (emacs-news-view-mode-map):
Fix inheritance from `special-mode-map' (bug#57100).

2 years agoClarify bookmark-set prompt
Lars Ingebrigtsen [Fri, 12 Aug 2022 15:24:38 +0000 (17:24 +0200)]
Clarify bookmark-set prompt

* lisp/bookmark.el (bookmark-set): Clarify prompt further
(bug#57128).

2 years agogud.el: invoke 'perldb' with '-E' instead of '-e'
Harald Jörg [Fri, 12 Aug 2022 15:15:19 +0000 (17:15 +0200)]
gud.el: invoke 'perldb' with '-E' instead of '-e'

* lisp/progmodes/gud.el (gud-perldb-massage-args): Allow '-E' switch
and use it as a default in favor of '-e'

* etc/NEWS ('perldb' now recognizes '-E') New entry in section 'Gud'

2 years agoRemove some more outdated Gnus manual stuff
Lars Ingebrigtsen [Fri, 12 Aug 2022 15:10:27 +0000 (17:10 +0200)]
Remove some more outdated Gnus manual stuff

* doc/misc/gnus.texi (Mail Source Customization): Remove more
outdated text (bug#57156).

2 years agoRemove (gnus) Gnus Development manual section
Lars Ingebrigtsen [Fri, 12 Aug 2022 15:09:25 +0000 (17:09 +0200)]
Remove (gnus) Gnus Development manual section

* doc/misc/gnus.texi (Gnus Development): Remove outdated section
(bug#57156).