Don't allow the `eq` and `unbind` byte-ops to commute (bug#65017)
* lisp/emacs-lisp/byte-opt.el (byte-after-unwind-ops):
Cease sinking `eq` past `unwind`, because that optimised away the
let-binding in
(let ((symbols-with-pos-enabled nil))
(eq x y))
and `eq` is currently sensitive to `symbols-with-pos-enabled`.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--eq-symbols-with-pos-enabled): New test.
Stefan Kangas [Fri, 4 Aug 2023 07:50:43 +0000 (09:50 +0200)]
; Fix http/https thinko in org manual
* doc/misc/org.org (External Links): Change an HTTPS link back to
HTTP, as it's used as an example to show the supported protocols.
Ref: https://lists.gnu.org/r/emacs-devel/2023-08/msg00018.html
Eli Zaretskii [Fri, 4 Aug 2023 07:17:51 +0000 (03:17 -0400)]
Merge from origin/emacs-29
0f183770c56 Fix byte-compiled files that use 'bind-key' from use-package acfcf7f3690 Fix "Paste from Kill Menu" in non X toolkit builds 04996b21241 Handle tabs in the SQL shown in the column listing 573fcf27122 Add new keyword to 'typescript-ts-mode' db7d70d3cad ; Add commentary to 'describe-function's completion
Eli Zaretskii [Fri, 4 Aug 2023 07:17:50 +0000 (03:17 -0400)]
Merge from origin/emacs-29
6eddbfe33f2 Clarify the meaning of the argument of ':align-to' space ... 5c6a51668b0 ; * doc/misc/eshell.texi (Argument Modifiers): Fix typo i... da5e05a50e8 Fix handling of ".elpaignore" file when compiling packages
Eli Zaretskii [Fri, 4 Aug 2023 06:34:55 +0000 (09:34 +0300)]
Fix "Paste from Kill Menu" in non X toolkit builds
* src/keymap.c (possibly_translate_key_sequence): Don't signal an
error if 'key-valid-p' returns nil. Suggested by Stefan Monnier
<monnier@iro.umontreal.ca>. (Bug#64927)
Michael Albinus [Thu, 3 Aug 2023 11:17:02 +0000 (13:17 +0200)]
Improve SELinux handling in Tramp
* lisp/net/tramp-sh.el (tramp-stat-file-attributes-with-selinux)
(tramp-stat-directory-files-and-attributes-with-selinux): New defconst.
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-stat)
(tramp-do-directory-files-and-attributes-with-stat): Return also
SELinux context.
(tramp-remote-selinux-p, tramp-do-copy-or-rename-file): Adapt docstring.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file)
(tramp-sudoedit-remote-selinux-p): Adapt docstring.
(tramp-sudoedit-file-attributes-with-selinux): New defconst.
(tramp-sudoedit-handle-file-attributes): Use it.
Helmut Eller [Thu, 20 Jul 2023 14:27:34 +0000 (16:27 +0200)]
Improve interactive prompting for face colors
When displaying the completion candidates, show how the face would
look with the new foreground/background.
* lisp/faces.el (faces--string-with-color): New helper,
factored out from 'defined-colors-with-face-attributes'.
(defined-colors-with-face-attributes): Use it.
(read-color): Add optional argument FACE and pass
it to 'faces--string-with-color.'
(read-face-attribute): Call 'read-color' with more appropriate
foreground and face arguments.
* doc/lispref/minibuf.texi (High-Level Completion): Describe
the intention behind the arguments FOREGROUND and FACE of
'read-color'. (Bug#64725)
Harald Jörg [Wed, 2 Aug 2023 21:53:42 +0000 (23:53 +0200)]
cperl-mode.el: Subroutine names are fontified correctly in all places
Subroutine names are fontified as subroutine names even if the name is also
the name of a builtin (fixing an ancient unreported bug). Subroutine name
are just comments in comment and pod (fixing a bug introduced recently)
* lisp/progmodes/cperl-mode.el (cperl-init-faces): Move
fontification of sub declarations before that of builtins. Don't
override existing faces when fontifying subroutine declarations.
Don't fontify method calls even if the sub names match those of
builtins.
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-sub-names):
New tests with a subroutine name in several surroundings.
* test/lisp/progmodes/cperl-mode-resources/sub-names.pl: New resource
for the new test.
Stefan Kangas [Wed, 2 Aug 2023 19:46:55 +0000 (21:46 +0200)]
Don't hardcode ruby version in interpreter-mode-alist
* lisp/progmodes/ruby-mode.el (interpreter-mode-alist): Don't hardcode
ruby version. This adds support for modern versions of Ruby like
"ruby2.7", instead of the previously hardcoded "ruby1.9".
rx: better not-wordchar and (syntax word) translation
* lisp/emacs-lisp/rx.el:
Add tables of legacy syntax.
(rx--translate-symbol):
Translate the legacy construct `not-wordchar` as (not wordchar), which
is more intuitively obvious.
* lisp/emacs-lisp/rx.el (rx--translate-syntax):
Generate the shorter \w and \W instead of \sw and \Sw.
* test/lisp/emacs-lisp/rx-tests.el (rx-atoms, rx-syntax, rx-not):
Adapt tests.
* lisp/emacs-lisp/rx.el (rx--generate-alt):
Treat the intervals and classes lists separately without joining,
to reduce allocation. Handle special cases first.
(rx--union-intervals):
Implement directly instead of using intersection and complement.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Adapt test, as some
character alternatives are now slightly different.
(rx--complement-intervals, rx--union-intervals)
(rx--intersect-intervals): New unit tests.
Michael Albinus [Tue, 1 Aug 2023 18:24:44 +0000 (20:24 +0200)]
Add more `tramp-suppress-trace' properties in Tramp
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Use `tramp-archive-handle-file-symlink-p'.
(tramp-archive-handle-file-symlink-p): New defun.
Stefan Kangas [Tue, 1 Aug 2023 10:18:12 +0000 (12:18 +0200)]
Fix font locking of booleans in conf-toml-mode
* lisp/textmodes/conf-mode.el (conf-toml-mode): Do not use case
folding when font locking.
* test/lisp/textmodes/conf-mode-tests.el (conf-test-toml-mode):
Expand test.
* test/lisp/textmodes/conf-mode-tests.el (conf-test-javaprop-mode):
Attempt to give the test some meaning by repairing regexps,
and fixing it so that it passes.
Stefan Kangas [Tue, 1 Aug 2023 07:55:01 +0000 (09:55 +0200)]
Remove IE9 support tag from HTML5 skeleton
This is no longer recommended in 2023, and in any case seems like
overkill in an otherwise bare-bones HTML5 template.
Ref: https://stackoverflow.com/a/6771584
Eli Zaretskii [Mon, 31 Jul 2023 18:50:45 +0000 (21:50 +0300)]
Fix 'string-pixel-width' under 'line-prefix'
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Disable
'line-prefix' and 'wrap-prefix' to avoid their effect on the
calculated string width. (Bug#64971)
Michael Albinus [Mon, 31 Jul 2023 17:40:11 +0000 (19:40 +0200)]
Optimizations on Tramp symlink handling
* lisp/net/tramp-sh.el (cl-seq): Require.
(tramp-perl-file-truename): Print also whether the file is a symlink.
(tramp-bundle-read-file-names): Rename from
`tramp-vc-registered-read-file-names'. Print also the
`file-directory-p: value.
(tramp-sh-handle-make-symbolic-link): Combine two commands. Use
`tramp-skeleton-make-symbolic-link'.
(tramp-sh-handle-file-truename): Read also "file-symlink-marker"
property.
(tramp-sh-handle-file-directory-p): Simplify if-let clause.
(tramp-sh-handle-file-name-all-completions): Simplify command.
(tramp-bundle-read-file-names): New defun.
(tramp-sh-handle-vc-registered, tramp-get-remote-path): Use it.
(tramp-open-shell): Flush "scripts" connection property.
(tramp-open-connection-setup-interactive-shell): Combine two commands.
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link):
Use `tramp-skeleton-make-symbolic-link'.
* lisp/language/vietnamese.el (vietnamese-vscii): Update docstring.
(vietnamese-tcvn, tcvn, tcvn-5712): Make them aliases of
vietnamese-vscii.
("Vietnamese"): Drop vietnamese-tcvn from coding-system values.
Update docstring.
Eli Zaretskii [Mon, 31 Jul 2023 15:11:23 +0000 (11:11 -0400)]
; Merge from origin/emacs-29
The following commits were skipped:
0002d4f3166 Avoid spurious whitespace in the modeline of emacsclient ... 96d52f89444 Fix function help for advised aliases (bug#64797) 71419a60c37 Avoid crashes due to invalid 'mode-line-format' b2cb6e82160 ; Better documentation of HOME on MS-Windows 54e98b5f9bd ; Clarify documentation of 'server-after-make-frame-hook' d13029cdcde Avoid crashes under 'which-key-mode' cb1f7db2490 ; Minor documentation fixes 4a687bcc20d Bump Emacs version
Eli Zaretskii [Mon, 31 Jul 2023 15:11:23 +0000 (11:11 -0400)]
Merge from origin/emacs-29
a9b28224af0 ; Last-minute changes befor releasing 29.1 7da1cee56b3 Update CMake support due to upstream changes (bug#64922) c2d95dd00e6 Remove nullptr named node from c++-ts-mode (bug#64818) 4e977136d31 Make compat check also check typescript 906ecf442c4 ; * etc/HISTORY: Fix the 28.3 entry.
Eli Zaretskii [Mon, 31 Jul 2023 15:11:21 +0000 (11:11 -0400)]
Merge from origin/emacs-29
ee20b50dfed ; * lisp/progmodes/typescript-ts-mode.el (treesit-query-c... 2215298d90b Update JSX support due to upstream changes (bug#64647) 235561a2ccc Update TSX support due to upstream changes (bug#64647) 12ab82d3b35 ; Fix customization form of 'bookmark-watch-bookmark-file' d149a4dc428 ; Improve documentation of automatic addition to minibuff... 42a99627948 ; Improve documentation of 'last-command-event' 101455cb853 ; * lisp/subr.el (ignore, always): Doc fixes. (Bug#64776)
; Fix backport of help-fns--analyze-function bug fix
* lisp/help-fns.el (help-fns--analyze-function):
Add back the NOERROR argument to function-alias-p, needed because
Emacs 29 doesn't prevent the creation of circular function aliases.
This fixes a failure in help-fns-tests.
* etc/themes/deeper-blue-theme.el (class):
* etc/themes/leuven-dark-theme.el (class):
* etc/themes/leuven-theme.el (class):
* etc/themes/manoj-dark-theme.el (manoj-dark):
* etc/themes/whiteboard-theme.el (class):
Use `unspecified` instead of `nil` as attribute for :background and
:foreground to silence HANDLE_INVALID_NIL_VALUE warning.
(rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
Change it so that we get "[_-a^]" instead.
* lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
`^` occurring first in a non-negated character alternative.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.
(rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
Change it so that we get "[_-a^]" instead.
* lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
`^` occurring first in a non-negated character alternative.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.
This was originally installed on 2023-06-17 in the emacs-29 release
branch and later reverted. This backport follows the Emacs 29.1
release (bug#64019).
The shy groups were caught by modified versions of the GNU ELPA
packages xr and relint:
- https://github.com/mattiase/xr/pull/6
- https://github.com/mattiase/relint/pull/14
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Quote special
character in regexp.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
* lisp/progmodes/js.el (js--plain-method-re):
(js--treesit-font-lock-settings):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Replace character
alternative [\\d], which matches '\' or 'd', with the most likely
intention [0-9]. Fix shy groups mistyped as optional colons.
Remove unneeded numbered :match group in rust-ts-mode.
Eli Zaretskii [Sun, 30 Jul 2023 15:05:00 +0000 (11:05 -0400)]
; Fix admin/upload-manuals script
* admin/upload-manuals (html_mono): Chdir to the right directory
before committing.
(html_node): Avoid computing $stale in newly-created or empty
directories.
Allow default values in 'map-let' and the pcase 'map' form
* lisp/emacs-lisp/map.el (map-let, map)
(map--make-pcase-bindings): Add a third argument for specifying a
default value, like in 'map-elt'. (Bug#49407)
* lisp/emacs-lisp/map.el (map--make-pcase-bindings): Clarify that keys
that aren't found aren't ignored, they actually get the value
nil (unless the new default value is given). The overall pattern can
still fail to match if the sub-pattern for the unfound key doesn't
match nil.
* test/lisp/emacs-lisp/map-tests.el (test-map-let-default)
(test-map-plist-pcase-default, test-map-pcase-matches): Add tests,
including for the above item.
* lisp/net/tramp-message.el (tramp-byte-run--set-suppress-trace):
New function. Add it to `defun-declarations-alist'.
(tramp-setup-debug-buffer, tramp-debug-buffer-name)
(tramp-get-debug-buffer, tramp-get-debug-file-name)
(tramp-trace-buffer-name, tramp-debug-message, tramp-message):
Add declare form.
(tramp-debug-buffer-name): Use `tramp-string-empty-or-nil-p'.
(tramp-test-message): New defun.
* lisp/help-fns.el (help-fns--analyze-function):
For aliases, use the base function name if at the end of the chain.
This fixes a regression introduced in d30fde6b0cc.