diff options
Diffstat (limited to 'lisp/textmodes/bibtex.el')
-rw-r--r-- | lisp/textmodes/bibtex.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 191ceedf041..e49d7549776 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1,8 +1,6 @@ ;;; bibtex.el --- BibTeX mode for GNU Emacs -;; Copyright (C) 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994-1999, 2001-2011 Free Software Foundation, Inc. ;; Author: Stefan Schoef <schoef@offis.uni-oldenburg.de> ;; Bengt Martensson <bengt@mathematik.uni-Bremen.de> @@ -2095,7 +2093,7 @@ Formats current entry according to variable `bibtex-entry-format'." ;; if match not at left subfield boundary... (if (< (1+ (nth 1 bounds)) (match-beginning 0)) (insert (bibtex-field-right-delimiter) " # ") - (delete-backward-char 1)))))))) + (delete-char -1)))))))) ;; use book title of crossref'd entry (if (and (memq 'inherit-booktitle format) @@ -3028,12 +3026,14 @@ if that value is non-nil. ;; brace-delimited ones ) nil - (font-lock-syntactic-keywords . bibtex-font-lock-syntactic-keywords) (font-lock-extra-managed-props . (category)) (font-lock-mark-block-function . (lambda () (set-mark (bibtex-end-of-entry)) (bibtex-beginning-of-entry))))) + (set (make-local-variable 'syntax-propertize-function) + (syntax-propertize-via-font-lock + bibtex-font-lock-syntactic-keywords)) (setq imenu-generic-expression (list (list nil bibtex-entry-head bibtex-key-in-head)) imenu-case-fold-search t) @@ -4313,8 +4313,7 @@ If optional arg MOVE is non-nil move point to end of field." (goto-char (bibtex-start-of-field bounds)) (forward-char) ; leading comma (bibtex-delete-whitespace) - (open-line 1) - (forward-char) + (insert "\n") (indent-to-column (+ bibtex-entry-offset bibtex-field-indentation)) (re-search-forward "[ \t\n]*=" end-field) @@ -4352,7 +4351,6 @@ column `bibtex-text-indentation' and continuation lines start here, too. If `bibtex-align-at-equal-sign' is non-nil, align equal signs, too." (interactive "*") (let ((pnt (copy-marker (point))) - (end (copy-marker (bibtex-end-of-entry))) (beg (bibtex-beginning-of-entry)) ; move point bounds) (bibtex-delete-whitespace) @@ -4364,8 +4362,7 @@ If `bibtex-align-at-equal-sign' is non-nil, align equal signs, too." (forward-char)) (skip-chars-backward " \t\n") (bibtex-delete-whitespace) - (open-line 1) - (forward-char) + (insert "\n") (indent-to-column bibtex-entry-offset) (goto-char pnt))) |