diff options
author | Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 2009-12-06 05:03:26 +0000 |
---|---|---|
committer | Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 2009-12-06 05:03:26 +0000 |
commit | 4106334caca419d53c525148f4abc1025dc387e5 (patch) | |
tree | e6b4f1f8584f01b870750e15745669bf629750ff | |
parent | 365b9a62960f67ae00d2ff2b987fbca23004dea3 (diff) | |
download | emacs-4106334caca419d53c525148f4abc1025dc387e5.tar.gz |
(bibtex-enclosing-field): Exclude entry delimiter if it is at the end
of the current line.
(bibtex-generate-url-list): Fix docstring.
-rw-r--r-- | lisp/textmodes/bibtex.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index dba40f10559..b85d63e4dff 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -909,7 +909,7 @@ If `bibtex-expand-strings' is non-nil, BibTeX strings are expanded for generating the URL. Set this variable before loading BibTeX mode. -The following is a complex example, see http://link.aps.org/linkfaq.html. +The following is a complex example, see URL `http://link.aps.org/'. (((\"journal\" . \"\\\\=<\\(PR[ABCDEL]?\\|RMP\\)\\\\=>\") \"http://link.aps.org/abstract/%s/v%s/p%s\" @@ -1836,13 +1836,16 @@ are ignored. Return point" "Search for BibTeX field enclosing point. For `bibtex-mode''s internal algorithms, a field begins at the comma following the preceding field. Usually, this is not what the user expects. -Thus if COMMA is non-nil, the \"current field\" includes the terminating comma. +Thus if COMMA is non-nil, the \"current field\" includes the terminating comma +as well as the entry delimiter if it appears on the same line. Unless NOERR is non-nil, signal an error if no enclosing field is found. On success return bounds, nil otherwise. Do not move point." (save-excursion (when comma (end-of-line) (skip-chars-backward " \t") + ;; Ignore entry delimiter and comma at end of line. + (if (memq (preceding-char) '(?} ?\))) (forward-char -1)) (if (= (preceding-char) ?,) (forward-char -1))) (let ((bounds (bibtex-search-backward-field bibtex-field-name t))) |