Imported Upstream version 0.19.7
[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-2004, 2015 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, see
19 ;; <http://www.gnu.org/licenses/>.
20
21 ;;; Commentary:
22
23 ;; This file provides a minimal amount of definitions that will autoload
24 ;; the complete support for viewing and editing PO files when necessary.
25 ;; It is meant to be installed in such a way that it will be part of the
26 ;; dumped Emacs image, or loaded automatically when Emacs is started,
27 ;; regardless how the user's .emacs looks like.
28
29 ;;; Code:
30
31 ;; For editing PO files.
32
33 (autoload 'po-mode "po-mode"
34   "Major mode for translators when they edit PO files.
35
36 Special commands:
37 \\{po-mode-map}
38 Turning on PO mode calls the value of the variable 'po-mode-hook',
39 if that value is non-nil.  Behaviour may be adjusted through some variables,
40 all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'."
41   t)
42 (setq auto-mode-alist
43       (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist))
44
45 ;; For viewing PO and POT files.
46
47 ;; To use the right coding system automatically under Emacs 20 or newer.
48 (unless (fboundp 'po-find-file-coding-system)
49   (autoload 'po-find-file-coding-system "po-compat"
50     "\
51 Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
52 Called through file-coding-system-alist, before the file is visited for real."))
53 (modify-coding-system-alist 'file "\\.po[t]?\\'\\|\\.po\\."
54                             'po-find-file-coding-system)