* lisp/net/dictionary.el: Add 'context-menu-dictionary' to
'context-menu-functions'.
(dictionary-search-word-at-mouse): New function.
(context-menu-dictionary): New function that uses 'thing-at-mouse'.
(dictionary-mouse-popup-matching-words): Remove stray 'selected-window'.
* lisp/textmodes/flyspell.el (flyspell-context-menu): Add '_click' arg.
Also remove some redundant `:group` arguments.
* lisp/net/eudc-export.el: Use lexical-binding.
(eudc-create-bbdb-record): Use `cl-progv` and `apply` to avoid `eval`.
* lisp/net/eudc-hotlist.el: Use lexical-binding.
* lisp/net/eudc.el (eudc-print-attribute-value): Use `funcall` to avoid
`eval`.
* lisp/net/eudcb-bbdb.el: Use lexical-binding.
(eudc-bbdb-filter-non-matching-record): Use `funcall` to avoid `eval`.
Move `bbdb-val` binding to avoid `setq`.
Use `seq-some` instead of `eval+or`.
(eudc-bbdb-format-record-as-result): Use `dolist` and `pcase`.
Use `funcall` to avoid `eval`.
(eudc-bbdb-query-internal): Simplify a bit.
* lisp/net/eudcb-ldap.el: Use lexical-binding.
(eudc-ldap-get-host-parameter): Use `defalias` to avoid `eval-and-compile`.
* lisp/net/telnet.el: Use lexical-binding.
* lisp/net/quickurl.el: Use lexical-binding.
* lisp/net/newst-ticker.el: Use lexical-binding.
* lisp/net/newst-reader.el: Use lexical-binding.
* lisp/net/goto-addr.el: Use lexical-binding.
* lisp/net/gnutls.el: Use lexical-binding.
* lisp/net/eudcb-macos-contacts.el: Use lexical-binding.
* lisp/net/eudcb-mab.el: Use lexical-binding.
* lisp/net/net-utils.el: Use lexical-binding.
(finger): Remove unused var `found`.
* lisp/net/network-stream.el (open-protocol-stream): Remove redundant
`defalias`.
* lisp/net/newst-plainview.el: Use lexical-binding.
(newsticker-hide-entry, newsticker-show-entry): Remove unused var
`is-invisible`.
(w3m-fill-column, w3-maximum-line-length): Declare vars.
* lisp/net/tramp.el (tramp-compute-multi-hops):
* lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory):
* lisp/net/tramp-cmds.el (tramp-default-rename-file):
* lisp/net/webjump.el (webjump): Don't forget lexical-binding for `eval`.
* lisp/net/dictionary.el (dictionary-link-dictionary): New defcustom.
(dictionary-mark-reference): Use dictionary-link-dictionary.
(dictionary-post-buffer-hook): New defcustom.
(dictionary-post-buffer): Run dictionary-post-buffer-hook.
(dictionary-mode-map): Bind 'S-SPC' to scroll-down-command.
(dictionary-search-default): Use possibly multi-word data at point.
* lisp/net/dictionary.el (dictionay-close): Changing the arity of the
function in cc5f280378 was a mistake.
Restore it, but mark the argument as unused to avoid a
wrong-number-of-arguments error when using the Quit button.
* lisp/net/dictionary.el (dictionary-popup-matching-words): Show error
if neither the parameter nor the word at point are defined
This avoids an error later on when the nil value is used as string
within dictionary-encode-charset.
* lisp/net/dictionary.el (dictionary-popup-matching-words): No need to
check for popup-menu, the code is part of Emacs now and the function
should always be there
* lisp/net/dictionary.el (dictionary-tooltip-mouse-event): Place
variable before dictionary-display-tooltip to avoid warning about use of
free variable when compiling dictionary-display-tooltip
* net/lisp/dictionary.el (dictionary-server): Support choice to select
the dictionary server to use
* net/lisp/dictionary.el (dictionary-check-connection): Support nil
value for dictionary-server
This nil value is the new default value of that variable. When
opening a new connection and dictionary-server is nil the code
behaves the following way:
- it will first try to connect to a dictd server running on localhost
- if that fails, it queries the user if the alternative
server (dict.org) should be consulted
- if the user agrees, the connection is made to dict.org
This allows the default value of dictionary-server not to connect
a remote server by default. The user is always able to select a
different server by customizing the variable dictionary-search.
* lisp/net/dicionary.el (dictionary-tooltip-mode): Add mouse movement
binding and use tooltip-functions instead of tooltip-hook
There were some changes in Emacs since testing it the last time. I had
to add keybinding for mouse movement and enable track-mouse to get the
mode working again.
* net/lisp/dictionary.el (dictionary-display-dictionary-line): Allow
getting more details on a dictionary by clicking the "(Details)" link.
I had the functionality to query the dictionary information but no
mechanism to invoke it. So just add a button after the short description
of the dictionary to get more information.
* net/lisp/dictionary-link.el: Removed now obsolete file
* net/lisp/dictionary.el: Use insert-button and make-button
* net/lisp/dictionary.el (dictionary-mode-map): Now defined using defvar
I had to add a conversion function as parameter for the button 'action
as I need to be able to pass nil data to my function. This is not
possible with the regular button 'action function and the 'button-data
value.
The functionality of searching a link in all dictionaries has been
removed for now. It might appear again once I have an idea how to
implement it.
* lisp/net/dictionary.el (dictionary-coding-systems-for-dictionaries):
Don't check for coding-system-list before using it. It check no longer
be necessary.
* lisp/net/link.el: Renamed to connection-link.el, also prefixing all
functions with "dictionary-" prefix
* lisp/net/dictionary.el: Adapt to renamed functions
* lisp/net/connection.el: Renamed to dictionary-connection.el, also
prefixing all functions with "dictionary-" prefix
* lisp/net/dictionary.el: Adapt to renamed functions