aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1999-06-27 23:34:54 +0000
committerKarl Heuer1999-06-27 23:34:54 +0000
commit263230fae969d185a7499e2a7c77f9aecbe778bc (patch)
treea2d5eaf1a6c4fab8f46e81ff6c4c202d58601d30
parentc8aca7d15194ce1f1344e338866c2690c737141b (diff)
downloademacs-263230fae969d185a7499e2a7c77f9aecbe778bc.tar.gz
emacs-263230fae969d185a7499e2a7c77f9aecbe778bc.zip
(bibtex-mode): `font-lock-mark-block-function'
should only be set for the bibtex buffer.
-rw-r--r--lisp/textmodes/bibtex.el48
1 files changed, 29 insertions, 19 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index aae5d2cc3ae..357e5e75e66 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -2573,27 +2573,37 @@ non-nil.
2573 bibtex-parse-keys-timeout t 2573 bibtex-parse-keys-timeout t
2574 'bibtex-parse-buffers-stealthily))) 2574 'bibtex-parse-buffers-stealthily)))
2575 ;; Install stealthy parse function if not already installed 2575 ;; Install stealthy parse function if not already installed
2576 (set (make-local-variable 'paragraph-start) "[ \f\n\t]*$") 2576 (make-local-variable 'paragraph-start)
2577 (set (make-local-variable 'comment-start) bibtex-comment-start) 2577 (setq paragraph-start "[ \f\n\t]*$")
2578 (set (make-local-variable 'comment-start-skip) bibtex-comment-start) 2578 (make-local-variable 'comment-start)
2579 (set (make-local-variable 'comment-column) 0) 2579 (setq comment-start bibtex-comment-start)
2580 (set (make-local-variable 'normal-auto-fill-function) 2580 (make-local-variable 'comment-start-skip)
2581 'bibtex-do-auto-fill) 2581 (setq comment-start-skip bibtex-comment-start)
2582 (set (make-local-variable 'font-lock-defaults) 2582 (make-local-variable 'comment-column)
2583 '(bibtex-font-lock-keywords 2583 (setq comment-column 0)
2584 nil t ((?$ . "\"") 2584 (make-local-variable 'defun-prompt-regexp)
2585 ;; Mathematical expressions should be fontified as strings 2585 (setq defun-prompt-regexp "^@[a-zA-Z0-9]+")
2586 (?\" . ".") 2586 (make-local-variable 'outline-regexp)
2587 ;; Quotes are field delimiters and quote-delimited 2587 (setq outline-regexp "@")
2588 ;; entries should be fontified in the same way as 2588 (make-local-variable 'normal-auto-fill-function)
2589 ;; brace-delimited ones 2589 (setq normal-auto-fill-function 'bibtex-do-auto-fill)
2590 ))) 2590 (make-local-variable 'font-lock-defaults)
2591 (setq font-lock-defaults
2592 '(bibtex-font-lock-keywords
2593 nil t ((?$ . "\"")
2594 ;; Mathematical expressions should be fontified as strings
2595 (?\" . ".")
2596 ;; Quotes are field delimiters and quote-delimited
2597 ;; entries should be fontified in the same way as
2598 ;; brace-delimited ones
2599 )))
2600 (make-local-variable 'font-lock-mark-block-function)
2591 (setq font-lock-mark-block-function 2601 (setq font-lock-mark-block-function
2592 (lambda () 2602 (lambda ()
2593 (set-mark (bibtex-end-of-entry)) 2603 (set-mark (bibtex-end-of-entry))
2594 (bibtex-beginning-of-entry))) 2604 (bibtex-beginning-of-entry)))
2595 (setq imenu-generic-expression 2605 (setq imenu-generic-expression
2596 (list (list nil bibtex-reference-head bibtex-key-in-head))) 2606 (list (list nil bibtex-reference-head bibtex-key-in-head)))
2597 (setq imenu-case-fold-search t) 2607 (setq imenu-case-fold-search t)
2598 ;; XEmacs needs easy-menu-add, Emacs does not care 2608 ;; XEmacs needs easy-menu-add, Emacs does not care
2599 (easy-menu-add bibtex-edit-menu) 2609 (easy-menu-add bibtex-edit-menu)