From: Glenn Morris Date: Sat, 9 Oct 2010 00:52:12 +0000 (-0700) Subject: browse-url.el trivia. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~46^2~120 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1ab97d068f2b8630b0e036510dd8e4b00faf8e4;p=emacs.git browse-url.el trivia. * lisp/net/browse-url.el: Don't require thingatpt, term, dired, executable, or w3-auto when compiling. (dired-get-filename, term-char-mode, term-send-down, term-send-string): Declare. (browse-url-text-emacs): Require term. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95810cb4d42..c7bdda088f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-10-09 Glenn Morris + + * net/browse-url.el: Don't require thingatpt, term, dired, + executable, or w3-auto when compiling. + (dired-get-filename, term-char-mode, term-send-down, term-send-string): + Declare. + (browse-url-text-emacs): Require term. + 2010-10-08 Andreas Schwab * net/browse-url.el (browse-url-xdg-open): Remove use of /bin/sh. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 5f50ddc096c..45dde6dba3c 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -205,12 +205,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Variables -(eval-when-compile (require 'cl) - (require 'thingatpt) - (require 'term) - (require 'dired) - (require 'executable) - (require 'w3-auto nil t)) +(eval-when-compile (require 'cl)) (defgroup browse-url nil "Use a web browser to look at a URL." @@ -756,6 +751,9 @@ narrowed." (add-hook 'kill-buffer-hook 'browse-url-delete-temp-file) +(declare-function dired-get-filename "dired" + (&optional localp no-error-if-not-filep)) + ;;;###autoload (defun browse-url-of-dired-file () "In Dired, ask a WWW browser to display the file named on this line." @@ -1384,6 +1382,10 @@ with possible additional arguments `browse-url-xterm-args'." ;; --- Lynx in an Emacs "term" window --- +(declare-function term-char-mode "term" ()) +(declare-function term-send-down "term" ()) +(declare-function term-send-string "term" (proc str)) + ;;;###autoload (defun browse-url-text-emacs (url &optional new-buffer) "Ask a text browser to load URL. @@ -1404,6 +1406,7 @@ used instead of `browse-url-new-window-flag'." (buf (get-buffer "*text browser*")) (proc (and buf (get-buffer-process buf))) (n browse-url-text-input-attempts)) + (require 'term) (if (and (browse-url-maybe-new-window new-buffer) buf) ;; Rename away the OLD buffer. This isn't very polite, but ;; term insists on working in a buffer named *lynx* and would