org-element: Tiny refactoring

* lisp/org-element.el (org-element-link-parser): Use `string-to-char'
  instead of (aref STRING 0).
This commit is contained in:
Nicolas Goaziou 2015-05-13 12:37:53 +02:00
parent 0e7062678e
commit fe0f30e022

View file

@ -3062,7 +3062,7 @@ Assume point is at the beginning of the link."
((string-match "\\`(\\(.*\\))\\'" raw-link)
(setq type "coderef" path (match-string 1 raw-link)))
;; Custom-id type: PATH is the name of the custom id.
((= (aref raw-link 0) ?#)
((= (string-to-char raw-link) ?#)
(setq type "custom-id" path (substring raw-link 1)))
;; Fuzzy type: Internal link either matches a target, an
;; headline name or nothing. PATH is the target or