From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Steve Petersen Newsgroups: gmane.emacs.help Subject: Re: syntax highlighting / font lock for latex in emacs 21 Date: Thu, 13 Feb 2003 17:02:00 -0500 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E4C15D8.9040604@umich.edu> References: <3E4C0DE0.7010104@umich.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1045174744 8749 80.91.224.249 (13 Feb 2003 22:19:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2003 22:19:04 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jRh7-0002Gj-00 for ; Thu, 13 Feb 2003 23:19:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jRib-00075a-01 for gnu-help-gnu-emacs@m.gmane.org; Thu, 13 Feb 2003 17:20:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsxfer.eecs.umich.edu!news.itd.umich.edu!not-for-mail User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help Original-Lines: 121 Original-NNTP-Posting-Host: 207.75.179.119 Original-X-Trace: news.itd.umich.edu 1045173768 207.75.179.119 (Thu, 13 Feb 2003 17:02:48 EST) Original-NNTP-Posting-Date: Thu, 13 Feb 2003 17:02:48 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:110156 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6659 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6659 Sorry. As always seems to happen, I figured it out not after the hour or so scouring the web, but instead only moments after actually posting somewhere and bugging people. I've updated auctex using an rpm and everything suddenly works like a charm, though once again I have little understanding as to why. Oh, except the colors are kinda ugly! But I expect that can be fixed later, *after* the paper is written. Thanks anyway, Steve Steve Petersen wrote: > > Hey folks, > > I just upgraded to RedHat 8.0, and with it came emacs 21.2.1. I'm using > the same old .emacs file and such. But for some reason, latex files > will not automatically fontify (though emacs does go into LaTeX mode, > and global-font-lock is on). When I force fontification using M-g M-g, > only comments get fontified--not LaTeX commands, etc. > > I'm supposed to be writing a paper and this is so disconcerting... > please help! I've attached my .emacs file, in case that helps. > > Thanks in advance, > Steve > > > ------------------------------------------------------------------------ > > ; rem these out for non-ifs emacs > ; (define-key global-map "\C-x?" 'help-command) > ; (define-key global-map "\C-h" 'delete-backward-char) > > (setq-default abbrev-mode t) > (read-abbrev-file "~/.abbrev_defs") > (setq save-abbrevs t) > > (setq-default transient-mark-mode t) > > (add-hook 'text-mode-hook 'turn-on-auto-fill) > > (custom-set-variables > '(tex-dvi-view-command "xdvi" t) > '(backup-by-copying t) > '(global-font-lock-mode t nil (font-lock)) > '(tex-default-mode (quote latex-mode) t) > '(font-lock-global-modes t)) > (custom-set-faces) > > ; don't know if this works... > > (require 'tex-site) > (setq outline-minor-mode-prefix "\C-c\C-o") ; Or whatever... > ; might be better "\C-c\C-o" > > ; below from Per Abrahamsen of auc-tex group > (defun turn-on-outline-minor-mode () > (outline-minor-mode 1)) > > (add-hook 'LaTeX-mode-hook 'turn-on-outline-minor-mode) > (add-hook 'emacs-lisp-mode-hook 'turn-on-outline-minor-mode) > (add-hook 'TeXinfo-mode-hook 'turn-on-outline-minor-mode) > > ; will this work? > > ; (load-library "tex-jp.el") > ; apparently not > > ; try this since could also use in regular text > > (add-hook 'text-mode-hook 'turn-on-outline-minor-mode) > > ; > ; this was added to have a local abbrev expansion in LaTeX > ; (see discussion in email 'compnet' folder) > > (define-abbrev-table 'LaTeX-mode-abbrev-table nil) > (add-hook 'LaTeX-mode-hook > (lambda () > (setq local-abbrev-table LaTeX-mode-abbrev-table))) > > ; ; trying to set up xae (for editing xml etc; recommended by emacs > ; ; newsgroups) from installation in directory below > > ; (add-to-list 'load-path (expand-file-name > ; "/usr/share/emacs/20.4/site-lisp/xae-1.0beta6/lisp")) > ; (require 'xae) > > ; ; > ; ; see if this corrects html-loading bug w/ xae (suggested by some guy > ; ; on the xae mailing list in March) > ; ; > > ; (setq auto-mode-alist (cons '("\\.xsl$" . xae-mode) auto-mode-alist)) > ; (setq auto-mode-alist (cons '("\\.htm$" . xae-mode) auto-mode-alist)) > ; (setq auto-mode-alist (cons '("\\.html$" . xae-mode) auto-mode-alist)) > ; (setq auto-mode-alist (cons '("\\.xsd$" . xae-mode) auto-mode-alist)) > ; (setq auto-mode-alist (cons '("\\.hs$" . xae-mode) auto-mode-alist)) > ; (setq auto-mode-alist (cons '("\\.jhm$" . xae-mode) auto-mode-alist)) > > > ; > ; using html-helper-mode temporarily instead of xae above (too > ; confusing and I need to get html going for my class website) > ; > > (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t) > (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) > auto-mode-alist)) > (setq html-helper-do-write-file-hooks t) > (setq html-helper-build-new-buffer t) > (setq html-helper-address-string "Steve Petersen") > > (autoload 'maniac-fill-mode "maniac" nil t) > > (setq outline-regexp "[@\^L]+") > > (global-set-key "\M-]" 'unexpand-abbrev)