summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parsebib.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/parsebib.el b/parsebib.el
index 33e75a3..d66b39a 100644
--- a/parsebib.el
+++ b/parsebib.el
@@ -151,8 +151,14 @@ combination, the field inherits from the same-name field in the
cross-referenced entry. If no inheritance should take place, the
target field is set to the symbol `none'.")
-(defconst parsebib--bibtex-identifier "[^^\"@\\&$#%',={}() \t\n\f]+" "Regexp describing a licit BibTeX identifier.")
-(defconst parsebib--key-regexp "[^^\"@\\&$#%',={} \t\n\f]+" "Regexp describing a licit key.")
+;; Regexes describing BibTeX identifiers and keys. Note that while $ ^ & are
+;; valid in BibTeX keys, they may nonetheless be problematic, because they are
+;; special for TeX. The difference between `parsebib--bibtex-identifier' and
+;; `parsebib--key-regexp' are the parentheses (), which are valid in keys. It may in
+;; fact not be necessary (or desirable) to distinguish the two, but until
+;; someone complains, I'll keep it this way.
+(defconst parsebib--bibtex-identifier "[^\"@\\#%',={}() \t\n\f]+" "Regexp describing a licit BibTeX identifier.")
+(defconst parsebib--key-regexp "[^\"@\\#%',={} \t\n\f]+" "Regexp describing a licit key.")
(defconst parsebib--entry-start "^[ \t]*@" "Regexp describing the start of an entry.")
;; Emacs 24.3 compatibility code.