From c8d548097278683c94eced742a1a1bea387ced2d Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 15 Jan 2023 14:30:46 +0100 Subject: [PATCH 01/13] Bump use-package version for Emacs 29.1 * lisp/use-package/use-package.el: Bump version to 2.4.5. --- lisp/use-package/use-package-core.el | 2 +- lisp/use-package/use-package.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 379e119b60f..7ab5bdc276f 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -65,7 +65,7 @@ :link '(custom-manual "(use-package) Top") :version "29.1") -(defconst use-package-version "2.4.4" +(defconst use-package-version "2.4.5" "This version of `use-package'.") (defcustom use-package-keywords diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 7682468522d..1b63a6d651a 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -5,7 +5,7 @@ ;; Author: John Wiegley ;; Maintainer: John Wiegley ;; Created: 17 Jun 2012 -;; Version: 2.4.4 +;; Version: 2.4.5 ;; Package-Requires: ((emacs "24.3") (bind-key "2.4")) ;; Keywords: dotemacs startup speed config package extensions ;; URL: https://github.com/jwiegley/use-package From f16bd1ead430294ff90cb4c3f0aba608a719a2e7 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 15 Jan 2023 09:57:41 -0700 Subject: [PATCH 02/13] Revert "* lisp/subr.el (while-let): Use if-let, not if-let* (bug#60758)." This reverts commit 083badc9c122a802080552e7771e78ee47c01e3c. --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index ab451b5613b..34dd847e9d5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2545,7 +2545,7 @@ The variable list SPEC is the same as in `if-let'." (let ((done (gensym "done"))) `(catch ',done (while t - (if-let ,spec + (if-let* ,spec (progn ,@body) (throw ',done nil)))))) From 82ae9caaddb561de7709dbab818311a6e3db3f50 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 15 Jan 2023 10:01:41 -0700 Subject: [PATCH 03/13] * lisp/subr.el (while-let): Fix docs if-let->if-let* (bug#60758). --- lisp/subr.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 34dd847e9d5..0f754fcd31f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2540,11 +2540,13 @@ The variable list SPEC is the same as in `if-let'." Evaluate each binding in turn, stopping if a binding value is nil. If all bindings are non-nil, eval BODY and repeat. -The variable list SPEC is the same as in `if-let'." +The variable list SPEC is the same as in `if-let*'." (declare (indent 1) (debug if-let)) (let ((done (gensym "done"))) `(catch ',done (while t + ;; This is `if-let*', not `if-let', deliberately, despite the + ;; name of this macro. See bug#60758. (if-let* ,spec (progn ,@body) From 44c9cb8653d19843b5e9f131b139aad7c1c4774b Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sun, 15 Jan 2023 21:31:16 +0100 Subject: [PATCH 04/13] Improve indentation for jsx * lisp/progmodes/js.el (js--treesit-indent-rules): Use more parent anchors and fix typo with wrong indent offset variable. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules): Use more parent anchors. --- lisp/progmodes/js.el | 15 +++++++++------ lisp/progmodes/typescript-ts-mode.el | 14 ++++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 058c8907bb5..cc556c4d0ec 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3454,13 +3454,16 @@ This function is intended for use in `after-change-functions'." ((parent-is "statement_block") parent-bol js-indent-level) ;; JSX - ((node-is "jsx_fragment") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_element") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_expression") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset) + ((match "<" "jsx_fragment") parent 0) + ((parent-is "jsx_fragment") parent js-indent-level) ((node-is "jsx_closing_element") parent 0) - ((node-is "/") parent 0) - ((node-is ">") parent 0))))) + ((node-is "jsx_element") parent js-indent-level) + ((parent-is "jsx_element") parent js-indent-level) + ((parent-is "jsx_opening_element") parent js-indent-level) + ((parent-is "jsx_expression") parent-bol js-indent-level) + ((match "/" "jsx_self_closing_element") parent 0) + ((parent-is "jsx_self_closing_element") parent js-indent-level) + (no-node parent-bol 0))))) (defvar js--treesit-keywords '("as" "async" "await" "break" "case" "catch" "class" "const" "continue" diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 037d5c8e87e..ffd5b941daf 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -97,13 +97,15 @@ Argument LANGUAGE is either `typescript' or `tsx'." ((parent-is "binary_expression") parent-bol typescript-ts-mode-indent-offset) ,@(when (eq language 'tsx) - `(((node-is "jsx_fragment") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_element") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_expression") parent typescript-ts-mode-indent-offset) - ((node-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset) + `(((match "<" "jsx_fragment") parent 0) + ((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset) ((node-is "jsx_closing_element") parent 0) - ((node-is "/") parent 0) - ((node-is ">") parent 0))) + ((node-is "jsx_element") parent typescript-ts-mode-indent-offset) + ((parent-is "jsx_element") parent typescript-ts-mode-indent-offset) + ((parent-is "jsx_opening_element") parent typescript-ts-mode-indent-offset) + ((parent-is "jsx_expression") parent-bol typescript-ts-mode-indent-offset) + ((match "/" "jsx_self_closing_element") parent 0) + ((parent-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset))) (no-node parent-bol 0)))) (defvar typescript-ts-mode--keywords From 352e41016bcaab8566347091b6b61908a9b57b57 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 16 Jan 2023 05:17:05 +0200 Subject: [PATCH 05/13] ruby-ts-mode: Support the option ruby-block-indent * lisp/progmodes/ruby-ts-mode.el (ruby-ts--block-indent-anchor): New function. (ruby-ts--indent-rules): Use it. * test/lisp/progmodes/ruby-ts-mode-tests.el: Run indent test for ruby-block-indent.rb. --- lisp/progmodes/ruby-ts-mode.el | 32 ++++++++++++++++++----- test/lisp/progmodes/ruby-ts-mode-tests.el | 1 + 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index d68b57966ba..939c054b041 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -780,12 +780,20 @@ i.e. expr of def foo(args) = expr is returned." ;; but with node set to the statement and parent set to ;; body_statement for all others. ... Fine. Be that way. ;; Ditto for "block" and "block_body" - ((node-is "body_statement") parent-bol ruby-indent-level) - ((parent-is "body_statement") (ruby-ts--bol ruby-ts--grand-parent-node) ruby-indent-level) - ((match "end" "do_block") parent-bol 0) - ((n-p-gp "block_body" "block" nil) parent-bol ruby-indent-level) - ((n-p-gp nil "block_body" "block") (ruby-ts--bol ruby-ts--grand-parent-node) ruby-indent-level) - ((match "}" "block") parent-bol 0) + ((node-is "body_statement") + (ruby-ts--block-indent-anchor ruby-ts--parent-node) + ruby-indent-level) + ((parent-is "body_statement") + (ruby-ts--block-indent-anchor ruby-ts--grand-parent-node) + ruby-indent-level) + ((match "end" "do_block") (ruby-ts--block-indent-anchor ruby-ts--parent-node) 0) + ((n-p-gp "block_body" "block" nil) + (ruby-ts--block-indent-anchor ruby-ts--parent-node) + ruby-indent-level) + ((n-p-gp nil "block_body" "block") + (ruby-ts--block-indent-anchor ruby-ts--grand-parent-node) + ruby-indent-level) + ((match "}" "block") (ruby-ts--block-indent-anchor ruby-ts--parent-node) 0) ;; Chained strings ((match "string" "chained_string") first-sibling 0) @@ -794,6 +802,18 @@ i.e. expr of def foo(args) = expr is returned." (catch-all parent-bol ruby-indent-level)))) `((ruby . ,common)))) +(defun ruby-ts--block-indent-anchor (block-node-getter) + (lambda (node parent _bol &rest _rest) + (let ((block-node (funcall block-node-getter node parent))) + (save-excursion + (goto-char + (treesit-node-start + (if ruby-block-indent + (ruby-ts--statement-ancestor block-node) + block-node))) + (back-to-indentation) + (point))))) + (defun ruby-ts--class-or-module-p (node) "Predicate if NODE is a class or module." (string-match-p ruby-ts--class-or-module-regex (treesit-node-type node))) diff --git a/test/lisp/progmodes/ruby-ts-mode-tests.el b/test/lisp/progmodes/ruby-ts-mode-tests.el index b2c990f8e56..eaf6367a306 100644 --- a/test/lisp/progmodes/ruby-ts-mode-tests.el +++ b/test/lisp/progmodes/ruby-ts-mode-tests.el @@ -251,6 +251,7 @@ The whitespace before and including \"|\" on each line is removed." (kill-buffer buf))))) (ruby-ts-deftest-indent "ruby-method-params-indent.rb") +(ruby-ts-deftest-indent "ruby-block-indent.rb") (provide 'ruby-ts-mode-tests) From 3d1e74c82a84d9b2c5ad45a377512b5ee83b8d47 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Mon, 16 Jan 2023 00:23:47 -0800 Subject: [PATCH 06/13] Fix tree-sitter indent preset function (bug#60270) * lisp/treesit.el (treesit-simple-indent-presets): Fix prev-adaptive-prefix so it doesn't return nil if the previous line has no prefix. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test. --- lisp/treesit.el | 1 - .../lisp/progmodes/c-ts-mode-resources/indent.erts | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index ffc78b93032..5e6f109531e 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1152,7 +1152,6 @@ See `treesit-simple-indent-presets'.") (and (>= (point) comment-start-bol) adaptive-fill-regexp (looking-at adaptive-fill-regexp) - (> (match-end 0) (match-beginning 0)) (match-end 0)))))) ;; TODO: Document. (cons 'grand-parent diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 71524e273f3..70fce68b0ec 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts @@ -133,6 +133,20 @@ Name: Multiline Block Comments 4 (bug#60270) */ =-=-= +Name: Multiline Block Comments 5 (bug#60270) + +=-= +/* +line one +line 2 + */ +=-= +/* + line one + line 2 + */ +=-=-= + Code: (lambda () From 67df34c143d1adbf6d2817abb5da5dcad06369bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 16 Jan 2023 11:48:09 +0000 Subject: [PATCH 07/13] Fix M-x eglot prompt when connection already exists (bug#60557) Before this change, if a current connection existed at the time of M-x eglot, user would be first asked to enter into M-x eglot's interactive spec details about new command line arguments, and only afterwards be prompted about what to do with the current connection (which could be to reconnect to it using the same arguments, or tear it down and make a new one). This is very confusing, as users may not be fully aware of the distinction between "reconnect" vs "disconnect-and-connect". They might not know if any new command line arguments provided are taking effect or not. This change simplifies this and removes the option to "reconnect instead" from M-x eglot (users can do that at any time via M-x eglot-reconnect). It also ensures that users are informed about a current connection before asking to enter new command line arguments and not the other way round. * lisp/progmodes/eglot.el (eglot): Rework. --- lisp/progmodes/eglot.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 0082a171303..445d6ee9b5e 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1113,16 +1113,16 @@ LANGUAGE-ID is the language ID string to send to the server for MANAGED-MAJOR-MODE, which matters to a minority of servers. INTERACTIVE is t if called interactively." - (interactive (append (eglot--guess-contact t) '(t))) - (setq managed-major-mode (eglot--ensure-list managed-major-mode)) - (let* ((current-server (eglot-current-server)) - (live-p (and current-server (jsonrpc-running-p current-server)))) - (if (and live-p - interactive - (y-or-n-p "[eglot] Live process found, reconnect instead? ")) - (eglot-reconnect current-server interactive) - (when live-p (ignore-errors (eglot-shutdown current-server))) - (eglot--connect managed-major-mode project class contact language-id)))) + (interactive + (let ((current-server (eglot-current-server))) + (unless (or (null current-server) + (y-or-n-p "\ +[eglot] Shut down current connection before attempting new one?")) + (user-error "[eglot] Connection attempt aborted by user.")) + (prog1 (append (eglot--guess-contact t) '(t)) + (when current-server (ignore-errors (eglot-shutdown current-server)))))) + (eglot--connect (eglot--ensure-list managed-major-mode) + project class contact language-id)) (defun eglot-reconnect (server &optional interactive) "Reconnect to SERVER. From 7c8eac8fbcb8cc8a4ededd86f4d2c7a507d8294c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 16 Jan 2023 16:00:18 +0200 Subject: [PATCH 08/13] ; * src/w32fns.c: Fix quoting. Patch by Arash Esbati . --- src/w32fns.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/w32fns.c b/src/w32fns.c index 192d3ddf27a..71206b8874c 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10396,8 +10396,8 @@ to be converted to forward slashes by the caller. */) #endif /* WINDOWSNT */ /* Query a value from the Windows Registry (under HKCU and HKLM), - where `key` is the registry key, `name` is the name, and `lpdwtype` - is a pointer to the return value's type. `lpwdtype` can be NULL if + where `key' is the registry key, `name' is the name, and `lpdwtype' + is a pointer to the return value's type. `lpwdtype' can be NULL if you do not care about the type. Returns: pointer to the value, or null pointer if the key/name does @@ -10698,7 +10698,7 @@ acting on \"Windows\" key events when `w32-pass-lwindow-to-system' or `w32-pass-rwindow-to-system' is nil. This variable is only used on Windows 98 and ME. For other Windows -versions, see the documentation of the `w32-register-hot-key` +versions, see the documentation of the `w32-register-hot-key' function. */); /* Although 255 is technically not a valid key code, it works and means that this hack won't interfere with any real key code. */ @@ -10732,7 +10732,7 @@ The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to appear as the `lwindow' key. Any other value will cause the key to be ignored. -Also see the documentation of the `w32-register-hot-key` function. */); +Also see the documentation of the `w32-register-hot-key' function. */); Vw32_lwindow_modifier = Qnil; DEFVAR_LISP ("w32-rwindow-modifier", @@ -10742,7 +10742,7 @@ The value can be hyper, super, meta, alt, control or shift for the respective modifier, or nil to appear as the `rwindow' key. Any other value will cause the key to be ignored. -Also see the documentation of the `w32-register-hot-key` function. */); +Also see the documentation of the `w32-register-hot-key' function. */); Vw32_rwindow_modifier = Qnil; DEFVAR_LISP ("w32-apps-modifier", @@ -11271,7 +11271,7 @@ globals_of_w32fns (void) get_proc_addr (hm_kernel32, "SetThreadDescription"); /* Support OS dark mode on Windows 10 version 1809 and higher. - See `w32_applytheme` which uses appropriate APIs per version of Windows. + See `w32_applytheme' which uses appropriate APIs per version of Windows. For future wretches who may need to understand Windows build numbers: https://docs.microsoft.com/en-us/windows/release-health/release-information */ From 1b458aced723dc752a699e509816b92399087775 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 16 Jan 2023 16:08:46 +0200 Subject: [PATCH 09/13] ; * lisp/progmodes/eglot.el: Remove stray space. --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 445d6ee9b5e..10512633181 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1121,7 +1121,7 @@ INTERACTIVE is t if called interactively." (user-error "[eglot] Connection attempt aborted by user.")) (prog1 (append (eglot--guess-contact t) '(t)) (when current-server (ignore-errors (eglot-shutdown current-server)))))) - (eglot--connect (eglot--ensure-list managed-major-mode) + (eglot--connect (eglot--ensure-list managed-major-mode) project class contact language-id)) (defun eglot-reconnect (server &optional interactive) From f367ba3ed03526356448a94addbb8554ece2f482 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 16 Jan 2023 16:52:48 +0200 Subject: [PATCH 10/13] ; Avoid byte-compiler warning in eglot.el * lisp/progmodes/eglot.el (eglot): Rename INTERACTIVE to avoid byte-compiler warning. Update the doc string. (Bug#60557) --- lisp/progmodes/eglot.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 10512633181..dc73152f5ab 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1075,7 +1075,7 @@ suitable root directory for a given LSP server's purposes." ;;;###autoload (defun eglot (managed-major-mode project class contact language-id - &optional interactive) + &optional _interactive) "Start LSP server in support of PROJECT's buffers under MANAGED-MAJOR-MODE. This starts a Language Server Protocol (LSP) server suitable for the @@ -1112,7 +1112,7 @@ described in `eglot-server-programs', which see. LANGUAGE-ID is the language ID string to send to the server for MANAGED-MAJOR-MODE, which matters to a minority of servers. -INTERACTIVE is t if called interactively." +INTERACTIVE is ignored and provided for backward compatibility." (interactive (let ((current-server (eglot-current-server))) (unless (or (null current-server) From 140824dc099a84556341f089e8a939f4a80c3f7f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 16 Jan 2023 16:55:01 +0200 Subject: [PATCH 11/13] ; Fix more quoting in w32fns.c. --- src/w32fns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/w32fns.c b/src/w32fns.c index 71206b8874c..b4192a5ffa6 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10664,7 +10664,7 @@ pops up the Windows Run dialog, - pops up the "System Properties" dialog, etc. On Windows 10, no \"Windows\" key combinations are normally handed to applications. To enable Emacs to process \"Windows\" key combinations, use the function -`w32-register-hot-key`. +`w32-register-hot-key'. For Windows 98/ME, see the doc string of `w32-phantom-key-code'. */); Vw32_pass_lwindow_to_system = Qt; @@ -10683,7 +10683,7 @@ pops up the Windows Run dialog, - pops up the "System Properties" dialog, etc. On Windows 10, no \"Windows\" key combinations are normally handed to applications. To enable Emacs to process \"Windows\" key combinations, use the function -`w32-register-hot-key`. +`w32-register-hot-key'. For Windows 98/ME, see the doc string of `w32-phantom-key-code'. */); Vw32_pass_rwindow_to_system = Qt; From c1d32d9a20dc94d403725c288d168451b916c034 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Mon, 16 Jan 2023 17:44:44 +0000 Subject: [PATCH 12/13] CC Mode: Prevent ids in temporary "declarators" getting into c-found-types This should fix bug #60765. In the scenario type an identifier in front of foo (bar, baz), as when started a new statement. This temporarily makes the function call a declarator, and bar and baz types. Don't enter bar and baz into c-found-types. * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1) (CASE 6): When a 'maybe type triggers this case, set `unsafe-maybe' to non-nil. --- lisp/progmodes/cc-engine.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 8ac3ef6808d..45d90ea2431 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10863,7 +10863,13 @@ This function might do hidden buffer changes." ;; types; other identifiers could just as well be ;; constants in C++. (memq at-type '(known found))))) - (throw 'at-decl-or-cast t) + (progn + ;; The user may be part way through typing a statement + ;; beginning with an identifier. This makes a 'maybe + ;; type in the following "declarator"'s arglist suspect. + (when (eq at-type 'maybe) + (setq unsafe-maybe t)) + (throw 'at-decl-or-cast t)) ;; CASE 7 ;; Can't be a valid declaration or cast, but if we've found a ;; specifier it can't be anything else either, so treat it as From e8c77d9abda9c5c48de546a4ff667ffdf3d27c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 15 Jan 2023 15:23:44 +0100 Subject: [PATCH 13/13] Fix hfy-exclude-file-rules (bug#60562) * lisp/htmlfontify.el (hfy-exclude-file-rules): Fix broken defcustom type; no longer fails test-custom-opts. Fix regexps not to use newline-sensitive patterns like `.` and `$` which do not make sense when matching file names. Better doc string. * lisp/htmlfontify.el (hfy-list-files): Simplify regexp argument. --- lisp/htmlfontify.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 0959405081f..1ab33cc6411 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -373,13 +373,13 @@ otherwise." :type '(string)) (defcustom hfy-exclude-file-rules - '("\\.flc$" - "/CVS/.*" - ".*~$" - "/\\.git\\(?:/.*\\)?$") - "Define some regular expressions to exclude files" + '("\\.flc\\'" + "/CVS/" + "~\\'" + "/\\.git\\(?:/\\|\\'\\)") + "Regular expressions matching files to exclude." :tag "exclude-rules" - :type '(list string) + :type '(repeat regexp) :version "29.1") (defcustom hfy-display-class nil @@ -1835,7 +1835,7 @@ Strips any leading \"./\" from each filename." (seq-some (lambda (r) (string-match r f)) hfy-exclude-file-rules))) - (directory-files-recursively "." ".*" nil t))) + (directory-files-recursively "." "" nil t))) ;; strip the filename off, return a directory name ;; not a particularly thorough implementation, but it will be