[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] New package: dict
From: |
Philip Kaludercic |
Subject: |
Re: [ELPA] New package: dict |
Date: |
Thu, 18 May 2023 12:59:42 +0000 |
Eshel Yaron <me@eshelyaron.com> writes:
> diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
> index ba65225692a..adf1f409f26 100644
> --- a/lisp/net/dictionary.el
> +++ b/lisp/net/dictionary.el
> @@ -38,6 +38,7 @@
> (require 'custom)
> (require 'dictionary-connection)
> (require 'button)
> +(require 'help-mode)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; Stuff for customizing.
> @@ -247,6 +248,39 @@ dictionary-coding-systems-for-dictionaries
> )))
> :version "28.1")
>
> +(defcustom dictionary-read-word-prompt "Search word"
> + "Prompt string to use when prompting for a word."
> + :type 'string
> + :version "30.1")
> +
> +(defcustom dictionary-display-definition-function nil
> + "Function to use for displaying dictionary definitions.
> +It is called with three string arguments: the word being defined,
> +the dictionary name, and the full definition."
> + :type '(choice (const :tag "Dictionary buffer" nil)
> + (const :tag "Help buffer"
> + dictionary-display-definition-in-help-buffer)
> + (function :tag "Custom function"))
> + :version "30.1")
> +
> +(defcustom dictionary-read-word-function nil
> + "Function to use for prompting for a word.
> +It is called with no arguments and must return a string."
> + :type '(choice (const :tag "Default" nil)
> + (const :tag "Dictionary-based completion"
> + dictionary-completing-read-word)
> + (function :tag "Custom function"))
> + :version "30.1")
> +
> +(defcustom dictionary-read-dictionary-function nil
> + "Function to use for prompting for a dictionary.
> +It is called with no arguments and must return a string."
> + :type '(choice (const :tag "Default" nil)
> + (const :tag "Choose among server-provided dictionaries"
> + dictionary-completing-read-dictionary)
> + (function :tag "Custom function"))
> + :version "30.1")
Would there be a point in implementing the previous, default
implementations as functions here that would be invoked, instead of
relying using nil?
--
Philip Kaludercic
- Re: [ELPA] New package: dict, (continued)
- Re: [ELPA] New package: dict, Eli Zaretskii, 2023/05/20
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/20
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/20
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/20
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/21
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/25
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/25
- Re: [ELPA] New package: dict, Eli Zaretskii, 2023/05/26
- Re: [ELPA] New package: dict, Rudolf Adamkovič, 2023/05/26
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/26
- Re: [ELPA] New package: dict,
Philip Kaludercic <=
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/18
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/18
- Re: [ELPA] New package: dict, Stephen Leake, 2023/05/14
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/15
Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/11