2 |
|
|
3 |
;; Copyright (C) 2005 Free Software Foundation, Inc. |
;; Copyright (C) 2005 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Arne J,Ax(Brgensen <arne@arnested.dk> |
;; Author: Arne Jørgensen <arne@arnested.dk> |
6 |
;; Keywords: tex |
;; Keywords: tex |
7 |
|
|
8 |
;; This file is part of AUCTeX. |
;; This file is part of AUCTeX. |
34 |
(if (boundp 'latex-inputenc-coding-alist) |
(if (boundp 'latex-inputenc-coding-alist) |
35 |
(when (fboundp 'latexenc-coding-system-to-inputenc) |
(when (fboundp 'latexenc-coding-system-to-inputenc) |
36 |
(when (fboundp 'latexenc-inputenc-to-coding-system) |
(when (fboundp 'latexenc-inputenc-to-coding-system) |
37 |
(let ((default (latexenc-coding-system-to-inputenc |
(let ((default (latexenc-coding-system-to-inputenc |
38 |
(or coding-system-for-write |
(or coding-system-for-write |
39 |
buffer-file-coding-system))) |
buffer-file-coding-system))) |
40 |
(selected 'undecided)) |
(selected 'undecided)) |
41 |
(setq selected (completing-read |
(setq selected (completing-read |
42 |
(if default |
(if default |
43 |
(format "Input encoding (default %s): " default) |
(format "Input encoding (default %s): " default) |
44 |
"Input encoding: ") |
"Input encoding: ") |
51 |
|
|
52 |
;; if necessary offer to set the coding system for saving |
;; if necessary offer to set the coding system for saving |
53 |
;; this buffer based on the selected input encoding |
;; this buffer based on the selected input encoding |
54 |
(when (and (null |
(when (and (null |
55 |
(coding-system-equal |
(coding-system-equal |
56 |
(coding-system-base |
(coding-system-base |
57 |
(or coding-system-for-write |
(or coding-system-for-write |
58 |
buffer-file-coding-system)) |
buffer-file-coding-system)) |
59 |
(coding-system-base |
(coding-system-base |
63 |
(coding-system-base |
(coding-system-base |
64 |
(latexenc-inputenc-to-coding-system selected))) |
(latexenc-inputenc-to-coding-system selected))) |
65 |
(message nil))) |
(message nil))) |
66 |
|
|
67 |
;; return selected input encoding |
;; return selected input encoding |
68 |
selected))) |
selected))) |
69 |
(read-string "Input encoding: "))) |
(read-string "Input encoding: "))) |
78 |
(TeX-add-symbols |
(TeX-add-symbols |
79 |
'("inputencoding" LaTeX-arg-inputenc-inputenc)))) |
'("inputencoding" LaTeX-arg-inputenc-inputenc)))) |
80 |
|
|
81 |
|
;; Local Variables: |
82 |
|
;; coding: iso-8859-1 |
83 |
|
;; End: |
84 |
|
|
85 |
;;; inputenc.el ends here |
;;; inputenc.el ends here |