diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-15 09:06:50 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-15 09:06:50 +0100 |
commit | 639488b55a80e716e29dc74622c4c3e08ce3fbbc (patch) | |
tree | 8e32c8366c8d1fa944905498bb8a4ccbe2d66c82 | |
parent | 8df828e40522b7696cde6ec22a4657173c9f02a1 (diff) | |
download | emacs-639488b55a80e716e29dc74622c4c3e08ce3fbbc.tar.gz |
Revert "Add command to invoke a search engine"
This reverts commit 3f36d0836274a01d3cfc73f53ddbc76afc1d8a5e.
Similar functionality has been added to webjump, so this commit duplicated that.
-rw-r--r-- | lisp/mouse.el | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 46dd0397d7f..ad69d54fce4 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -534,16 +534,6 @@ Some context functions add menu items below the separator." :help "Find file or URL from text around mouse click")))) menu) -(defun context-menu-online-search (menu click) - "Populate MENU with command to search online." - (save-excursion - (mouse-set-point click) - (define-key-after menu [online-search-separator] menu-bar-separator) - (define-key-after menu [online-search-at-mouse] - '(menu-item "Online search" mouse-online-search-at-point - :help "Search for region or word online"))) - menu) - (defvar context-menu-entry `(menu-item ,(purecopy "Context Menu") ,(make-sparse-keymap) :filter ,(lambda (_) (context-menu-map))) @@ -3230,26 +3220,6 @@ is copied instead of being cut." (with-current-buffer (window-buffer window) (setq cursor-type (nth 3 state))))))) -(defvar eww-search-prefix) -(defun mouse-online-search-at-point (event) - "Query an online search engine at EVENT. -If a region is active, the entire region will be sent, otherwise -the symbol at point will be used. This command uses EWW's -default search engine, as configured by `eww-search-prefix'." - (interactive "e") - (require 'eww) - (let ((query (if (use-region-p) - (buffer-substring (region-beginning) - (region-end)) - (save-excursion - (mouse-set-point event) - (thing-at-point 'symbol))))) - (unless query - (user-error "Nothing to search for")) - (browse-url (concat - eww-search-prefix - (mapconcat #'url-hexify-string (split-string query) "+"))))) - ;;; Bindings for mouse commands. |