[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
w3m-load.el byte compile
- From: Kevin Ryde <user42@xxxxxxxxxx>
- Date: Tue, 13 Aug 2013 11:38:56 +1000
- X-ml-name: emacs-w3m
- X-mail-count: 12114
This is an idea to byte compile w3m-load.el, so that its docstrings are
(Bnot loaded into memory unless or until they're viewed (which may be
(BI suspect generate-file-autoloads puts no-byte-compile for the benefit
(Bof emacs' own loaddefs which are dumped and therefore don't need byte
(Bcompiling. For everyone else byte compiling saves some memory on medium
(Bto large docstrings.
(B2013-08-13 Kevin Ryde <user42@xxxxxxxxxx>
(B * w3mhack.el (w3mhack-module-list): Remove w3mhack-load-file from the
(B modules not to be byte compiled, so that it is byte compiled.
(B (w3mhack-generate-load-file): Remove no-byte-compile from w3m-load.el.
--- w3mhack.el.~1.176.~ 2013-08-13 11:20:15.000000000 +1000
(B+++ w3mhack.el 2013-08-13 11:29:54.000000000 +1000
(B@@ -289,7 +289,7 @@
(B (version-specific-modules '("w3m-ems.el" "w3m-xmas.el"))
(B (ignores;; modules not to be byte-compiled.
(B- (list "w3mhack.el" "w3m-setup.el" w3mhack-load-file)
(B+ (list "w3mhack.el" "w3m-setup.el")
(B (delete (if (featurep 'xemacs) "w3m-xmas.el" "w3m-ems.el")
(B (copy-sequence version-specific-modules))))
(B (shimbun-dir (file-name-as-directory shimbun-module-directory))
(B@@ -979,6 +979,14 @@
(B (goto-char (point-max))
(B (insert (if (featurep 'xemacs) "\C-l\n" "")
(B ";;; " w3mhack-load-file " ends here\n"))
(B+ ;; Delete "no-byte-compile" so that w3m-load.el will byte compile.
(B+ ;; Byte compiling gives dynamic docstrings which means they aren't
(B+ ;; loaded into memory unless or until required.
(B+ (goto-char (point-min))
(B+ (when (re-search-forward "^;; no-byte-compile: t\n" nil t)
(B+ (delete-region (match-beginning 0) (match-end 0)))
(B (defun w3mhack-generate-xemacs-load-file (file)