[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find-grep-dired vs. browse-url-of-dired-file
From: |
Kevin Rodgers |
Subject: |
Re: find-grep-dired vs. browse-url-of-dired-file |
Date: |
Fri, 10 Dec 2004 10:59:29 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
Kevin Rodgers wrote:
> doesn't begin with a slash. All that's needed to fix that is for
> browse-url-of-file to call expand-file-name first:
>
> *** emacs-21.3/lisp/net/browse-url.el~ Wed Dec 4 05:38:27 2002
> --- emacs-21.3/lisp/net/browse-url.el Fri Dec 10 10:38:04 2004
> ***************
> *** 535,541 ****
> `browse-url-file-url'. Pass the URL to a browser using the
> `browse-url' function then run `browse-url-of-file-hook'."
> (interactive)
> ! (or file
> (setq file (buffer-file-name))
> (error "Current buffer has no file"))
> (let ((buf (get-file-buffer file)))
> --- 535,542 ----
> `browse-url-file-url'. Pass the URL to a browser using the
> `browse-url' function then run `browse-url-of-file-hook'."
> (interactive)
> ! (or (and file
> ! (setq file (expand-file-name file)))
> (setq file (buffer-file-name))
> (error "Current buffer has no file"))
> (let ((buf (get-file-buffer file)))
Actually, I think it'd be clearer to write that conditional as:
(cond (file (setq file (expand-file-name file)))
((setq file (buffer-file-name)))
(t (error "Current buffer has no file")))
--
Kevin Rodgers