From 44df143a60e035816bcf5a241631e48b9b0a487a Mon Sep 17 00:00:00 2001 From: Rasmus Pank Roulund Date: Sun, 28 Nov 2021 18:41:34 +0100 Subject: [PATCH] org-export-activate-smart-quotes: Support languages with hyphens. Get smart-quotes from "en" for "#+language: en-gb". --- lisp/ox.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 98c9c1119..6f10112bb 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -5688,8 +5688,9 @@ Return the new string." (lambda (match) (or (plist-get (cdr (assq (pop quote-status) - (cdr (assoc (plist-get info :language) - org-export-smart-quotes-alist)))) + (cdr (cl-assoc (plist-get info :language) + org-export-smart-quotes-alist + :test (lambda (lang k) (string-match-p k lang)))))) encoding) match)) s nil t))) -- 2.34.1