1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

162765 commits

Author SHA1 Message Date
Stefan Kangas
4fa37dc426 Merge from origin/emacs-29
ec00d292ec Improve treesit-fontify-with-override
4bcdb1cc65 Make killing a non-last client work the same no matter th...
a27f61f6f4 Use the function 'window-system' on the tab-bar/tab-line ...
432b9655ae Restore font-lock-type-face for lisp mode &symbols
2022-12-05 06:30:21 +01:00
Stefan Kangas
f09cf0efd6 ; Merge from origin/emacs-29
The following commit was skipped:

029988d4a5 Prevent a segfault when deleting a fullscreen frame on Ne...
2022-12-05 06:30:21 +01:00
Stefan Kangas
9d5ec880b0 Merge from origin/emacs-29
3768b10077 ; * lisp/pcomplete.el (pcomplete-allow-modifications): Fi...
84214578f5 Fix markup in ERC manual
2022-12-05 06:30:21 +01: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
Yuan Fu
ec00d292ec
Improve treesit-fontify-with-override
This also fixes fontification problem with c-ts-mode--fontify-defun.

Now treesit-fontify-with-override clips the fontification region for
the user, so no need for (max start node-start) shenanigans anymore.
More importantly it doesn't fontify unless the region between
node-start and node-end intersects with the region between start and
end, which fixes the problem with c-ts-mode--fontify-defun.

