• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1;;; start-po.el --- autoload definitions for viewing and editing PO files
2
3;; Copyright (C) 1995-2004, 2016, 2019 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;; <https://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
36Special commands:
37\\{po-mode-map}
38Turning on PO mode calls the value of the variable 'po-mode-hook',
39if that value is non-nil.  Behaviour may be adjusted through some variables,
40all 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.
48(unless (fboundp 'po-find-file-coding-system)
49  (autoload 'po-find-file-coding-system "po-compat"
50    "\
51Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
52Called 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)
55