]> git.eshelyaron.com Git - emacs.git/log
emacs.git
21 months agoSkip one python test case on macOS
Mattias Engdegård [Mon, 28 Nov 2022 18:41:02 +0000 (19:41 +0100)]
Skip one python test case on macOS

* 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.

21 months ago; * configure.ac (module_env_snippet_30): Fix a typo.
Eli Zaretskii [Mon, 28 Nov 2022 18:10:17 +0000 (20:10 +0200)]
; * configure.ac (module_env_snippet_30): Fix a typo.

21 months agoBump master Emacs version to 30.0.50
Eli Zaretskii [Mon, 28 Nov 2022 18:03:07 +0000 (20:03 +0200)]
Bump master Emacs version to 30.0.50

* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp:
* etc/refcards/ru-refcard.tex: Bump Emacs version to 30.0.50.

* etc/NEWS.29: New file.
* etc/NEWS: Empty for Emacs 30.

* configure.ac: Add boilerplate for module-env-XX.h.

* src/emacs-module.h.in (struct emacs_env_30): Add.
* src/module-env-29.h: Remove header comment.
* src/module-env-30.h: New file.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Set last version to 29.1.

21 months agoDo not prune native-compiled system directories (bug#59658)
Juanma Barranquero [Mon, 28 Nov 2022 16:46:21 +0000 (17:46 +0100)]
Do not prune native-compiled system directories (bug#59658)

* lisp/emacs-lisp/comp.el (native-compile-prune-cache):
Skip last directory in `native-comp-eln-load-path'.

21 months ago; Fix typo in eglot-alternatives (Bug#59653)
Stefan Kangas [Mon, 28 Nov 2022 14:32:25 +0000 (15:32 +0100)]
; Fix typo in eglot-alternatives (Bug#59653)

* lisp/progmodes/eglot.el (eglot-alternatives): Fix typo.
Problem reported by Arash Esbati <arash@gnu.org>.

21 months agoFix display of long completions.
Gregory Heytings [Mon, 28 Nov 2022 12:17:30 +0000 (12:17 +0000)]
Fix display of long completions.

* lisp/minibuffer.el (completion--insert-strings): Do not assume
"at least 2 columns", which is not possible when completion
strings are long, e.g. with completions-detailed set.

21 months ago; * doc/lispref/windows.texi (Selecting Windows): Doc fix
Juanma Barranquero [Mon, 28 Nov 2022 11:58:26 +0000 (12:58 +0100)]
; * doc/lispref/windows.texi (Selecting Windows): Doc fix

21 months ago; Don't emit a "Server stopped" message when restarting the Emacs server
Jim Porter [Mon, 28 Nov 2022 01:22:49 +0000 (17:22 -0800)]
; Don't emit a "Server stopped" message when restarting the Emacs server

* lisp/server.el (server-stop): Return non-nil when we actually stop
the server.  Don't message about stopping the server here (but do log
it).
(server-start): Emit the appropriate message about stopping or
restarting the server.

21 months agoDo not enter locked narrowing when it would span the whole buffer
Gregory Heytings [Mon, 28 Nov 2022 01:20:46 +0000 (01:20 +0000)]
Do not enter locked narrowing when it would span the whole buffer

* src/xdisp.c (handle_fontified_prop):
* src/keyboard.c (safe_run_hooks_maybe_narrowed): Add condition.

21 months ago* lisp/progmodes/xref.el (xref--outdated-p): Fix broken docstring.
Dmitry Gutov [Mon, 28 Nov 2022 01:07:01 +0000 (03:07 +0200)]
* lisp/progmodes/xref.el (xref--outdated-p): Fix broken docstring.

21 months agoCatch more cases in info--ensure-not-in-directory-node
Stefan Kangas [Mon, 28 Nov 2022 00:32:01 +0000 (01:32 +0100)]
Catch more cases in info--ensure-not-in-directory-node

* lisp/info.el (info--ensure-not-in-directory-node): Fix the case
where "DIR" is in upper-case, and if 'Info-current-file' is an
absolute file name.
Problem reported by Eli Zaretskii <eliz@gnu.org>.

21 months agoFix incompatible -t and -r options in emacsclient
Gregory Heytings [Sun, 27 Nov 2022 23:15:00 +0000 (23:15 +0000)]
Fix incompatible -t and -r options in emacsclient

* lib-src/emacsclient.c (decode_options): Do not allow -t and -r
together.

21 months agoMinor improvements to locked narrowing
Gregory Heytings [Sun, 27 Nov 2022 22:53:20 +0000 (22:53 +0000)]
Minor improvements to locked narrowing

* src/xdisp.c (get_locked_narrowing_begv)
(get_locked_narrowing_zv): Safer handling of negative values.
(handle_fontified_prop): Do not use locked narrowing if the region
size is <= 0.

* src/keyboard.c (safe_run_hooks_maybe_narrowed): Do not use
locked narrowing if the region size is <= 0.

21 months agoRemove treesit-comment-start/end and use comment-start/end-skip
Yuan Fu [Sun, 27 Nov 2022 22:15:57 +0000 (14:15 -0800)]
Remove treesit-comment-start/end and use comment-start/end-skip

treesit-comment-start/end is unnecessary because of
comment-start/end-skip, so they should be removed.

Cleanup and set comment-start/end-skip for tree-sitter C-like major
modes.

I replaced the [ \t]* part in comment-start-skip with (syntax
whitespace), which is what comment-end-skip uses.  I also added
grouping in comment-start-skip to match that of comment-end-skip.

* 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 (typescript-ts-mode): Setup
comment-start/end-skip.

* lisp/treesit.el (treesit-comment-start)
(treesit-comment-end): Remove variables.
(treesit-simple-indent-presets): Use comment-start/end-skip instead.

21 months agoMerge branch 'feature/improved-locked-narrowing'
Gregory Heytings [Sun, 27 Nov 2022 21:19:41 +0000 (22:19 +0100)]
Merge branch 'feature/improved-locked-narrowing'

21 months agoFix the new ctags test
Eli Zaretskii [Sun, 27 Nov 2022 18:01:50 +0000 (20:01 +0200)]
Fix the new ctags test

* test/manual/etags/Makefile (ctags_update): Sort CTAGS* files
before comparing.  Patch by lu4nx <lx@shellcodes.org>.  (Bug#59544)

* .gitignore: Ignore CTAGS*.sorted files.

21 months ago; Consistently call alists "association list"
Stefan Kangas [Sun, 27 Nov 2022 17:07:57 +0000 (18:07 +0100)]
; Consistently call alists "association list"

* doc/lispref/compile.texi (Compiler Errors):
* doc/misc/gnus.texi (Score File Format):
* etc/NEWS.24:
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/progmodes/gdb-mi.el (gdb-threads-list)
(gdb-breakpoints-list, gdb-place-breakpoints): Prefer the term
"association list" for alists.

21 months ago; * src/treesit.c (Ftreesit_parser_included_ranges): Doc fix.
Eli Zaretskii [Sun, 27 Nov 2022 17:08:18 +0000 (19:08 +0200)]
; * src/treesit.c (Ftreesit_parser_included_ranges): Doc fix.

21 months ago; Fix typo (Bug#59634)
Stefan Kangas [Sun, 27 Nov 2022 17:02:55 +0000 (18:02 +0100)]
; Fix typo (Bug#59634)

* src/treesit.c (Ftreesit_parser_included_ranges): Fix typo.

21 months ago; * lisp/progmodes/xref.el: Fix some typos
Juanma Barranquero [Sun, 27 Nov 2022 16:29:58 +0000 (17:29 +0100)]
; * lisp/progmodes/xref.el: Fix some typos

21 months agoExtend memory-info for remote systems
Michael Albinus [Sun, 27 Nov 2022 15:57:03 +0000 (16:57 +0100)]
Extend memory-info for remote systems

* doc/lispref/files.texi (Magic File Names): Add memory-info.

* doc/lispref/internals.texi (Garbage Collection): memory-info can
also retrieve values from remote systems.

* etc/NEWS: Document changes in memory-info.  Fix typos.

* lisp/files.el (warn-maybe-out-of-memory): Ensure local memory info.

* lisp/net/tramp.el (tramp-handle-memory-info): New defun.
(tramp-file-name-for-operation)
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist)
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'memory-info'.

* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-exec-path):
Let-bind `process-file-side-effects'.

* src/alloc.c (Fmemory_info): Support remote systems.
(Qmemory_info): Declare.

* test/lisp/net/tramp-tests.el (tramp-test31-memory-info): New test.

21 months agoConsistently refer to VC packages as such
Philip Kaludercic [Sun, 27 Nov 2022 14:31:29 +0000 (15:31 +0100)]
Consistently refer to VC packages as such

* lisp/emacs-lisp/package-vc.el: Replace instances of "source package"
in comments and docstrings.
* lisp/emacs-lisp/package.el: Replace instances of "source package" in
comments and docstrings.

21 months agoFix xref interaction with which-func (bug#59575)
Juanma Barranquero [Sun, 27 Nov 2022 13:57:14 +0000 (14:57 +0100)]
Fix xref interaction with which-func (bug#59575)

* lisp/progmodes/xref.el (xref--add-log-current-defun):
New function.
(xref--xref-buffer-mode): Assign it buffer-locally to
`add-log-current-defun-function'.

21 months agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sun, 27 Nov 2022 13:44:17 +0000 (15:44 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

21 months ago; Fix last change in etags.c
Eli Zaretskii [Sun, 27 Nov 2022 13:43:39 +0000 (15:43 +0200)]
; Fix last change in etags.c

* lib-src/etags.c (cleanup_tags_file): Renamed from
clean_matched_file_tag.

* test/manual/etags/CTAGS.good_update:
* test/manual/etags/CTAGS.good_crlf: Update to match the test.

21 months agoFixed ctags local command execute vulnerability
lu4nx [Fri, 25 Nov 2022 06:38:29 +0000 (14:38 +0800)]
Fixed ctags local command execute vulnerability

* lib-src/etags.c:

(clean_matched_file_tag): New function
(do_move_file): New function
(readline_internal):
Add `leave_cr` parameter, if true, include the \r character

* test/manual/etags/CTAGS.good_crlf: New file
* test/manual/etags/CTAGS.good_update: New file
* test/manual/etags/crlf: New file
* test/manual/etags/Makefile: Add `ctags -u` test cases

21 months agoFix xref to correctly display Windows absolute filenames
Juanma Barranquero [Sun, 27 Nov 2022 11:32:04 +0000 (12:32 +0100)]
Fix xref to correctly display Windows absolute filenames

* lisp/progmodes/xref.el (xref--group-name-for-display):
Use `file-name-absolute-p' instead of faking it. (Discussed
in bug#59628.)

21 months ago* lib-src/emacsclient.c (print_help_and_exit): Fix --timeout.
Shohei YOSHIDA [Sun, 27 Nov 2022 12:58:27 +0000 (21:58 +0900)]
* lib-src/emacsclient.c (print_help_and_exit): Fix --timeout.

21 months agoMake frame synchronization more robust
Po Lu [Sun, 27 Nov 2022 11:17:38 +0000 (19:17 +0800)]
Make frame synchronization more robust

* src/xterm.c (x_sync_wait_for_frame_drawn_event)
(x_sync_handle_frame_drawn): Only cancel frame synchronization
if hanging twice or more in a row.
* src/xterm.h (struct x_output, FRAME_X_DRAW_JUST_HUNG): New
flag.

21 months ago; * src/xdisp.c (get_locked_narrowing_begv): Minor change.
Gregory Heytings [Sun, 27 Nov 2022 10:25:19 +0000 (10:25 +0000)]
; * src/xdisp.c (get_locked_narrowing_begv): Minor change.

21 months agoRemove compatibility code in csharp-mode
Theodor Thornhill [Sat, 26 Nov 2022 19:10:58 +0000 (20:10 +0100)]
Remove compatibility code in csharp-mode

* lisp/progmodes/csharp-mode.el (c-basic-matchers-before): Remove
invalid string check for Emacs 27.
(version=): Remove compatibility hack for string handling in CC Mode
in Emacs 27.1.  (Bug#59602)

21 months ago; * src/treesit.c (Ftreesit_induce_sparse_tree): Doc fix.
Eli Zaretskii [Sun, 27 Nov 2022 08:10:05 +0000 (10:10 +0200)]
; * src/treesit.c (Ftreesit_induce_sparse_tree): Doc fix.

21 months ago; Fix recent documentation changes in treesit.el
Eli Zaretskii [Sun, 27 Nov 2022 08:06:02 +0000 (10:06 +0200)]
; Fix recent documentation changes in treesit.el

* lisp/treesit.el (treesit-font-lock-level)
(treesit-font-lock-recompute-features): Doc fixes.

21 months ago; * lisp/progmodes/sh-script.el (sh--redirect-bash-ts-mode): Doc fix.
Eli Zaretskii [Sun, 27 Nov 2022 07:58:02 +0000 (09:58 +0200)]
; * lisp/progmodes/sh-script.el (sh--redirect-bash-ts-mode): Doc fix.

21 months agoAdd js-ts-mode to eglot-server-programs
Theodor Thornhill [Sat, 26 Nov 2022 20:12:51 +0000 (21:12 +0100)]
Add js-ts-mode to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add js-ts-mode as
an alternative.  (Bug#59252)

21 months agoImprove describe-text-properties display
Stefan Kangas [Sun, 27 Nov 2022 06:29:54 +0000 (07:29 +0100)]
Improve describe-text-properties display

* lisp/descr-text.el (describe-property-list): Don't propertize white
space with the 'help-argument-name' face.  This improves display
slightly when that face has an underline.

21 months ago; * src/editfns.c: Minor improvements in comments.
Gregory Heytings [Sun, 27 Nov 2022 01:02:16 +0000 (01:02 +0000)]
; * src/editfns.c: Minor improvements in comments.

21 months agoSimplify narrowing_locks_restore
Gregory Heytings [Sun, 27 Nov 2022 00:53:01 +0000 (00:53 +0000)]
Simplify narrowing_locks_restore

* src/editfns.c (narrowing_locks_restore): Simplify.

21 months agoImprove handling of killed buffers in locked narrowings
Gregory Heytings [Sun, 27 Nov 2022 00:24:40 +0000 (00:24 +0000)]
Improve handling of killed buffers in locked narrowings

* src/editfns.c (narrowing_locks_add, narrowing_locks_remove):
New functions, factored out.
(narrowing_lock_push, narrowing_lock_pop)
(narrowing_locks_restore): Use the new functions.
(narrowing_lock_get_bound): Return NULL for killed buffers.
(reset_outermost_narrowings, unwind_reset_outermost_narrowing):
Remove killed buffers from the 'narrowing_locks' alist.

21 months agoMake typescript-ts-mode not fallback to js-mode
Yuan Fu [Sat, 26 Nov 2022 23:32:57 +0000 (15:32 -0800)]
Make typescript-ts-mode not fallback to js-mode

1. js-mode might not be able to handle typescript file
2. Now that we use separate modes for tree-sitter modes, not falling
back makes tree-sitter modes more consistent

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): Remove
the fallback code.

21 months agoMake bash-ts-mode fall back to sh-mode if the file isn't in Bash
Yuan Fu [Sat, 26 Nov 2022 23:31:48 +0000 (15:31 -0800)]
Make bash-ts-mode fall back to sh-mode if the file isn't in Bash

* lisp/progmodes/sh-script.el (sh--guess-shell): Take out into a new
function.
(sh-base-mode): Use the new function.
(bash-ts-mode): Update docstring.
(sh--redirect-recursing): New variable.
(sh--redirect-bash-ts-mode): New function.

21 months agoCorrectly fontify types in typeof() expression in csharp-ts-mode
Jostein Kjønigsen [Fri, 25 Nov 2022 19:15:06 +0000 (20:15 +0100)]
Correctly fontify types in typeof() expression in csharp-ts-mode

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add new pattern.

21 months agoReorganize treesit-font-lock-feaure-list's to the new level scheme
Yuan Fu [Sat, 26 Nov 2022 23:05:57 +0000 (15:05 -0800)]
Reorganize treesit-font-lock-feaure-list's to the new level scheme

* lisp/progmodes/c-ts-mode.el (c-ts-mode--base-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/python.el (python-ts-mode)
* lisp/progmodes/sh-script.el (bash-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode):
Reorganized treesit-font-lock-feature-list.

21 months agoAdd treesit-font-lock-level
Yuan Fu [Sat, 26 Nov 2022 22:54:55 +0000 (14:54 -0800)]
Add treesit-font-lock-level

This replaces font-lock-maximum-decoration and allows us to disable
the busiest fontification level by default.

* lisp/treesit.el (treesit-font-lock-level): New variable.
(treesit-font-lock-feature-list)
(treesit-font-lock-settings): Change docstring.
(treesit-font-lock-recompute-features): Use the new variable.

21 months agoAdd default limit for tree-sitter recursive tree-traversing function
Yuan Fu [Sat, 26 Nov 2022 22:51:26 +0000 (14:51 -0800)]
Add default limit for tree-sitter recursive tree-traversing function

This fixes bug#59426.

* src/treesit.c (treesit_search_dfs)
(treesit_build_sparse_tree): Remove no_limit parameter.
(Ftreesit_search_forward, Ftreesit_induce_sparse_tree): Use default
limit of 1000.

* doc/lispref/parsing.texi (Retrieving Nodes): Update manual.

21 months agoPartially fix some python tests (bug#59477)
Yuan Fu [Sat, 26 Nov 2022 22:08:11 +0000 (14:08 -0800)]
Partially fix some python tests (bug#59477)

This fixes

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

but leaves

python-tests--fill-long-first-line

unfixed.

* lisp/progmodes/python.el (python-mode): Add the missing setup.

21 months agoMinor improvements for locked narrowing
Gregory Heytings [Sat, 26 Nov 2022 22:38:12 +0000 (22:38 +0000)]
Minor improvements for locked narrowing

* src/editfns.c (narrowing_lock_pop): Clarify comment, replace
assertion by return.
(narrowing_locks_restore): Add comments.

* lisp/subr.el (with-narrowing, internal--with-narrowing):
Simplify, use a single helper function with an optional argument.

21 months agoImprove robustness of server.el tests
Jim Porter [Fri, 25 Nov 2022 19:13:06 +0000 (11:13 -0800)]
Improve robustness of server.el tests

* lisp/emacs-lisp/ert.el (ert--insert-infos): Allow 'message' to be a
function that is called when inserting the info.
(ert-info): Update docstring to describe using a function for
MESSAGE-FORM.

* lisp/server.el (server-start): Log when the server is starting.

* test/lisp/server-tests.el (server-tests/can-create-frames-p): New
constant.  Use it to skip tests that need to create frames.
(server-tests/start-emacsclient): Rename to...
(server-tests/start-client): ... this, and set the process's buffer.
(server-tests/with-server): Put the server file in a temporary
directory so we don't conflict with real Emacs servers.
(server-tests/with-client): New macro...
(server-tests/server-start/stop-prompt-with-client)
(server-tests/emacsclient/server-edit)
(server-tests/emacsclient/create-frame)
(server-tests/emacsclient/create-frame): ... use it.
(server-tests/server-start/stop-prompt-with-client): Simplify.

21 months agoRemove mentions of create-directory nnmaildir setting
Eric Abrahamsen [Sat, 26 Nov 2022 20:12:50 +0000 (12:12 -0800)]
Remove mentions of create-directory nnmaildir setting

* lisp/gnus/nnmaildir.el (nnmaildir-open-server): The
'create-directory server parameter should have been removed entirely,
and supplanted by 'target-prefix. Remove check for old parameter.
* doc/misc/gnus.texi (Maildir): Delete mention from manual.

21 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 26 Nov 2022 18:49:04 +0000 (10:49 -0800)]
Update from Gnulib by running admin/merge-gnulib

21 months agoDocstring improvements
Gregory Heytings [Sat, 26 Nov 2022 16:37:29 +0000 (16:37 +0000)]
Docstring improvements

* src/xdisp.c (syms_of_xdisp):
* src/keyboard.c (syms_of_keyboard):
Docstring improvements.

21 months agoDocstring improvements
Gregory Heytings [Sat, 26 Nov 2022 16:29:52 +0000 (16:29 +0000)]
Docstring improvements

* src/xdisp.c (syms_of_xdisp):
* src/keyboard.c (syms_of_keyboard):
* src/buffer.c (syms_of_buffer):
Docstring improvements.

21 months agoFurther improvements to narrowing locks
Gregory Heytings [Sat, 26 Nov 2022 16:13:04 +0000 (16:13 +0000)]
Further improvements to narrowing locks

* src/editfns.c:
(narrowing_lock_get_bound): Return a pointer to a struct
Lisp_Marker instead of a character position.  Suggested by Eli
Zaretskii.
(reset_outermost_narrowings, unwind_reset_outermost_narrowing)
(Fwiden, Fnarrow_to_region): Adapt accordingly.
(narrowing_lock_peek_tag, narrowing_lock_push)
(narrowing_lock_pop, narrowing_locks_save)
(narrowing_locks_restore): Use XCAR/XCDR/XSETCAR instead of
Fcar/Fcdr/Fsetcar.

21 months ago; * src/treesit.c: Fix typos and wording in comments.
Eli Zaretskii [Sat, 26 Nov 2022 15:50:36 +0000 (17:50 +0200)]
; * src/treesit.c: Fix typos and wording in comments.

21 months ago; doc fix: Use w32-* names instead of obsolete ones
Juanma Barranquero [Sat, 26 Nov 2022 14:34:07 +0000 (15:34 +0100)]
; doc fix: Use w32-* names instead of obsolete ones

* doc/emacs/msdos.texi (Text and Binary): Describe
w32-(add|remove)-untranslated-fiesystem functions by
their non-obsolete name.

21 months ago; Don't mention Makefiles twice in `(emacs) Program Modes`
Stefan Kangas [Sat, 26 Nov 2022 14:47:33 +0000 (15:47 +0100)]
; Don't mention Makefiles twice in `(emacs) Program Modes`

* doc/emacs/programs.texi (Program Modes): Don't mention Makefiles
twice.  (Bug#59610)

21 months ago; Clean up unused function: cuserid
lu4nx [Sat, 26 Nov 2022 13:02:19 +0000 (21:02 +0800)]
; Clean up unused function: cuserid

* lib-src/ntlib.c (cuserid): Remove unused function.

21 months agoImprove locked narrowing around low-level hooks.
Gregory Heytings [Sat, 26 Nov 2022 14:09:41 +0000 (14:09 +0000)]
Improve locked narrowing around low-level hooks.

* src/buffer.c (syms_of_buffer): Two new variables,
'long-line-locked-narrowing-region-size' and
'long-line-locked-narrowing-bol-search-limit', to make the locked
narrowing around low-level hooks configurable.

Increase the default value of 'long-line-threshold'.  After
carefully considering the (few) bug reports about long line
optimizations, I concluded that the previous default value was too
low.

* src/xdisp.c (get_locked_narrowing_begv)
(get_locked_narrowing_zv): Two new functions.
(handle_fontified_prop, reseat): Use them.

* src/keyboard.c (safe_run_hooks_maybe_narrowed): Use them.

* src/dispextern.h (struct it): Add two new fields to store the
values returned by these functions.
Make them externally visible.

* src/editfns.c: (Fsave_restriction): Update docstring.

21 months ago; * doc/emacs/programs.texi (Program Modes): Improve indexing.
Stefan Kangas [Sat, 26 Nov 2022 13:54:25 +0000 (14:54 +0100)]
; * doc/emacs/programs.texi (Program Modes): Improve indexing.

21 months agoMention new programming language support in manual
Stefan Kangas [Sat, 26 Nov 2022 13:27:53 +0000 (14:27 +0100)]
Mention new programming language support in manual

* doc/emacs/programs.texi (Program Modes): Mention newly added support
for C#, TypeScript and JSON.

21 months ago; Fix typos
Stefan Kangas [Sat, 26 Nov 2022 09:24:20 +0000 (10:24 +0100)]
; Fix typos

21 months agoIn project-find-file and the like, add absolute file name to history
Augusto Stoffel [Tue, 11 Oct 2022 18:21:34 +0000 (20:21 +0200)]
In project-find-file and the like, add absolute file name to history

* lisp/progmodes/project.el (project--read-file-cpd-relative): Add
absolute file name to history.

21 months agoImprove documentation of some posn-* functions
Eli Zaretskii [Sat, 26 Nov 2022 11:56:30 +0000 (13:56 +0200)]
Improve documentation of some posn-* functions

* lisp/subr.el (posn-object-x-y): Doc fix.

* doc/lispref/commands.texi (Click Events): More accurate
documentation of what are DX and DY in POSITION.

21 months agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 26 Nov 2022 11:55:56 +0000 (13:55 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

21 months agoFix generation of autoloads on MS-Windows
Eli Zaretskii [Sat, 26 Nov 2022 10:59:06 +0000 (12:59 +0200)]
Fix generation of autoloads on MS-Windows

* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--file-load-name): Handle the case when FILE and
OUTFILE don't share any common ancestor directory.  (Bug#59507)

21 months agoReduce wasted cycles in x*.c
Po Lu [Sat, 26 Nov 2022 10:57:34 +0000 (18:57 +0800)]
Reduce wasted cycles in x*.c

* src/xfns.c (compute_tip_xy, Fx_show_tip):
* src/xselect.c (x_own_selection, x_get_local_selection)
(x_clear_frame_selections): Call CAR and CDR, not Fcar and Fcdr.

21 months ago; Fix some typos
Michael Heerdegen [Sun, 23 Oct 2022 01:29:44 +0000 (03:29 +0200)]
; Fix some typos

* doc/emacs/programs.texi (Programming Language Doc):
* lisp/wid-edit.el (lazy): Fix typos.

21 months ago; Add doc string to 'ucs-normalize-string'
Eli Zaretskii [Sat, 26 Nov 2022 08:55:49 +0000 (10:55 +0200)]
; Add doc string to 'ucs-normalize-string'

* lisp/international/ucs-normalize.el (ucs-normalize-string): Add
a doc string.  (Bug#59603)

21 months agoUse substitute-command-keys in Info-index error
Stefan Kangas [Sat, 26 Nov 2022 08:37:48 +0000 (09:37 +0100)]
Use substitute-command-keys in Info-index error

* lisp/info.el (info--ensure-not-in-directory-node): New helper
function using substitute-command-keys for error message.
(Info-index, Info-virtual-index): Use it.

21 months agoeglot-server-programs: ts-mode -> typescript-ts-mode
Brian Leung [Sat, 26 Nov 2022 02:16:52 +0000 (18:16 -0800)]
eglot-server-programs: ts-mode -> typescript-ts-mode

* lisp/progmodes/eglot.el (eglot-server-programs): Fix name of
'typescript-ts-mode' after rename from 'ts-mode'.  (Bug#59589)

21 months ago; * lisp/progmodes/csharp-mode.el: Add Commentary.
Stefan Kangas [Sat, 26 Nov 2022 08:04:39 +0000 (09:04 +0100)]
; * lisp/progmodes/csharp-mode.el: Add Commentary.

21 months agoFix tree-sitter assertion error (bug#59574)
Yuan Fu [Sat, 26 Nov 2022 02:50:26 +0000 (18:50 -0800)]
Fix tree-sitter assertion error (bug#59574)

* src/treesit.c (treesit_sync_visible_region): Initialize
visible_beg/end when tree is NULL.

21 months agoRename treesit_ensure_position_synced to treesit_sync_visible_region
Yuan Fu [Fri, 25 Nov 2022 23:10:20 +0000 (15:10 -0800)]
Rename treesit_ensure_position_synced to treesit_sync_visible_region

* src/treesit.c: Rename to better convey the purpose of the function.

21 months ago; Add comments in treesit.c and treesit.h
Yuan Fu [Fri, 25 Nov 2022 23:06:55 +0000 (15:06 -0800)]
; Add comments in treesit.c and treesit.h

* src/treesit.c
* src/treesit.h: Add (and fix) comments.

21 months ago; Fix comment-end in treesit-simple-indent-presets
Yuan Fu [Fri, 25 Nov 2022 22:24:27 +0000 (14:24 -0800)]
; Fix comment-end in treesit-simple-indent-presets

* lisp/treesit.el (treesit-simple-indent-presets): Fix comment-end.

21 months ago; * lisp/progmodes/csharp-mode.el: Add author and maintainer.
Yuan Fu [Fri, 25 Nov 2022 22:23:44 +0000 (14:23 -0800)]
; * lisp/progmodes/csharp-mode.el: Add author and maintainer.

21 months ago; * test/lisp/eshell/esh-var-tests.el: Fix incorrect paren placement.
Jim Porter [Sat, 26 Nov 2022 01:42:57 +0000 (17:42 -0800)]
; * test/lisp/eshell/esh-var-tests.el: Fix incorrect paren placement.

21 months agoRename ts-mode to typescript-ts-mode
Theodor Thornhill [Fri, 25 Nov 2022 20:04:18 +0000 (21:04 +0100)]
Rename ts-mode to typescript-ts-mode

* lisp/progmodes/typescript-ts-mode.el: Rename from 'ts-mode' to
'typescript-ts-mode'.  Rename all symbols to match new prefix.
* etc/NEWS: Mention the new mode name.
Ref: https://lists.gnu.org/r/emacs-devel/2022-11/msg01587.html

21 months agoRename ts-mode.el to typescript-ts-mode.el
Theodor Thornhill [Sat, 26 Nov 2022 00:45:56 +0000 (01:45 +0100)]
Rename ts-mode.el to typescript-ts-mode.el

* lisp/progmodes/ts-mode.el: Move from here...
* lisp/progmodes/typescript-ts-mode.el: ...to here.

21 months agoFix no-accept-focus handling for embedded frames
Po Lu [Fri, 25 Nov 2022 11:35:14 +0000 (19:35 +0800)]
Fix no-accept-focus handling for embedded frames

* src/xterm.c (handle_one_xevent): Don't focus embedded frames
on click if they have `no-accept-focus' set.

21 months agoSave and restore narrowing locks in 'save-restriction'.
Gregory Heytings [Sat, 26 Nov 2022 00:14:15 +0000 (00:14 +0000)]
Save and restore narrowing locks in 'save-restriction'.

* src/editfns.c: (Fsave_restriction): Save and restore narrowing
locks.  Suggested by Stefan Monnier.
(narrowing_locks_save, narrowing_locks_restore): Helper functions.

* lisp/subr.el (with-narrowing-1): Simplify.

21 months agoDrop project--value-in-dir
Dmitry Gutov [Sat, 5 Mar 2022 02:28:31 +0000 (04:28 +0200)]
Drop project--value-in-dir

Drop the project--value-in-dir mechanics, where the user could edit
the value in .dir-locals.el and have it applied instantly without
reverting the current buffer.  It made working in remote buffers with
enable-remote-dir-locals non-nil slower, which doesn't seem worth it
for a minor improvement of an infrequent operation.  Also less
compexity overall.

* lisp/progmodes/project.el (project-try-vc, project-files)
(project--vc-list-files, project-ignores, project-buffers):
Use the user options directly.
(project--vc-merge-submodules-p, project--value-in-dir):
Delete functions.

21 months agoGeneric 'with-narrowing' macro.
Gregory Heytings [Fri, 25 Nov 2022 21:43:48 +0000 (21:43 +0000)]
Generic 'with-narrowing' macro.

* lisp/subr.el (with-narrowing): New generic macro, replacing the
'with-locked-narrowing' one.  Suggested by Stefan Monnier.
(with-narrowing-1, with-narrowing-2): Helper functions.

21 months ago; * lisp/server.el (server-start): Fix a typo in a warning message.
Jim Porter [Fri, 25 Nov 2022 18:36:20 +0000 (10:36 -0800)]
; * lisp/server.el (server-start): Fix a typo in a warning message.

21 months agoReworked locked narrowing.
Gregory Heytings [Fri, 25 Nov 2022 17:51:01 +0000 (17:51 +0000)]
Reworked locked narrowing.

* src/editfns.c: (narrowing_locks): New alist to hold the narrowing
locks and their buffers.
(narrowing_lock_get_bound, narrowing_lock_peek_tag)
(narrowing_lock_push, narrowing_lock_pop): New functions to access
and update 'narrowing_locks'.
(reset_outermost_narrowings, unwind_reset_outermost_narrowing):
Functions moved from src/xdisp.c, and rewritten with the above
functions.
(Fwiden): Use the above functions. Update docstring.
(Fnarrow_to_region, Fnarrowing_lock, Fnarrowing_unlock): Use the above
functions.
(syms_of_editfns): Remove the 'narrowing-locks' variable.

* src/lisp.h: Make 'reset_outermost_narrowings' externally visible.

* src/xdisp.c (reset_outermost_narrowings)
unwind_reset_outermost_narrowing): Functions moved to src/editfns.c.

* lisp/subr.el (with-locked-narrowing): Improved macro, with a helper
function.

21 months ago; lisp/progmodes/which-func.el: Mark emacs-devel as maintainer.
Stefan Kangas [Fri, 25 Nov 2022 14:01:03 +0000 (15:01 +0100)]
; lisp/progmodes/which-func.el: Mark emacs-devel as maintainer.

21 months ago; * lisp/progmodes/which-func.el: Remove obsolete comment
Juanma Barranquero [Fri, 25 Nov 2022 13:46:14 +0000 (14:46 +0100)]
; * lisp/progmodes/which-func.el: Remove obsolete comment

21 months agoDisable auth-source-pass-extra-query-keywords by default
F. Jason Park [Fri, 25 Nov 2022 05:03:03 +0000 (21:03 -0800)]
Disable auth-source-pass-extra-query-keywords by default

* doc/misc/auth.texi: Mention subdomain matching in
`auth-source-pass-extra-query-keywords' section.
* etc/NEWS: Mention the loss of traditional auth-source-pass features
when `auth-source-pass-extra-query-keywords' is enabled.
* lisp/auth-source-pass (auth-source-pass-extra-query-keywords): Set
default to nil.  Mention domain matching in doc string.
(auth-source-pass--match-regexp): Allow username to contain "@".
* lisp/erc/erc-compat.el:
(erc-compat--29-auth-source-pass--retrieve-parsed): Adjust regexp.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-extra-query-keywords--suffixed-user): make plain
username more email-like.
(Bug#58985.)

21 months ago; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare.
Eli Zaretskii [Fri, 25 Nov 2022 13:36:18 +0000 (15:36 +0200)]
; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare.

21 months ago; Fix doc strings in xref.el
Eli Zaretskii [Fri, 25 Nov 2022 13:29:10 +0000 (15:29 +0200)]
; Fix doc strings in xref.el

* lisp/progmodes/xref.el (xref-history-storage)
(xref-global-history, xref-window-local-history): Doc fixes.

21 months ago; * src/sqlite.c (Fsqlite_version): Doc fix.
Eli Zaretskii [Fri, 25 Nov 2022 13:00:07 +0000 (15:00 +0200)]
; * src/sqlite.c (Fsqlite_version): Doc fix.

21 months agoAdd sqlite library version string retrieval function (bug#58766)
Mattias Engdegård [Fri, 25 Nov 2022 09:42:38 +0000 (10:42 +0100)]
Add sqlite library version string retrieval function (bug#58766)

* src/sqlite.c (sqlite3_libversion, load_dll_functions):
Make sqlite3_libversion available.
(Fsqlite_version): New.
(syms_of_sqlite): Define sqlite-version.
* doc/lispref/text.texi (Database): Document.
* test/src/sqlite-tests.el (sqlite-returning): `RETURNING` was added
in sqlite 3.35; skip the test for older versions.

21 months agoFix regex errors in csharp-mode
Theodor Thornhill [Thu, 24 Nov 2022 22:12:40 +0000 (23:12 +0100)]
Fix regex errors in csharp-mode

* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax):
Repetition errors in regex.

(csharp-compilation-re-xbuild-warning): Make regex match regex for
xbuild-error.

21 months agoCC Mode: Fix the "asymmetry rule" for fontifying a type followed by *
Alan Mackenzie [Fri, 25 Nov 2022 09:49:02 +0000 (09:49 +0000)]
CC Mode: Fix the "asymmetry rule" for fontifying a type followed by *

This fixes bug #59427.  We now handle correctly the case when a parenthesis
follows the * which is ambiguously a multiplication or indirection operator.
Also, we don't recognise a type thus found as a found type - the evidence is
too weak.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix CASE 17.5 as
above.

21 months agoRemove unused parameter from image_create_pix_container
Stefan Kangas [Fri, 25 Nov 2022 09:12:52 +0000 (10:12 +0100)]
Remove unused parameter from image_create_pix_container

* src/image.c (image_create_pix_container): Remove unused
frame parameter. Update callers.

21 months agoShow package name in package-vc--unpack prompt
Daanturo [Thu, 24 Nov 2022 17:06:37 +0000 (00:06 +0700)]
Show package name in package-vc--unpack prompt

* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Display the
package name when asking whether to overwrite its previous
checkout.  (Bug#59548)

21 months ago; Remove unused variable treesit-imenu-function
Stefan Kangas [Fri, 25 Nov 2022 07:57:57 +0000 (08:57 +0100)]
; Remove unused variable treesit-imenu-function

* lisp/treesit.el (treesit-imenu-function): Remove unused
variable.  (Bug#59475)

21 months agoDon't explicitly delete client frames when killing Emacs anyway
Jim Porter [Mon, 21 Nov 2022 19:47:08 +0000 (11:47 -0800)]
Don't explicitly delete client frames when killing Emacs anyway

This eliminates a useless error prompt when killing Emacs from a
client frame when there are no other frames (bug#58877).

* lisp/server.el (server-running-external): New error.
(server--file-name): New function...
(server-eval-at): ... use it.
(server-start): Factor out server stopping code into...
(server-stop): ... here.
(server-force-stop): Use 'server-stop', and tell it not to delete
frames.

* test/lisp/server-tests.el
(server-tests/server-force-stop/keeps-frames): New test.

21 months ago; Add more tests for the Emacs server
Jim Porter [Sun, 20 Nov 2022 06:26:45 +0000 (22:26 -0800)]
; Add more tests for the Emacs server

* test/lisp/server-tests.el (server-tests/emacs-client)
(server-tests/max-wait-time): New constants.
(server-tests/start-emacsclient): New function.
(server-tests/with-server, server-tests/wait-until): New macros.
(server-tests/variable): New variable.
(server-test/server-start-sets-minor-mode): Rename to...
(server-tests/server-start/sets-minor-mode): ... this.
(server-tests/server-start/stop-prompt-with-client)
(server-tests/server-start/no-stop-prompt-without-client)
(server-tests/emacsclient/server-edit)
(server-tests/emacsclient/create-frame, server-test/emacsclient/eval):
New tests.

* test/lib-src/emacsclient-tests.el: Mention the above file.

21 months ago; Fix up some NEWS entries for Eshell
Jim Porter [Fri, 25 Nov 2022 01:22:53 +0000 (17:22 -0800)]
; Fix up some NEWS entries for Eshell

* etc/NEWS (Incompatible changes in Emacs 29.1): Move an entry from
here...
(Changes in Specialized Modes and Packages in Emacs 29.1): ... to
here.  Additionally, improve wording of another entry to be more
precise.