]> git.eshelyaron.com Git - emacs.git/commitdiff
browse-url.el trivia.
authorGlenn Morris <rgm@gnu.org>
Sat, 9 Oct 2010 00:52:12 +0000 (17:52 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 9 Oct 2010 00:52:12 +0000 (17:52 -0700)
* 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.

lisp/ChangeLog
lisp/net/browse-url.el

index 95810cb4d42128c2141546d7e4617f1811cb9774..c7bdda088f28f543a820a5566435ffdaa0fd806d 100644 (file)
@@ -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.
index 5f50ddc096c834e89c4a87172cb34a0502954563..45dde6dba3c39f4cbe083fed44f5d86a2d9bfaa3 100644 (file)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; 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