diff options
| author | Glenn Morris | 2010-12-14 00:06:18 -0800 |
|---|---|---|
| committer | Glenn Morris | 2010-12-14 00:06:18 -0800 |
| commit | ab274982aae89487894bb90becf53f6d29e35ab3 (patch) | |
| tree | a31f6e855b1e0dfcf26d9b83fbf6641e58ee4444 | |
| parent | e758216c60d9c7f6040378829ed26b8794f66e34 (diff) | |
| download | emacs-ab274982aae89487894bb90becf53f6d29e35ab3.tar.gz emacs-ab274982aae89487894bb90becf53f6d29e35ab3.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/progmodes/js.el | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9642b36acee..083b1b0f924 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2010-12-14 Glenn Morris <rgm@gnu.org> | 1 | 2010-12-14 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/js.el: Doc't require font-lock, etags, or easymenu. | ||
| 4 | (find-tag-marker-ring): Declare. | ||
| 5 | (js-find-symbol): Require etags. | ||
| 6 | |||
| 3 | * mail/sendmail.el: Don't require rmail or mailalias when compiling. | 7 | * mail/sendmail.el: Don't require rmail or mailalias when compiling. |
| 4 | Require mail-utils. | 8 | Require mail-utils. |
| 5 | (mail-alias-file): Don't autoload. Doc fix. | 9 | (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 @@ | |||
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | (require 'cc-mode) | 49 | (require 'cc-mode) |
| 50 | (require 'font-lock) | ||
| 51 | (require 'newcomment) | 50 | (require 'newcomment) |
| 51 | (require 'thingatpt) ; forward-symbol etc | ||
| 52 | (require 'imenu) | 52 | (require 'imenu) |
| 53 | (require 'etags) | ||
| 54 | (require 'thingatpt) | ||
| 55 | (require 'easymenu) | ||
| 56 | (require 'moz nil t) | 53 | (require 'moz nil t) |
| 57 | (require 'json nil t) | 54 | (require 'json nil t) |
| 58 | 55 | ||
| @@ -2171,12 +2168,15 @@ marker." | |||
| 2171 | (setf (car bounds) (point)))) | 2168 | (setf (car bounds) (point)))) |
| 2172 | (buffer-substring (car bounds) (cdr bounds))))) | 2169 | (buffer-substring (car bounds) (cdr bounds))))) |
| 2173 | 2170 | ||
| 2171 | (defvar find-tag-marker-ring) ; etags | ||
| 2172 | |||
| 2174 | (defun js-find-symbol (&optional arg) | 2173 | (defun js-find-symbol (&optional arg) |
| 2175 | "Read a JavaScript symbol and jump to it. | 2174 | "Read a JavaScript symbol and jump to it. |
| 2176 | With a prefix argument, restrict symbols to those from the | 2175 | With a prefix argument, restrict symbols to those from the |
| 2177 | current buffer. Pushes a mark onto the tag ring just like | 2176 | current buffer. Pushes a mark onto the tag ring just like |
| 2178 | `find-tag'." | 2177 | `find-tag'." |
| 2179 | (interactive "P") | 2178 | (interactive "P") |
| 2179 | (require 'etags) | ||
| 2180 | (let (symbols marker) | 2180 | (let (symbols marker) |
| 2181 | (if (not arg) | 2181 | (if (not arg) |
| 2182 | (setq symbols (js--get-all-known-symbols)) | 2182 | (setq symbols (js--get-all-known-symbols)) |