changeset 111962:d53efc3630ba

Tidy up some js.el requires. * lisp/progmodes/js.el: Doc't require font-lock, etags, or easymenu. (find-tag-marker-ring): Declare. (js-find-symbol): Require etags.
author Glenn Morris <rgm@gnu.org>
date Tue, 14 Dec 2010 00:06:18 -0800
parents 0604fca5939a
children 44431106d60d
files lisp/ChangeLog lisp/progmodes/js.el
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Dec 13 21:01:08 2010 -0800
+++ b/lisp/ChangeLog	Tue Dec 14 00:06:18 2010 -0800
@@ -1,5 +1,9 @@
 2010-12-14  Glenn Morris  <rgm@gnu.org>
 
+	* progmodes/js.el: Doc't require font-lock, etags, or easymenu.
+	(find-tag-marker-ring): Declare.
+	(js-find-symbol): Require etags.
+
 	* mail/sendmail.el: Don't require rmail or mailalias when compiling.
 	Require mail-utils.
 	(mail-alias-file): Don't autoload.  Doc fix.
--- a/lisp/progmodes/js.el	Mon Dec 13 21:01:08 2010 -0800
+++ b/lisp/progmodes/js.el	Tue Dec 14 00:06:18 2010 -0800
@@ -47,12 +47,9 @@
 
 
 (require 'cc-mode)
-(require 'font-lock)
 (require 'newcomment)
+(require 'thingatpt)                    ; forward-symbol etc
 (require 'imenu)
-(require 'etags)
-(require 'thingatpt)
-(require 'easymenu)
 (require 'moz nil t)
 (require 'json nil t)
 
@@ -2171,12 +2168,15 @@
           (setf (car bounds) (point))))
       (buffer-substring (car bounds) (cdr bounds)))))
 
+(defvar find-tag-marker-ring)           ; etags
+
 (defun js-find-symbol (&optional arg)
   "Read a JavaScript symbol and jump to it.
 With a prefix argument, restrict symbols to those from the
 current buffer.  Pushes a mark onto the tag ring just like
 `find-tag'."
   (interactive "P")
+  (require 'etags)
   (let (symbols marker)
     (if (not arg)
         (setq symbols (js--get-all-known-symbols))