emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/textmodes bibtex.el


From: Roland Winkler
Subject: [Emacs-diffs] emacs/lisp/textmodes bibtex.el
Date: Sun, 06 Dec 2009 05:03:27 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Roland Winkler <winkler>        09/12/06 05:03:27

Modified files:
        lisp/textmodes : bibtex.el 

Log message:
        (bibtex-enclosing-field): Exclude entry delimiter if it is at the end
        of the current line.
        (bibtex-generate-url-list): Fix docstring.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/textmodes/bibtex.el?cvsroot=emacs&r1=1.154&r2=1.155

Patches:
Index: bibtex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/bibtex.el,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -b -r1.154 -r1.155
--- bibtex.el   5 Dec 2009 04:05:37 -0000       1.154
+++ bibtex.el   6 Dec 2009 05:03:26 -0000       1.155
@@ -909,7 +909,7 @@
 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 @@
   "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)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]