+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.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 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."
(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."
;; --- 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.
(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