changeset 110860:1b90af51024f

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.
author Glenn Morris <rgm@gnu.org>
date Fri, 08 Oct 2010 17:52:12 -0700
parents 7aa4fdb60d57
children ca28093784c4
files lisp/ChangeLog lisp/net/browse-url.el
diffstat 2 files changed, 17 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Oct 08 23:55:33 2010 +0000
+++ b/lisp/ChangeLog	Fri Oct 08 17:52:12 2010 -0700
@@ -1,3 +1,11 @@
+2010-10-09  Glenn Morris  <rgm@gnu.org>
+
+	* 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  <schwab@linux-m68k.org>
 
 	* net/browse-url.el (browse-url-xdg-open): Remove use of /bin/sh.
--- a/lisp/net/browse-url.el	Fri Oct 08 23:55:33 2010 +0000
+++ b/lisp/net/browse-url.el	Fri Oct 08 17:52:12 2010 -0700
@@ -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 @@
 
 (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 @@
 
 ;; --- 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 @@
 	 (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