Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gettext-tools / misc / start-po.el
1 ;;; start-po.el -- autoload definitions for viewing and editing PO files
2
3 ;; Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
4 ;;
5 ;; This file is part of GNU gettext.
6 ;;
7 ;; GNU gettext is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 2, or (at your option)
10 ;; any later version.
11 ;;
12 ;; GNU gettext is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ;; GNU General Public License for more details.
16 ;;
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
19 ;; Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 ;; Boston, MA 02110-1301, USA.
21
22 ;;; Commentary:
23
24 ;; This file provides a minimal amount of definitions that will autoload
25 ;; the complete support for viewing and editing PO files when necessary.
26 ;; It is meant to be installed in such a way that it will be part of the
27 ;; dumped Emacs image, or loaded automatically when Emacs is started,
28 ;; regardless how the user's .emacs looks like.
29
30 ;;; Code:
31
32 ;; For editing PO files.
33
34 (autoload 'po-mode "po-mode"
35   "Major mode for translators when they edit PO files.
36
37 Special commands:
38 \\{po-mode-map}
39 Turning on PO mode calls the value of the variable 'po-mode-hook',
40 if that value is non-nil.  Behaviour may be adjusted through some variables,
41 all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'."
42   t)
43 (setq auto-mode-alist
44       (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist))
45
46 ;; For viewing PO and POT files.
47
48 ;; To use the right coding system automatically under Emacs 20 or newer.
49 (unless (fboundp 'po-find-file-coding-system)
50   (autoload 'po-find-file-coding-system "po-compat"
51     "\
52 Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
53 Called through file-coding-system-alist, before the file is visited for real."))
54 (modify-coding-system-alist 'file "\\.po[t]?\\'\\|\\.po\\."
55                             'po-find-file-coding-system)