Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!mit-eddie!uw-beaver!uw-june!randy From: randy@uw-june.UUCP (William Randy Day) Newsgroups: comp.emacs Subject: Major mode loading time: dependent on file length? Message-ID: <2552@uw-june.UUCP> Date: Thu, 21-May-87 16:14:13 EDT Article-I.D.: uw-june.2552 Posted: Thu May 21 16:14:13 1987 Date-Received: Sat, 23-May-87 12:13:02 EDT Organization: U of Washington, CSCI, Seattle Lines: 31 I have a major mode that's invoked by the command bibTeX-mode. It does nothing but invoke tex-mode, define a few keys, local-unset a few key, and setq a few variables. However, I have noticed that the execution of this bibTeX-mode command (which is not byte compiled) varies tremendously with the size of the file in the buffer where I execute the bibTeX-mode command. Executing the command in an empty buffer is instantanious. Executing the command in a buffer with 12k of text takes several minutes. Any ideas why the major mode execution times vary so much? I'm using GNU emacs, version 18.32. The actual code for bibTeX-mode is included below: (defun bibTeX-mode () "bibTeX-mode changes the mode to a style suitable for bibTeX files." (interactive) (tex-mode) (define-key TeX-mode-map "\en" 'next-field) (define-key TeX-mode-map "\ej" 'justify-field) (define-key TeX-mode-map "\e]" 'next-key) (local-unset-key "\"") (setq mode-name "BibTeX-mode") (setq Key-Search-String "") (novalue) ) Thanks, Randy Day. Internet (ARPA): randy@dbnet.cs.washington.edu CSNET: randy%washington@relay.cs.net UUCP: {decvax|ihnp4}!uw-beaver!uw-june!randy