1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-14 10:00:25 -08:00
Commit graph

38 commits

Author SHA1 Message Date
Stefan Kangas
25ebb9374b ; More minor docfixes found by checkdoc 2021-09-14 07:57:14 +02:00
Juri Linkov
bd917088e6 * lisp/thingatpt.el (thing-at-mouse): New function (bug#50256).
* 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.
2021-09-12 20:32:02 +03:00
Stefan Kangas
0cabf8bc36 ; Fix typos 2021-09-03 13:05:32 +02:00
Lars Ingebrigtsen
790259f01a Make "not found" message in dictionary less misleading
* lisp/net/dictionary.el (dictionary-do-search): Don't say there
are more words when there aren't (bug#47056).
2021-03-18 08:43:22 +01:00
Mattias Engdegård
a0854f939c ; Fix typos in doc strings 2021-03-12 12:12:14 +01:00
Stefan Monnier
dc083ebc4e * lisp/net/*.el: Use lexical-binding
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`.
2021-03-08 10:11:22 -05:00
Stefan Kangas
54af0d4298 Remove redundant requires of easymenu
* lisp/allout.el:
* lisp/emacs-lisp/edebug.el:
* lisp/emacs-lisp/ert.el:
* lisp/erc/erc-menu.el:
* lisp/help-mode.el:
* lisp/net/dictionary.el:
* lisp/nxml/rng-nxml.el:
* lisp/progmodes/ebrowse.el:
* lisp/progmodes/meta-mode.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ps-mode.el:
* lisp/progmodes/vera-mode.el:
* lisp/wid-browse.el: Remove redundant require of easymenu.  We only
use the autoloaded macro 'easy-menu-define' here.
2021-02-26 15:52:26 +01:00
Mattias Engdegård
de15ca7d00 Fix typos
* doc/lispref/display.texi (Size of Displayed Text):
* doc/lispref/windows.texi (Buffer Display Action Functions):
* etc/NEWS:
* etc/ORG-NEWS (Org-Attach has been refactored and extended):
* lisp/battery.el (display-battery-mode, battery--upower-subsribe):
* lisp/calendar/parse-time.el:
* lisp/dired-x.el:
* lisp/emacs-lisp/chart.el (chart-sequece, chart-bar-quickie):
* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p)
(eldoc-documentation-strategy):
* lisp/emacs-lisp/pcase.el (pcase--split-pred, pcase--u1):
* lisp/gnus/gnus-search.el (gnus-search-expandable-keys)
(gnus-search-parse-query, gnus-search-query-return-string)
(gnus-search-imap, gnus-search-imap-search-command)
(gnus-search-transform-expression):
* lisp/gnus/nnselect.el:
* lisp/isearch.el (isearch-lazy-count-format):
* lisp/mh-e/mh-show.el (mh-show-msg):
* lisp/net/dictionary-connection.el (dictionary-connection-open):
* lisp/net/dictionary.el (dictionary-default-popup-strategy)
(dictionary, dictionary-split-string, dictionary-do-select-dictionary)
(dictionary-display-dictionarys, dictionary-search)
(dictionary-tooltip-mode):
* lisp/net/eudcb-macos-contacts.el (eudc-macos-contacts-set-server):
* lisp/net/mailcap.el (mailcap-mime-data):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
* lisp/nxml/nxml-mode.el (nxml-mode):
* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cperl-mode.el (cperl-mode)
(cperl-fontify-syntaxically):
* lisp/progmodes/flymake.el (flymake-diagnostic-functions):
* lisp/progmodes/verilog-mode.el (verilog--supressed-warnings)
(verilog-preprocess):
* lisp/simple.el (self-insert-uses-region-functions):
* lisp/textmodes/bibtex.el (bibtex-copy-summary-as-kill):
* lisp/textmodes/texnfo-upd.el (texinfo-insert-master-menu-list):
* src/dispnew.c:
* src/font.c (Ffont_get):
* src/indent.c (compute_motion):
* src/process.c (init_process_emacs):
* src/w32fns.c (deliver_wm_chars):
* test/lisp/jsonrpc-tests.el (deferred-action-complex-tests):
Fix typos in documentation, comments, and internal identifiers.
2021-02-18 16:50:55 +01:00
Juri Linkov
552d2b9083 * lisp/net/dictionary.el: Dictionary improvements (bug#45262)
* 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.
2021-02-09 20:29:54 +02:00
Stefan Kangas
e027842f4f Fix copyright and license statement in dictionary*.el
* lisp/net/dictionary-connection.el:
* lisp/net/dictionary.el: Add copyright statement and fix license
statement.
2021-02-07 16:07:42 +01:00
Stefan Kangas
4e8d36fdaa Various doc fixes in dictionary.el
* lisp/net/dictionary.el (dictionary-set-server-var)
(dictionary-server, dictionary-port)
(dictionary-default-dictionary)
(dictionary-default-popup-strategy, dictionary-proxy-server)
(dictionary-proxy-port, dictionary-description-open-delimiter)
(dictionary-description-close-delimiter)
(dictionary-window-configuration, dictionary-selected-window)
(dictionary-position-stack, dictionary-data-stack)
(dictionary-positions, dictionary-current-data)
(dictionary-connection, dictionary-instances)
(dictionary-color-support, dictionary-word-history)
(dictionary-mode, dictionary, dictionary-check-connection)
(dictionary-mode-p, dictionary-send-command)
(dictionary-read-reply-and-split, dictionary-check-reply)
(dictionary-check-initial-reply, dictionary-store-state)
(dictionary-store-positions, dictionary-new-search)
(dictionary-new-search-internal, dictionary-do-search)
(dictionary-display-search-result)
(dictionary-display-word-definition)
(dictionary-special-dictionary, dictionary-set-strategy)
(dictionary-tooltip-dictionary, dictionary-switch-tooltip-mode)
(dictionary-tooltip-mode, global-dictionary-tooltip-mode): Doc fixes
to adhere to our conventions.
2021-02-07 15:53:51 +01:00
Mauro Aranda
c7f15dfa80 Fix Quit button in dictionary buffer
* 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.
2021-01-02 11:59:36 -03:00
Stefan Kangas
dd662fc972 Fix some over-wide docstrings
* lisp/cedet/semantic/analyze/refs.el
(semantic-analyze-refs-proto)
(semantic-analyze-refs-impl):
* lisp/cedet/semantic/symref.el
(semantic-symref-hit-to-tag-via-buffer):
* lisp/emacs-lisp/chart.el (chart-axis-draw):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct, cl-loop):
* lisp/emacs-lisp/eieio-core.el (eieio--add-new-slot):
* lisp/eshell/em-unix.el (eshell/info):
* lisp/gnus/deuglify.el (gnus-outlook-rearrange-article):
* lisp/gnus/gnus-agent.el (gnus-agent-read-article-number):
* lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines)
(gnus-put-text-property-excluding-newlines):
* lisp/gnus/message.el (message-sort-headers):
* lisp/gnus/nntp.el (nntp-with-open-group)
(nntp-with-open-group-function):
* lisp/gnus/nnvirtual.el (nnvirtual-create-mapping):
* lisp/mail/feedmail.el (feedmail-fiddle-list-of-fiddle-plexes)
(feedmail-queue-reminder, feedmail-mail-send-hook-splitter):
* lisp/net/dictionary.el (dictionary-do-matching):
* lisp/obsolete/longlines.el (longlines-auto-wrap):
* lisp/org/ob-sql.el (org-babel-sql-dbstring-vertica):
* lisp/org/ol-bbdb.el (org-bbdb-date-list):
* lisp/progmodes/cc-cmds.el (c-mark-function):
* lisp/progmodes/cperl-mode.el (cperl-add-tags-recurse)
(cperl-add-tags-recurse-noxs-fullpath)
(cperl-add-tags-recurse-noxs):
* lisp/progmodes/etags.el (tags-search):
* lisp/progmodes/verilog-mode.el (verilog-delete-auto-buffer)
(verilog-auto-re-search-do, verilog-expand-vector-internal):
* lisp/textmodes/reftex-parse.el (reftex-init-section-numbers):
* lisp/textmodes/reftex-toc.el
(reftex-toc-load-all-files-for-promotion):
* lisp/textmodes/sgml-mode.el (html-mode):
* lisp/textmodes/table.el (table--transcoord-cache-to-table)
(table--transcoord-table-to-cache, table--remove-eol-spaces)
(table--region-in-cell-p, table-goto-bottom-right-corner)
(table-split-cell-horizontally):
* lisp/url/url-handlers.el (url-insert):
* lisp/vc/ediff-util.el (ediff-inferior-compare-regions): Fix doc
strings to not exceed 80-column limits.  (Bug#44858)
2020-12-30 12:44:19 +01:00
Torsten Hilbrich
62d14e10f9 * lisp/net/dictionary.el (dictionary-pre-buffer): Unify casing
Let all the buttons begins with an upper-case character and the rest of
the text is lower-case.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
d466231c3e A number of docstring fixes
* lisp/net/dictionary.el (dictionary-set-server-var, dictionary-mode,
  dictionary, dictionary-new-buffer, dictionary-reply-code,
  dictionary-reply, dictionary-reply-list, dictionary-open-server,
  dictionary-check-connection, dictionary-mode-p, dictionary-close,
  dictionary-read-reply, dictionary-split-string,
  dictionary-read-reply-and-split, dictionary-read-answer,
  dictionary-check-reply, dictionary-coding-system,
  dictionary-decode-charset, dictionary-encode-charset,
  dictionary-check-initial-reply, dictionary-store-state,
  dictionary-restore-state, dictionary-new-search,
  dictionary-new-search-internal, dictionary-do-search,
  dictionary-pre-buffer, dictionary-post-buffer,
  dictionary-display-search-result, dictionary-display-word-entry,
  dictionary-display-word-definition, dictionary-mark-reference,
  dictionary-select-dictionary, dictionary-display-dictionarys,
  dictionary-display-dictionary-line, dictionary-set-dictionary,
  dictionary-special-dictionary, dictionary-display-more-info,
  dictionary-select-strategy, dictionary-do-select-strategy,
  dictionary-display-strategies, dictionary-display-strategy-line,
  dictionary-set-strategy, dictionary-new-matching,
  dictionary-do-matching, dictionary-display-only-match-result,
  dictionary-display-match-result, dictionary-display-match-result,
  dictionary-display-match-lines, dictionary-search,
  dictionary-previous, dictionary-help, dictionary-match-words,
  dictionary-mouse-popup-matching-words,
  dictionary-popup-matching-words, dictionary-tooltip-mode,
  dictionary-tooltip-mouse-event): Fix docstring

The following kind of changes were made:

- finish first line with a full stop (.)
- mention parameter in upper-case whenever possible (considering the
  length constraints)
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
89e9c1686e * lisp/net/dictionary.el (dictionary-display-more-info): Spelling fix
Fix the spelling in the error message for non-existing dictionary.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
d30618cbc1 * lisp/net/dictionary.el (dictionary-tooltip-mode): Use setq-local 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
4deb8618e4 * lisp/net/dictionary.el (dictionary-mode): Use setq-local 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
ffa7d6671d * lisp/net/dictionary.el: Prefer defsubst over defmacro 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
54a3964e29 Update GPL version
* lisp/net/dictionary.el: Use GPL version 3 or later
* lisp/net/dictionary-connection.el: Use GPL version 3 or later
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
81ebe86d8d Show error message when asking to match for nothing
* 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.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
09952ce434 Removed useless check for popup-menu
* 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
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
cc5f280378 * lisp/net/dictionary.el: Add lexical-binding:t
Fixing all the issues found by this. A number of unused variables were
reported here.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
d5a4da25b0 * lisp/net/dictionary.el: Remove remnants of package
Version and package depedencies are not useful when included into
Emacs.
2020-11-19 21:21:43 +01:00
Matthias Meulien
7ca331a4f9 Add history of search words to read-string 2020-11-19 08:33:42 +01:00
Matthias Meulien
28fe134971 Remove text property from empty line 2020-11-19 08:32:28 +01:00
Torsten Hilbrich
91ff1c8f7c Move placement of dictionary-tooltip-mouse-event
* 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
2020-11-19 08:25:42 +01:00
Torsten Hilbrich
2f1e4fbc42 Support nil value for dictionary-server
* 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.
2020-11-19 08:23:07 +01:00
Torsten Hilbrich
837505075c Fix dictionary tooltip mode
* 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.
2020-10-10 07:04:27 +02:00
Torsten Hilbrich
329b6a0210 Adding details page for dictionary
* 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.
2020-10-09 20:05:38 +02:00
Torsten Hilbrich
1773b9b687 Dictionary now uses button
* 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.
2020-10-09 20:05:38 +02:00
Torsten Hilbrich
99a7e918c8 Don't check for existence of defface
* lisp/net/dictionary.el: defface has been available in Emacs for quite
some time now. No need to check it before using it.
2020-10-08 19:41:17 +02:00
Torsten Hilbrich
49c250b388 Dont't check coding-system-list for existence
* 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.
2020-10-08 19:41:17 +02:00
Torsten Hilbrich
5dc17d73b0 Add :version tag to defcustom statement
* lisp/net/dictionary.el: Add :version tag to all defcustom statements

Suggested-By: Robert Pluim <rpluim@gmail.com>
2020-10-08 19:33:14 +02:00
Torsten Hilbrich
723906c444 Removed some compability parts in dictionary
* lisp/net/dictionary.el: Use cl-lib, remove defface and defgroup
checks, remove xemacs-related code
* lisp/net/dictionary-link.el: Remove xemacs-related code
2020-10-08 05:59:53 +02:00
Torsten Hilbrich
e2ebffdd62 Renamed link.el
* lisp/net/link.el: Renamed to connection-link.el, also prefixing all
functions with "dictionary-" prefix
* lisp/net/dictionary.el: Adapt to renamed functions
2020-10-08 05:56:31 +02:00
Torsten Hilbrich
658ec3ccee Renamed connection.el
* lisp/net/connection.el: Renamed to dictionary-connection.el, also
prefixing all functions with "dictionary-" prefix
* lisp/net/dictionary.el: Adapt to renamed functions
2020-10-08 05:56:31 +02:00
Torsten Hilbrich
b6227446d9 Importing dictionary module
* lisp/net: Adding files connection.el, link.el, dictionary.el,
imported from https://github.com/myrkr/dictionary-el.git
2020-10-08 05:56:31 +02:00