forked from mirrors/org-mode
Merge branch 'bugfix'
This commit is contained in:
commit
880d4fada6
|
@ -271,10 +271,10 @@ If nil then the Chicago author-date style is used as a fallback.")
|
||||||
;; Prior to Emacs-27.1 argument of `regexp' form must be a string literal.
|
;; Prior to Emacs-27.1 argument of `regexp' form must be a string literal.
|
||||||
;; It is the reason why `rx' is avoided here.
|
;; It is the reason why `rx' is avoided here.
|
||||||
(rx-to-string
|
(rx-to-string
|
||||||
`(seq word-start
|
`(seq (or line-start space)
|
||||||
(regexp ,(regexp-opt (mapcar #'car org-cite-csl--label-alist) t))
|
(regexp ,(regexp-opt (mapcar #'car org-cite-csl--label-alist) t))
|
||||||
(0+ digit)
|
(0+ digit)
|
||||||
(or word-start line-end space ? ))
|
(or word-end line-end space " "))
|
||||||
t)
|
t)
|
||||||
"Regexp matching a label in a citation reference suffix.
|
"Regexp matching a label in a citation reference suffix.
|
||||||
Label is in match group 1.")
|
Label is in match group 1.")
|
||||||
|
@ -372,7 +372,7 @@ or raise an error if the variable is unset."
|
||||||
((and (guard org-cite-csl-styles-dir) file)
|
((and (guard org-cite-csl-styles-dir) file)
|
||||||
(expand-file-name file org-cite-csl-styles-dir))
|
(expand-file-name file org-cite-csl-styles-dir))
|
||||||
(other
|
(other
|
||||||
(user-error "Cannot handle relative style file name" other))))
|
(user-error "Cannot handle relative style file name: %S" other))))
|
||||||
|
|
||||||
(defun org-cite-csl--locale-getter ()
|
(defun org-cite-csl--locale-getter ()
|
||||||
"Return a locale getter.
|
"Return a locale getter.
|
||||||
|
@ -426,7 +426,9 @@ The result is a association list. Keys are: `id', `prefix',`suffix',
|
||||||
((re-search-forward org-cite-csl--label-regexp nil t)
|
((re-search-forward org-cite-csl--label-regexp nil t)
|
||||||
(setq location-start (match-beginning 0))
|
(setq location-start (match-beginning 0))
|
||||||
(setq label (cdr (assoc (match-string 1) org-cite-csl--label-alist)))
|
(setq label (cdr (assoc (match-string 1) org-cite-csl--label-alist)))
|
||||||
(setq locator-start (match-end 1)))
|
(goto-char (match-end 1))
|
||||||
|
(skip-chars-forward "[:space:] ")
|
||||||
|
(setq locator-start (point)))
|
||||||
((re-search-forward (rx digit) nil t)
|
((re-search-forward (rx digit) nil t)
|
||||||
(setq location-start (match-beginning 0))
|
(setq location-start (match-beginning 0))
|
||||||
(setq label "page")
|
(setq label "page")
|
||||||
|
|
Loading…
Reference in a new issue