[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: M's meaning changed



In [emacs-w3m : No.12242] jidanni@xxxxxxxxxxx wrote:
> But now when on top of a URL, C-x C-f (ffap) is acting like C-u C-x C-f,
> getting the URL with firefox instead of emacs-w3m...

(defun my-ffap (&optional filename) ;PJ Weisberg
  (interactive)
  (let ((ffap-url-fetcher (if current-prefix-arg
                              #'browse-url-firefox
                            ffap-url-fetcher))
        (current-prefix-arg nil))
    (find-file-at-point filename)))
(global-set-key "\C-x\C-f" 'my-ffap)

Because `ffap-url-fetcher' defaults to `browse-url' that invokes
`browse-url-firefox' in your system now.  If you want it to run
emacs-w3m, try this:

(setq ffap-url-fetcher 'w3m-browse-url)

Otherwise:

  (let ((ffap-url-fetcher (if current-prefix-arg
                              #'browse-url-firefox
                            #'w3m-browse-url))