Mercurial > emacs
comparison lisp/textmodes/reftex.el @ 46928:cbd08432d202
* reftex.el (reftex-mode): Create special syntax tables.
(reftex-syntax-table): Set a default in case this is being used
outside a LaTeX file.
(reftex-syntax-table-for-bib): Set a default in case this is being used
outside a LaTeX file.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Sat, 17 Aug 2002 09:21:19 +0000 |
parents | 7af0f250bfd0 |
children | 11e08f9901ea |
comparison
equal
deleted
inserted
replaced
46927:e1aab27b11be | 46928:cbd08432d202 |
---|---|
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 | 317 (unless reftex-syntax-table |
319 (setq reftex-syntax-table (copy-syntax-table (syntax-table))) | 318 (setq reftex-syntax-table (copy-syntax-table)) |
320 (modify-syntax-entry ?\( "." reftex-syntax-table) | 319 (modify-syntax-entry ?\( "." reftex-syntax-table) |
321 (modify-syntax-entry ?\) "." reftex-syntax-table)) | 320 (modify-syntax-entry ?\) "." reftex-syntax-table)) |
322 | 321 |
323 (unless reftex-syntax-table-for-bib | 322 (unless reftex-syntax-table-for-bib |
324 (setq reftex-syntax-table-for-bib (copy-syntax-table reftex-syntax-table)) | 323 (setq reftex-syntax-table-for-bib |
324 (copy-syntax-table reftex-syntax-table)) | |
325 (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) | 325 (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) |
326 (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) | 327 (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) |
328 (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)) | 328 (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)) |
329 | 329 |
379 (reftex-plug-into-AUCTeX)) | 379 (reftex-plug-into-AUCTeX)) |
380 (unless (get 'reftex-auto-view-crossref 'initialized) | 380 (unless (get 'reftex-auto-view-crossref 'initialized) |
381 (and reftex-auto-view-crossref | 381 (and reftex-auto-view-crossref |
382 (reftex-toggle-auto-view-crossref)) | 382 (reftex-toggle-auto-view-crossref)) |
383 (put 'reftex-auto-view-crossref 'initialized t)) | 383 (put 'reftex-auto-view-crossref 'initialized t)) |
384 | |
385 ;; Prepare the special syntax tables. | |
386 (setq reftex-syntax-table (copy-syntax-table (syntax-table))) | |
387 (modify-syntax-entry ?\( "." reftex-syntax-table) | |
388 (modify-syntax-entry ?\) "." reftex-syntax-table) | |
389 | |
390 (setq reftex-syntax-table-for-bib | |
391 (copy-syntax-table reftex-syntax-table)) | |
392 (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) | |
393 (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib) | |
394 (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) | |
395 (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib) | |
396 | |
384 (run-hooks 'reftex-mode-hook)) | 397 (run-hooks 'reftex-mode-hook)) |
385 ;; Mode was turned off | 398 ;; Mode was turned off |
386 (easy-menu-remove reftex-mode-menu))) | 399 (easy-menu-remove reftex-mode-menu))) |
387 | 400 |
388 (if (fboundp 'add-minor-mode) | 401 (if (fboundp 'add-minor-mode) |