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

162637 commits

Author SHA1 Message Date
Alan Mackenzie
f373a23e51 CC Mode: Prevent lone ids being parsed as types unless in decl arglists
This fixes bug #59051.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): In the test for the
last invocation of c-fdoc-shift-type-backward before CASE 1, additionally
test CONTEXT not being an arglist or BACKUP-AT-TYPE being non-nil.
2022-11-29 20:22:58 +00:00
Stefan Kangas
00cb6e052a ; Improve error message when LSP server not found
* lisp/progmodes/eglot.el (eglot--guess-contact): Improve wording of
error message when no LSP server was found.
2022-11-29 20:33:18 +01:00
Stefan Kangas
7ea95d1b92 ; * doc/misc/eglot.texi (Setting Up LSP Servers): Improve indexing. 2022-11-29 20:33:18 +01:00
Mattias Engdegård
c43cdfd639 Allow csharp-mode in c-default-style
* lisp/progmodes/cc-vars.el (c-default-style):
Add csharp-mode to the type.  This fixes test-custom-opts.
2022-11-29 17:35:28 +01:00
Augusto Stoffel
13bb49bc0b In project-find-file, add abbreviated file names to history
* lisp/progmodes/project.el (project--read-file-cpd-relative):
Use 'abbreviate-file-name' (bug#58447).
2022-11-29 18:15:09 +02:00
Dmitry Gutov
4dab5f8671 * lisp/progmodes/project.el (project-vc-name): Fix the :type form (bug#48747). 2022-11-29 18:01:55 +02:00
Michael Albinus
079625d3c6 Tramp cleanup
* doc/misc/tramp.texi: Use @value{tramp} where appropriate.

* doc/misc/trampver.texi: Change "Tramp" format ifplaintext.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Ignore `memory-info'.
2022-11-29 17:00:02 +01:00
Eli Zaretskii
067c65578e Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29 2022-11-29 13:55:31 +02:00
Kai Ma
4313279e34 ; Fix typo in NEWS 2022-11-29 10:57:27 +01:00
Po Lu
afc7ed987b Allow be-resources to fail
* lib-src/be_resources.cc (be_perror): Print additional blurb.
(main): Return 0 on failure as well, but print the blurb.
Problem reported by the Haiku packager.
2022-11-29 06:26:16 +00:00
F. Jason Park
00de296d1b Simplify erc-sasl's auth-source API
* doc/misc/erc.texi: Revise descriptions in SASL chapter to reflect
simplified auth-source options.

* lisp/erc/erc-sasl.el (erc-sasl-password,
erc-sasl-auth-source-function): Revise doc strings.
(erc-sasl-auth-source-password-as-host): New function to serve as
more useful choice for option `erc-sasl-auth-source-function'.
(erc-sasl--read-password): Promote auth-source to pole position, above
an explicit string and `:password'.

* test/lisp/erc/erc-sasl-tests.el (erc-sasl--read-password--basic):
Massage tests to conform to simplified `erc-sasl-password'
API.  (Bug#29108.)
2022-11-29 00:01:13 -05:00
F. Jason Park
83b9496a19 * doc/misc/erc.texi: Revise SASL and modules chapters. 2022-11-28 23:58:55 -05:00
F. Jason Park
35e2b8a26b Add erc-sasl-auth-source-function to cached options
* lisp/erc/erc-sasl.el (erc-sasl--read-password): Consult cached
options instead of `erc-sasl-auth-source-function'.
(erc-sasl--init): Add `erc-sasl-auth-source-function' to
`erc-sasl--options'.

* test/lisp/erc/erc-sasl-tests.el (erc-sasl--read-password--basic,
erc-sasl--read-password--auth-source): Look for original value of
`erc-sasl-auth-source-function' in `erc-sasl--options' under the
`authfn' key.
2022-11-28 23:56:04 -05:00
Jostein Kjønigsen
7336520fe7
Improve fontification in csharp-ts-mode
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Improve rules for variables, new-expressions, and catch statements.
2022-11-28 15:07:45 -08:00
Jostein Kjønigsen
2661c51953
Improve fontification in typescript-ts-mode
- Restore method-name fontification.
- Fontify all types in class-declarations, extendees too

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Change patterns.
2022-11-28 15:00:03 -08:00
Theodor Thornhill
bbf1b93d43
Add more font-lock settings to css-ts-mode
* lisp/textmodes/css-mode.el (css--treesit-settings): Add new
font-lock features 'query', 'keyword', 'operator' and 'bracket'.
(css-ts-mode): Use new features.
2022-11-28 14:56:08 -08:00
Yuan Fu
f794263da2
Reparse tree-sitter tree when buffer restriction changes
* src/treesit.c (treesit_sync_visible_region): Set nee_reparse flag to
true if buffer range changes.  Add some assertion.

* src/treesit.c (treesit_ensure_parsed): Move
treesit_sync_visible_region in front of the check for need_reparse.
2022-11-28 14:34:12 -08:00
Mattias Engdegård
78663ad78b ; typos
(cherry picked from commit 7939184f8e)
2022-11-28 21:28:12 +02:00
Eli Zaretskii
a7b0b20c1b Fix GUD item on the menu bar in source buffers
* lisp/progmodes/gud.el (alist-get): Restore gud-minor-mode menu
on the menu bar.  (Bug#59605)
2022-11-28 21:19:22 +02:00
Eli Zaretskii
c6cb6d8506 Cut the emacs-29 release branch
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 29.0.60.

* admin/admin.el (set-version): Fix regexp for configure.ac.

* lisp/cus-edit.el (customize-changed-options-previous-release):
Bump last version to 28.2.
2022-11-28 19:47:35 +02:00
Juanma Barranquero
2772ebe366 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'.
2022-11-28 17:46:21 +01:00
Stefan Kangas
5b325a03c5 ; Fix typo in eglot-alternatives (Bug#59653)
* lisp/progmodes/eglot.el (eglot-alternatives): Fix typo.
Problem reported by Arash Esbati <arash@gnu.org>.
2022-11-28 15:34:09 +01:00
Gregory Heytings
6deeda411c 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.
2022-11-28 13:18:37 +01:00
Juanma Barranquero
264e9e3a17 ; * doc/lispref/windows.texi (Selecting Windows): Doc fix 2022-11-28 12:58:26 +01:00
Jim Porter
a85ff22300 ; 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.
2022-11-27 22:21:33 -08:00
Gregory Heytings
56ab6203fa 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.
2022-11-28 02:22:02 +01:00
Dmitry Gutov
99463478e5 * lisp/progmodes/xref.el (xref--outdated-p): Fix broken docstring. 2022-11-28 03:07:15 +02:00
Stefan Kangas
059467ddc2 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>.
2022-11-28 01:32:01 +01:00
Gregory Heytings
5f97a085be Fix incompatible -t and -r options in emacsclient
* lib-src/emacsclient.c (decode_options): Do not allow -t and -r
together.
2022-11-28 00:16:00 +01:00
Gregory Heytings
6d3cea2c8e 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.
2022-11-27 23:53:51 +01:00
Yuan Fu
d5dc1dbf7c
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.
2022-11-27 14:20:56 -08:00
Gregory Heytings
849223fba1 Merge branch 'feature/improved-locked-narrowing' 2022-11-27 22:19:41 +01:00
Eli Zaretskii
89a10ffcc4 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.
2022-11-27 20:01:50 +02:00
Stefan Kangas
7bf393dcf0 ; 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.
2022-11-27 18:12:45 +01:00
Eli Zaretskii
eaa823b9d6 ; * src/treesit.c (Ftreesit_parser_included_ranges): Doc fix. 2022-11-27 19:08:18 +02:00
Stefan Kangas
a175c42b3a ; Fix typo (Bug#59634)
* src/treesit.c (Ftreesit_parser_included_ranges): Fix typo.
2022-11-27 18:03:11 +01:00
Juanma Barranquero
7ee71ab6e5 ; * lisp/progmodes/xref.el: Fix some typos 2022-11-27 17:30:27 +01:00
Michael Albinus
1cbf2655db 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.
2022-11-27 16:57:03 +01:00
Philip Kaludercic
ca42ff5f0e 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.
2022-11-27 15:32:00 +01:00
Juanma Barranquero
31cfd6d311 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'.
2022-11-27 14:58:45 +01:00
Eli Zaretskii
a5259b48a4 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-11-27 15:44:17 +02:00
Eli Zaretskii
6f0906be51 ; 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.
2022-11-27 15:43:39 +02:00
lu4nx
d48bb4874b 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
2022-11-27 15:20:49 +02:00
Juanma Barranquero
41d2365d58 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.)
2022-11-27 14:20:22 +01:00
Shohei YOSHIDA
bacba02e5c * lib-src/emacsclient.c (print_help_and_exit): Fix --timeout. 2022-11-27 15:17:40 +02:00
Po Lu
80bfd6dc5b 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.
2022-11-27 19:21:03 +08:00
Gregory Heytings
18fa159fa9 ; * src/xdisp.c (get_locked_narrowing_begv): Minor change. 2022-11-27 11:26:24 +01:00
Theodor Thornhill
ea2f2f1e71 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)
2022-11-27 10:32:56 +01:00
Eli Zaretskii
8cda625b22 ; * src/treesit.c (Ftreesit_induce_sparse_tree): Doc fix. 2022-11-27 10:10:05 +02:00
Eli Zaretskii
80dcd78ff1 ; Fix recent documentation changes in treesit.el
* lisp/treesit.el (treesit-font-lock-level)
(treesit-font-lock-recompute-features): Doc fixes.
2022-11-27 10:06:02 +02:00