speechd-speak-connections is a variable defined in speechd-speak.el . Its value is shown below. Documentation: Alist mapping major modes and buffers to speechd connection. By default, there s a single connection to speechd, named "default". This variable can define special connections for particular major modes and buffers. Each element of the alist is of the form (MODE-OR-BUFFER . CONNECTION-NAME). MODE-OR-BUFFER may be, in the order of preference from the highest to the lowest: - a list, representing a function call returning non-nil iff the element should be applied - buffer name - the symbol :minibuffer , representing minibuffers - major mode symbol - nil, representing non-buffer areas, e.g. echo area - t, representing the default value if nothing else matches CONNECTION-NAME is an arbitrary non-empty string naming the corresponding connection. If connection with such a name doesn t exist, it is automatically created. You can customize this variable. Value: (((sdx-connection-matcher ’w3m ’fr "w3m-fr") . "w3m-fr") ((sdx-connection-matcher ’(latex reftex-toc) ’fr "latex-fr") . "latex-fr") ((sdx-connection-matcher ’(latex reftex-toc) ’en "latex-en") . "latex-en") ((sdx-connection-matcher ’(mew-draft mew-message) ’fr "mew-fr") . "mew-fr")) Original value was nil
What we called the situation/context is represented by first element of each alist element. It certainly simply be a mode, but what makes the process very flexible is that this first element might be almost what you want and in particular a function that can help to make the selection.
In fact selecting on the Emacs mode as it is done by default is already something very powerful. You might have a different speaking behavior for code and text for instance provided you define a suitable connection for any Emacs mode you want to use. Notice that several Emacs modes may share the same connection.
But Emacs mode may not be sufficient to determine speaking behavior. For instance, latex-mode may be used to edit english LATEX sources as well as french ones. In the first case you certainly want Speechd-el to speak english and french in the second case. One surely might imagine redefining language dependent Emacs mode to continue to use a simple mode –> connection mapping. Anyway it seems that it implies to hack Emacs deeper than simply implmenting the sdx-connection-matcher (cf. 6 ,)function that provides a more sutle connection selection not only based on Emacs mode.
|Apache/2.4.38 (Unix) PHP/7.3.2 SVN/1.11.1|