branch: externals/denote
commit 50f94967349f05f89f9e264dfb1e84958be20e55
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Use the correct :type for user options that expect regexp or nil
Thanks to Stefan Monnier for pointing this out on the emacs-devel
mailing list:
<https://lists.gnu.org/archive/html/emacs-devel/2025-10/msg00683.html>.
---
denote.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/denote.el b/denote.el
index 3e3852455e..0dee3d0db2 100644
--- a/denote.el
+++ b/denote.el
@@ -680,7 +680,8 @@ and `denote-directory-subdirectories'.
The match is performed with `string-match-p'."
:group 'denote
:package-version '(denote . "1.2.0")
- :type 'string)
+ :type '(choice (const :tag "Do not filter out anything (default)" nil)
+ (string :tag "Regular expression")))
(define-obsolete-variable-alias
'denote-excluded-keywords-regexp
@@ -696,7 +697,8 @@ prompts as completion candidates when the user option
The match is performed with `string-match-p'."
:group 'denote
:package-version '(denote . "4.2.0")
- :type 'string)
+ :type '(choice (const :tag "Do not filter out anything (default)" nil)
+ (string :tag "Regular expression")))
(defcustom denote-excluded-files-regexp nil
"Regular expression of files that are excluded from Denote file prompts.
@@ -706,7 +708,8 @@ and `denote-open-or-create'.
The match is performed with `string-match-p' on the full file path."
:group 'denote
:package-version '(denote . "3.0.0")
- :type 'string)
+ :type '(choice (const :tag "Do not filter out anything (default)" nil)
+ (string :tag "Regular expression")))
(defcustom denote-after-new-note-hook nil
"Normal hook that runs after the `denote' command.