Subject: Re: bug#33939: 26.1; Avoid loading libs eagerly or unnecessarily in mhtml-mode/sgml-mode

From: Leo Liu <[email-masked]>
Date: Tue, 08 Jan 2019 06:43:20 +0800

On 2019-01-07 21:56 +0200, Eli Zaretskii wrote:
> This is OK for the emacs-26 branch, thanks.

I was bored enough to check if js.el had any low-hanging fruits and
found another one. js.el uses nothing from thingatpt since
forward-symbol now lives in subr.el. Should I go ahead and put the
following patch on emacs-26?

Sorry to discover these issues one after another. The situation is worse
than I imagined.

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 65ffb0e0..1e2c3411 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -48,10 +48,9 @@
 
 (require 'cc-mode)
 (require 'newcomment)
-(require 'thingatpt)                    ; forward-symbol etc
 (require 'imenu)
 (require 'moz nil t)
-(require 'json nil t)
+(require 'json)
 (require 'sgml-mode)
 (require 'prog-mode)