Stefan Kangas [Fri, 2 Dec 2022 11:36:35 +0000 (12:36 +0100)]
Merge from origin/emacs-29
39e0c60176 * lisp/tab-bar.el (tab-bar-format-align-right): Fix alignm... bf66b90b9a Fix the width of margins for icons in outline-minor-mode (... 2e4960d63d ; Change c-ts-mode--base-mode to c-ts-base-mode 1aa1f8432b Add new TypeScript mode tsx-ts-mode ad0563855f Add case and match to python--treesit-keywords (bug#59720) 16e68e64f9 ; * lisp/progmodes/c-ts-mode.el: Change rx to regexp-opt. 3bccef6f52 project-files (VC-aware): Make sure the VC backend is loaded 03a40b974c term--update-term-menu: Add the menu to term-terminal-menu 368c7c7d8e Improve detection of very long lines 9c58ea37af ; Fix last change in proced.el 0c1495574a Add colors to Proced (bug#59407) 91dba5b066 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/e... 70ecdebc92 ; Fix typos (don't abbreviate "with" or "without") d94c5870c0 ; * lisp/tab-bar.el (tab-bar-change-tab-group): Doc fix.
Juri Linkov [Fri, 2 Dec 2022 07:59:53 +0000 (09:59 +0200)]
* lisp/tab-bar.el (tab-bar-format-align-right): Fix alignment on TTY frames.
Calculate the alignment from the left edge instead of the right edge
since the `right' spec doesn't work on TTY frames when windows are split
horizontally (bug#59620).
* lisp/emacs-lisp/icons.el (icons--create): Handle :width as well.
* lisp/outline.el (outline--margin-width, outline-margin-width):
New variables.
(outline-open-in-margins, outline-close-in-margins)
(outline-close-rtl-in-margins): Don't inherit from parents.
Use `:width font' instead of `:height 10'.
(outline-minor-mode): Calculate the number of columns for margins
to fit the icons.
There are in fact two languages supporting TypeScript for tree-sitter.
Because TSX causes some ambiguities with types there are two grammars,
one called typescript and one called tsx. To account for this and to
be as correct as possible we enable using both.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Change to a function to accomodate
the two languages.
(typescript-ts-mode--font-lock-settings): Change to a function to
accomodate the two languages.
(typescript-ts-base-mode): Parent mode for typescript-ts-mode
and tsx-ts-mode.
(typescript-ts-mode): Derive from typescript-ts-base-mode and
extend with language specific settings
(tsx-ts-mode): New major mode that derives from
typescript-ts-base-mode and extend it with language specific
settings
Add autoload cookies for the respective file type extensions: .ts and
.tsx.
Sean Whitton [Thu, 1 Dec 2022 22:14:28 +0000 (15:14 -0700)]
term--update-term-menu: Add the menu to term-terminal-menu
Reading bug#5641, the intention was to add this to the existing
"Terminal" menu for term-mode buffers, not to the local keymaps of all
other buffers. Moreover, the existing code signaled errors when
switching to buffers with no local keymap, such as term-mode buffers
whose processes have died.
* lisp/term.el (term--update-term-menu): Add the menu to
term-terminal-menu, instead of implicitly trying to add it to every
local keymap.
Eli Zaretskii [Thu, 1 Dec 2022 18:15:52 +0000 (20:15 +0200)]
; Fix last change in proced.el
* lisp/proced.el (proced-low-memory-usage-threshold)
(proced-medium-memory-usage-threshold, proced-run-status-code)
(proced-interruptible-sleep-status-code)
(proced-uninterruptible-sleep-status-code, proced-executable): Fix
doc strings.
(proced-format-time): Simplify the format, to avoid bogus warnings
from the byte-compiler.
* etc/NEWS: Move Proced entries to one place and fix their
wording.
Laurence Warne [Wed, 16 Nov 2022 14:32:44 +0000 (14:32 +0000)]
Add colors to Proced (bug#59407)
Add a new custom variable proced-enable-color-flag which when set to a
non-nil value (defaults to nil), will prompt some format functions to
furnish their respective process attributes with colors and effects in
order to make them easier to distinguish and highlight possible issues
(e.g. high memory usage), in a manner similar to htop.
In particular, the current Emacs process id is highlighted purple in
both the process id and parent process id columns, session leaders
have their process ids underlined, larger memory sizes for rss
are highlighted in darker shades of orange, and the first word in the
args property (the executable) is highlighted in blue.
* lisp/proced.el (proced-grammar-alist): Update to use the new format
functions.
(proced-low-memory-usage-threshold): New custom variable to determine
whether a value represents 'low' memory usage, used only in
proced-format-memory for coloring.
(proced-medium-memory-usage-threshold): New custom variable to
determine whether a value represents 'medium' memory usage, used only
in proced-format-memory for coloring.
(proced-enable-color-flag): New custom variable to toggle coloring.
(proced-run-status-code, proced-interruptible-sleep-status-code)
(proced-uninterruptible-sleep-status-code, proced-executable)
(proced-executable, proced-memory-gb, proced-memory-mb)
(proced-memory-default, proced-pid, proced-ppid, proced-pgrp)
(proced-sess, proced-cpu, proced-mem, proced-user, proced-time-colon):
New faces.
(proced-format-time): Edit function to color colons using
proced-time-colon.
(proced-format-args): Edit function to color executables using
proced-executable.
(proced-format-state): New function to color states.
(proced-format-pid): New function to color process ids.
(proced-format-ppid): New function to color parent process ids.
(proced-format-pgrp): New function to color process group ids.
(proced-format-sess): New function to color process session leader
ids.
(proced-format-cpu): New function to color cpu utilization.
(proced-format-mem): New function to color memory utilization.
(proced-format-user): New function to color the user a process
belongs to.
Eli Zaretskii [Thu, 1 Dec 2022 12:40:47 +0000 (14:40 +0200)]
Fix compilation of Org 9.6 on MS-Windows
* lisp/org/org-clock.el (org-x11idle-exists-p): Don't try to
invoke "command x11idle" on MS-Windows and MS-DOS. This fixes a
hang during byte-compilation of Org.
Po Lu [Thu, 1 Dec 2022 06:24:43 +0000 (14:24 +0800)]
Merge from origin/emacs-29
4161023a63 Fix crashes and memory leaks during display deinitialization 785fa80159 New user option: project-vc-extra-root-markers 7a1f1825fd Add inline to c-ts-mode--keywords 3d976d6a03 Remove duplicate "friend" from c-ts-mode--keywords 01e7d4b2a1 Make treesit-defun-prefer-top-level more flexible fb5d9ff559 Fix c-ts-mode defun movement (bug#59628) 7397f2099b * lisp/tab-bar.el: Keep tabs of the same group together (b... 832b013ef0 Insert news for installed packages only cc6efa7992 ; Fix type error in 'package-maintainers' ee32ae7c36 ; * etc/NEWS: Add missing tree-sitter based modes. 33546d6dd2 ; * etc/NEWS: Move an entry to a proper place. (bug#59718) 8617edfffd ; Fix typos
Dmitry Gutov [Thu, 1 Dec 2022 02:05:49 +0000 (04:05 +0200)]
New user option: project-vc-extra-root-markers
* lisp/progmodes/project.el: Commentary update.
(project-vc, project-vc-include-untracked, project-vc-name):
Update docstrings. Rename 'VC project' to 'VC-aware project'.
(project-vc-extra-root-markers): New option (bug#41572).
(project-try-vc): Use it. Construct a single regexp from all and
validate it using the MATCH argument of 'directory-files'. Call
'locate-dominating-file' directly.
(project-ignores): Support VC-aware project instances with nil
value of VC backend.
* test/lisp/progmodes/project-tests.el (project-vc-recognizes-git)
(project-vc-extra-root-markers-supports-wildcards)
New tests.
(project-tests--this-file): New variable.
Yuan Fu [Wed, 30 Nov 2022 22:59:06 +0000 (14:59 -0800)]
Fix c-ts-mode defun movement (bug#59628)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--end-of-defun): New function.
(c-ts-mode--base-mode): Use more specific regexp, and set
treesit-defun-prefer-top-level.
(c-ts-mode)
(c++-ts-mode): Set end-of-defun-function.
Juri Linkov [Wed, 30 Nov 2022 19:36:33 +0000 (21:36 +0200)]
* lisp/tab-bar.el: Keep tabs of the same group together (bug#59721)
(tab-bar-tab-post-change-group-functions): Change the default value to
'(tab-bar-move-tab-to-group)'. Improve docstring.
(tab-bar-change-tab-group): Improve docstring.
Stefan Kangas [Wed, 30 Nov 2022 15:10:39 +0000 (16:10 +0100)]
Merge from origin/emacs-29
af1a99d53f Sink python indent offset guessing to avoid test failure dc0f2ec2db * etc/NEWS: Announce Org update. 0625651e8a Update to Org 9.6-3-ga4d38e edd64e64a3 Fix interactive selection of emacs-lock mode, broken by 2a... a699f65936 Fix typo in flag to load Emacs-specific LLDB commands f6aa7c335f ; Typo fixes in etc/NEWS and lisp/ files f373a23e51 CC Mode: Prevent lone ids being parsed as types unless in ... 00cb6e052a ; Improve error message when LSP server not found 7ea95d1b92 ; * doc/misc/eglot.texi (Setting Up LSP Servers): Improve ... c43cdfd639 Allow csharp-mode in c-default-style 13bb49bc0b In project-find-file, add abbreviated file names to history 4dab5f8671 * lisp/progmodes/project.el (project-vc-name): Fix the :ty... 079625d3c6 Tramp cleanup 067c65578e Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/e... 4313279e34 ; Fix typo in NEWS afc7ed987b Allow be-resources to fail 00de296d1b Simplify erc-sasl's auth-source API 83b9496a19 * doc/misc/erc.texi: Revise SASL and modules chapters. 35e2b8a26b Add erc-sasl-auth-source-function to cached options 7336520fe7 Improve fontification in csharp-ts-mode 2661c51953 Improve fontification in typescript-ts-mode bbf1b93d43 Add more font-lock settings to css-ts-mode f794263da2 Reparse tree-sitter tree when buffer restriction changes 78663ad78b ; typos
* lisp/org/org-element.el (org-element--get-node-properties):
Escape literal `+`.
* lisp/org/org-persist.el (org-persist-load:index):
Replace line-start with string-start when the latter is meant.
* test/lisp/progmodes/python-tests.el (python-ffap-module-path-1):
This test fails with a standard macOS Python installation;
see bug#59477 and bug#25753.
Sink python indent offset guessing to avoid test failure
Call python-indent-guess-indent-offset late in the set-up of
python-mode and python-ts-mode to make sure that the required other
settings (of syntax-propetize-function in particular) have been
carried out. This cures a python-test failure (bug#59477).
Fix interactive selection of emacs-lock mode, broken by 2a4b0da28c
* lisp/emacs-lock.el (emacs-lock--set-mode): Check that
arg is 4 and prefix is '(4).
(emacs-lock-mode): Pass also `current-prefix-arg' to
`emacs-lock--set-mode'.
Alan Mackenzie [Tue, 29 Nov 2022 20:19:34 +0000 (20:19 +0000)]
CC Mode: Prevent lone ids being parsed as types unless in decl arglists
This fixes bug #59051.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): In the test for the
last invocation of c-fdoc-shift-type-backward before CASE 1, additionally
test CONTEXT not being an arglist or BACKUP-AT-TYPE being non-nil.
Po Lu [Tue, 29 Nov 2022 06:25:04 +0000 (06:25 +0000)]
Allow be-resources to fail
* lib-src/be_resources.cc (be_perror): Print additional blurb.
(main): Return 0 on failure as well, but print the blurb.
Problem reported by the Haiku packager.
F. Jason Park [Thu, 24 Nov 2022 05:31:19 +0000 (21:31 -0800)]
Simplify erc-sasl's auth-source API
* doc/misc/erc.texi: Revise descriptions in SASL chapter to reflect
simplified auth-source options.
* lisp/erc/erc-sasl.el (erc-sasl-password,
erc-sasl-auth-source-function): Revise doc strings.
(erc-sasl-auth-source-password-as-host): New function to serve as
more useful choice for option `erc-sasl-auth-source-function'.
(erc-sasl--read-password): Promote auth-source to pole position, above
an explicit string and `:password'.
* test/lisp/erc/erc-sasl-tests.el (erc-sasl--read-password--basic):
Massage tests to conform to simplified `erc-sasl-password'
API. (Bug#29108.)
F. Jason Park [Thu, 24 Nov 2022 05:31:19 +0000 (21:31 -0800)]
Add erc-sasl-auth-source-function to cached options
* lisp/erc/erc-sasl.el (erc-sasl--read-password): Consult cached
options instead of `erc-sasl-auth-source-function'.
(erc-sasl--init): Add `erc-sasl-auth-source-function' to
`erc-sasl--options'.
* test/lisp/erc/erc-sasl-tests.el (erc-sasl--read-password--basic,
erc-sasl--read-password--auth-source): Look for original value of
`erc-sasl-auth-source-function' in `erc-sasl--options' under the
`authfn' key.
* lisp/textmodes/css-mode.el (css--treesit-settings): Add new
font-lock features 'query', 'keyword', 'operator' and 'bracket'.
(css-ts-mode): Use new features.
* test/lisp/progmodes/python-tests.el (python-ffap-module-path-1):
This test fails with a standard macOS Python installation;
see bug#59477 and bug#25753.