]> git.eshelyaron.com Git - emacs.git/log
emacs.git
17 months agocperl-mode: Fix byte-compilation warnings
Harald Jörg [Sat, 1 Jul 2023 13:25:33 +0000 (15:25 +0200)]
cperl-mode: Fix byte-compilation warnings

* lisp/progmodes/cperl-mode.el (defconst): Reformat docstring to
fit into 80 columns.
(cperl-find-sub-attrs): Mark lexical parameters as unused.

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-attrs-and-signatures): Fix use of
`match-beginning'
(perl-indent-parens-as-block): Define as a variable.

17 months agoAdd duplicate-region-final-position (bug#64185)
Mattias Engdegård [Fri, 30 Jun 2023 16:34:10 +0000 (18:34 +0200)]
Add duplicate-region-final-position (bug#64185)

* lisp/misc.el (duplicate-region-final-position): New defcustom.
(duplicate-dwim): Use it.
* lisp/rect.el (rectangle--duplicate-right): Add displacement
argument.
* test/lisp/misc-tests.el (misc--duplicate-dwim): Extend test.

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:30:00 +0000 (06:30 -0400)]
Merge from origin/emacs-29

edd36786e1e ; * lisp/bookmark.el (bookmark-bmenu-locate): Doc fix (bu...
16eac20a5db ; Fix last change
ab8d0f7b768 Add project command entries to the menu-bar
fc6099bf046 ; Improve documentation of text-property-search-* functions
cc660bd2651 ; * etc/PROBLEMS: Mention MinGW problems with -D_FORTIFY_...
a5bd9fb8c4a ; Improve doc strings in register.el
0be18d80978 ; Fix @xref in last change to doc/emacs/regs.texi.
624c779517d ; Fix tree-sitter C binding typos in Elisp manual.
16e9bdff4f4 Improve documentation of registers

17 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:30:00 +0000 (06:30 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

884b668b981 Use a temporary buffer in nnagent-request-set-mark (bug#6...

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:29:52 +0000 (06:29 -0400)]
Merge from origin/emacs-29

a722e7dd152 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
65f146cf1c2 ; * lisp/calculator.el (calculator-need-3-lines): Fix las...
9e8386bdacc Support cons cell as value of ':line-width' box attribute
1d2ba6b363b ; * admin/notes/tree-sitter/treesit_record_change: Update.
02b6be892fa Add missing calls to treesit_record_change in editfns.c
e982192e933 Call treesit_record_change in subst-char-in-region (bug#6...
ddbb11f5657 ; * lisp/misc.el (duplicate-line-final-position): Fix las...
cecbe92d5d9 ; * lisp/misc.el (duplicate-line-final-position): doc pre...
042f0d6a14c ; Fix documentation of ':box' face attribute

# Conflicts:
# etc/NEWS

17 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:29:44 +0000 (06:29 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

d5cff340b3b * lisp/misc.el (duplicate-line-final-position): New defcu...

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:29:43 +0000 (06:29 -0400)]
Merge from origin/emacs-29

ef16339918e Make js-beginning-of-defun return non-nil on success
2c90ade09a4 Tree-sitter use with-silent-modifications like jit-lock (...
11cead0d73c Fix todo-mode.el Commentary and a doc string (bug#64298)
6ae83322d4c Prevent truncation of todo-mode categories sexp
ee41f07be52 Avoid making todo-mode buffers manually editable
53332bdf625 ; * doc/lispref/variables.texi: Fix define-obsolete-varia...
162c9c058eb ; Document that 'named-let' needs lexical-binding
68028f0fa31 ; * etc/PROBLEMS: Fix typo.

17 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:29:43 +0000 (06:29 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

ac0a82ea987 Fix Tramp mount-spec (don't merge)

17 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:29:43 +0000 (06:29 -0400)]
Merge from origin/emacs-29

4df510c7a70 Fix VC package build when doc file isn't in a subdir
382f5fa8130 ; * doc/emacs/package.texi (Fetching Package Sources): Fi...
fc7e7c3fde3 Fix type check in tramp-get-buffer-string
2aa57fe6cf9 ; Fix typo in maintaining.texi (bug#64279)

17 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 1 Jul 2023 10:29:43 +0000 (06:29 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

1d9200d9bbb ; * doc/lispintro/emacs-lisp-intro.texi (car & cdr): Fix ...
987b25d60dd Clarify list terminology

17 months ago; * lisp/bookmark.el (bookmark-bmenu-locate): Doc fix (bug#64370).
Eli Zaretskii [Sat, 1 Jul 2023 09:46:37 +0000 (12:46 +0300)]
; * lisp/bookmark.el (bookmark-bmenu-locate): Doc fix (bug#64370).

17 months ago; Fix last change
Eli Zaretskii [Sat, 1 Jul 2023 09:43:33 +0000 (12:43 +0300)]
; Fix last change

* lisp/menu-bar.el (menu-bar-file-menu, menu-bar-search-menu)
(menu-bar-replace-menu, menu-bar-project-menu)
(menu-bar-buffers-menu-command-entries): Fix help-echo text (bug#63469).

17 months agoAdd project command entries to the menu-bar
Spencer Baugh [Mon, 15 May 2023 18:01:32 +0000 (14:01 -0400)]
Add project command entries to the menu-bar

This will make it easier for new users to learn these increasingly
important and useful commands.  (Bug#63469)

* lisp/menu-bar.el (menu-bar-file-menu): Add project-dired and
project-find-file entries.
(menu-bar-search-menu): Add project-find-regexp entry.
(menu-bar-replace-menu): Add project-query-replace regexp entry.
(menu-bar-shell-commands-menu): Add project-shell entry.
(menu-bar-buffers-menu-command-entries): Add project-switch-to-buffer
and project-list-buffer entries.
(menu-bar-project-menu): Add.
(menu-bar-tools-menu): Add "Project" submenu, and also project-compile
entry and change text for compile entry.

17 months ago; Improve documentation of text-property-search-* functions
Eli Zaretskii [Sat, 1 Jul 2023 09:28:33 +0000 (12:28 +0300)]
; Improve documentation of text-property-search-* functions

* doc/lispref/text.texi (Property Search): Improve wording and markup.

* lisp/emacs-lisp/text-property-search.el (text-property-search-forward)
(text-property-search-backward): Doc fixes.  (Bug#64367)

17 months agoFix total count of messages in Rmail summary buffers
Eli Zaretskii [Sat, 1 Jul 2023 08:34:43 +0000 (11:34 +0300)]
Fix total count of messages in Rmail summary buffers

* lisp/mail/rmailsum.el (rmail-new-summary-1): Actually count the
messages in the summary buffer instead of relying on
'rmail-total-messages'.  Reported by Andrea Monaco
<andrea.monaco@autistici.org>.

17 months agoRecognize PKGBUILD as bash style
Davide Masserut [Tue, 20 Jun 2023 13:55:11 +0000 (15:55 +0200)]
Recognize PKGBUILD as bash style

* lisp/progmodes/sh-script.el (sh--guess-shell): Handle PKGBUILD.
(Bug#64251)

17 months agoImprove Tramp for remote WebDAV
Michael Albinus [Sat, 1 Jul 2023 08:19:37 +0000 (10:19 +0200)]
Improve Tramp for remote WebDAV

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
Improve stability for WebDAV.

17 months ago; * etc/PROBLEMS: Mention MinGW problems with -D_FORTIFY_SOURCE=2.
Eli Zaretskii [Sat, 1 Jul 2023 07:01:59 +0000 (10:01 +0300)]
; * etc/PROBLEMS: Mention MinGW problems with -D_FORTIFY_SOURCE=2.

17 months agocperl-mode: Add recent features to etc/NEWS
Harald Jörg [Fri, 30 Jun 2023 21:55:53 +0000 (23:55 +0200)]
cperl-mode: Add recent features to etc/NEWS

I mishandled git and killed my previous commit.  Sorry for the noise.

* etc/NEWS: Add a section to Changes in Specialized Modes

17 months agocperl-mode: Add recent features to etc/NEWS
Harald Jörg [Fri, 30 Jun 2023 21:58:31 +0000 (23:58 +0200)]
cperl-mode: Add recent features to etc/NEWS

* etc/NEWS: Add a section to Changes in Specialized Modes

17 months agocperl-mode: Add recent features to etc/NEWS
Harald Jörg [Fri, 30 Jun 2023 21:55:53 +0000 (23:55 +0200)]
cperl-mode: Add recent features to etc/NEWS

* etc/NEWS: Add a section to Changes in Specialized Modes

17 months ago; cperl-mode-resources: More test cases for cperl-mode.el
Harald Jörg [Fri, 30 Jun 2023 21:48:59 +0000 (23:48 +0200)]
; cperl-mode-resources: More test cases for cperl-mode.el

* test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl:
Adapt to the signatures now available in cperl-mode.el

17 months agocperl-mode.el: Support subroutine signatures
Harald Jörg [Fri, 30 Jun 2023 21:41:06 +0000 (23:41 +0200)]
cperl-mode.el: Support subroutine signatures

Since Perl 5.20, subroutine signatures were available as an
experimental feature.  With Perl 5.38, they will be always enabled in
the new object system.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-64190.pl:
* test/lisp/progmodes/cperl-mode-resources/cperl-bug-64364.pl: New
test resources.

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-attrs-and-signatures): Add tests for
signatures.
(cperl-test-attribute-rx, cperl-test-attribute-list-rx)
(cperl-test-prototype-rx, cperl-test-signature-rx): Tests for the
new rx sequences.
(cperl-test-bug-64190): New test for multiline declarations.
(cperl-test-bug-64364): New test for indentation of declarations.

* lisp/progmodes/cperl-mode.el:
(toplevel): New rx sequences to match Perl variables and attributes.
(cperl-declaration-header-p): New function to identify declarations.
(cperl-block-declaration-p): Use the new function.
(cperl-mode): Use the rx sequences.
(cperl-get-state): Use the new function.
(cperl-sniff-for-indent): Use the new function.
(cperl-find-sub-attrs): Improve fontification of subroutine
prototypes and attributes while typing when jit-lock-mode is
active.  Detect signatures, and distinguish them from prototypes.
(cperl-find-pods-heres): Use the rx sequences to detect subroutines.
(cperl-init-faces): Use the rx sequences for fontification.

17 months ago; Improve doc strings in register.el
Eli Zaretskii [Fri, 30 Jun 2023 11:47:12 +0000 (14:47 +0300)]
; Improve doc strings in register.el

* lisp/register.el (register-preview-delay)
(register-describe-oneline, register-preview-default)
(register-preview-function, register-preview, point-to-register)
(window-configuration-to-register)
(frame-configuration-to-register, jump-to-register)
(register-val-jump-to, number-to-register, increment-register)
(view-register, list-registers, register-val-describe)
(insert-register, register-val-insert, copy-to-register)
(append-to-register, prepend-to-register)
(copy-rectangle-to-register): Doc fixes.

17 months ago; Fix @xref in last change to doc/emacs/regs.texi.
Basil L. Contovounesios [Fri, 30 Jun 2023 11:21:00 +0000 (12:21 +0100)]
; Fix @xref in last change to doc/emacs/regs.texi.

17 months ago; Fix tree-sitter C binding typos in Elisp manual.
Basil L. Contovounesios [Fri, 30 Jun 2023 10:58:33 +0000 (11:58 +0100)]
; Fix tree-sitter C binding typos in Elisp manual.

17 months agoImprove documentation of registers
Eli Zaretskii [Fri, 30 Jun 2023 07:13:53 +0000 (10:13 +0300)]
Improve documentation of registers

* doc/lispref/text.texi (Registers): Document buffers in
registers.  Mention "frameset" as another name for "frame
configuration".
* doc/emacs/regs.texi (Registers, Configuration Registers)
(File and Buffer Registers): Clarify and improve wording.  Add
cross-references and indexing.
(Configuration Registers): Rename the section to a more accurate
name.  (Bug#64354)

* lisp/register.el (jump-to-register, point-to-register)
(register-alist, frame-configuration-to-register): Doc fixes.
(Bug#64353)

17 months agoUse a temporary buffer in nnagent-request-set-mark (bug#64117)
Andrew G Cohen [Tue, 27 Jun 2023 07:40:46 +0000 (15:40 +0800)]
Use a temporary buffer in nnagent-request-set-mark (bug#64117)

Commit cb12a84f2c519a48dd87453c925e3bc36d9944db inadvertently removed
the use of a temporary buffer in nnagent-request-set-mark.  Bug and
fix reported by Jens Schmidt <jschmidt4gnu@vodafonemail.de>

* lisp/gnus/nnagent.el (nnagent-request-set-mark): Restore the use of
a temporary buffer that was inadvertently removed.

(cherry picked from commit 5075d752773c31d959272a7e2b73b1dc38ba184c)

17 months agoUse OUT-DIR in treesit-install-language-grammar (bug#64295)
Yuan Fu [Thu, 29 Jun 2023 18:27:37 +0000 (11:27 -0700)]
Use OUT-DIR in treesit-install-language-grammar (bug#64295)

* lisp/treesit.el (treesit-install-language-grammar): Use out-dir.

17 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Thu, 29 Jun 2023 18:23:12 +0000 (21:23 +0300)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

17 months ago; * lisp/calculator.el (calculator-need-3-lines): Fix last change.
Eli Zaretskii [Thu, 29 Jun 2023 18:21:28 +0000 (21:21 +0300)]
; * lisp/calculator.el (calculator-need-3-lines): Fix last change.

17 months agoSupport cons cell as value of ':line-width' box attribute
john muhl [Wed, 28 Jun 2023 17:58:27 +0000 (12:58 -0500)]
Support cons cell as value of ':line-width' box attribute

* lisp/calculator.el (calculator-need-3-lines): Support
values of a face's ':line-width' box attribute that are
cons cells.  (Bug#64344)

Copyright-paperwork-exempt: yes

17 months ago; * admin/notes/tree-sitter/treesit_record_change: Update.
Yuan Fu [Thu, 29 Jun 2023 00:05:29 +0000 (17:05 -0700)]
; * admin/notes/tree-sitter/treesit_record_change: Update.

17 months agoAdd missing calls to treesit_record_change in editfns.c
Yuan Fu [Thu, 29 Jun 2023 00:03:19 +0000 (17:03 -0700)]
Add missing calls to treesit_record_change in editfns.c

These should be all that are missing.  See the next commit for detail.

* src/editfns.c (Ftranslate_region_internal):
(Ftranspose_regions): Call treesit_record_change.

17 months agoCall treesit_record_change in subst-char-in-region (bug#64329)
Yuan Fu [Wed, 28 Jun 2023 21:16:52 +0000 (14:16 -0700)]
Call treesit_record_change in subst-char-in-region (bug#64329)

* src/editfns.c (Fsubst_char_in_region): Call treesit_record_change in
the else branch.

17 months ago; * lisp/misc.el (duplicate-line-final-position): Fix last doc change.
Eli Zaretskii [Thu, 29 Jun 2023 10:00:21 +0000 (13:00 +0300)]
; * lisp/misc.el (duplicate-line-final-position): Fix last doc change.

Repeat after me: "The first line of a doc string must be a single
complete sentence."

17 months ago; * lisp/misc.el (duplicate-line-final-position): doc precision
Mattias Engdegård [Thu, 29 Jun 2023 09:21:53 +0000 (11:21 +0200)]
; * lisp/misc.el (duplicate-line-final-position): doc precision

17 months agoUse a temporary buffer in nnagent-request-set-mark (bug#64117)
Andrew G Cohen [Tue, 27 Jun 2023 07:40:46 +0000 (15:40 +0800)]
Use a temporary buffer in nnagent-request-set-mark (bug#64117)

Commit cb12a84f2c519a48dd87453c925e3bc36d9944db inadvertently removed
the use of a temporary buffer in nnagent-request-set-mark.  Bug and
fix reported by Jens Schmidt <jschmidt4gnu@vodafonemail.de>

* lisp/gnus/nnagent.el (nnagent-request-set-mark): Restore the use of
a temporary buffer that was inadvertently removed.

17 months ago; Fix documentation of ':box' face attribute
Eli Zaretskii [Thu, 29 Jun 2023 07:47:26 +0000 (10:47 +0300)]
; Fix documentation of ':box' face attribute

* lisp/faces.el (set-face-attribute): Update the documentation of
WIDTH in the :box face attribute.  (Bug#64344)

17 months ago* lisp/misc.el (duplicate-line-final-position): New defcustom (bug#64185).
Juri Linkov [Thu, 29 Jun 2023 07:13:09 +0000 (10:13 +0300)]
* lisp/misc.el (duplicate-line-final-position): New defcustom (bug#64185).

* lisp/misc.el (duplicate-line): Use it.

* test/lisp/misc-tests.el (misc--duplicate-line): Add tests for
duplicate-line-final-position.

17 months ago* lisp/misc.el (duplicate-line-final-position): New defcustom (bug#64185).
Juri Linkov [Thu, 29 Jun 2023 07:13:06 +0000 (10:13 +0300)]
* lisp/misc.el (duplicate-line-final-position): New defcustom (bug#64185).

* lisp/misc.el (duplicate-line): Use it.

* test/lisp/misc-tests.el (misc--duplicate-line): Add tests for
duplicate-line-final-position.

Don't merge to master.

17 months agoMake js-beginning-of-defun return non-nil on success
Daniel Martín [Sun, 25 Jun 2023 20:17:14 +0000 (22:17 +0200)]
Make js-beginning-of-defun return non-nil on success

The docstring of 'beginning-of-defun-function' says that the
function shall return non-nil when it found the beginning
of a defun.  This is specially important because the calling
code decides when to move point depending on the return value.
* lisp/progmodes/js.el (js-beginning-of-defun)
(js--beginning-of-defun-flat): Return non-nil when the beginning
of a defun is found.  (Bug#64283)

* test/lisp/progmodes/js-tests.el (js-mode-end-of-defun): Add a unit
test.

18 months agoFontify C, C++, Objective C identifiers containing $
Alan Mackenzie [Wed, 28 Jun 2023 18:29:39 +0000 (18:29 +0000)]
Fontify C, C++, Objective C identifiers containing $

Optionally, fontify them with font-lock-warning-face.
This fixes bug#64204.

* lisp/progmodes/cc-fonts.el (c-font-lock-ids-with-dollar):
New function.
(c-simple-decl-matchers, c-complex-decl-matchers): invoke
c-font-lock-ids-with-dollar for pertinent languages.

* lisp/progmodes/cc-langs.el (c-symbol-start): Add `$' to the
character list.
(c-dollar-in-ids): New lang const.
(c-symbol-key): For the Pike value, use the AWK value rather
than the C value as the basis, as the latter is no longer
suitable.

