1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

162711 commits

Author SHA1 Message Date
Tom Gillespie
432b9655ae Restore font-lock-type-face for lisp mode &symbols
* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2)
(lisp-el-font-lock-keywords-2): Restore use of type face instead of
builtin face for &symbol keywords.  This fixes what appears to be
a copy paste error that changed the face for common lisp and emacs
lisp &symbol style keywords that was introduced in commit
a498e5f83 by restoring the type face to font-lock-type-face as
consistent with the comments.
2022-12-04 19:50:45 +02:00
Kai Ma
029988d4a5 Prevent a segfault when deleting a fullscreen frame on NextStep.
* nsterm.m ([EmacsView resetCursorRects:]): Be defensive when
accessing FRAME_OUTPUT_DATA.  [resetCursorRects:] can be called
from the event loop after the frame is deleted.  When this
happens, emacsframe is NULL.  This means there is an underlying
leak of the EmacsView object!  (Bug#59794)
Do not merge to master.

Copyright-paperwork-exempt: yes
2022-12-04 14:50:04 +02:00
Eli Zaretskii
3768b10077 ; * lisp/pcomplete.el (pcomplete-allow-modifications): Fix a typo. 2022-12-04 14:42:07 +02:00
Eli Zaretskii
84214578f5 Fix markup in ERC manual
* doc/misc/erc.texi (SASL): Use @table instead of simulating it
with @indentedblock.  Fix markup.  (Bug#59815)
2022-12-04 14:31:50 +02:00
Yuan Fu
96af584af6
Fix comment-start-skip in tree-sitter modes (bug#59690)
* lisp/progmodes/c-ts-mode.el (c-ts-mode)
(c++-ts-mode)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode): Remove the group
from the regexp.
2022-12-03 14:49:38 -08:00
Yuan Fu
520a4e12f8
; * lisp/treesit.el (treesit-end-of-defun): Guard against nil value. 2022-12-03 14:49:37 -08:00
Eli Zaretskii
2c4d92d30f ; * lisp/subr.el (posn-col-row): Revert inadvertent change. 2022-12-03 22:09:16 +02:00
Eli Zaretskii
6fb9a03cbd ; Remove debugging leftover message
* lisp/emacs-lisp/comp.el (comp--native-compile): Remove
unnecessary call to 'message'.  (Bug#59766)
2022-12-03 22:06:34 +02:00
Mattias Engdegård
c5ba47c889 Speed up Unicode normalisation tests by a factor of 5
After this change, ucs-normalize-tests are still very slow but
somewhat less disastrously so (from 100 to 20 min on this machine).

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--normalization-equal-p)
(ucs-normalize-tests--normalization-chareq-p)
(ucs-normalize-tests--rule1-holds-p)
(ucs-normalize-tests--rule2-holds-p)
(ucs-normalize-tests--part1-rule2):
Run only over the Unicode code space.
Hoist `with-current-buffer` to reduce overhead.
2022-12-03 20:47:41 +01:00
Eli Zaretskii
afa4fcb95b Fix "C-h k" when clicking on another frame
* lisp/help.el (help--analyze-key): Don't barf if the key sequence
includes a switch-frame event.  (Bug#59785)
2022-12-03 21:43:36 +02:00
Stefan Kangas
f6e2f30f39 ; Fix typos 2022-12-03 15:39:43 +01:00
Juanma Barranquero
bd58dcedfb Fix and expand tests broken by commit 2772ebe366 of 2022-11-28
* test/lisp/emacs-lisp/comp-tests.el
(with-test-native-compile-prune-cache)
(test-native-compile-prune-cache)
(test-native-compile-prune-cache/delete-only-eln)
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
Check that the last directory in `native-comp-eln-load-path' is
not affected by `native-compile-prune-cache'.
2022-12-03 12:23:02 +01:00
Stefan Kangas
a0dd9fdebe ; Add cross-reference to string-equal docstring
* lisp/subr.el (string-equal-ignore-case):
* src/fns.c (Fstring_equal): Doc fix; add cross-references.
2022-12-03 11:32:23 +01:00
Eli Zaretskii
11c3c54d8a Fix handling of relative directories in "--init-directory=DIR"
* lisp/startup.el (command-line): Interpret non-absolute file
names in '--init-directory' relative to the directory from
which Emacs is started.  (Bug#59795)
2022-12-03 12:21:00 +02:00
Eli Zaretskii
401f76cc3d Make sure 'user-emacs-directory' ends in a slash
* lisp/startup.el (command-line): Make sure 'user-emacs-directory'
has the form of a directory.
2022-12-03 12:03:13 +02:00
Eli Zaretskii
641ef36403 Fix gud-minor-mode-menu
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode)
(easy-mmode-define-keymap): Don't declare obsolete, since we are
still using it in gud.el.  (Bug#59769)  (Bug#59605)
Do not merge to master.
2022-12-03 11:32:00 +02:00
Eli Zaretskii
3623d5c195 Revert "Make easy-mmode-defmap obsolete and adjust only caller"
This reverts commit 8bb5c1bfec.
That commit lost too many useful features in the GUD menus
and caused several bugs, the last of them bug#59769.

Do not merge to master.
2022-12-03 11:16:41 +02:00
Sean Whitton
17d40c163e vc-git-print-log: Don't assume vc-git-log-switches is a list
* lisp/vc/vc-git.el (vc-git-print-log): Call ensure-list on
vc-git-log-switches to handle the case where it's a singular string.
2022-12-02 23:58:30 -07:00
Mattias Engdegård
1e36ad9458 ; server-tests: remove CI debugging 2022-12-02 18:26:50 +01:00
Eli Zaretskii
54633fcd76 ; * lisp/subr.el (string-equal-ignore-case): Doc fix (bug#59779). 2022-12-02 19:08:08 +02:00
Mattias Engdegård
8413e95138 ; server-test CI debugging 2022-12-02 18:06:00 +01:00
Mattias Engdegård
4b3eb928fe Fix server-tests run noninteractively (bug#59742)
This may or may not fix the test run from CI.

* test/lisp/server-tests.el (server-tests/can-create-frames-p):
Don't attempt to create frames if TERM=dumb, which what we have
if run from M-x compile (for instance).
(server-tests/server-force-stop/keeps-frames): Delete created frame so
that it doesn't cause trouble for other tests.
2022-12-02 17:32:22 +01:00
Randy Taylor
1b567f5a67 Use file-name-nondirectory to determine default project-name
* lisp/progmodes/project.el (project-name):
Use file-name-nondirectory instead of file-name-base (bug#59756).
2022-12-02 17:12:43 +02:00
Yikai Zhao
f72cda2b82 Speed up auto-completion in 'sh-script-mode'
* lisp/progmodes/sh-script.el (sh--cmd-completion-table-gen): New
function, replacement for 'sh--cmd-completion-table'.
(sh--cmd-completion-table): Function removed.
(sh-completion-at-point-function): Use
'sh--cmd-completion-table-gen'.  (Bug#59678)
2022-12-02 15:42:09 +02:00
Juanma Barranquero
e5b0141b0d Fix error editing multisession variables (bug#59710)
* lisp/emacs-lisp/multisession.el (multisession-edit-value):
Do not use `bound-and-true-p' on a non-symbol.  This reverts
commit bd586121ac.
2022-12-02 14:25:35 +01:00
dickmao
24ca490d7d ; Fix a typo in .clang-format. 2022-12-02 15:01:11 +02:00
Vibhav Pant
a48cd7bb9f ; Make clang-format format indent preprocessor blocks correctly.
(cherry picked from commit 1abda0c839)
2022-12-02 15:00:23 +02:00
Brian Leung
2b9cd50f93 Add tsx-ts-mode to eglot-server-programs
* lisp/progmodes/eglot.el (eglot-server-programs): Add
tsx-ts-mode.  (Bug#59770)
2022-12-02 12:56:13 +01:00
Juri Linkov
39e0c60176 * 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).
2022-12-02 09:59:53 +02:00
Juri Linkov
bf66b90b9a Fix the width of margins for icons in outline-minor-mode (bug#59719)
* doc/lispref/display.texi (Icons): Add :width spec.

* 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.
2022-12-02 09:54:22 +02:00
Yuan Fu
2e4960d63d
; Change c-ts-mode--base-mode to c-ts-base-mode
* lisp/progmodes/c-ts-mode.el (c-ts-mode--base-mode)
(c-ts-mode, c++-ts-mode): Change to c-ts-base-mode.
2022-12-01 20:42:35 -08: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
Daniel Martín
ad0563855f
Add case and match to python--treesit-keywords (bug#59720)
* lisp/progmodes/python.el (python--treesit-keywords): Add "case" and
"match" keywords.
2022-12-01 19:59:52 -08:00
Yuan Fu
16e68e64f9
; * lisp/progmodes/c-ts-mode.el: Change rx to regexp-opt. 2022-12-01 19:59:51 -08:00
Dmitry Gutov
3bccef6f52 project-files (VC-aware): Make sure the VC backend is loaded
* lisp/progmodes/project.el (project-files):
Make sure the VC backend is loaded (bug#59734).
2022-12-02 04:03:19 +02:00
Sean Whitton
03a40b974c 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.
2022-12-01 15:14:42 -07:00
Eli Zaretskii
368c7c7d8e Improve detection of very long lines
* src/xdisp.c (redisplay_window): Recheck for long lines if the
restriction has changed.  (Bug#56682)
2022-12-02 00:07:53 +02: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
91dba5b066 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29 2022-12-01 19:34:32 +02:00
Stefan Kangas
70ecdebc92 ; Fix typos (don't abbreviate "with" or "without") 2022-12-01 16:36:09 +01:00
Eli Zaretskii
d94c5870c0 ; * lisp/tab-bar.el (tab-bar-change-tab-group): Doc fix. 2022-12-01 17:34:26 +02:00
Eli Zaretskii
a86ccb5f9d ; Fix recently added treesit documentation
* lisp/treesit.el (treesit-defun-prefer-top-level):
* doc/lispref/positions.texi (List Motion): Fix wording.
2022-12-01 17:25:28 +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
61311d6862 ; Fix test failure on CI 2022-12-01 16:40:59 +02:00
Stefan Kangas
0a5ede0149 ; Auto-commit of loaddefs files. 2022-12-01 15:33:12 +01: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
Stefan Kangas
b7b2455c5f Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-11-29 18:15:27 UTC.

(cherry picked from commit de00aef3e1)
2022-12-01 15:09:40 +01:00
kobarity
5d1a1019c6 Add highlighting Python operators (bug#59629)
* lisp/progmodes/python.el (python-rx): Remove "is" and
"not" from operator.
(python-font-lock-keywords-maximum-decoration): Add
highlighting operators.
* test/lisp/progmodes/python-tests.el
(python-font-lock-assignment-statement-1)
(python-font-lock-assignment-statement-2)
(python-font-lock-assignment-statement-3)
(python-font-lock-assignment-statement-4)
(python-font-lock-assignment-statement-5)
(python-font-lock-assignment-statement-6)
(python-font-lock-assignment-statement-7)
(python-font-lock-assignment-statement-8)
(python-font-lock-assignment-statement-9)
(python-font-lock-assignment-statement-10)
(python-font-lock-assignment-statement-11)
(python-font-lock-assignment-statement-12)
(python-font-lock-assignment-statement-13)
(python-font-lock-assignment-statement-14)
(python-font-lock-assignment-statement-15)
(python-font-lock-assignment-statement-16)
(python-font-lock-assignment-statement-17)
(python-font-lock-assignment-statement-18)
(python-font-lock-assignment-statement-multiline-1)
(python-font-lock-assignment-statement-multiline-2)
(python-font-lock-assignment-statement-multiline-3)
(python-font-lock-assignment-statement-multiline-4)
(python-font-lock-assignment-statement-multiline-5)
(python-font-lock-assignment-statement-multiline-6)
(python-font-lock-escape-sequence-multiline-string): Modify
expectations to include faces for operators.
(python-font-lock-operator-1, python-font-lock-operator-2): New tests.
2022-12-01 14:45:10 +02:00
Eli Zaretskii
8b3baadf67 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.
2022-12-01 14:40:47 +02:00