]> git.eshelyaron.com Git - emacs.git/log
emacs.git
23 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

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

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

23 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)

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

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

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

23 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)

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

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

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

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

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

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

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

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

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

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

23 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

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

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

23 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)

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

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

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

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

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

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

23 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

23 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)

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

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

23 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)

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

23 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)

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

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

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

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

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

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

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

23 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

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

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

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

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

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

23 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

23 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.)

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

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

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

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

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

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

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

23 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)

23 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)

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

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

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

23 months agoMake ibuffer directory filter buffer aware
Gabriel do Nascimento Ribeiro [Thu, 10 Nov 2022 09:11:03 +0000 (06:11 -0300)]
Make ibuffer directory filter buffer aware

* lisp/ibuf-ext.el (define-ibuffer-filter): Make ibuffer directory
filter buffer aware for buffer not visiting files.  (Bug#59165)

23 months agoAdd support for window-local xref history
Ackerley Tng [Fri, 25 Nov 2022 00:58:33 +0000 (02:58 +0200)]
Add support for window-local xref history

* lisp/progmodes/xref.el (xref-history-storage):
New user option (bug#59381).
(xref--make-xref-history): New function.
(xref--history): Use it.
(xref-global-history, xref-window-local-history): New function.
(xref--get-history): New function.
(xref--push-backward, xref--push-forward)
(xref-push-marker-stack, xref-go-back, xref-go-forward)
(xref-clear-marker-stack, xref-marker-stack-empty-p)
(xref-forward-history-empty-p): Use it.

23 months agoBind Buffer-menu-view-other-window to "O"
Stefan Kangas [Fri, 25 Nov 2022 00:38:03 +0000 (01:38 +0100)]
Bind Buffer-menu-view-other-window to "O"

* lisp/buff-menu.el (Buffer-menu-mode-map): Bind
'Buffer-menu-view-other-window' to "O".
(Buffer-menu-mode): Clean up docstring.  (Bug#59280)

23 months ago; * lisp/net/goto-addr.el (goto-address-at-point): Fix last commit.
Stefan Kangas [Fri, 25 Nov 2022 00:26:05 +0000 (01:26 +0100)]
; * lisp/net/goto-addr.el (goto-address-at-point): Fix last commit.

23 months agoAllow goto-address-at-point to use secondary browser
Gabriel do Nascimento Ribeiro [Mon, 21 Nov 2022 11:08:52 +0000 (08:08 -0300)]
Allow goto-address-at-point to use secondary browser

* lisp/net/goto-addr.el (goto-address-at-point): Call
`browse-url-button-open-url', so a prefix argument uses
`browse-url-secondary-browser-function'.  (Bug#59443)

23 months agoFix easy menu separator in oldXMenu
Manuel Giraud [Fri, 18 Nov 2022 21:58:19 +0000 (22:58 +0100)]
Fix easy menu separator in oldXMenu

* lisp/emacs-lisp/easymenu.el (easy-menu-convert-item-1): Replace a
string of dash with a menu separator as the doc says.  (Bug#59370)

23 months agoImprove csharp-ts-mode fontification
Jostein Kjønigsen [Thu, 24 Nov 2022 21:41:29 +0000 (13:41 -0800)]
Improve csharp-ts-mode fontification

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add more pattern for definition feature.

23 months agoImprove python-ts-mode fontification (bug#59534)
Yuan Fu [Thu, 24 Nov 2022 18:18:14 +0000 (10:18 -0800)]
Improve python-ts-mode fontification (bug#59534)

* lisp/progmodes/python.el (python--treesit-operators): Add operators.
(python--treesit-fontify-string): Fontify BOF docstrings.

23 months agoWork around lsp-mode compatibility bug
Paul Eggert [Thu, 24 Nov 2022 20:56:22 +0000 (12:56 -0800)]
Work around lsp-mode compatibility bug

* src/timefns.c (Ftime_subtract): Respect current-time-list when
args are eq (Bug#59506).

23 months ago; Avoid treesit-related byte-compilation warnings
Eli Zaretskii [Thu, 24 Nov 2022 19:24:29 +0000 (21:24 +0200)]
; Avoid treesit-related byte-compilation warnings

* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/ts-mode.el: Declare treesit.c functions.

23 months agoAdd more tree-sitter modes to eglot-server-programs
Brian Leung [Thu, 24 Nov 2022 18:48:07 +0000 (10:48 -0800)]
Add more tree-sitter modes to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add python-ts-mode
and bash-ts-mode.  (Bug#59550)

23 months ago; * src/emacs.c (usage_message): Fix typo
Philip Kaludercic [Thu, 24 Nov 2022 19:08:17 +0000 (20:08 +0100)]
; * src/emacs.c (usage_message): Fix typo

Author:

23 months ago; * lisp/progmodes/eglot.el (eglot-server-programs): Add csharp-ts-mode.
Eli Zaretskii [Thu, 24 Nov 2022 18:54:38 +0000 (20:54 +0200)]
; * lisp/progmodes/eglot.el (eglot-server-programs): Add csharp-ts-mode.

23 months ago* src/emacs.c (usage_message): Add missing --init-directory entry
Philip Kaludercic [Sun, 20 Nov 2022 21:51:14 +0000 (22:51 +0100)]
* src/emacs.c (usage_message): Add missing --init-directory entry

23 months agoAdd tree-sitter-based modes to eglot-server-programs
Brian Leung [Sat, 12 Nov 2022 22:30:37 +0000 (14:30 -0800)]
Add tree-sitter-based modes to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add
tree-sitter-based major modes.  (Bug#59229)

23 months agoicalendar: Adjust tests after fixing parsing of sexp entries (bug#56241)
Ulf Jasper [Thu, 24 Nov 2022 17:56:50 +0000 (18:56 +0100)]
icalendar: Adjust tests after fixing parsing of sexp entries (bug#56241)

* test/lisp/calendar/icalendar-tests.el
(icalendar-export-bug-56241-nested-sexps): New.
* test/lisp/calendar/icalendar-tests.el (icalendar-real-world):
Disable testcase for exporting sexp entries that has now become invalid.

23 months agoicalendar.el: Fix parsing of sexp entries (bug#56241)
hokomo [Thu, 24 Nov 2022 17:39:51 +0000 (18:39 +0100)]
icalendar.el: Fix parsing of sexp entries (bug#56241)

* lisp/calendar/icalendar.el (icalendar--convert-sexp-to-ical): Use
read-from-string for parsing sexp entries (bug#56241).
Copyright-paperwork-exempt: yes

23 months agoEglot: don't confuse URLs and windows file paths
dannyfreeman [Thu, 24 Nov 2022 15:22:33 +0000 (15:22 +0000)]
Eglot: don't confuse URLs and windows file paths

bug#59338

* lisp/progmodes/eglot.el (eglot--path-to-uri): Check for windows path

23 months agoRemove fboundp check in eglot--connect
João Távora [Thu, 24 Nov 2022 14:48:35 +0000 (14:48 +0000)]
Remove fboundp check in eglot--connect

project.el is a GNU ELPA :core package, so this kind of trick isn't
needed.

* lisp/progmodes/eglot.el (eglot--connect): Don't fboundp
project-name.

23 months agoEglot: Advertise completion.resolveSupport capabilities
Marcin Pajkowski [Sun, 20 Nov 2022 19:03:57 +0000 (20:03 +0100)]
Eglot: Advertise completion.resolveSupport capabilities

Some servers avoid reporting completion items that
require "additionalTextEdits" capability.  Actually,
'eglot-completion-at-point' function supports such
feature so it can be advertised to LSP server.
* lisp/progmodes/eglot.el (eglot-client-capabilities): Advertise
resolveSupport.  (bug#59465)

Copyright-paperwork-exempt: yes

23 months agoAdd new SI prefixes
Mattias Engdegård [Thu, 24 Nov 2022 12:47:55 +0000 (13:47 +0100)]
Add new SI prefixes

* lisp/calc/calc-units.el (math-unit-prefixes):
* lisp/files.el (file-size-human-readable):

Add ronna, quetta, ronto and quecto.  (We get the future IEC binary
prefixes Ri and Qi (robi and quebi) in `file-size-human-readable` for
free.)

23 months agoFix reentrancy problem/crash in xterm.c
Po Lu [Thu, 24 Nov 2022 12:10:14 +0000 (20:10 +0800)]
Fix reentrancy problem/crash in xterm.c

* src/xterm.c (x_ignore_errors_for_next_request)
(x_stop_ignoring_errors): Be paranoid and block input inside the
protected section.
(x_focus_frame): Block input around critical section.

23 months agoFix trashing of symlink that points at a directory
Mike Kupfer [Mon, 21 Nov 2022 00:44:20 +0000 (16:44 -0800)]
Fix trashing of symlink that points at a directory

* lisp/files.el (move-file-to-trash): Redefine is-directory so
that it is false for symlinks.

23 months agoFix cross-filesystem directory trashing (Bug#58721)
Mike Kupfer [Sun, 30 Oct 2022 17:31:11 +0000 (10:31 -0700)]
Fix cross-filesystem directory trashing (Bug#58721)

* lisp/files.el (move-file-to-trash): When trashing a directory with
the same name as something that's already in the trash, copy it into
the trash folder and then delete it, rather than using rename-file.

23 months agoCC Mode: Make it scroll fast over buffers with only #define's
Alan Mackenzie [Thu, 24 Nov 2022 10:51:03 +0000 (10:51 +0000)]
CC Mode: Make it scroll fast over buffers with only #define's

* lisp/progmodes/cc-engine.el (c-forward-over-token): New LIMIT parameter

* lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): Replace
ill-formed regular expression (which mixed \\sw and character alternative)
with simpler efficient regexp.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): New forward limit LIM+ used in
c-forward-declarator and c-forward-over-token.

23 months agoFix face issues in show-paren context overlay (bug#59527)
Tassilo Horn [Thu, 24 Nov 2022 09:47:54 +0000 (10:47 +0100)]
Fix face issues in show-paren context overlay (bug#59527)

* lisp/paren.el (show-paren--show-context-in-overlay): Use
show-paren-priority as overlay priority (fixes problem 2 of
bug#59527).
* lisp/simple.el (blink-paren-open-paren-line-string): Ensure the
context lines are font-locked before taking the
buffer-substring (fixes problem 1 of bug#59527).

23 months agoAvoid assertion violations in treesit.c when editing non-ASCII
Eli Zaretskii [Thu, 24 Nov 2022 09:09:51 +0000 (11:09 +0200)]
Avoid assertion violations in treesit.c when editing non-ASCII

* src/treesit.c (make_treesit_parser): Use byte positions when
initializing 'lisp_parser'.  This avoids assertion violations when
the buffer has non-ASCII characters.

23 months agoEUDC: Improve LDAP and BBDB tests
Thomas Fitzsimmons [Thu, 24 Nov 2022 07:16:26 +0000 (02:16 -0500)]
EUDC: Improve LDAP and BBDB tests

* test/lisp/net/eudc-tests.el (eudcb-ldap): Make slapd detection
reliable.
* test/lisp/net/eudc-resources/bbdb: Add another test contact.

23 months ago; Relayout comments in treesit-font-lock-fontify-region
Yuan Fu [Thu, 24 Nov 2022 03:46:38 +0000 (19:46 -0800)]
; Relayout comments in treesit-font-lock-fontify-region

; * lisp/treesit.el (treesit-font-lock-fontify-region): Relayout
comments.

23 months ago; * lisp/progmodes/csharp-mode.el: Add missing require form.
Yuan Fu [Thu, 24 Nov 2022 03:34:10 +0000 (19:34 -0800)]
; * lisp/progmodes/csharp-mode.el: Add missing require form.

23 months agoAdd an error fontification heuristic to c-ts-mode
Yuan Fu [Thu, 24 Nov 2022 01:35:15 +0000 (17:35 -0800)]
Add an error fontification heuristic to c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Use new
function.
(c-ts-fontify-error): New function.

23 months ago; * src/treesit.c (treesit_predicate_match): Move use below check.
Yuan Fu [Thu, 24 Nov 2022 01:24:03 +0000 (17:24 -0800)]
; * src/treesit.c (treesit_predicate_match): Move use below check.

23 months agoDon't always filter out captured tree-sitter nodes outside of region
Yuan Fu [Wed, 23 Nov 2022 23:20:19 +0000 (15:20 -0800)]
Don't always filter out captured tree-sitter nodes outside of region

* lisp/treesit.el (treesit-font-lock-fontify-region): If the capture
name is a function, don't filter.

23 months agoproject-switch-project: Use a different fix for bug#58784
Dmitry Gutov [Thu, 24 Nov 2022 02:33:01 +0000 (04:33 +0200)]
project-switch-project: Use a different fix for bug#58784

* lisp/progmodes/project.el (project-current-inhibit-prompt):
Rename to 'project-current-directory-override', and make it a
string value.
(project-current): Refer to it.
(project-switch-project): Bind it.  Drop the temp buffer (bug#58784).

23 months agoAdd test scenarios for local ERC modules
F. Jason Park [Mon, 21 Nov 2022 03:01:32 +0000 (19:01 -0800)]
Add test scenarios for local ERC modules

* test/lisp/erc/erc-scenarios-base-local-modules.el: New file.
* test/lisp/erc/resources/base/local-modules/first.eld: New file.
* test/lisp/erc/resources/base/local-modules/fourth.eld: New file
* test/lisp/erc/resources/base/local-modules/second.eld: New file.
* test/lisp/erc/resources/base/local-modules/third.eld: New file.
(Bug#57955.)

23 months agoAccept functions in place of passwords in ERC
F. Jason Park [Sun, 13 Nov 2022 09:52:48 +0000 (01:52 -0800)]
Accept functions in place of passwords in ERC

* lisp/erc/erc-backend.el (erc-session-password): Add comment
explaining type is now string, nil, or function.
* lisp/erc/erc-compat.el (erc-compat--29-auth-source-pass-search):
Use obfuscation from auth-source function when available.
* lisp/erc/erc-sasl.el (erc-sasl--read-password,
erc-server-AUTHENTICATE): Use `erc--unfun'.
* lisp/erc/erc-services.el (erc-nickserv-get-password,
erc-nickserv-send-identify): Use `erc--unfun'.
* lisp/erc/erc.el (erc--unfun): New function for unwrapping a
password couched in a getter.
(erc--debug-irc-protocol-mask-secrets): Add variable to indicate
whether to mask passwords in debug logs.
(erc--mask-secrets): New function to swap masked secret with question
marks in debug logs.
(erc-log-irc-protocol): Conditionally mask secrets when
`erc--debug-irc-protocol-mask-secrets' is non-nil.
(erc--auth-source-search): Don't unwrap secret from function before
returning.
(erc-server-join-channel, erc-login): Use `erc--unfun'.

* test/lisp/erc/erc-services-tests.el
(erc-services-tests--wrap-search): Add helper for `erc--unfun'.
(erc-services-tests--auth-source-standard,
erc-services-tests--auth-source-announced,
erc-services-tests--auth-source-overrides, erc-nickserv-get-password):
Use `erc--unfun'.
* test/lisp/erc/erc-tests.el (erc--debug-irc-protocol-mask-secrets):
Add test for masking secrets with `erc--unfun' and friends.

23 months agoAdd non-IRCv3 SASL module to ERC
F. Jason Park [Mon, 12 Jul 2021 10:44:28 +0000 (03:44 -0700)]
Add non-IRCv3 SASL module to ERC

* doc/misc/erc.texi: Add SASL section in Advanced Usage chapter to
document the new SASL module.

* etc/ERC-NEWS: Mention addition of erc-sasl module for SASL support.

* lisp/erc/erc-compat.el
(erc-compat--29-sasl-scram-construct-gs2-header,
erc-compat--29-sasl-scram-client-first-message,
erc-compat--29-sasl-scram--client-final-message): Fix encoding bug and
add minimal authorization support with copies of SASL functions
introduced in Emacs 29.

* lisp/erc/erc.el (erc-modules): Add `sasl'.
* lisp/erc/erc-sasl.el: New file (bug#29108).
* test/lisp/erc/erc-sasl-tests.el: New file.
* test/lisp/erc/erc-scenarios-sasl.el: New file.
* test/lisp/erc/resources/sasl/plain-failed.eld: New file.
* test/lisp/erc/resources/sasl/plain.eld: New file.
* test/lisp/erc/resources/sasl/scram-sha-1.eld: New file.
* test/lisp/erc/resources/sasl/scram-sha-256.eld: New file.
* test/lisp/erc/resources/sasl/external.eld: New file.

23 months agoCall erc-login indirectly via new generic wrapper
F. Jason Park [Sun, 18 Sep 2022 08:49:23 +0000 (01:49 -0700)]
Call erc-login indirectly via new generic wrapper

* lisp/erc/erc-backend (erc--register-connection): Add new internal
generic function that defers to `erc-login' by default.
(erc-process-sentinel, erc-server-connect): Call
`erc--register-connection' instead of `erc-login'.