* lisp/progmodes/cc-vars.el (c-warn-ids-with-dollar): New
customizable option.

* doc/misc/cc-mode.texi ("Miscellaneous Font Locking"): Add a
section on the new optional fontification of identifiers with
'font-lock-warning-face'.

18 months agoAdapt Tramp's kubernetes integration
Michael Albinus [Wed, 28 Jun 2023 14:53:01 +0000 (16:53 +0200)]
Adapt Tramp's kubernetes integration

* doc/misc/tramp.texi (Inline methods): Shorten kubernetes entry.
(Kubernetes setup): New node.
(Top, Configuration): Add it to the menu.

* lisp/net/tramp-container.el (tramp-kubernetes--context-namespace):
Adapt dpcstring.
(tramp-kubernetes-connection-local-default-profile)
(tramp-kubernetes-connection-local-default-variables)
(tramp-flatpak-connection-local-default-profile)
(tramp-flatpak-connection-local-default-variables): Rename.

* lisp/net/tramp.el (tramp-expand-args): Use `tramp-compat-take'.

* test/lisp/net/tramp-tests.el (tramp-test34-connection-local-variables)
(tramp-test34-explicit-shell-file-name): Don't let-bind
`connection-local-profile-alist' and `connection-local-criteria-alist'.

18 months ago* lisp/emacs-lisp/cl-macs.el (cl--slet): Fix bug#64315
Stefan Monnier [Wed, 28 Jun 2023 13:24:30 +0000 (09:24 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--slet): Fix bug#64315

18 months agoSpeed up duplicate-dwim and duplicate-line by another factor 10
Mattias Engdegård [Wed, 28 Jun 2023 12:36:39 +0000 (14:36 +0200)]
Speed up duplicate-dwim and duplicate-line by another factor 10

* lisp/misc.el (duplicate--insert-copies): New.
(duplicate-line, duplicate-dwim): Call it.

18 months agoTree-sitter use with-silent-modifications like jit-lock (bug#64321)
Yuan Fu [Wed, 28 Jun 2023 03:58:34 +0000 (20:58 -0700)]
Tree-sitter use with-silent-modifications like jit-lock (bug#64321)

* lisp/treesit.el (treesit--font-lock-notifier): Use
with-silent-modifications when marking modified text to be fontified
by jit-lock.  This is what jit-lock itself does.

18 months agoMerge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs
Stefan Monnier [Tue, 27 Jun 2023 20:14:43 +0000 (16:14 -0400)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs

18 months agocl-macs-tests.el (cl-&key-arguments): Fix regression
Stefan Monnier [Tue, 27 Jun 2023 20:14:32 +0000 (16:14 -0400)]
cl-macs-tests.el (cl-&key-arguments): Fix regression

* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Turn "cannot use
lexical var" errors into warnings.
Make the obey `with-suppressed-warnings`.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments):
Suppress warnings.

18 months agoAmend the handling of c-laomib-cache.
Alan Mackenzie [Tue, 27 Jun 2023 20:11:48 +0000 (20:11 +0000)]
Amend the handling of c-laomib-cache.

There was unstable syntactic analysis of lines which were brace
lists.  This fixes bug#64133.

* lisp/progmodes/cc-engine.el (c-laomib-cache): Allow several
entries with the same LIM element corresponding to distinct
scanning regions.
(c-laomib-get-cache): Add new parameter START.  Adjust to be
able to have entries with the same LIM element and handle them
correctly.
(c-laomib-put-cache): Amend the handling of cache entries with
the same LIM element.
(c-looking-at-or-maybe-in-bracelist): Supply the needed new
argument to c-laomib-get-cache.  Add in a new call to
c-laomib-put-cache.

18 months agoFix todo-mode.el Commentary and a doc string (bug#64298)
Stephen Berman [Tue, 27 Jun 2023 15:50:18 +0000 (17:50 +0200)]
Fix todo-mode.el Commentary and a doc string (bug#64298)

* lisp/calendar/todo-mode.el: Explicitly note in the Commentary
that the Todo mode user manual is a separate Info manual in the
Emacs installation.
(todo-always-add-time-string): Replace doc string, which was
mistakenly retained in the initial merge of this version of
todo-mode.el, by a correct description of this user option.

18 months agoPrevent truncation of todo-mode categories sexp
Stephen Berman [Tue, 27 Jun 2023 15:38:20 +0000 (17:38 +0200)]
Prevent truncation of todo-mode categories sexp

* lisp/calendar/todo-mode.el (todo-delete-file)
(todo-move-category, todo-convert-legacy-files)
(todo-update-categories-sexp, todo-check-format):
Bind print-length and print-level to nil before using prin1
and related functions, to avoid truncating the todo categories
sexp and possibly corrupting the file format.

18 months agoAvoid making todo-mode buffers manually editable
Stephen Berman [Tue, 27 Jun 2023 15:27:42 +0000 (17:27 +0200)]
Avoid making todo-mode buffers manually editable

* lisp/calendar/todo-mode.el (todo-add-category)
(todo-move-category, todo-edit-item--header)
(todo-set-item-priority, todo-move-item, todo-item-undone)
(todo-archive-done-item, todo-set-category-number): Restrict the
scope of nil buffer-read-only to the function calls that change
buffer text, thereby preventing todo mode buffers from becoming
manually editable and hence possibly corrupted when the minibuffer
is in use.

18 months agoSpeed up duplicate-line by a factor of 2
Mattias Engdegård [Tue, 27 Jun 2023 15:00:11 +0000 (17:00 +0200)]
Speed up duplicate-line by a factor of 2

* lisp/misc.el (duplicate-line): Add the newline to the string to be
inserted instead of inserting it separately.
This makes duplicate-line as fast as duplicate-dwim with a contiguous
region.  Both could easily be made faster yet by making the code more
complex.

18 months ago; * doc/lispref/variables.texi: Fix define-obsolete-variable-alias arglist
Vladimir Sedach [Tue, 27 Jun 2023 04:50:59 +0000 (22:50 -0600)]
; * doc/lispref/variables.texi: Fix define-obsolete-variable-alias arglist

The WHEN argument is not optional anymore (bug#64312)

Copyright-paperwork-exempt: yes

18 months agoFix dired-insert-directory wrt remote directories
Michael Albinus [Tue, 27 Jun 2023 10:46:49 +0000 (12:46 +0200)]
Fix dired-insert-directory wrt remote directories

* lisp/dired.el (dired-insert-directory): Respect remote
directories consequently.

18 months ago; Document that 'named-let' needs lexical-binding
Eli Zaretskii [Mon, 26 Jun 2023 15:41:06 +0000 (18:41 +0300)]
; Document that 'named-let' needs lexical-binding

* doc/lispref/variables.texi (Local Variables): Warn that
'named-let' only works under lexical-binding.  (Bug#64290)

18 months agostartup.el: Don't override init.el custom of `debug-ignored-errors`
Stefan Monnier [Mon, 26 Jun 2023 15:25:14 +0000 (11:25 -0400)]
startup.el: Don't override init.el custom of `debug-ignored-errors`

* lisp/startup.el (startup--load-user-init-file): Undo commit 4302bc9b0f12.
Mimic the code we use for `debug-on-error` instead.

18 months agoFix Tramp mount-spec
Michael Albinus [Mon, 26 Jun 2023 13:48:48 +0000 (15:48 +0200)]
Fix Tramp mount-spec

* lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): The mount-spec
could contain an optional trailing slash.  (Bug#64278)

* lisp/net/tramp-rclone.el (tramp-rclone-handle-file-system-info):
Check return code of command.

18 months ago; * etc/PROBLEMS: Fix typo.
Robert Pluim [Mon, 26 Jun 2023 13:26:32 +0000 (15:26 +0200)]
; * etc/PROBLEMS: Fix typo.

18 months agoCC Mode: Fix parenthesis bug in XEmacs part of macro
Alan Mackenzie [Mon, 26 Jun 2023 13:25:45 +0000 (13:25 +0000)]
CC Mode: Fix parenthesis bug in XEmacs part of macro

* lisp/progmodes/cc-defs.el (c-looking-at-non-alphnumspace):
Correct confused parentheses.

18 months agoFix Tramp mount-spec (don't merge)
Michael Albinus [Mon, 26 Jun 2023 10:41:04 +0000 (12:41 +0200)]
Fix Tramp mount-spec (don't merge)

* lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): The mount-spec
could contain an optional trailing slash.  (Bug#64278)

18 months ago; * doc/misc/erc.texi: Mention ERC's own mailing list.
F. Jason Park [Sun, 25 Jun 2023 13:43:56 +0000 (06:43 -0700)]
; * doc/misc/erc.texi: Mention ERC's own mailing list.

18 months agoAvoid "shadows" warning from erc-button--nick slots
F. Jason Park [Sun, 25 Jun 2023 13:15:11 +0000 (06:15 -0700)]
Avoid "shadows" warning from erc-button--nick slots

* lisp/erc/erc-button.el (erc-button-nick): Rename slots that share
names with user options to avoid "lexical argument shadows the dynamic
variable" warning.
(erc-button-add-nickname-buttons): Remove "erc-button-" namespace from
slot accessors.

18 months agoRevert "Allow erc-reuse-frames to favor connections"
F. Jason Park [Tue, 20 Jun 2023 06:14:40 +0000 (23:14 -0700)]
Revert "Allow erc-reuse-frames to favor connections"

This (mostly) reverts commit 0e4c07dc7448aafd2aa5f6e101d7b7aac23d8a6b.

* etc/ERC-NEWS: Also revert hunk from 52c8d537 "* etc/ERC-NEWS: Add
section for ERC 5.6." because it announced this feature, which no
longer exists.
* lisp/erc/erc.el (erc-reuse-frames): Revise doc string instead of
reverting completely.  (Bug#62833)

18 months agoFix VC package build when doc file isn't in a subdir
Daniel Semyonov [Fri, 23 Jun 2023 05:40:57 +0000 (08:40 +0300)]
Fix VC package build when doc file isn't in a subdir

* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Expand 'file' before attempting to get its directory.  (Bug#64242)

18 months agoMerge remote-tracking branch 'refs/remotes/origin/master'
Stefan Monnier [Sun, 25 Jun 2023 15:39:01 +0000 (11:39 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'

18 months agocl-macs.el: Silence recent new "lexical arg shadows" warnings
Stefan Monnier [Sun, 25 Jun 2023 15:38:40 +0000 (11:38 -0400)]
cl-macs.el: Silence recent new "lexical arg shadows" warnings

* lisp/emacs-lisp/cl-macs.el (cl--slet): Add `nowarn` arg.
(cl--defsubst-expand): Use it.
(cl-defstruct): Silence warnings abour lexical shadowing when a slot's
name happens to be the same as a dynbound var.

18 months agoAllow suppressing the "lexical arg shadows dynbound var" warning
Stefan Monnier [Sun, 25 Jun 2023 15:11:03 +0000 (11:11 -0400)]
Allow suppressing the "lexical arg shadows dynbound var" warning

In most cases the right way to fix this warning is by renaming
the offending argument, but in some cases this is inconvenient, as is
the case in `cl-defstruct` where arg names are imposed by slot names.

This patch also happens to fix a few bugs along the way:
- miscompilation of (lambda (gcs-done) (lambda (x) (+ x gcs-done)))
- errors about void function `byte-compile-warn-x` if the warning was
  emitted via `cconv-fv` when bytecomp was not loaded.
Oh, and it improves the warning by making the location info slightly
more precise.

* lisp/emacs-lisp/cconv.el (cconv--analyze-function): Remove this warning.
* lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list):
Warn about it here instead.  Let `with-suppressed-warnings` control it
under `lexical`.

18 months agoCorrection to patch on 2023-06-21 15:36:56 +0000.
Alan Mackenzie [Sun, 25 Jun 2023 15:06:05 +0000 (15:06 +0000)]
Correction to patch on 2023-06-21 15:36:56 +0000.

This corrects an error where commenting out a template closer
left a subsequent closer without a syntax-table text property.

* lisp/progmodes/cc-engine.el (c-unmark-<>-around-region):
Don't scan from the inside of 2-character comment delimiters.
Replace invalid skip-syntax-forward call with a null string
argument by an invocation of
c-search-forward-non-nil-char-property.

18 months ago; * doc/emacs/package.texi (Fetching Package Sources): Fix typo (bug#64282).
Eli Zaretskii [Sun, 25 Jun 2023 14:57:31 +0000 (17:57 +0300)]
; * doc/emacs/package.texi (Fetching Package Sources): Fix typo (bug#64282).

18 months agoFix type check in tramp-get-buffer-string
Michael Albinus [Sun, 25 Jun 2023 12:31:23 +0000 (14:31 +0200)]
Fix type check in tramp-get-buffer-string

* lisp/net/tramp.el (tramp-get-buffer-string): Check, that BUFFER
is really a bufferp.

18 months ago; Fix typo in maintaining.texi (bug#64279)
Eshel Yaron [Sat, 24 Jun 2023 20:31:44 +0000 (23:31 +0300)]
; Fix typo in maintaining.texi (bug#64279)

* doc/emacs/maintaining.texi (Log Buffer): Fix a typo.

18 months ago; * doc/lispintro/emacs-lisp-intro.texi (car & cdr): Fix typo.
Eli Zaretskii [Sun, 25 Jun 2023 05:25:13 +0000 (08:25 +0300)]
; * doc/lispintro/emacs-lisp-intro.texi (car & cdr): Fix typo.

(cherry picked from commit 0ebedd0119c1bc3c1f55e873385a01e97f102766)

18 months agoClarify list terminology
Richard M. Stallman [Sat, 24 Jun 2023 23:19:53 +0000 (19:19 -0400)]
Clarify list terminology

* doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed):
Mention "cons cell".  Add index entries.
(car & cdr): Simplify etymology of `car' and `cdr'.
Explain why for some purposes they are better than `first' and `rest'.
Mention cons cells.

(cherry picked from commit 188c90c7c111dbbdc3edd29c23b59ade26f97bfd)

18 months ago; * doc/lispintro/emacs-lisp-intro.texi (car & cdr): Fix typo.
Eli Zaretskii [Sun, 25 Jun 2023 05:25:13 +0000 (08:25 +0300)]
; * doc/lispintro/emacs-lisp-intro.texi (car & cdr): Fix typo.

18 months agoClarify list terminology
Richard M. Stallman [Sat, 24 Jun 2023 23:19:53 +0000 (19:19 -0400)]
Clarify list terminology

* doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed):
Mention "cons cell".  Add index entries.
(car & cdr): Simplify etymology of `car' and `cdr'.
Explain why for some purposes they are better than `first' and `rest'.
Mention cons cells.

18 months ago(macroexp--unfold-lambda): Obey the lexbind semantics
Stefan Monnier [Sat, 24 Jun 2023 21:53:41 +0000 (17:53 -0400)]
(macroexp--unfold-lambda): Obey the lexbind semantics

While at it, rework the code so as not to rely on an
intermediate rewriting of (funcall (lambda ..) ...)
to ((lambda ..) ...) since that forms is deprecated.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-funcall): Unfold lambdas
instead of turning them into the deprecated ((lambda ..) ..).
(byte-optimize-form-code-walker): Don't unfold ((lambda ..) ..) any more.
(byte-compile-inline-expand): Revert to non-optimized call if the unfolding
can't be optimized.

* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Don't unfold
((lambda ..) ..) any more.

* lisp/emacs-lisp/cl-macs.el (cl--slet): Remove workaround.

* lisp/emacs-lisp/disass.el (disassemble): Make sure the code is
compiled with its own `lexical-binding` value.

* lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda): Make it work
both for ((lambda ..) ..) and for (funcall #'(lambda ..) ..).
Be careful not to move dynbound vars from `lambda` to `let`.
(macroexp--expand-all): Unfold (funcall #'(lambda ..) ..) instead of
turning it into ((lambda ..) ..).  Don't unfold ((lambda ..) ..) any more.

18 months ago* lisp/emacs-lisp/cl-macs.el (cl--slet): Unbreak bootstrap
Stefan Monnier [Sat, 24 Jun 2023 15:44:32 +0000 (11:44 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--slet): Unbreak bootstrap

18 months agoFix Python indentation of continuation lines within parens
kobarity [Sun, 18 Jun 2023 14:47:25 +0000 (23:47 +0900)]
Fix Python indentation of continuation lines within parens

* lisp/progmodes/python.el (python-indent-context): Add a new indent
context `:inside-paren-continuation-line'.
(python-indent--calculate-indentation): Use the new indent context.
* test/lisp/progmodes/python-tests.el (python-indent-pep8-2)
(python-indent-pep8-3)
(python-indent-inside-paren-1)
(python-indent-inside-paren-2)
(python-indent-inside-paren-3)
(python-indent-inside-paren-6)
(python-indent-after-backslash-2): Change to use the new indent
context.
(python-indent-inside-paren-8)
(python-indent-inside-paren-9): New tests. (Bug#63959)

18 months ago; Fix documentation of last change
Eli Zaretskii [Sat, 24 Jun 2023 11:58:44 +0000 (14:58 +0300)]
; Fix documentation of last change

* lisp/net/eww.el (eww-copy-alternate-url): Doc fix.
* etc/NEWS:
* doc/misc/eww.texi (Basics): Minor wording and punctuation fixes.
(Bug#64126)

18 months agoNew command 'eww-copy-alternate-url'
Eshel Yaron [Sat, 17 Jun 2023 10:48:51 +0000 (13:48 +0300)]
New command 'eww-copy-alternate-url'

This adds a new command to EWW that copies an alternate link to the
currently visited page into the kill ring.  This is useful for
subscribing to website feeds, etc.

* lisp/net/eww.el (eww--alternate-urls, eww-read-alternate-url):
 New functions.
(eww-copy-alternate-url): New command.
(eww-mode-map): Bind it to 'A'.

* doc/misc/eww.texi (Basics): Document it.

* etc/NEWS: Announce it.
(Bug#64126)

18 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 24 Jun 2023 11:13:42 +0000 (07:13 -0400)]
Merge from origin/emacs-29

d0147ff9e50 * lisp/emacs-lisp/shortdoc.el: More and better `substring...
fa06249a9fb Fix "C-x RET r" when the new encoding is UTF
679e9d7c56e ; Mention MinGW64 GCC 13.1 problems in PROBLEMS
fdc1a12ed1a Fix "vc-print-log does not erase buffer" and associated p...
d507aa7336b Add selector_expression indentation rule
1f664a0af75 Add "nixd" LSP server to Eglot
e962cf4ba72 Fix building --with-native-compilation=aot from release t...
4ca371e9cc7 Fix bug#64152 (Minibuffer sometimes goes "modal")
a0ccf1859cc Disable target-async by default in gdb-mi.el
2bad5829ff7 Revert "Fix parsing of dn line if WITHDN is non-nil"
7637e361d3b Don't truncate filenames with "emacs.el" in them
2591eb1190a Improve documentation of 'minibuffer-message'
6f211bc57b9 Eglot: again fix positions of coinciding inlay hint overl...
a24e9e3fee5 ; Update ChangeLog.4 and etc/AUTHORS.

18 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 24 Jun 2023 10:57:26 +0000 (06:57 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

c9022d69218 * lisp/ldefs-boot.el: Regenerate.
f690827fa50 Bump Emacs version to 29.0.92

18 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 24 Jun 2023 10:57:25 +0000 (06:57 -0400)]
Merge from origin/emacs-29

8f62e7b85f6 Describe primarily the Emacs s-exp dialect for treesit qu...
eacd75df4e4 ; Improve documentation of overlay priorities
b3f11e94fad Fix documentation of :predicate in 'define-globalized-min...

18 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 24 Jun 2023 10:57:25 +0000 (06:57 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

02f0be03017 Revert "Fix some tree-sitter :match regexps"

18 months ago* lisp/emacs-lisp/shortdoc.el: More and better `substring` examples.
Mattias Engdegård [Fri, 23 Jun 2023 17:42:44 +0000 (19:42 +0200)]
* lisp/emacs-lisp/shortdoc.el: More and better `substring` examples.

Suggested by Juri Linkov.

18 months agoFix "C-x RET r" when the new encoding is UTF
Eli Zaretskii [Sat, 24 Jun 2023 08:49:14 +0000 (11:49 +0300)]
Fix "C-x RET r" when the new encoding is UTF

* src/fileio.c (Finsert_file_contents): Update point of
'conversion_buffer' before decoding the last block.  (Bug#64253)

18 months agoApply quote substitution to popup choice menus
Stephen Berman [Sat, 24 Jun 2023 08:45:10 +0000 (10:45 +0200)]
Apply quote substitution to popup choice menus

* lisp/wid-edit.el (widget-choose): Iteratively apply
substitute-command-keys to choice item text before building popup
or text buffer menu.  Also fix two unnecessary uses of let*.

18 months ago; Mention MinGW64 GCC 13.1 problems in PROBLEMS
Eli Zaretskii [Sat, 24 Jun 2023 07:23:07 +0000 (10:23 +0300)]
; Mention MinGW64 GCC 13.1 problems in PROBLEMS

* etc/PROBLEMS: Mention the problems building with MinGW64 GCC
13.1.  (Bug#63365)

18 months agoFix "vc-print-log does not erase buffer" and associated problems
Dmitry Gutov [Sat, 24 Jun 2023 02:57:18 +0000 (05:57 +0300)]
Fix "vc-print-log does not erase buffer" and associated problems

* lisp/vc/vc.el (vc-deduce-fileset): Make sure to retain the
buffer switch (if it did), bug#63949.

18 months agoExtend Tramp kubernetes method
Michael Albinus [Fri, 23 Jun 2023 19:26:14 +0000 (21:26 +0200)]
Extend Tramp kubernetes method

* doc/misc/tramp.texi (Inline methods): Adapt kubernetes method.

* etc/NEWS: Describe changes in Tramp kubernetes method.

* lisp/net/tramp-container.el (tramp-kubernetes-context)
(tramp-kubernetes-namespace): New defcustoms.
(tramp-kubernetes--completion-function): Extend for CONTAINER.POD
syntax.
(tramp-kubernetes--host-name-regexp): New defconst.
(tramp-kubernetes--container, tramp-kubernetes--pod)
(tramp-kubernetes--current-context): New defuns.
(tramp-kubernetes--current-context-data): Simplify.
(tramp-kubernetes--context-namespace): New defun.
(tramp-methods) <kubernetes>: Respect container, context and
namespace.  (Bug#59797)
(tramp-container-connection-local-default-kubernetes-variables):
New defconst.  Set respective connection-local variables.

* lisp/net/tramp-sh.el (tramp-config-check): New variable.
(tramp-open-connection-setup-interactive-shell): Use it.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-extra-expand-args): New defvar.
(tramp-expand-args): Use it.

18 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Fri, 23 Jun 2023 19:15:13 +0000 (21:15 +0200)]
; * etc/NEWS: Fix typos.

18 months agocl-defsubst: Use static scoping for args
Stefan Monnier [Fri, 23 Jun 2023 15:37:12 +0000 (11:37 -0400)]
cl-defsubst: Use static scoping for args

* lisp/emacs-lisp/cl-macs.el (cl--slet): New function, partly extracted
from `cl--slet*`.
(cl--slet*): Use it.
(cl--defsubst-expand): Use it to fix bug#47552.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct-dynbound-label):
New test.

18 months agocl-defun/cl-struct: Use static scoping for function args
Stefan Monnier [Fri, 23 Jun 2023 14:45:49 +0000 (10:45 -0400)]
cl-defun/cl-struct: Use static scoping for function args

* lisp/emacs-lisp/cl-macs.el (cl--slet*): New function.
(cl--transform-lambda): Use it to fix bug#47552.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): Add test.

18 months agoAdd selector_expression indentation rule
Theodor Thornhill [Fri, 23 Jun 2023 13:37:04 +0000 (15:37 +0200)]
Add selector_expression indentation rule

* lisp/progmodes/go-ts-mode.el (go-ts-mode--indent-rules): New rule.

18 months agoRevert "Avoid header line with some empty non-nil formats"
Eli Zaretskii [Fri, 23 Jun 2023 10:50:15 +0000 (13:50 +0300)]
Revert "Avoid header line with some empty non-nil formats"

This reverts commit 4f66cbbfe520ee31ef26676e09a926217d9736fe.
This is part of removing the recently-added feature whereby
certain non-nil values of 'header-line-format' could signal
that the header line shall not be displayed.  The feature is
being reverted because its advantages are very minor, whereas
the complications it causes are serious.

18 months agoRevert "; Fix last change"
Eli Zaretskii [Fri, 23 Jun 2023 10:47:53 +0000 (13:47 +0300)]
Revert "; Fix last change"

This reverts commit 05c2be28a3e97bd920d0bf8c8b59ec682a420cce.
This is part of removing the recently-added feature whereby
certain non-nil values of 'header-line-format' could signal
that the header line shall not be displayed.  The feature is
being reverted because its advantages are very minor, whereas
the complications it causes are serious.

18 months agoRevert "; Fix coding style in just installed change"
Eli Zaretskii [Fri, 23 Jun 2023 10:47:33 +0000 (13:47 +0300)]
Revert "; Fix coding style in just installed change"

This reverts commit 229f0b8dd3b92827b6e0c6fc105508e8b80858f5.
This is part of removing the recently-added feature whereby
certain non-nil values of 'header-line-format' could signal
that the header line shall not be displayed.  The feature is
being reverted because its advantages are very minor, whereas
the complications it causes are serious.

18 months agoRevert "; * src/window.c (window_wants_header_line): Shut up bogus GCC warning."
Eli Zaretskii [Fri, 23 Jun 2023 10:47:05 +0000 (13:47 +0300)]
Revert "; * src/window.c (window_wants_header_line): Shut up bogus GCC warning."

This reverts commit ef8485ad05dd9200b68ea8141fd44c7b976140cd.
This is part of removing the recently-added feature whereby
certain non-nil values of 'header-line-format' could signal
that the header line shall not be displayed.  The feature is
being reverted because its advantages are very minor, whereas
the complications it causes are serious.