Re: Rough start... (emacs byte-compiling)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2004-08-31 at 11:20, Paul W. Frields wrote:
> On Tue, 2004-08-31 at 13:30, Dave Pawson wrote:
> > > Well, I'll be darned. It really is faster loading!
> > 
> > The other trick, once documents become large, is to 
> > 'compile' the dtd producing xyz.ced, which psgml then
> > uses, and it 'reads' the dtd so much quicker.
> >   Probably not noticable until the file size is significant;
> > but well worth doing.
> 
> Ah, now *that* I've done before. Since my markup of Strunk's book was in
> separate chapter files, that step was invaluable.

That's SOP for internal Red Hat guides, which are many multiple
chapters.  So much so that one developer I worked with on a doc got so
tired of doing M-x sgml-load-dtd each time that he wrote this bit for
our .emacs files; it assigns C-c d to the task of loading a .ced file
(from the $PWD only):

;; Vadim Nasardinov's <vadimn@xxxxxxxxxx> wrote this to save some
;; keystrokes when loading DTDs; this presumes the existence of only
;; one .ced file.

(defun rh-sgml-load-dtd ()
  "Load the .ced file from the current directory."

  (interactive)

  (let* ((files (directory-files "." nil "\\.ced$"))
         (ced-file (car files)))
    (if (or (not ced-file)
            (cdr files))
        (error (format "Expected one .ced file, but found: %S" files))
      (progn
          (message (format "Loading the DTD from %s..." ced-file))
          (sgml-load-dtd (car files))))))

(add-hook
 'sgml-mode-hook
 (lambda ()
   (local-set-key "\C-cd" 'rh-sgml-load-dtd)))


-- 
Karsten Wade, RHCE, Tech Writer
a lemon is just a melon in disguise
http://people.redhat.com/kwade/
gpg fingerprint: 2680 DBFD D968 3141 0115  5F1B D992 0E06 AD0E 0C41



[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Red Hat 9]     [Yosemite News]     [KDE Users]

  Powered by Linux