From 7eed479eabc793b616dff32e9a3e8d9c882f3a81 Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Sat, 2 Sep 2023 20:16:30 -0300 Subject: [PATCH] Fix defcustoms in filesets.el (Bug#65708) * lisp/filesets.el (filesets-browse-dir-function) (filesets-open-file-function filesets-save-buffer-function) (filesets-commands filesets-external-viewers): Don't override default value for the function widget with an invalid default value. Remove redundant ":" in tag. Fix default values for choice and list widgets. --- lisp/filesets.el | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/lisp/filesets.el b/lisp/filesets.el index 81a194a45e6..639b108ac03 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -413,15 +413,14 @@ directory's name. Note: You have to manually rebuild the menu if you change this value." :set #'filesets-set-default - :type '(choice :tag "Function:" + :type '(choice :tag "Function" (const :tag "dired" :value dired) (list :tag "Command" :value ("" "%s") (string :tag "Name") (string :tag "Arguments")) - (function :tag "Function" - :value nil))) + (function :tag "Function"))) (defcustom filesets-open-file-function #'filesets-find-or-display-file "The function used for opening files. @@ -437,23 +436,21 @@ readable, will not be opened. Caveat: Changes will take effect only after rebuilding the menu." :set #'filesets-set-default - :type '(choice :tag "Function:" + :type '(choice :tag "Function" (const :tag "filesets-find-or-display-file" :value filesets-find-or-display-file) (const :tag "filesets-find-file" :value filesets-find-file) - (function :tag "Function" - :value nil))) + (function :tag "Function"))) (defcustom filesets-save-buffer-function #'save-buffer "The function used to save a buffer. Caveat: Changes will take effect after rebuilding the menu." :set #'filesets-set-default - :type '(choice :tag "Function:" + :type '(choice :tag "Function" (const :tag "save-buffer" :value save-buffer) - (function :tag "Function" - :value nil))) + (function :tag "Function"))) (defcustom filesets-find-file-delay (if (and (featurep 'xemacs) gutter-buffers-tab-visible-p) @@ -535,7 +532,7 @@ the filename." :type '(repeat :tag "Commands" (list :tag "Definition" :value ("") (string "Name") - (choice :tag "Command" + (choice :tag "Command" :value "" (string :tag "String") (function :tag "Function")) (repeat :tag "Argument List" @@ -546,8 +543,7 @@ the filename." :value "") (string :tag "Quoted File Name" :value "<>") - (function :tag "Function" - :value nil)))))) + (function :tag "Function")))))) (defcustom filesets-external-viewers (let @@ -647,12 +643,12 @@ In order to view pdf or rtf files in an Emacs buffer, you could use these: (repeat :tag "Properties" (choice (list :tag ":constraintp" - :value (:constraintp) + :value (:constraintp ignore) (const :format "" :value :constraintp) (function :tag "Function")) (list :tag ":constraint-flag (obsolete)" - :value (:constraint-flag) + :value (:constraint-flag nil) (const :format "" :value :constraint-flag) (sexp :tag "Symbol")) @@ -667,7 +663,7 @@ In order to view pdf or rtf files in an Emacs buffer, you could use these: :value :ignore-on-read-text) (boolean :tag "Boolean")) (list :tag ":args" - :value (:args) + :value (:args nil) (const :format "" :value :args) (repeat :tag "List" @@ -676,10 +672,9 @@ In order to view pdf or rtf files in an Emacs buffer, you could use these: :value "") (symbol :tag "Symbol" :value nil) - (function :tag "Function" - :value nil)))) + (function :tag "Function")))) (list :tag ":open-hook" - :value (:open-hook) + :value (:open-hook nil) (const :format "" :value :open-hook) (hook :tag "Hook")) -- 2.39.2