ious-obsolete-entry)
    (define-key po-mode-map "T" 'po-previous-translated-entry)
    (define-key po-mode-map "U" 'po-previous-untranslated-entry)
    (define-key po-mode-map "Q" 'po-quit)
    (define-key po-mode-map "S" 'po-consider-source-path)
    (define-key po-mode-map "V" 'po-validate)
    (define-key po-mode-map "W" 'po-kill-ring-save-comment)
    (define-key po-mode-map "Y" 'po-yank-comment)
    (define-key po-mode-map "_" 'po-undo)
    (define-key po-mode-map "\C-_" 'po-undo)
    (define-key po-mode-map "\C-xu" 'po-undo)
    (define-key po-mode-map "0" 'po-other-window)
    (define-key po-mode-map "\177" 'po-fade-out-entry)
    (define-key po-mode-map "\C-c\C-a" 'po-select-auxiliary)
    (define-key po-mode-map "\C-c\C-e" 'po-edit-msgstr-and-ediff)
    (define-key po-mode-map [?\C-c?\C-#] 'po-edit-comment-and-ediff)
    (define-key po-mode-map "\C-c\C-C" 'po-edit-comment-and-ediff)
    (define-key po-mode-map "\M-," 'po-mark-translatable)
    (define-key po-mode-map "\M-." 'po-select-mark-and-mark)
;;;;  (define-key po-mode-map "\M-c" 'po-select-and-save-entry)
;;;;  (define-key po-mode-map "\M-l" 'po-edit-lexicon-entry)
    (define-key po-mode-map "\M-s" 'po-select-source-reference)
    (define-key po-mode-map "\M-A" 'po-ignore-as-auxiliary)
;;;;  (define-key po-mode-map "\M-L" 'po-ignore-lexicon-file)
    (define-key po-mode-map "\M-S" 'po-ignore-source-path)
    po-mode-map)
  "Keymap for PO mode.")

;;;###autoload
(defun po-mode ()
  "Major mode for translators when they edit PO files.

Special commands:
\\{po-mode-map}
Turning on PO mode calls the value of the variable 'po-mode-hook',
if that value is non-nil.  Behaviour may be adjusted through some variables,
all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'."
  (interactive)
  (kill-all-local-variables)
  (setq major-mode 'po-mode
        mode-name "PO")
  (use-local-map po-mode-map)
  (easy-menu-define po-mode-menu po-mode-map "" po-mode-menu-layout)
  (set (make-local-variable 'font-lock-defaults) '(po-font-lock-keywords t))

  (set (make-local-variable 'po-read-only) buffer-read-only)
  (setq buffer-read-only t)

  (make-local-variable 'po-start-of-entry)
  (make-local-variable 'po-start-of-msgctxt)
  (make-local-variable 'po-start-of-msgid)
  (make-local-variable 'po-start-of-msgid_plural)
  (make-local-variable 'po-start-of-msgstr-block)
  (make-local-variable 'po-end-of-entry)
  (make-local-variable 'po-entry-type)

  (make-local-variable 'po-translated-counter)
  (make-local-variable 'po-fuzzy-counter)
  (make-local-variable 'po-untranslated-counter)
  (make-local-variable 'po-obsolete-counter)
  (make-local-variable 'po-mode-line-string)

  (setq po-mode-flag t)

  (po-check-file-header)
  (po-compute-counters nil)

  (set (make-local-variable 'po-edited-fields) nil)
  (set (make-local-variable 'po-marker-stack) nil)
  (set (make-local-variable 'po-search-path) '(("./") ("../")))

  (set (make-local-variable 'po-reference-alist) nil)
  (set (make-local-variable 'po-reference-cursor) nil)
  (set (make-local-variable 'po-reference-check) 0)

  (set (make-local-variable 'po-keywords)
       '(("gettext") ("gettext_noop") ("_") ("N_")))
  (set (make-local-variable 'po-string-contents) nil)
  (set (make-local-variable 'po-string-buffer) nil)
  (set (make-local-variable 'po-string-start) nil)
  (set (make-local-variable 'po-string-end) nil)
  (set (make-local-variable 'po-marking-overlay) (po-create-overlay))

  (add-hook 'write-contents-functions 'po-replace-revision-date)

  (run-hooks 'po-mode-hook)
  (message (_"You may type 'h' or '?' for a short PO mode reminder.")))

(defvar po-subedit-mode-map
  ;; Use (make-keymap) because (make-sparse-keymap) does not work on Demacs.
  (let ((po-subedit-mode-map (make-keymap)))
    (define-key po-subedit-mode-map "\C-c\C-a" 'po-subedit-cycle-auxiliary)
    (define-key po-subedit-mode-map "\C-c\C-c" 'po-subedit-exit)
    (define-key po-subedit-mode-map "\C-c\C-e" 'po-subedit-ediff)
    (define-key po-subedit-mode-map "\C-c\C-k" 'po-subedit-abort)
    po-subedit-mode-map)
  "Keymap while editing a PO mode entry (or the full PO file).")
