branch: externals/auctex commit 4321dcc430513f01b3280f0df1eb0287f8011469 Author: Ikumi Keita <ik...@ikumi.que.jp> Commit: Ikumi Keita <ik...@ikumi.que.jp>
Tweak locale treatment on xemacs. * tex-jp.el (japanese-TeX-set-process-coding-system): Use the locale related environment variables for fallback value. --- tex-jp.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tex-jp.el b/tex-jp.el index 36acf27..a42cbe8 100644 --- a/tex-jp.el +++ b/tex-jp.el @@ -395,10 +395,17 @@ See also a user custom option `TeX-japanese-process-input-coding-system'." ;; xemacs 21.4. ((and (featurep 'xemacs) - (fboundp 'get-coding-system-from-locale) - (fboundp 'current-locale)) + (fboundp 'get-coding-system-from-locale)) (get-coding-system-from-locale - (current-locale)))))) + (if (fboundp 'current-locale) + (current-locale) + ;; I don't know XEmacs well, so incorporate + ;; the suggestion of + ;; http://lists.gnu.org/archive/html/auctex-devel/2017-02/msg00079.html + ;; as well. + (or (getenv "LC_ALL") + (getenv "LC_CTYPE") + (getenv "LANG")))))))) (if (and lcs (japanese-TeX-coding-ejsu lcs)) lcs 'euc-jp)))))))