From: Glenn Morris Date: Tue, 14 Dec 2010 08:06:18 +0000 (-0800) Subject: Tidy up some js.el requires. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~278^2~113 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ab274982aae89487894bb90becf53f6d29e35ab3;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9642b36acee..083b1b0f924 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2010-12-14 Glenn Morris + * 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. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index fdb11aa7d88..dffbb7726fe 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -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 @@ marker." (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))