diff options
author | Joost Kremers <joostkremers@fastmail.fm> | 2017-03-27 08:36:11 +0200 |
---|---|---|
committer | Joost Kremers <joostkremers@fastmail.fm> | 2017-03-27 08:41:30 +0200 |
commit | fd861a7034e967b675d6ff2762d619359211dcf6 (patch) | |
tree | 0c945107282ac1db17ea2ebd1eab30efc340c3c4 | |
parent | 7e69eb7400cfe65584ed8c8c2954f73f7941aa2e (diff) |
Include braces in return value of parsebib-read-preamble.
-rw-r--r-- | parsebib.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/parsebib.el b/parsebib.el index c1b7226..3f28680 100644 --- a/parsebib.el +++ b/parsebib.el @@ -443,7 +443,8 @@ expansion." (defun parsebib-read-preamble (&optional pos) "Read the @Preamble definition at the line POS is on. -Return the preamble as a string, or nil if none was found. +Return the preamble as a string (including the braces surrounding +the preamble text), or nil if no preamble was found. POS can be a number or a marker. It does not have to be at the beginning of a line, but the @Preamble must start at the @@ -451,9 +452,8 @@ beginning of the line POS is on. If POS is nil, it defaults to point." (when pos (goto-char pos)) (beginning-of-line) - (when (parsebib--looking-at-goto-end (concat parsebib--entry-start "preamble[[:space:]]*[\(\{]")) + (when (parsebib--looking-at-goto-end (concat parsebib--entry-start "\\(preamble[[:space:]]*\\)[\(\{]") 1) (let ((beg (point))) - (forward-char -1) (when (parsebib--match-paren-forward) (buffer-substring-no-properties beg (point)))))) |