* lisp/treesit.el (treesit-fontify-with-override): Add optional
parameter BOUND-START and BOUND-END.  Wrap the function body in a
when-form.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-declarator)
(c-ts-mode--fontify-variable)
(c-ts-mode--fontify-defun)
(c-ts-fontify-error)
* lisp/progmodes/js.el (js--fontify-template-string)
* lisp/progmodes/python.el (python--treesit-fontify-string): Use the
new signature.
2022-12-04 20:03:28 -08:00
Jim Porter
4bcdb1cc65 Make killing a non-last client work the same no matter the auto-stop setting
Previously, if 'server-stop-automatically' was configured for
'kill-terminal' or 'delete-frame', killing a client via
'save-buffers-kill-terminal' wouldn't prompt about the saving files in
the client's buffer list (as it does when not using those settings).
This change ensures that those settings only apply when killing the
last client, as described in the manual (bug#51993).

* lisp/server.el (server-save-buffers-kill-terminal): Handle
'server-stop-automatically' behavior in this function, rather than
calling 'server-stop-automatically--handle-delete-frame'.
2022-12-04 14:14:09 -08:00
Juri Linkov
a27f61f6f4 Use the function 'window-system' on the tab-bar/tab-line (bug#59620)
* lisp/tab-bar.el (tab-bar-separator)
(tab-bar-format-align-right, tab-bar-auto-width):
* lisp/tab-line.el (tab-line-format-template): Replace the variable
'window-system' with the function call '(window-system)'.
2022-12-04 21:30:34 +02:00
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
Po Lu
3e00e50ee3 Fix potential crash deselecting for property change notifications
* src/xselect.c (x_cancel_selection_transfer): Catch errors
around XSelectInput.
2022-12-04 21:56:23 +08: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
Manuel Giraud
a51743dbcb Make a boxed menu bar have a shadow at its right end (bug#59778)
* src/xdisp.c (display_menu_bar) [HAVE_X_WINDOWS]: Make a boxed
menu bar have a shadow at its right end in non-toolkit X builds.
2022-12-04 14:43:21 +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
Po Lu
f96a9e10b1 Make Emacs build with Xfixes support on old versions of the library
* src/xterm.c (xfixes_toggle_visible_pointer):
(x_toggle_visible_pointer):
(XTtoggle_invisible_pointer, x_term_init): Disable code
requiring fixes 4.0 or later when the fixes library is older.
* src/xterm.h: Define missing types needed by other extensions
when the fixes library is too old.
* configure.ac: Allow building with any version of the Xfixes
extension library.
2022-12-04 20:02:32 +08:00
Stefan Kangas
be67cc276a Merge from origin/emacs-29
96af584af6 Fix comment-start-skip in tree-sitter modes (bug#59690)
520a4e12f8 ; * lisp/treesit.el (treesit-end-of-defun): Guard against...
2c4d92d30f ; * lisp/subr.el (posn-col-row): Revert inadvertent change.
6fb9a03cbd ; Remove debugging leftover message
c5ba47c889 Speed up Unicode normalisation tests by a factor of 5
afa4fcb95b Fix "C-h k" when clicking on another frame
f6e2f30f39 ; Fix typos
bd58dcedfb Fix and expand tests broken by commit 2772ebe366 of 2022-...
a0dd9fdebe ; Add cross-reference to string-equal docstring
11c3c54d8a Fix handling of relative directories in "--init-directory...
401f76cc3d Make sure 'user-emacs-directory' ends in a slash
2022-12-04 06:31:24 +01:00
Stefan Kangas
91a578ac9f ; Merge from origin/emacs-29
The following commits were skipped:

641ef36403 Fix gud-minor-mode-menu
3623d5c195 Revert "Make easy-mmode-defmap obsolete and adjust only c...
2022-12-04 06:31:24 +01:00
Stefan Kangas
395f9d83f2 Merge from origin/emacs-29
17d40c163e vc-git-print-log: Don't assume vc-git-log-switches is a list
2022-12-04 06:31:24 +01: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
Po Lu
1c90138651 Improve performance of other_frames and XTfullscreen_hook
* src/frame.c (other_frames):
* src/xterm.c (XTfullscreen_hook, x_check_fullscreen)
(x_set_window_size_1): Avoid extraneous calls to x_sync.
2022-12-03 21:06:12 +08: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
Stefan Kangas
dd7a7633be Merge from origin/emacs-29
1e36ad9458 ; server-tests: remove CI debugging
54633fcd76 ; * lisp/subr.el (string-equal-ignore-case): Doc fix (bug#...
8413e95138 ; server-test CI debugging
4b3eb928fe Fix server-tests run noninteractively (bug#59742)
1b567f5a67 Use file-name-nondirectory to determine default project-name
f72cda2b82 Speed up auto-completion in 'sh-script-mode'
e5b0141b0d Fix error editing multisession variables (bug#59710)
2022-12-03 06:30:29 +01:00
Stefan Kangas
98327e3719 ; Merge from origin/emacs-29
The following commits were skipped:

24ca490d7d ; Fix a typo in .clang-format.
a48cd7bb9f ; Make clang-format format indent preprocessor blocks corr...
2022-12-03 06:30:29 +01:00
Stefan Kangas
9065d74515 Merge from origin/emacs-29
2b9cd50f93 Add tsx-ts-mode to eglot-server-programs
2022-12-03 06:30:29 +01:00
Juanma Barranquero
2541bec21b * lisp/bindings.el (bound-and-true-p): Verify argument is a symbol 2022-12-03 02:04:48 +01:00
Stefan Monnier
73d169c7db * lisp/emacs-lisp/cl-macs.el (cl-flet): Optimize a bit more
Also optimize the case where we use `cl-flet` to introduce a local alias.
2022-12-02 19:15:46 -05: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
Po Lu
64044f545a More behind the scenes transparent speedups around xselect.c
* src/xdisp.c (display_menu_bar): Fix compiler warning about
NULL pointer dereference.
* src/xfns.c (Fx_begin_drag): Use x_intern_atoms.
(Fx_change_window_property): Pass dpyinfo to
x_fill_property_data.
* src/xselect.c (lisp_data_to_selection_data): Use
x_intern_atoms instead of syncing for each atom.
(x_fill_property_data, x_send_client_event): Use
x_intern_cached_atom.
* src/xterm.c (x_intern_atoms): New function.
* src/xterm.h: Update prototypes.
2022-12-02 21:03:07 +08: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
dickmao
a67ed9a403 ; Fix typo in .clang-format (Bug#59768) 2022-12-02 13:52:21 +01: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
Stefan Kangas
3eb64d21f6 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.

# Conflicts:
#	etc/NEWS
2022-12-02 12:36:35 +01:00