Mercurial > emacs
comparison lisp/textmodes/reftex.el @ 46904:7af0f250bfd0
(reftex-mode): Moved creation of special syntax tables to top-level.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Thu, 15 Aug 2002 11:28:50 +0000 |
parents | 060f433ebf11 |
children | cbd08432d202 |
comparison
equal
deleted
inserted
replaced
46903:42b66cce768d | 46904:7af0f250bfd0 |
---|---|
312 | 312 |
313 (defvar reftex-mode-menu nil) | 313 (defvar reftex-mode-menu nil) |
314 (defvar reftex-syntax-table nil) | 314 (defvar reftex-syntax-table nil) |
315 (defvar reftex-syntax-table-for-bib nil) | 315 (defvar reftex-syntax-table-for-bib nil) |
316 | 316 |
317 ;; Prepare the special syntax tables. | |
318 (unless reftex-syntax-table | |
319 (setq reftex-syntax-table (copy-syntax-table (syntax-table))) | |
320 (modify-syntax-entry ?\( "." reftex-syntax-table) | |
321 (modify-syntax-entry ?\) "." reftex-syntax-table)) | |
322 | |
323 (unless reftex-syntax-table-for-bib | |
324 (setq reftex-syntax-table-for-bib (copy-syntax-table reftex-syntax-table)) | |
325 (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) | |
326 (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib) | |
327 (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) | |
328 (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)) | |
329 | |
317 (defvar reftex-auto-view-crossref-timer nil | 330 (defvar reftex-auto-view-crossref-timer nil |
318 "The timer used for auto-view-crossref.") | 331 "The timer used for auto-view-crossref.") |
319 | 332 |
320 ;;;###autoload | 333 ;;;###autoload |
321 (defun turn-on-reftex () | 334 (defun turn-on-reftex () |
366 (reftex-plug-into-AUCTeX)) | 379 (reftex-plug-into-AUCTeX)) |
367 (unless (get 'reftex-auto-view-crossref 'initialized) | 380 (unless (get 'reftex-auto-view-crossref 'initialized) |
368 (and reftex-auto-view-crossref | 381 (and reftex-auto-view-crossref |
369 (reftex-toggle-auto-view-crossref)) | 382 (reftex-toggle-auto-view-crossref)) |
370 (put 'reftex-auto-view-crossref 'initialized t)) | 383 (put 'reftex-auto-view-crossref 'initialized t)) |
371 (unless reftex-syntax-table | |
372 (setq reftex-syntax-table (copy-syntax-table (syntax-table))) | |
373 (modify-syntax-entry ?\( "." reftex-syntax-table) | |
374 (modify-syntax-entry ?\) "." reftex-syntax-table)) | |
375 (unless reftex-syntax-table-for-bib | |
376 (setq reftex-syntax-table-for-bib (copy-syntax-table reftex-syntax-table)) | |
377 (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) | |
378 (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib) | |
379 (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) | |
380 (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)) | |
381 (run-hooks 'reftex-mode-hook)) | 384 (run-hooks 'reftex-mode-hook)) |
382 ;; Mode was turned off | 385 ;; Mode was turned off |
383 (easy-menu-remove reftex-mode-menu))) | 386 (easy-menu-remove reftex-mode-menu))) |
384 | 387 |
385 (if (fboundp 'add-minor-mode) | 388 (if (fboundp 'add-minor-mode) |