diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-07-07 13:25:23 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-07-09 17:27:49 +0200 |
commit | 2a8d083607e7e0fe9358f1f6526dbd8aa928af61 (patch) | |
tree | b450f931c3936ebc3e30ebaf57f5fdc8ec10e70a /lisp/ffap.el | |
parent | aa1e837ab43a5c6d0f31596b4ae3a3fd7352b3c5 (diff) | |
download | emacs-2a8d083607e7e0fe9358f1f6526dbd8aa928af61.tar.gz emacs-2a8d083607e7e0fe9358f1f6526dbd8aa928af61.tar.bz2 emacs-2a8d083607e7e0fe9358f1f6526dbd8aa928af61.zip |
Drop support for the dead third-party w3 package
The w3 package was removed from GNU ELPA in 2020 as it doesn't run on
a recent Emacs, and development had stopped over a decade before that.
If anyone wants to revive the w3 package, they should look this all
over, but it doesn't make sense for us to maintain this support code.
Ref: https://debbugs.gnu.org/25395
* lisp/net/browse-url.el (browse-url-w3): Make obsolete.
(browse-url--browser-defcustom-type)
(browse-url-default-browser):
* lisp/ffap.el (ffap-url-at-point, ffap-file-at-point):
* lisp/net/newst-plainview.el (newsticker--buffer-do-insert-text):
* lisp/net/newst-reader.el (newsticker-html-renderer)
(newsticker-show-news):
* lisp/net/newst-treeview.el (newsticker--treeview-render-text):
* lisp/org/ol.el (org-store-link):
* lisp/url/url.el (url-retrieve): Remove w3 support code and related
documentation and comments. (Bug#56435)
* test/lisp/net/browse-url-tests.el
(browse-url-tests-browser-kind): Adjust test for above changes.
* etc/TODO: Remove TODO to install W3.
* doc/misc/org.org (Handling Links): Don't mention W3.
* lisp/msb.el (msb--few-menus, msb--very-many-menus): Check for
eww-mode instead of w3-mode.
Diffstat (limited to 'lisp/ffap.el')
-rw-r--r-- | lisp/ffap.el | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el index d7225ee9c97..9de0dd40d16 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -68,8 +68,8 @@ ;; If you do not like these bindings, modify the variable ;; `ffap-bindings', or write your own. ;; -;; If you use ange-ftp, browse-url, complete, efs, or w3, it is best -;; to load or autoload them before ffap. If you use ff-paths, load it +;; If you use ange-ftp, browse-url, complete, efs, it is best to load +;; or autoload them before ffap. If you use ff-paths, load it ;; afterwards. Try apropos {C-h a ffap RET} to get a list of the many ;; option variables. In particular, if ffap is slow, try these: ;; @@ -79,7 +79,7 @@ ;; (setq ffap-shell-prompt-regexp nil) ; disable shell prompt stripping ;; (setq ffap-gopher-regexp nil) ; disable gopher bookmark matching ;; -;; ffap uses `browse-url' (if found, else `w3-fetch') to fetch URLs. +;; ffap uses `browse-url' to fetch URLs. ;; For a hairier `ffap-url-fetcher', try ffap-url.el (same ftp site). ;; Also, you can add `ffap-menu-rescan' to various hooks to fontify ;; the file and URL references within a buffer. @@ -97,7 +97,6 @@ ;; * break long menus into multiple panes (like imenu?) ;; * notice node in "(dired)Virtual Dired" (quotes, parentheses, whitespace) ;; * notice "machine.dom blah blah blah dir/file" (how?) -;; * as w3 becomes standard, rewrite to rely more on its functions ;; * regexp options for ffap-string-at-point, like font-lock (MCOOK) ;; * v19: could replace `ffap-locate-file' with a quieter `locate-library' ;; * handle "$(VAR)" in Makefiles @@ -1339,30 +1338,25 @@ Assumes the buffer has not changed." ;; Older: (apply 'copy-region-as-kill ffap-string-at-point-region) (message "Copied to kill ring: %s" str)))) -;; External. -(declare-function w3-view-this-url "ext:w3" (&optional no-show)) - ;;;###autoload (defun ffap-url-at-point () "Return URL from around point if it exists, or nil. Sets the variable `ffap-string-at-point-region' to the bounds of URL, if any." (when ffap-url-regexp - (or (and (eq major-mode 'w3-mode) ; In a w3 buffer button? - (w3-view-this-url t)) - (let ((thing-at-point-beginning-of-url-regexp ffap-url-regexp) - (thing-at-point-default-mail-uri-scheme ffap-foo-at-bar-prefix) - val) - (setq val (thing-at-point-url-at-point ffap-lax-url - (if (use-region-p) - (cons (region-beginning) - (region-end))))) - (if val - (let ((bounds (thing-at-point-bounds-of-url-at-point - ffap-lax-url))) - (setq ffap-string-at-point-region - (list (car bounds) (cdr bounds))))) - val)))) + (let ((thing-at-point-beginning-of-url-regexp ffap-url-regexp) + (thing-at-point-default-mail-uri-scheme ffap-foo-at-bar-prefix) + val) + (setq val (thing-at-point-url-at-point ffap-lax-url + (if (use-region-p) + (cons (region-beginning) + (region-end))))) + (if val + (let ((bounds (thing-at-point-bounds-of-url-at-point + ffap-lax-url))) + (setq ffap-string-at-point-region + (list (car bounds) (cdr bounds))))) + val))) (defvar ffap-gopher-regexp "\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *" @@ -1503,12 +1497,7 @@ which may actually result in an URL rather than a filename." ((and (eq major-mode 'internal-ange-ftp-mode) (string-match "^\\*ftp \\(.*\\)@\\(.*\\)\\*$" (buffer-name))) - (concat "/" (substring (buffer-name) 5 -1) ":")) - ;; This is too often a bad idea: - ;;((and (eq major-mode 'w3-mode) - ;; (stringp url-current-server)) - ;; (host-to-ange-path url-current-server)) - ))) + (concat "/" (substring (buffer-name) 5 -1) ":"))))) (and remote-dir (or (and (string-match "\\`\\(/?~?ftp\\)/" name) @@ -1882,7 +1871,7 @@ Return value: ;;; ffap-other-*, ffap-read-only-*, ffap-alternate-* commands: ;; There could be a real `ffap-noselect' function, but we would need -;; at least two new user variables, and there is no w3-fetch-noselect. +;; at least two new user variables. ;; So instead, we just fake it with a slow save-window-excursion. (defun ffap-other-window (filename) |