1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

7546 Commits

Author SHA1 Message Date
Eli Zaretskii
9a352ab1c7 ; * etc/NEWS: Fix wording of a recently added entry. 2022-12-26 16:10:44 +02:00
Po Lu
cc29fab3a6 Redisplay "invisible" frames that are actually visible on modern X
* etc/NEWS: Document that "invisible" frames are now redisplayed
if the compositing manager is still displaying it as part of a
thumbnail out of Emacs's control.

* src/dispnew.c (Fredraw_display): Use FRAME_REDISPLAY_P.
* src/frame.h (FRAME_REDISPLAY_P): New macro.

* src/xdisp.c (clear_garbaged_frames, echo_area_display)
(prepare_menu_bars, redisplay_internal, display_and_set_cursor)
(gui_clear_cursor): Use FRAME_REDISPLAY_P to determine whether
or not a frame should be redisplayed.
* src/xfns.c (Fx_create_frame): Set visibility state initially.
* src/xterm.c (handle_one_xevent): Likewise.
* src/xterm.h (struct x_output): New field `visibility_state'.
2022-12-26 15:57:48 +08:00
Stefan Kangas
e871f21348 ; Manually fix merge errors in etc/NEWS 2022-12-21 02:38:13 +01:00
Stefan Kangas
2bbc554db6 Merge from origin/emacs-29
d3a76db88b * lisp/repeat.el: Fix repeat-keep-prefix to allow customi...
8ef3777d54 Correct capitalization of Lisp in the manual (bug#60222)
d03ea89378 eglot.el: Add vscode-json-languageserver to eglot-server-...
8550a99378 ; * src/emacs-module.h.in (enum emacs_funcall_exit): Fix ...
fb7f3999c5 ; Fix ruby-method-params-indent's :version value
cfbfd393b4 * lisp/progmodes/project.el (project--read-file-cpd-relat...
2b1fdbffcb ruby-method-params-indent: New user option
b9e813f79f ; ruby-indent-level: Improve the docstring
399433cc2b * lisp/progmodes/project.el: Filter out empty strings fro...
23f7c9c2a9 Fix storing email into nnmail by Gnus
63cdbd986b ; Really respect browse-url var in erc-compat
64163618d2 whitespace: Fix unintended change in buffer modification ...
a75d1da911 Make emacsclient add abbreviated file names to file-name-...
b3e7768a0e Repair setopt test after error demotion to warning
2022-12-21 02:37:17 +01:00
Dmitry Gutov
2b1fdbffcb ruby-method-params-indent: New user option
* lisp/progmodes/ruby-mode.el (ruby-method-params-indent):
New option (bug#60110).

(ruby-smie-rules): Use it.

* etc/NEWS: Mention it.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Ensure the var's value is default.

* test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb:
New file.

* test/lisp/progmodes/ruby-mode-tests.el (ruby-deftest-indent):
New macro, use it to run the indentation test using the new file.
Disable the :expensive-test tag, because neither runs for "longer
than some few seconds", both take significantly below 1s.
2022-12-19 21:06:07 +02:00
Stefan Kangas
6c842ef81c ; Fix merge errors in etc/NEWS 2022-12-19 05:00:38 +01:00
Stefan Kangas
690724f0f1 Merge from origin/emacs-29
67bc96c9d9 Remove treesit-defun-prefer-top-level and friends
4f9bccef55 Add yaml-ts-mode (Bug#60105)
f9cb144d45 Fix indentation in json-ts-mode (bug#60123)
3d348c46e7 ; Handle nil ARG in treesit-beginning/end-of-defun
1a66435dda New input method 'cyrillic-chuvash'
b9227c502d ; Improve wording of 'format' doc string
2022-12-19 04:42:18 +01:00
Michael Albinus
cf1b771864 ; * etc/NEWS: Fix typos. 2022-12-18 16:43:05 +01:00
Dmitry Gutov
6f88de109c ruby-mode: Support endless methods (bug#54702)
* lisp/progmodes/ruby-mode.el (ruby-endless-method-head-re):
New constant.
(ruby-smie-grammar): New token.
(ruby-smie--forward-token, ruby-smie--backward-token):
Recognize it.
(ruby-smie-rules): Indentation support.
(ruby-add-log-current-method): Support here too.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-after-endless-method): New test.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: New examples.
2022-12-18 14:04:17 +02:00
Eli Zaretskii
88e59b16cb ; Improve documentation of installing tree-sitter and grammars.
* etc/NEWS: Enhance tree-sitter sections wrt grammar libraries.
2022-12-18 12:08:22 +02:00
Randy Taylor
cb8ccdd267
Add rust-ts-mode (Bug#60136)
* etc/NEWS: Mention it.
* lisp/progmodes/eglot.el (eglot-server-programs): Add it.
* lisp/progmodes/rust-ts-mode.el: New major mode with
tree-sitter support.
2022-12-17 15:40:53 -08:00
Paul Eggert
bef1edc9ca make-directory now returns t if dir already exists
This new feature will help fix a copy-directory bug (Bug#58919).
Its implementation does not rely on make-directory handlers
supporting the new feature, as it no longer uses a make-directory
handler H in any way other than (funcall H DIR), thus using
only the intersection of the old and new behavior for handlers.
This will give us time to fix handlers at our leisure.
* lisp/files.el (files--ensure-directory): New arg MKDIR.
All uses changed.
(files--ensure-directory, make-directory):
Return non-nil if DIR is already a directory.  All uses changed.
* test/lisp/files-tests.el (files-tests-make-directory):
Test new return-value convention.
2022-12-17 14:24:16 -08:00
Paul Eggert
8a9579ca29 Use make-directory handlers uniformly
Formerly, the code supported both make-directory and
make-directory-internal handlers. This led to confusion and meant than
in a few cases (nnmaildir, ido) remote directories could not be used in
some cases.  Fix this by using only make-directory handlers.

Perhaps there used to be a reason for why there were both
make-directory and make-directory-internal handlers, but whatever that
reason was, it seems to have vanished even before now.

There is no longer any need for make-directory-internal handlers, as
the few remaining callers that use make-directory-internal do so only
when there are no handlers.  However, this change keeps the existing
make-directory-internal handlers for now, in case this code is ever
used in older Emacs versions that still call those handlers.

* lisp/gnus/nnmaildir.el (nnmaildir--mkdir):
* lisp/ido.el (ido-file-internal):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-directory):
Use make-directory, not make-directory-internal.
* lisp/net/tramp-smb.el (tramp-smb-handle-make-directory-internal):
Now obsolete.
* src/fileio.c (Fmake_directory_internal): Do not look for or
use a make-directory-internal handler.
* test/lisp/files-tests.el:
(files-tests-file-name-non-special-make-directory-internal):
Remove, as this test incorrectly assumes that make-directory-internal
must support handlers.
2022-12-17 14:24:16 -08:00
Randy Taylor
4f9bccef55
Add yaml-ts-mode (Bug#60105)
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add yaml support.
* etc/NEWS: Mention it.
* lisp/textmodes/yaml-ts-mode.el: New major mode with
tree-sitter support.
* lisp/progmodes/eglot.el (eglot-server-programs): Add it.
2022-12-16 14:55:02 -08:00
Eli Zaretskii
1a66435dda New input method 'cyrillic-chuvash'
* lisp/leim/quail/cyrillic.el ("cyrillic-chuvash"): New input
method, contributed by flashymittens@tutanota.com.  (Bug#60023)

Copyright-paperwork-exempt: yes
2022-12-16 22:05:52 +02:00
Stefan Kangas
4331771222 ; Fix merge errors 2022-12-16 08:47:27 +01:00
Stefan Kangas
03892d4f7c Merge from origin/emacs-29
033071692c ; Fix typos
f4a513344d Add lambda_expression-rule to java-ts-mode (bug#60091)
546aed3543 eglot: Add support for new language server csharp-ls
cb761eb7ac Use the new tree-sitter commands
037407ad95 Add "function" feature to python-ts-mode (bug#59977)
fee2efe1b0 Add go-ts-mode and go-mod-ts-mode (Bug#60025)
e8f7ab67ad Add basic support for hideshow in python-ts-mode (bug#60044)
cac070b23e Add "this" keyword to java-ts-mode (bug#60086)
c8d75046a2 When completing relative project file names, use relative...
3b618d0e3e Avoid segfaults due to invalid selected-window's buffer

# Conflicts:
#	lisp/progmodes/sh-script.el
2022-12-16 08:45:06 +01:00
Jim Porter
e63ef66c57 Add support for the "splice operator" in Eshell
This allows splicing lists in-place in argument lists, which is
particularly important when defining aliases using the '$*' special
variable (bug#59960).

* lisp/eshell/esh-var.el (eshell-parse-variable): Add support for the
splice operator.
(eshell-interpolate-variable): Let 'eshell-parse-variable' handle
adding 'eshell-escape-arg'.
(eshell-complete-variable-reference): Handle the splice operator.

* lisp/eshell/esh-arg.el (eshell-concat-groups)
(eshell-prepare-splice): New functions...
(eshell-resolve-current-argument): ... use them.
(eshell-splice-args): New function.

* lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Handle
'eshell-splice-args'.

* lisp/eshell/esh-util.el (eshell-list-to-string): New function...
(eshell-flatten-and-stringify): ... use it.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Remove
'eshell-splice-args' sigils in Eshell command forms so that we can
perform completion on splice-expansions.

* lisp/eshell/em-unix.el (eshell-complete-host-reference): Don't try
to complete arguments containing "$@".

* test/lisp/eshell/esh-var-tets.el (esh-var-test/interp-list-var)
(esh-var-test/interp-list-var-concat, esh-var-test/interp-var-splice)
(esh-var-test/interp-var-splice-concat)
(esh-var-test/quoted-interp-list-var)
(esh-var-test/quoted-interp-list-var-concat)
(esh-var-test/quoted-interp-var-splice)
(esh-var-test/quoted-interp-var-splice-concat): New tests.

* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-all-args-var-splice): New test.

* doc/misc/eshell.texi (Dollars Expansion): Explain the splice
operator.
(Aliases): Expand documentation and use '$@*'.
(Built-ins, Bugs and Ideas): Use '$@*' where appropriate.

* etc/NEWS: Announce this change.
2022-12-15 21:41:03 -08:00
Randy Taylor
fee2efe1b0
Add go-ts-mode and go-mod-ts-mode (Bug#60025)
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add go-mod support.
* etc/NEWS: Mention them.
* lisp/progmodes/eglot.el (eglot-server-programs): Add them.
* lisp/progmodes/go-ts-mode.el: New major modes with
tree-sitter support.
2022-12-15 17:20:50 -08:00
Juri Linkov
99aa00e6e3 Revert 21b387c39b with last-minute hasty changes (bug#60048).
* lisp/simple.el (completion-list-mode-map): Unbind [up] and [down].
(previous-line-completion, next-line-completion): Remove.
2022-12-15 21:27:36 +02:00
Randy Taylor
3a633bdd6d ; * etc/NEWS: Fix recent changes. 2022-12-15 19:05:43 +02:00
Eli Zaretskii
12684c3a19 Mention 'tree-sitter' in user manual and NEWS
* doc/emacs/programs.texi (Program Modes): Mention tree-sitter and
the modes supported by it.
* etc/NEWS: Mention tree-sitter in the Installation Changes
section.
2022-12-15 10:47:11 +02:00
Eli Zaretskii
49d7e0cec6 ; * etc/NEWS: Rearrange entries for tree-sitter supported modes. 2022-12-15 10:25:27 +02:00
Eli Zaretskii
0ad2112a2f ; Announce 'toml-ts-mode' in NEWS. 2022-12-15 10:09:25 +02:00
Eli Zaretskii
f93a5180a6 Update the documentation of overlays (bug#59996)
* src/buffer.c (Foverlay_recenter, Foverlay_lists): Update the doc
strings.

* lisp/subr.el (copy-overlay): Update comment.

* doc/lispref/internals.texi (Buffer Internals): Remove buffer
fields relevant to the old implementation; add the new interval
tree field.
* doc/lispref/display.texi (Overlays, Managing Overlays): Update
text to be consistent with the new implementation of overlays.
(Managing Overlays): Remove documentation of 'overlay-recenter'.

* etc/NEWS: Mention incompatible aspects of overlay
reimplementation.
2022-12-14 20:13:47 +02:00
Stefan Kangas
f1840cf12f ; * etc/NEWS: Fix another merge error. 2022-12-14 00:15:08 +01:00
Stefan Kangas
f8bc26a3db ; Fix merge error 2022-12-14 00:12:52 +01:00
Stefan Kangas
8036739c1b Merge from origin/emacs-29
cd5856e403 Fix bug when calling `rgrep` non-interactively
ba4bdd6a25 Adapt Tramp specific tests in eglot-tests.el
1d5c35c8e4 * lisp/textmodes/texinfo.el (texinfo-flymake): Improve do...
a99d0e7e6c Support a function in the BUFFER-LIST arg of list-buffers...
def51dd645 ; Fix typos
4980ed7a6d Don't allow lazy highlight from recursive minibuffers
4ef8b9f544 Improve resetting face attributes when looking for suitab...
c4b8bc90a8 ; Fix typos in doc strings
c45eb13845 ; * lisp/bs.el (bs-attributes-list): Doc fix
d6adaf487d Add lexical-binding to example package header
03ad1a92a2 Add improved tree-sitter navigation
a5272e2a7c ; * test/src/treesit-tests.el: Add outline headers.
489bcacc7c Add cross-reference to flush-lines
0f9e6532b1 Use font-lock-number-face for numeric values in csharp-mode
4bccb7b211 Make treesit-query-validate create a read-only buffer
c0fe6c72ce Improve dockerfile-ts-mode imenu generation (Bug#59979)
631908f701 Add "->" to python--treesit-operators (bug#59968)
5d4274d9b6 ; * admin/notes/tree-sitter/build-module/build.sh: Add -f...
d264b75669 Align C++ access specifiers to their enclosing class/stru...
ca67d988d8 Add cmake-ts-mode
8ec923775d Tweak various ts-mode's indent and fontification (bug#59931)
647b6a8099 Add expression for generic_name in csharp-ts-mode (bug#59...
5b178efd85 ; Adjust eglot test to recent autopep8/pycodestyle
58b8ed8b55 ; Avoid compilation warning on MS-Windows
40c23c11e8 * lisp/outline.el: Fix the value 'insert' of outline-mino...
527eb11de2 * lisp/minibuffer.el (completions-group-separator): Rever...
42d740fb2c ; Skip two eglot tests when typescript is missing
19ef86f775 ; Remove outdated text describing overlays
081bf58300 Skip Eglot rust-analyzer tests if 'cargo' isn't available

# Conflicts:
#	lisp/progmodes/typescript-ts-mode.el
#	lisp/treesit.el
2022-12-14 00:06:29 +01:00
Randy Taylor
ca67d988d8
Add cmake-ts-mode
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add cmake support.
* etc/NEWS: Mention it.
* lisp/progmodes/cmake-ts-mode.el: New major mode with
tree-sitter support.
* lisp/progmodes/eglot.el (eglot-server-programs): Add it.
2022-12-12 15:08:54 -08:00
Theodor Thornhill
b889eced44 Add prog-fill-reindent-defun (bug#59664)
Introduce a new command that aims to reindent code in a defun, or fill
a paragraph of text.  The command uses treesit.el when available,
otherwise falls back to using syntax-ppss and regexps.  Treesit.el
needs a new variable that is intended to be set by the major modes so
that this and other future functions can know what kind of node we are
looking at.

* doc/emacs/programs.texi: Mention the new command.
* etc/NEWS: Mention the new command.
* lisp/progmodes/c-ts-mode.el (c++-ts-mode): Add regexp for the new
variable.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add regexp for the
new variable.
* lisp/progmodes/java-ts-mode.el (java-ts-mode): Add regexp for the
new variable.
* lisp/progmodes/js.el (js-ts-mode): Add regexp for the new variable.
* list/progmodes/prog-mode.el (prog-mode-map): Bind the new command by
default.
(prog-fill-reindent-defun): New command.
* lisp/progmodes/sh-script.el (bash-ts-mode): Add regexp for the new
variable.
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode): Add
regexp for the new variable.
* lisp/treesit.el (treesit-text-type-regexp): New variable.
2022-12-11 22:31:31 +02:00
Po Lu
6d6ca47aba Merge from origin/emacs-29
44c5f36149 ; Fix two byte-compiler warnings
a8ee046fb5 Ensure 'package-vc--version' always returns a version
022ab1061b Ensure 'package-vc--main-file' always returns an existing...
357fe91996 Check if package already exists before installing from ch...
5e8bc79f6b ; Fix reference in docstring to 'package-vc-install-from-...
af88b00b19 Refresh the package quickstart file in package-vc
5a092c8e46 ; * admin/notes/tree-sitter/starter-guide (Indent): Minor...
ebef8905b0 Make indirect buffers use tree-sitter parsers of their ba...
8f53fa10d9 Fontify "this" as a keyword in c++-ts-mode (bug#59924)
8de8f1dc05 Add class_body indentation for typescript (bug#59680)
839341d737 Make more granular defun-type-regexp (bug#59873)
8f49137c9b Add dockerfile-ts-mode (Bug#59894)
1014bcc8e3 Fix fontification of method-invocations in js-ts-mode (bu...
7141920c6a Fix escape-sequence feature in typescript-ts-mode (bug#59...
4df35e3491 Improve fontification in csharp-ts-mode (bug#59909)
33a8415eb7 Use 'project--value-in-dir' for 'project-vc-include-untra...
594267395d Update Turkish Hello
940d9070e9 Support newer glib versions (Bug#59061)
0bd26abf7f ; * doc/misc/use-package.texi: Fix @file.
bcf235acd5 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
2ea7a357fd ; * doc/misc/use-package.texi: Fix @acronym.
d268ab1c5d Bring back the project--value-in-dir logic
2022-12-11 09:34:03 +08:00
Eli Zaretskii
9c670695b9 ; * etc/NEWS: Fix last change. 2022-12-10 15:32:41 +02:00
Gustaf Waldemarson
5d506a7eab gdb-mi.el: Configure variable order and length in local-vars window
This changes allows users to configure the order of various properties
as well as truncating their length.  The full description of each
property is available as a help-text (tooltip).
* lisp/progmodes/gdb-mi.el (gdb-locals-table-row-config): New user
option.
(gdb-locals-value-filter): Don't limit the values here.
(gdb-locals-table-columns-list): New function.
(gdb-locals-handler-custom): Call it.  (Bug#59730)

* etc/NEWS: Announce the change.
2022-12-10 15:26:50 +02:00
Randy Taylor
8f49137c9b
Add dockerfile-ts-mode (Bug#59894)
* admin/notes/tree-sitter/build-module/batch.sh: Add dockerfile support.
* admin/notes/tree-sitter/build-module/build.sh: Support different
namespaces and add dockerfile support.
* etc/NEWS: Mention it.
* lisp/progmodes/dockerfile-ts-mode.el: New major mode with
tree-sitter support.
* lisp/progmodes/eglot.el (eglot-server-programs): Add it.
2022-12-09 16:46:01 -08:00
Michael Albinus
b36bc69267 ; * etc/NEWS: Fix typos. 2022-12-09 15:51:48 +01:00
Sean Whitton
f1942c298c Make eshell-read-aliases-list an interactive command
* lisp/eshell/em-alias.el (eshell-read-aliases-list): Add interactive
specification.  Note in docstring that the command is useful after
manually editing eshell-aliases-file.
* etc/NEWS:
* doc/misc/eshell.texi (Aliases): Document the change.
2022-12-08 22:55:28 -07:00
Stefan Kangas
e950f5a663 Merge branch 'feature/use-package' into emacs-29 2022-12-08 18:01:30 +01:00
João Távora
4bc9c8972a Add lisp/external-completion.el for completions from external tools
This table uses a new 'external' completion style which has been in
use in Eglot and other third-party extensions for a long time.  It's
meant for libraries that interface with an external tool which
provides completions, such as a shell utility, an inferior process, an
http server.

The new file lisp/external-completion.el provides a helper function,
external-completion-table which is given an interfacing function to
the external tool and returns a "programmed completion" table that is
bound to the 'external' completion style.  That table can then be used
with completing-read or any other facility expecting a completion
table.

When the 'external' is in use, the usual styles configured by the user
or other in 'completion-styles' are completely overriden.  This
relatively minor inconvenience is the price to pay for responsive
completion where the full set of completion candidates doesn't need to
be transfered into Emacs's address space.

* lisp/external-completion.el: New file.

* etc/NEWS: (Lisp Changes in Emacs 29.1): Mention
  external-completion-table.
2022-12-07 19:06:09 +00:00
Eli Zaretskii
51a192023a ; * etc/NEWS: Fix the 'bs-default-action-list' entry. 2022-12-07 14:50:41 +02:00
Thomas Fitzsimmons
9ae1c2762d EUDC: Outline deprecation plans in NEWS
* etc/NEWS (EUDC): Mention deprecation plans.
2022-12-06 21:41:51 -05:00
Juanma Barranquero
f0e118d3f6 * etc/NEWS: Mention new bs option 2022-12-07 02:36:41 +01:00
Eli Zaretskii
a8574e76ff ; * etc/NEWS: Fix entry for 'vc-git-shortlog-switches'. 2022-12-05 14:21:36 +02:00
Sean Whitton
5be502a697 Improve passing user switches to Git log commands (bug#59414)
* lisp/vc/vc-git.el (vc-git-log-switches): Revise docstring.
(vc-git-shortlog-switches): New defcustom.
(vc-git-print-log): Use vc-git-log-switches or
vc-git-shortlog-switches depending on whether printing a shortlog.
(vc-git-log-outgoing, vc-git-log-incoming): Use
vc-git-shortlog-switches.
(vc-git-log-search, vc-git-expanded-log-entry): Use
vc-git-log-switches.
* etc/NEWS: Document the new defcustom.
2022-12-04 22:02:46 -07:00
Theodor Thornhill
1aa1f8432b
Add new TypeScript mode tsx-ts-mode
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.

* etc/NEWS: Mention the new mode.
2022-12-01 20:41:57 -08:00
Eli Zaretskii
9c58ea37af ; 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.
2022-12-01 20:15:52 +02:00
Laurence Warne
0c1495574a 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.
2022-12-01 19:46:30 +02:00
Eli Zaretskii
2d5cf7329e ; * etc/NEWS: Fix wording and punctuation of recently added entries. 2022-12-01 17:11:43 +02:00
Dmitry Gutov
91a9598baf Update project docs and NEWS
* doc/emacs/maintaining.texi (Projects): Update the name.

* etc/NEWS: Mention new option (bug#41572).
2022-12-01 16:24:25 +02:00
Po Lu
e961a31507 Speed up handling X selection requests
* etc/NEWS: Announce speedup.
* src/alloc.c (garbage_collect): Call mark_xselect.
* src/xftfont.c (xftfont_end_for_frame): Fix crash on display IO
error.
* src/xselect.c (struct selection_data, struct transfer): New
structures.
(outstading_transfers): New variable.
(SELECTED_EVENTS, x_selection_request_lisp_error): Stop checking
cs->nofree.
(x_catch_errors_unwind): Delete function.
(c_size_for_format, x_size_for_format, selection_data_for_offset)
(selection_data_size, transfer_selecting_event)
(x_continue_selection_transfer, x_remove_selection_transfers)
(x_selection_transfer_timeout): New functions.
(x_reply_selection_request): When handling selection requests,
never wait for property notifications synchronously.  Instead,
write out the selection data as the client reads it from the
event loop.
(x_handle_selection_request, x_convert_selection)
(x_handle_property_notify, x_get_window_property)
(lisp_data_to_selection_data): Don't ever use pointers to Lisp
string data! Instead, just store the string object itself.
(syms_of_xselect): Initialize outstanding transfer list.
(syms_of_xselect_for_pdumper):
* src/xterm.c (x_delete_display): Remove outstanding selection
transfers.
* src/xterm.h: Update prototypes.
2022-12-01 14:33:34 +08:00
Eli Zaretskii
ee32ae7c36 ; * etc/NEWS: Add missing tree-sitter based modes. 2022-11-30 20:29:04 +02:00