home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / lib / emacs / site-lisp / po-mode.elc < prev    next >
Encoding:
Text File  |  1996-10-12  |  40.2 KB  |  542 lines

  1.  
  2. (defvar po-auto-edit-with-msgid nil "\
  3. *Automatically use msgid when editing untranslated entries.")
  4.  
  5. (defvar po-auto-fuzzy-on-edit nil "\
  6. *Automatically mark entries fuzzy when being edited.")
  7.  
  8. (defvar po-auto-select-on-unfuzzy nil "\
  9. *Automatically select some new entry while make an entry not fuzzy.")
  10.  
  11. (defvar po-auto-replace-revision-date (quote ask) "\
  12. *Automatically revise date in headers.  Value is nil, t, or ask.")
  13.  
  14. (defvar po-default-file-header "# SOME DESCRIPTIVE TITLE.
  15. # Copyright (C) YEAR Free Software Foundation, Inc.
  16. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  17. #
  18. #, fuzzy
  19. msgid \"\"
  20. msgstr \"\"
  21. \"Project-Id-Version: PACKAGE VERSION\\n\"
  22. \"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\\n\"
  23. \"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"
  24. \"Language-Team: LANGUAGE <LL@li.org>\\n\"
  25. \"MIME-Version: 1.0\\n\"
  26. \"Content-Type: text/plain; charset=CHARSET\\n\"
  27. \"Content-Transfer-Encoding: ENCODING\\n\"
  28. " "*Default PO file header.")
  29.  
  30. (defvar po-mode-flag)
  31.  
  32. (defvar po-start-of-entry)
  33.  
  34. (defvar po-middle-of-entry)
  35.  
  36. (defvar po-end-of-entry)
  37.  
  38. (defvar po-entry-type)
  39.  
  40. (defvar po-translated-counter)
  41.  
  42. (defvar po-fuzzy-counter)
  43.  
  44. (defvar po-untranslated-counter)
  45.  
  46. (defvar po-obsolete-counter)
  47.  
  48. (defvar po-mode-line-string)
  49.  
  50. (defvar po-work-buffer)
  51.  
  52. (defvar po-work-buffer-lock)
  53.  
  54. (defvar po-marker-stack)
  55.  
  56. (defvar po-search-path)
  57.  
  58. (defvar po-reference-alist)
  59.  
  60. (defvar po-reference-cursor)
  61.  
  62. (defvar po-reference-check)
  63.  
  64. (defvar po-keywords)
  65.  
  66. (defvar po-next-file-list)
  67.  
  68. (defvar po-string-start)
  69.  
  70. (defvar po-string-end)
  71.  
  72. (eval-and-compile (or (fboundp (quote gettext)) (defsubst gettext (string) string)))
  73.  
  74. (defsubst _ (string) (gettext string))
  75.  
  76. (defsubst N_ (string) string)
  77.  
  78. (defun po-mode-version nil "\
  79. Show Emacs PO mode version." (interactive) (byte-code "ÀˆÁÂÃ!ÄÅÆO\"‡" [nil message _ "Emacs PO mode, version %s" "$Revision: 1.36 $" 11 -2] 6))
  80.  
  81. (defvar po-help-display-string (_ "  [PO Mode Summary]       Next Previous            Miscellaneous
  82.                           n    p    Any type       .     Redisplay
  83. Moving around             /t   /M-t Translated     /v    Version info
  84. <    First if any         f    M-f  Fuzzy          ?, h  This help
  85. >    Last if any          o    M-o  Obsolete       =     Current index
  86. /SPC Auto select          u    M-u  Untranslated   O     Other window
  87.                                                    V     Validate
  88.                         Msgstr Comments            Q     Quit
  89. Modifying entries         RET  #    Call editor    U     Undo
  90. TAB   Remove fuzzy mark   k    K    Kill to        E    Edit out full
  91. /DEL  Fuzzy or fade out   w    W    Copy to
  92. LFD   Init with msgid     y    Y    Yank from        [*: Later, /: Docum]
  93.  
  94. gettext Keyword Marking                            Position Stack
  95. ,    Find next string     Compendiums              m  Mark and push current
  96. M-,  Mark translatable    *c    To compendium      r  Pop and return
  97. M-.  Change mark, mark    *M-C  Select, save       x  Exchange current/top
  98.  
  99. Program Sources           Auxiliary Files          Lexicography
  100. s    Cycle reference      *a    Cycle file         *l    Lookup translation
  101. M-s  Select reference     *M-a  Select file        *M-l  Add/edit translation
  102. S    Consider path        *A    Consider file      *L    Consider lexicon
  103. M-S  Ignore path          *M-A  Ignore file        *M-L  Ignore lexicon
  104. "))
  105.  
  106. (defvar po-any-msgid-regexp "^\\(#~?[     ]*\\)?msgid.*
  107. \\(\\(#~?[     ]*\\)?\".*
  108. \\)*" "Regexp matching a whole msgid field, whether obsolete or not.")
  109.  
  110. (defvar po-any-msgstr-regexp "^\\(#~?[     ]*\\)?msgstr.*
  111. \\(\\(#~?[     ]*\\)?\".*
  112. \\)*" "Regexp matching a whole msgstr field, whether obsolete or not.")
  113.  
  114. (defvar po-msgfmt-program "msgfmt" "\
  115. Path to msgfmt program from GNU gettext package.")
  116.  
  117. (defconst po-font-lock-keywords (quote (("^\\(msgid \\|msgstr \\)?\"\\|\"$" . font-lock-keyword-face) ("[%\\\\]." . font-lock-variable-name-face) ("^# .*\\|^#[:,]?" . font-lock-comment-face) ("^#:\\(.*\\)" 1 font-lock-reference-face))) "\
  118. Additional expressions to highlight in PO mode.")
  119.  
  120. (defvar po-mode-map nil "\
  121. Keymap for PO mode.")
  122.  
  123. (if po-mode-map nil (setq po-mode-map (make-keymap)) (suppress-keymap po-mode-map) (define-key po-mode-map "    " (quote po-unfuzzy)) (define-key po-mode-map "
  124. " (quote po-msgid-to-msgstr)) (define-key po-mode-map "" (quote po-edit-msgstr)) (define-key po-mode-map " " (quote po-auto-select-entry)) (define-key po-mode-map "?" (quote po-help)) (define-key po-mode-map "#" (quote po-edit-comment)) (define-key po-mode-map "," (quote po-tags-search)) (define-key po-mode-map "." (quote po-current-entry)) (define-key po-mode-map "<" (quote po-first-entry)) (define-key po-mode-map "=" (quote po-statistics)) (define-key po-mode-map ">" (quote po-last-entry)) (define-key po-mode-map "f" (quote po-next-fuzzy-entry)) (define-key po-mode-map "h" (quote po-help)) (define-key po-mode-map "k" (quote po-kill-msgstr)) (define-key po-mode-map "m" (quote po-push-location)) (define-key po-mode-map "n" (quote po-next-entry)) (define-key po-mode-map "o" (quote po-next-obsolete-entry)) (define-key po-mode-map "p" (quote po-previous-entry)) (define-key po-mode-map "q" (quote po-confirm-and-quit)) (define-key po-mode-map "r" (quote po-pop-location)) (define-key po-mode-map "s" (quote po-cycle-source-reference)) (define-key po-mode-map "t" (quote po-next-translated-entry)) (define-key po-mode-map "u" (quote po-next-untranslated-entry)) (define-key po-mode-map "v" (quote po-mode-version)) (define-key po-mode-map "w" (quote po-kill-ring-save-msgstr)) (define-key po-mode-map "x" (quote po-exchange-location)) (define-key po-mode-map "y" (quote po-yank-msgstr)) (define-key po-mode-map "E" (quote po-edit-out-full)) (define-key po-mode-map "K" (quote po-kill-comment)) (define-key po-mode-map "O" (quote po-other-window)) (define-key po-mode-map "Q" (quote po-quit)) (define-key po-mode-map "S" (quote po-consider-source-path)) (define-key po-mode-map "U" (quote po-undo)) (define-key po-mode-map "V" (quote po-validate)) (define-key po-mode-map "W" (quote po-kill-ring-save-comment)) (define-key po-mode-map "Y" (quote po-yank-comment)) (define-key po-mode-map "" (quote po-fade-out-entry)) (define-key po-mode-map "¬" (quote po-mark-translatable)) (define-key po-mode-map "®" (quote po-select-mark-and-mark)) (define-key po-mode-map "æ" (quote po-previous-fuzzy-entry)) (define-key po-mode-map "ï" (quote po-previous-obsolete-entry)) (define-key po-mode-map "ô" (quote po-previous-translated-entry)) (define-key po-mode-map "õ" (quote po-previous-untranslated-entry)) (define-key po-mode-map "ó" (quote po-select-source-reference)) (define-key po-mode-map "Ó" (quote po-ignore-source-path)))
  125.  
  126. (defvar po-subedit-mode-map nil "\
  127. Keymap while editing a PO mode entry (or the full PO file).")
  128.  
  129. (if po-subedit-mode-map nil (setq po-subedit-mode-map (make-sparse-keymap)) (define-key po-subedit-mode-map "" (quote exit-recursive-edit)))
  130.  
  131. (defun po-mode nil "\
  132. Major mode for translators when they edit PO files.
  133. Special commands:\\{po-mode-map}
  134. Turning on PO mode calls the value of the variable `po-mode-hook',
  135. if that value is non-nil.  Behaviour may be adjusted with
  136. variables po-auto-edit-with-msgid, po-auto-fuzzy-on-edit,
  137. po-auto-select-on-unfuzzy and po-auto-replace-revision-date." (interactive) (byte-code "LjӠˆÔ‰ˆÕ‰ˆÖ
  138. !ˆÄ‰ˆ×Å!ˆØ‰ˆ×Ù!ˆ×Ú!ˆ×Û!ˆ×Ü!ˆ×Ý!ˆ×Þ!ˆ×ß!ˆ×à!ˆ×á!ˆÄ‰ˆâ ˆãÇ!ˆ×È!ˆ×É!ˆäåæÇ!çQ!‰ˆÇ‰    ˆ×Ê!ˆÇ‰
  139. ˆ×Ë!ˆè‰ ˆ×Ì!ˆ×Í!ˆ×Î!ˆÇ‰ ˆÇ‰ˆé‰ˆ×Ï!ˆ×Ð!ˆ×Ñ!ˆ×Ò!ˆê‰ˆÇ‰ˆÇ‰ˆÇ‰ˆëìí!!ˆîï!‡" [major-mode mode-name po-mode-map buffer-read-only t font-lock-defaults po-mode-flag nil po-work-buffer po-work-buffer-lock po-marker-stack po-search-path po-reference-alist po-reference-cursor po-reference-check po-keywords po-next-file-list po-string-start po-string-end kill-all-local-variables po-mode "PO" use-local-map make-local-variable (po-font-lock-keywords t) po-start-of-entry po-middle-of-entry po-end-of-entry po-entry-type po-translated-counter po-fuzzy-counter po-untranslated-counter po-obsolete-counter po-mode-line-string po-check-file-header po-compute-counters generate-new-buffer "*Edit " buffer-name "*" (("./") ("../")) 0 (("gettext") ("gettext_noop") ("_") ("N_")) message _ "You may type `h' or `?' for a short PO mode reminder." run-hooks po-mode-hook] 31))
  140.  
  141. (defun po-mode-destroy-cleanup nil "\
  142. When destroying a PO mode buffer, kill editing buffer as well." (byte-code "ÂÃ\"…Ä    !…Å    !‡" [mode-name po-work-buffer string= "PO" bufferp kill-buffer] 4))
  143.  
  144. (if (boundp (quote kill-buffer-hook)) (add-hook (quote kill-buffer-hook) (quote po-mode-destroy-cleanup)))
  145.  
  146. (make-variable-buffer-local (quote po-mode-flag))
  147.  
  148. (defvar po-mode-line-entry (quote (po-mode-flag ("  " po-mode-line-string))) "\
  149. Mode line format entry displaying MODE-LINE-STRING.")
  150.  
  151. (or (member po-mode-line-entry mode-line-format) (let ((entry (member (quote global-mode-string) mode-line-format))) (setcdr entry (cons po-mode-line-entry (cdr entry)))))
  152.  
  153. (defun po-update-mode-line-string nil "\
  154. Compute a new statistics string to display in mode line." (byte-code "ÅÆ    \"
  155. ÇV…ÅÈ
  156. \" ÇV…ÅÉ \" ÇV…\"ÅÊ \"R‰ˆËÌ !‡" [po-mode-line-string po-translated-counter po-fuzzy-counter po-untranslated-counter po-obsolete-counter format "%dt" 0 "+%df" "+%du" "+%do" set-buffer-modified-p buffer-modified-p] 9))
  157.  
  158. (defun po-type-counter nil "\
  159. Return the symbol name of the counter appropriate for the current entry." (byte-code "Â=ƒ
  160. Â-Ä=ƒł-Æ=ƒǂ-È=ƒ(ɂ-ÊËÌ!!‡" [po-entry-type t obsolete po-obsolete-counter fuzzy po-fuzzy-counter translated po-translated-counter untranslated po-untranslated-counter error _ "Unknown entry type"] 3))
  161.  
  162. (defun po-decrease-type-counter nil "\
  163. Decrease the counter corresponding to the nature of the current entry." (byte-code "Á Â!SL)‡" [counter po-type-counter eval] 4))
  164.  
  165. (defun po-increase-type-counter nil "\
  166. Increase the counter corresponding to the nature of the current entry.
  167. Then, update the mode line counters." (byte-code "Á Â!TL)ˆÃ ‡" [counter po-type-counter eval po-update-mode-line-string] 4))
  168.  
  169. (defvar po-fuzzy-regexp)
  170.  
  171. (defvar po-untranslated-regexp)
  172.  
  173. (defun po-compute-counters (flag) "\
  174. Prepare counters for mode line display.  If FLAG, also echo entry position." (byte-code "…ΠˆÏ‰ˆÏ‰ˆÏ‰ˆÏ‰ˆÏÏÉŠebˆÐÉÊ#…•ÑÒ\"ÏU…LƒEÓÔÕ!#‚LÓÔÖ!\"ˆ`‰ˆ×Ï!bˆT‰ˆ…m` =…m‰ˆgØ=ƒ{ T‰‚Ù !ƒ‰ T‰‚    T‰ˆbˆ‚#ˆebˆÐÉÊ#…ª
  175. T‰ˆ‚™ˆ    
  176. Z‰)ˆƒÆÓÔÚ!    
  177. &‚ÉÓÛ!+ˆÜ ‡" [flag po-translated-counter po-fuzzy-counter po-untranslated-counter po-obsolete-counter position total here po-any-msgstr-regexp nil t po-middle-of-entry po-untranslated-regexp po-fuzzy-regexp po-find-span-of-entry 0 re-search-forward % 20 message _ "Position %d/%d" "Position %d" match-beginning 35 looking-at "Position %d/%d; %d translated, %d fuzzy, %d untranslated, %d obsolete" "" po-update-mode-line-string] 19))
  178.  
  179. (defun po-redisplay nil "\
  180. Redisplay the current entry." (byte-code "b‡" [po-middle-of-entry] 1))
  181.  
  182. (defun po-other-window nil "\
  183. Get the cursor into another window, out of PO mode." (interactive) (byte-code "ÁˆÂÀ!ƒàˆÄÅ !‚ÆÇ!‡" [t nil one-window-p split-window switch-to-buffer other-buffer other-window 1] 6))
  184.  
  185. (defun po-check-lock nil "\
  186. Ensure that GNU Emacs is not currently in recursive edit for PO mode." (byte-code "…    !ˆÃÄÅ!!ƒÆ ‚ÇÄÈ!!‡" [po-work-buffer-lock po-work-buffer pop-to-buffer y-or-n-p _ "Here is your current edit.  Do you wish to abort it? " abort-recursive-edit error "Type `C-c C-c' once done"] 7))
  187.  
  188. (defun po-edit-out-full nil "\
  189. Go into recursive edit for editing the PO file in fundamental mode." (interactive) (byte-code "ÁˆÃÄÅ!!…#ÆÄÇ!!ˆÁÈ ˆÉ
  190. !ˆÊ ˆÉÁ!ˆË )‡" [buffer-read-only nil po-subedit-mode-map yes-or-no-p _ "Should I let you edit the whole PO file? " message "Type `C-c C-c' once done" fundamental-mode use-local-map recursive-edit po-mode] 10))
  191.  
  192. (defun po-check-file-header nil "\
  193. Create a missing PO mode file header, or replace an oldish one." (byte-code "ŠÁÁÁebˆÇ ÁÅ#ƒYÈÉ!bˆÊË!ˆÌÉ!‰ˆÍÎ!ƒSÇÏ Å#ƒ3Á‚P bˆ`eV…IÊË!ˆÐcˆÑ ˆ‚6ˆÑ ˆÅ‰‚Vʼn‚\\ʼnˆebˆ
  194. …iÒÓ\"+)‡" [buffer-read-only nil insert-flag end-of-header po-any-msgstr-regexp t po-default-file-header re-search-forward match-beginning 0 previous-line 1 match-end looking-at "msgid \"\"
  195. " "
  196. \"PO-Revision-Date: " "#~ " beginning-of-line insert "
  197. "] 12))
  198.  
  199. (defun po-replace-revision-date nil "\
  200. Replace the revision date by current time in the PO file header." (byte-code "ÄÅ!ƒ?Á=†Æ=…ÇÈÉ!!ƒ9ŠebˆÊËÂÁ#…5ÂÌÍÅÎÏ \"ÐQÁÁ#))‚<ÑÒ!‚DÑÈÓ!!‡" [po-auto-replace-revision-date t nil buffer-read-only fboundp format-time-string ask y-or-n-p _ "May I set PO-Revision-Date? " re-search-forward "^\"PO-Revision-Date:.*" replace-match "\"PO-Revision-Date: " "%Y-%m-%d %H:%M %Z" current-time "\\n\"" message "" "PO-Revision-Date should be adjusted..."] 11))
  201.  
  202. (defun po-find-span-of-entry nil "\
  203. Find the extent of the PO file entry where the cursor is.
  204. Set variables PO-START-OF-ENTRY, PO-MIDDLE-OF-ENTRY, PO-END-OF-ENTRY
  205. and PO-ENTRY-TYPE to meaningful values.  Decreasing priority of type
  206. interpretation is: obsolete, fuzzy, untranslated or translated." (byte-code "`Ê    ÂÃ#ƒ{Ë    !ˆÌÍ!XƒWÌÍ!‰ˆÎÍ!‰ˆÌÍ!‰ˆË    ÂÃ#ƒ@ÎÍ!‰ˆÌÍ!‰‚TbˆÊ    ÂÃ#ƒQÌÍ!‚Re‰‚xÎÍ!‰ˆÌÍ!‰ˆbˆÊ    ÂÃ#ƒuÌÍ!‚ve‰‚’e‰ˆ bˆË    !ˆÎÍ!‰ˆÌÍ!‰ˆbˆgÏ=ƒ Ð‚¿ bˆËÃ#ƒ°Ñ‚¿bˆÒ    !ƒ¾Ó‚¿Ô‰ˆb)‡" [here po-any-msgstr-regexp nil t po-start-of-entry po-middle-of-entry po-end-of-entry po-entry-type po-fuzzy-regexp po-untranslated-regexp re-search-backward re-search-forward match-end 0 match-beginning 35 obsolete fuzzy looking-at untranslated translated] 22))
  207.  
  208. (defun po-add-attribute (name) "\
  209. Add attribute NAME to the current entry, unless it is already there." (byte-code "ŠÁ
  210. bˆÆÇ Ä#ƒ5ŒÈÉÊ!ËÊ!\"ˆebˆÆÌÌQÁÄ#ƒ*Á‚1dbˆÍÎ\")‚LÏÐ!ˆgÑ=…FÒÓ!ˆ‚9ˆÍÔÐ#))‡" [buffer-read-only nil po-start-of-entry po-middle-of-entry t name re-search-forward "
  211. #[,!] .*" narrow-to-region match-beginning 0 match-end "\\b" insert ", " skip-chars-forward "
  212. " 35 next-line 1 "#, "] 12))
  213.  
  214. (defun po-delete-attribute (name) "\
  215. Delete attribute NAME from the current entry, if any." (byte-code "ŠÁ
  216. bˆÆÇ Ä#…2ŒÈÉÊ!ËÊ!\"ˆebˆÆÌÍÎÏÐ&ÁÄ#…1ÑÒÄÄ#)))‡" [buffer-read-only nil po-start-of-entry po-middle-of-entry t name re-search-forward "
  217. #[,!] .*" narrow-to-region match-beginning 0 match-end concat "\\(
  218. #[,!] " "$\\|, " "$\\| " ",\\)" replace-match ""] 13))
  219.  
  220. (defun po-say-location-depth nil "\
  221. Tell how many entries in the entry location stack." (byte-code "    GÃUƒÄÅÆ!!‚%ÇUƒÄÅÈ!!‚%ÄÅÉ!\")‡" [depth po-marker-stack t 0 message _ "Empty location stack" 1 "One entry in location stack" "%d entries in location stack"] 8))
  222.  
  223. (defun po-push-location nil "\
  224. Stack the location of the current entry, for later return." (interactive) (byte-code "ˆàˆŠbˆÄ     B‰)ˆÅ ‡" [po-middle-of-entry po-marker-stack nil po-find-span-of-entry point-marker po-say-location-depth] 4))
  225.  
  226. (defun po-pop-location nil "\
  227. Unstack a saved location, and return to the corresponding entry." (interactive) (byte-code "Áˆƒ@bˆA‰ˆÂ ˆÃ ‚ÄÅÆ!!‡" [po-marker-stack nil po-current-entry po-say-location-depth error _ "The entry location stack is empty"] 5))
  228.  
  229. (defun po-exchange-location nil "\
  230. Exchange the location of the current entry with the top of stack." (interactive) (byte-code "ȃ#Ä ˆ    bˆÅ @bˆ
  231. AB‰)ˆÆ ˆÇ ‚(ÈÉÊ!!‡" [po-marker-stack po-middle-of-entry location nil po-find-span-of-entry point-marker po-current-entry po-say-location-depth error _ "The entry location stack is empty"] 7))
  232.  
  233. (defun po-current-entry nil "\
  234. Display the current entry." (interactive) (byte-code "ÀˆÁ ˆÂ ‡" [nil po-find-span-of-entry po-redisplay] 3))
  235.  
  236. (defun po-first-entry-with-regexp (regexp) "\
  237. Display the first entry in the file which msgstr matches REGEXP." (byte-code "`ebˆÄ    ÂÃ#ƒÅÆ!bˆÇ ‚bˆÈÉÊ!!)‡" [here regexp nil t re-search-forward match-beginning 0 po-current-entry error _ "There is no such entry"] 6))
  238.  
  239. (defun po-last-entry-with-regexp (regexp) "\
  240. Display the last entry in the file which msgstr matches REGEXP." (byte-code "`dbˆÄ    ÂÃ#ƒÅ ‚bˆÆÇÈ!!)‡" [here regexp nil t re-search-backward po-current-entry error _ "There is no such entry"] 5))
  241.  
  242. (defun po-next-entry-with-regexp (regexp wrap) "\
  243. Display the entry following the current entry which msgstr matches REGEXP.
  244. If WRAP is not nil, the search may wrap around the buffer." (byte-code "Ç ˆ`    bˆÈ
  245. ÃÄ#ƒÉÊ!bˆË ‚B…'ebˆÈ
  246. Ä#ƒ:ÉÊ!bˆË ˆÌÍÎ!!‚BbˆÏÍÐ!!)‡" [here po-end-of-entry regexp nil t wrap po-start-of-entry po-find-span-of-entry re-search-forward match-beginning 0 po-current-entry message _ "Wrapping around the buffer" error "There is no such entry"] 12))
  247.  
  248. (defun po-previous-entry-with-regexp (regexp wrap) "\
  249. Redisplay the entry preceding the current entry which msgstr matches REGEXP.
  250. If WRAP is not nil, the search may wrap around the buffer." (byte-code "Ç ˆ`    bˆÈ
  251. ÃÄ#ƒÉ ‚8…\"dbˆÈ
  252. Ä#ƒ0É ˆÊËÌ!!‚8bˆÍËÎ!!)‡" [here po-start-of-entry regexp nil t wrap po-end-of-entry po-find-span-of-entry re-search-backward po-current-entry message _ "Wrapping around the buffer" error "There is no such entry"] 10))
  253.  
  254. (defun po-first-entry nil "\
  255. Display the first entry." (interactive) (byte-code "ÁˆÂ!‡" [po-any-msgstr-regexp nil po-first-entry-with-regexp] 2))
  256.  
  257. (defun po-last-entry nil "\
  258. Display the last entry." (interactive) (byte-code "ÁˆÂ!‡" [po-any-msgstr-regexp nil po-last-entry-with-regexp] 2))
  259.  
  260. (defun po-next-entry nil "\
  261. Display the entry following the current entry." (interactive) (byte-code "ÁˆÂÁ\"‡" [po-any-msgstr-regexp nil po-next-entry-with-regexp] 3))
  262.  
  263. (defun po-previous-entry nil "\
  264. Display the entry preceding the current entry." (interactive) (byte-code "ÁˆÂÁ\"‡" [po-any-msgstr-regexp nil po-previous-entry-with-regexp] 3))
  265.  
  266. (defvar po-after-entry-regexp "\\(\\'\\|\\(#[     ]*\\)?[^\"]\\)" "\
  267. Regexp which should be true after a full msgstr string matched.")
  268.  
  269. (defvar po-untranslated-regexp (concat "^msgstr[     ]*\"\"
  270. " po-after-entry-regexp) "Regexp matching a whole msgstr field, but only if active and empty.")
  271.  
  272. (defun po-next-untranslated-entry nil "\
  273. Find the next untranslated entry, wrapping around if necessary." (interactive) (byte-code "ˆÃÁ\"‡" [po-untranslated-regexp t nil po-next-entry-with-regexp] 3))
  274.  
  275. (defun po-previous-untranslated-entry nil "\
  276. Find the previous untranslated entry, wrapping around if necessary." (interactive) (byte-code "ˆÃÁ\"‡" [po-untranslated-regexp t nil po-previous-entry-with-regexp] 3))
  277.  
  278. (defun po-msgid-to-msgstr nil "\
  279. Use another window to edit msgstr reinitialized with msgid." (interactive) (byte-code "ÁˆÃ ˆÄ=†Å=†ÆÇÈ!!…)É ˆÊÁËÂÁ\"\"ˆÌ ˆÍ ˆÎÏ!‡" [po-entry-type nil t po-find-span-of-entry untranslated obsolete y-or-n-p _ "Really loose previous translation? " po-decrease-type-counter po-set-field po-get-field po-current-entry po-increase-type-counter message ""] 10))
  280.  
  281. (defvar po-obsolete-msgstr-regexp "^#~?[     ]*msgstr.*
  282. \\(#~?[     ]*\".*
  283. \\)*" "Regexp matching a whole msgstr field of an obsolete entry.")
  284.  
  285. (defun po-next-obsolete-entry nil "\
  286. Find the next obsolete entry, wrapping around if necessary." (interactive) (byte-code "ˆÃÁ\"‡" [po-obsolete-msgstr-regexp t nil po-next-entry-with-regexp] 3))
  287.  
  288. (defun po-previous-obsolete-entry nil "\
  289. Find the previous obsolete entry, wrapping around if necessary." (interactive) (byte-code "ˆÃÁ\"‡" [po-obsolete-msgstr-regexp t nil po-previous-entry-with-regexp] 3))
  290.  
  291. (defvar po-fuzzy-regexp "^#[,!] .*fuzzy" "\
  292. Regexp matching the string inserted by msgmerge for translations
  293. which does not match exactly.")
  294.  
  295. (defun po-next-fuzzy-entry nil "\
  296. Find the next fuzzy entry, wrapping around if necessary." (interactive) (byte-code "ˆÃÁ\"‡" [po-fuzzy-regexp t nil po-next-entry-with-regexp] 3))
  297.  
  298. (defun po-previous-fuzzy-entry nil "\
  299. Find the next fuzzy entry, wrapping around if necessary." (interactive) (byte-code "ˆÃÁ\"‡" [po-fuzzy-regexp t nil po-previous-entry-with-regexp] 3))
  300.  
  301. (defun po-unfuzzy nil "\
  302. Remove the fuzzy attribute for the current entry." (interactive) (byte-code "ˆàˆÄ=…Å ˆÆÇ!ˆÈ ˆÉ ˆ    …Ê ˆË ‡" [po-entry-type po-auto-select-on-unfuzzy nil po-find-span-of-entry fuzzy po-decrease-type-counter po-delete-attribute "fuzzy" po-current-entry po-increase-type-counter po-auto-select-entry po-update-mode-line-string] 8))
  303.  
  304. (defun po-next-translated-entry nil "\
  305. Find the next untranslated entry, wrapping around if necessary." (interactive) (byte-code "ňÆUƒÇÈÉ!!‚*Ê    Â\"ˆË ˆ Ì=?…*Ê Â\"ˆË ˆ‚‡" [po-translated-counter po-untranslated-regexp t po-entry-type po-any-msgstr-regexp nil 0 error _ "There is no such entry" po-next-entry-with-regexp po-find-span-of-entry translated] 8))
  306.  
  307. (defun po-previous-translated-entry nil "\
  308. Find the previous untranslated entry, wrapping around if necessary." (interactive) (byte-code "ňÆUƒÇÈÉ!!‚*Ê    Â\"ˆË ˆ Ì=?…*Ê Â\"ˆË ˆ‚‡" [po-translated-counter po-any-msgstr-regexp t po-entry-type po-untranslated-regexp nil 0 error _ "There is no such entry" po-previous-entry-with-regexp po-find-span-of-entry translated] 8))
  309.  
  310. (defun po-auto-select-entry nil "\
  311. Select the next entry having the same type as the current one.
  312. If none, wrap from the beginning of the buffer with another type,
  313. going from untranslated to fuzzy, and from fuzzy to obsolete.
  314. Plain translated entries are always disregarded unless there are
  315. no entries of the other types." (interactive) (byte-code "ň̠ˆbˆ    ÍU…
  316. ÍU… ÍUƒ.Î ÅÆ#ƒ)ÏÍ!b‚+eb‚ÄÐ=ƒ9т;…ÃÑ=…k    ÍV…UΠ   ÅÆ#ƒdÏÍ!bˆÅ‰‚kebˆÒ‰ˆÒ=…•
  317. ÍV…Î
  318. ÅÆ#ƒŽÏÍ!bˆÅ‰‚•ebˆÓ‰ˆÓ=…¿ ÍV…©Î ÅÆ#ƒ¸ÏÍ!bˆÅ‰‚¿ebˆÑ‰ˆ‚=)ˆÔ ‡" [po-end-of-entry po-untranslated-counter po-fuzzy-counter po-obsolete-counter po-any-msgstr-regexp nil t goal po-entry-type po-untranslated-regexp po-fuzzy-regexp po-obsolete-msgstr-regexp po-find-span-of-entry 0 re-search-forward match-beginning translated untranslated fuzzy obsolete po-current-entry] 12))
  319.  
  320. (eval-and-compile (if (fboundp (quote kill-new)) (fset (quote po-kill-new) (symbol-function (quote kill-new))) (defun po-kill-new (string) "Push STRING onto the kill ring, for Emacs 18 where kill-new is missing." (po-check-lock) (save-excursion (set-buffer po-work-buffer) (erase-buffer) (insert string) (kill-region (point-min) (point-max))))))
  321.  
  322. (defun po-extract-unquoted (buffer start end) "\
  323. Extract and return the unquoted string in BUFFER going from START to END.
  324. Crumb preceding or following the quoted string is ignored." (byte-code "Ç ˆŠqˆÈ ˆÉ    
  325. #ˆebˆÊË!ˆÌe`\"ˆdbˆÍË!ˆÌ`d\"ˆebˆÎÏÄÅ#…<ÐÑÅÅ#ˆ‚+ˆebˆÎÒÄÅ#…ÚhÓ=ƒVÐËÅÅ#‚ÖhÔ=ƒdÐÕÅÅ#‚ÖhÖ=ƒrÐ×ÅÅ#‚ÖhØ=ƒ€ÐÙÅÅ#‚ÖhÚ=ƒŽÐÛÅÅ#‚ÖhÜ=ƒœÐÝÅÅ#‚ÖhÞ=ƒªÐßÅÅ#‚ÖhàZÐÑÅÅ#ˆáâ!…Ñãä\"gàZ\\‰ˆÐÑÅÅ#ˆ‚µˆc)ˆ‚@ˆå )‡" [po-work-buffer buffer start end nil t value po-check-lock erase-buffer insert-buffer-substring search-forward "\"" delete-region search-backward re-search-forward "\"[     ]*\\\\?
  326. #?~?[     ]*\"" replace-match "" "\\\\[\\\"abfnt\\\\0-7]" 34 97 "" 98 "" 102 " " 110 "
  327. " 116 "    " 92 "\\" 48 looking-at "[0-7]" * 8 buffer-string] 26))
  328.  
  329. (defun po-eval-requoted (form prefix obsolete) "\
  330. Eval FORM, which inserts a string, and return the string fully requoted.
  331. If PREFIX, precede the result with its contents.  If OBSOLETE, comment all
  332. generated lines in the returned string.  Evaluating FORM should insert the
  333. wanted string in the buffer which is current at the time of evaluation.
  334. If FORM is itself a string, then this string is used for insertion." (byte-code "Ç ˆŠqˆÈ ˆ    ;ƒ    c‚É ˆÊ    !ˆebˆËÌÃÄ#ebˆËÍÃÄ#…ŸhÎ=ƒ=ÏÐÄÄ#‚›hÑ=ƒKÏÒÄÄ#‚›hÓ=ƒYÏÔÄÄ#‚›hÕ=ƒgÏÖÄÄ#‚›h×=ƒ‚Ï
  335. ?†tmƒ{؂|ÙÄÄ#‚›hÚ=ƒÏÛÄÄ#‚›hÜ=…›ÏÝÄÄ#ˆ‚'ˆebˆ…«Þß\"ˆ
  336. ƒ´à‚µácˆdbˆácˆ…Ãâcˆ…áebˆm?…ág×=†Ùãcˆäâ!ˆ‚̈å ))‡" [po-work-buffer form multi-line nil t prefix obsolete po-check-lock erase-buffer push-mark eval re-search-forward "[^
  337. ]
  338. +[^
  339. ]" "[\\\"
  340.     \\\\]" 34 replace-match "\\\"" 7 "\\a" 8 "\\b" 12 "\\f" 10 "\\n" "\\n\"
  341. \"" 9 "\\t" 92 "\\\\" insert " " "\"\"
  342. \"" "\"" "
  343. " "#~ " search-forward buffer-string] 17))
  344.  
  345. (defun po-get-field (msgid kill) "\
  346. Extract and return the unquoted msgstr string, unless MSGID selects msgid.
  347. If KILL, then add the unquoted string to the kill ring." (byte-code "    ƒŠ
  348. bˆÈ Å#)ˆÉpÊË!ÌË!#‚!Ép #…*Í!ˆ)‡" [string msgid po-start-of-entry po-any-msgid-regexp po-end-of-entry t po-middle-of-entry kill re-search-forward po-extract-unquoted match-beginning 0 match-end po-kill-new] 8))
  349.  
  350. (defun po-set-field (msgid form) "\
  351. Replace the current msgstr, unless MSGID, using FORM to get a string.
  352. If MSGID is true, replace the current msgid instead.  In either case,
  353. evaluating FORM should insert the wanted string in the current buffer.
  354. If FORM is itself a string, then this string is used for insertion.
  355. The string is properly requoted before the replacement occurs." (byte-code "†Ì ˆÍ
  356. ƒ΂Ï Ð=#Š bˆÑƒ$‚&\"ˆÒÓÔÕ!ÖÕ!\"    \"?…BÉ×    ÊÊ#)ˆƒ\\Ñ!ˆÔÕ!‰ ˆÖÕ!‰‚``‰))ˆ†iØ ˆÙ ‡" [msgid string form po-entry-type po-start-of-entry po-any-msgid-regexp po-any-msgstr-regexp po-end-of-entry buffer-read-only nil t po-middle-of-entry po-decrease-type-counter po-eval-requoted "msgid" "msgstr" obsolete re-search-forward string-equal buffer-substring match-beginning 0 match-end replace-match po-increase-type-counter po-redisplay] 14))
  357.  
  358. (defun po-kill-ring-save-msgstr nil "\
  359. Push the msgstr string from current entry on the kill ring." (interactive) (byte-code "ÀˆÂ ˆÃÀÁ\"‡" [nil t po-find-span-of-entry po-get-field] 4))
  360.  
  361. (defun po-kill-msgstr nil "\
  362. Empty the msgstr string from current entry, pushing it on the kill ring." (interactive) (byte-code "ÀˆÁ ˆÂ ˆÃÀÄ\"ˆÅ ˆÆ ‡" [nil po-kill-ring-save-msgstr po-decrease-type-counter po-set-field "" po-current-entry po-increase-type-counter] 6))
  363.  
  364. (defun po-yank-msgstr nil "\
  365. Replace the current msgstr string by the top of the kill ring." (interactive) (byte-code "ÀˆÃ ˆÄ ˆÅÀ    Æ=ƒǂÈ\"ˆÉ ˆÊ ˆÆ‰‡" [nil last-command this-command po-find-span-of-entry po-decrease-type-counter po-set-field yank (yank-pop 1) (yank) po-current-entry po-increase-type-counter] 7))
  366.  
  367. (defun po-fade-out-entry nil "\
  368. Mark an active entry as fuzzy; obsolete a fuzzy or untranslated entry;
  369. or completely delete an obsolete entry, saving its msgstr on the kill ring." (interactive) (byte-code "ĈǠˆÈ ˆÉ=ƒÊ ˆËÌ!ˆÍ ˆÎ ‚žÏ=†&Ð=ƒeÑÒÓ!!…^Ê ˆŠŒÔ    
  370. \"ˆÄebˆm?…UgÕ=†MÖcˆ×Ø!ˆ‚@)))ˆÍ ˆÎ ˆÙÚ!‚žÛ=…žÊ ˆÜ ˆÝÄÅ\"ˆÄÞ    
  371. \")ˆ    bˆßÄÅ#ƒ‘àá!b‚—âÄÅ#ˆÍ ˆÙÚ!‡" [po-entry-type po-start-of-entry po-end-of-entry buffer-read-only nil t po-any-msgstr-regexp po-check-lock po-find-span-of-entry translated po-decrease-type-counter po-add-attribute "fuzzy" po-current-entry po-increase-type-counter fuzzy untranslated yes-or-no-p _ "Should I really obsolete this entry? " narrow-to-region 10 "#~ " search-forward "
  372. " message "" obsolete po-update-mode-line-string po-get-field delete-region re-search-forward match-beginning 0 re-search-backward] 24))
  373.  
  374. (defvar po-active-comment-regexp "^\\(#
  375. \\|# .*
  376. \\)+" "Regexp matching the whole editable comment part of an active entry.")
  377.  
  378. (defvar po-obsolete-comment-regexp "^\\(#~? #
  379. \\|#~? # .*
  380. \\)+" "Regexp matching the whole editable comment part of an obsolete entry.")
  381.  
  382. (defun po-get-comment (kill-flag) "\
  383. Extract and return the editable comment string, uncommented.
  384. If KILL-FLAG, then add the unquoted comment to the kill ring." (byte-code "Ê ˆp
  385. Á=Š bˆË    ƒ ‚Ç#ƒbqˆÌ ˆÍÎÏ!ÐÏ!#ˆebˆm?…RÑ    ƒ@҂AÓ!…JÔÕÇÇ#ˆÖ×!ˆ‚2ˆ    …\\Øed\"ˆÙ ‚cÕ)*‡" [buffer obsolete po-entry-type po-start-of-entry po-obsolete-comment-regexp po-active-comment-regexp po-end-of-entry t po-work-buffer kill-flag po-check-lock re-search-forward erase-buffer insert-buffer-substring match-beginning 0 match-end looking-at "#~? # ?" "#~? ?" replace-match "" forward-line 1 copy-region-as-kill buffer-string] 12))
  386.  
  387. (defun po-set-comment (form) "\
  388. Using FORM to get a string, replace the current editable comment.
  389. Evaluating FORM should insert the wanted string in the current buffer.
  390. If FORM is itself a string, then this string is used for insertion.
  391. The string is properly recommented before the replacement occurs." (byte-code "Ï ˆp
  392. Á=ÌŠ qˆÐ ˆ;ƒc‚\"Ñ ˆÒ!ˆo†*hÓU?…0Ôcˆebˆm?…]gÓUƒK    ƒGՂHւT    ƒSׂTØcˆÙÔ!ˆ‚4ˆÚ ‰)ˆbˆÛ    ƒr‚t    Ê#…‡ÜÝÞß!àß!\" \"?ƒ–Ì á ÊÊ#)‚ âã!ˆÌ c)+ˆÛ!ˆÞß!‰ˆàß!‰    ˆä ‡" [buffer obsolete po-entry-type string po-work-buffer form po-start-of-entry po-obsolete-comment-regexp po-active-comment-regexp po-end-of-entry t buffer-read-only nil po-any-msgstr-regexp po-middle-of-entry po-check-lock erase-buffer push-mark eval 10 "
  393. " "#~ #" "#" "#~ # " "# " search-forward buffer-string re-search-forward string-equal buffer-substring match-beginning 0 match-end replace-match skip-chars-forward "     
  394. " po-redisplay] 18))
  395.  
  396. (defun po-kill-ring-save-comment nil "\
  397. Push the msgstr string from current entry on the kill ring." (interactive) (byte-code "ÁˆÂ ˆÃÀ!‡" [t nil po-find-span-of-entry po-get-comment] 3))
  398.  
  399. (defun po-kill-comment nil "\
  400. Empty the msgstr string from current entry, pushing it on the kill ring." (interactive) (byte-code "ÀˆÁ ˆÂÃ!ˆÄ ‡" [nil po-kill-ring-save-comment po-set-comment "" po-redisplay] 4))
  401.  
  402. (defun po-yank-comment nil "\
  403. Replace the current comment string by the top of the kill ring." (interactive) (byte-code "ˆàˆÄÅ=ƒƂÇ!ˆÅ‰ˆÈ ‡" [last-command this-command nil po-find-span-of-entry po-set-comment yank (yank-pop 1) (yank) po-redisplay] 4))
  404.  
  405. (defun po-edit-string (string) "\
  406. Edit STRING recursively in a pop-up buffer, return the edited string.
  407. Run po-subedit-mode-hook first prior to beginning edition.  If recursive edit
  408. is aborted, return nil instead." (byte-code "Ì ˆÁ     È=͋Î
  409. !ˆ-‡" [po-work-buffer-lock t start po-start-of-entry middle po-middle-of-entry end po-end-of-entry obsolete po-entry-type po-work-buffer string po-check-lock ((byte-code "Â!ˆÃ ˆÄÅ!ˆÆ    Ç\"ˆebˆÈÉʏ‡" [po-work-buffer string pop-to-buffer erase-buffer run-hooks po-subedit-mode-hook insert "<" nil (byte-code "Á!ˆÂÃÄ!!ˆÅ ˆdbˆÆÇ!ˆhÈ=…É`Sd\"ˆÊ ‡" [po-subedit-mode-map use-local-map message _ "Type `C-c C-c' once done" recursive-edit skip-chars-backward "     
  410. " 60 delete-region buffer-string] 8) ((quit (byte-code "À‡" [nil] 1)))] 7)) bury-buffer] 7))
  411.  
  412. (defun po-edit-comment nil "\
  413. Use another window to edit the current translator comment." (interactive) (byte-code "ÁˆÂ ˆÃÄÁ!!…Å!ˆÆ )‡" [string nil po-find-span-of-entry po-edit-string po-get-comment po-set-comment po-redisplay] 6))
  414.  
  415. (defun po-edit-msgstr nil "\
  416. Use another window to edit the current msgstr." (interactive) (byte-code "ÈŠˆ…    Æ=…Ç ˆÈÉÃÃ\"!
  417. …;Ê ˆËÃ
  418. \"ˆÌ ˆ …/    Í=…8ÎÏ!ˆÌ ˆÐ )‡" [po-auto-edit-with-msgid po-entry-type string nil po-auto-fuzzy-on-edit po-find-span-of-entry untranslated po-msgid-to-msgstr po-edit-string po-get-field po-decrease-type-counter po-set-field po-current-entry translated po-add-attribute "fuzzy" po-increase-type-counter] 11))
  419.  
  420. (defun po-normalize-old-style (explain) "\
  421. Normalize old gettext style fields using K&R C multiline string syntax.
  422. To minibuffer messages sent while normalizing, add the EXPLAIN string." (byte-code "Æ ÇÃebˆÈÉÊ!     #ˆËÌÃÅ#…9Í    Î\"ÇU…*ÈÉÊ!     #ˆÏÐÅÃ#ˆ    T‰ˆ‚ˆbˆÈÉÑ!    \"+‡" [here counter buffer-read-only nil explain t point-marker 0 message _ "Normalizing %d, %s" re-search-forward "\\(^#?[     ]*msg\\(id\\|str\\)[     ]*\"\\|[^\"     ][     ]*\\)\\\\
  423. " % 10 replace-match "\\1\"
  424. \"" "Normalizing %d...done"] 12))
  425.  
  426. (defun po-normalize-field (msgid explain) "\
  427. Normalize all msgstr's, or msgid's if MSGID.
  428. To minibuffer messages sent while normalizing, add the EXPLAIN string." (byte-code "È ÉebˆÊ
  429. ÃÄ#…?Ë    Ì\"ÉU… ÍÎÏ!    #ˆÐÉ!bˆÑ ˆÒÓÃ\"\"ˆbˆ    T‰ˆ‚ˆbˆÍÎÔ!    \"*‡" [here counter po-any-msgstr-regexp nil t explain msgid po-end-of-entry point-marker 0 re-search-forward % 10 message _ "Normalizing %d, %s" match-beginning po-find-span-of-entry po-set-field po-get-field "Normalizing %d...done"] 13))
  430.  
  431. (defun po-normalize nil "\
  432. Normalize all entries in the PO file." (interactive) (byte-code "ÁˆÄÅÆ!!ˆÇÀÅÈ!\"ˆÇÁÅÉ!\"ˆ
  433. dU?…$ÁÊ
  434. d\")ˆËÁ!‡" [t nil po-end-of-entry buffer-read-only po-normalize-old-style _ "pass 1/3" po-normalize-field "pass 2/3" "pass 3/3" kill-region po-compute-counters] 9))
  435.  
  436. (defun po-show-source-path nil "\
  437. Echo the current source search path in the message area." (byte-code "    ÃÄ!…
  438. Å@@Q‰ˆA‰ˆ‚ˆÆ
  439. !*‡" [path po-search-path string _ "Path is:" " " message] 5))
  440.  
  441. (defun po-consider-source-path (directory) "\
  442. Add a given DIRECTORY, requested interactively, to the source search path." (interactive "DDirectory for search path: ") (byte-code "È    CB‰ˆÄ‰ˆÅ ‡" [po-search-path directory po-reference-check nil 0 po-show-source-path] 2))
  443.  
  444. (defun po-ignore-source-path nil "\
  445. Delete a directory, selected with completion, from the source search path." (interactive) (byte-code "ÁˆÄÅÆÇ!ÁÂ$C\"‰ˆÈ‰ˆÉ ‡" [po-search-path nil t po-reference-check delete completing-read _ "Directory to remove? " 0 po-show-source-path] 7))
  446.  
  447. (defun po-ensure-source-references nil "\
  448. Extract all references into a list, with paths resolved, if necessary." (byte-code "Ì ˆ    UƒÂ‚‘‰ˆŠbˆÍÎ Å#…ÏÐ!…ÑÒ!bˆÓÔÕ!ÑÕ!\"ÓÔÖ!ÑÖ!\"    Â
  449. @@P‰
  450. ˆ×
  451. !?…X…eA‰ˆ‚Cˆ…|
  452. ØQ
  453. Ù!E B‰,ˆ‚)ˆÚ !‰ˆ ‰ ˆ‰‡" [po-start-of-entry po-reference-check nil po-reference-alist po-middle-of-entry t name line path po-search-path file po-reference-cursor po-find-span-of-entry re-search-forward "^#:" looking-at "\\(
  454. #:\\)? *\\([^: ]+\\):\\([0-9]+\\)" match-end 0 buffer-substring match-beginning 2 3 file-exists-p ":" string-to-int nreverse] 16))
  455.  
  456. (defun po-show-source-context (triplet) "\
  457. Show the source context given a TRIPLET which is (PROMPT FILE LINE)." (byte-code "ÆA@!ˆÇAA@!ˆÈÉ!ˆÊË  @=?…,    T‰ˆ A‰ˆ‚ˆ    T‰ˆ ‰ˆ …G    T‰ˆ A‰ˆ‚6ˆÌÍÎ!
  458.     @$+‡" [triplet maximum position cursor po-reference-alist po-reference-cursor find-file-other-window goto-line other-window 1 0 nil message _ "Displaying %d/%d: \"%s\""] 9))
  459.  
  460. (defun po-cycle-source-reference nil "\
  461. Display some source context for the current entry.
  462. If the command is repeated many times in a row, cycle through contexts." (interactive) (byte-code "ÈĠˆƒÅ    Æ=ƒA†
  463. ‚@!‚$ÇÈÉ!!‡" [po-reference-cursor last-command po-reference-alist nil po-ensure-source-references po-show-source-context po-cycle-source-reference error _ "No resolved source references"] 5))
  464.  
  465. (defun po-select-source-reference nil "\
  466. Select one of the available source contexts for the current entry." (interactive) (byte-code "ÁˆÃ ˆƒÄÅÆÇÈ!ÁÂ$\"!‚ÉÇÊ!!‡" [po-reference-alist nil t po-ensure-source-references po-show-source-context assoc completing-read _ "Which source context? " error "No resolved source references"] 9))
  467.  
  468. (defun po-find-c-string (keywords) "\
  469. Find the next C string, excluding those marked by any of KEYWORDS.
  470. Returns (START . END) for the found string, or (nil . nil) if none found." (byte-code "ÂÂ?…ÆÇÂÃ#…žhÈUƒÉÊ!‚šhËUƒ3ÌgÍUƒ.΂/Ï!‚šŠÐ ˆÑÒ!)ƒCÓ ‚š`S‰ˆgÔU?…`ÕÖ!ˆgÍU…\\ÌÏ!ˆ‚HˆÌ×!ˆ`‰ˆbˆØÙ!ˆhÚU…šÛ×!ˆØÙ!ˆ`ØÜ!ˆÝÞ` \"C\"…™    bˆÂ‰ˆÂ‰)ˆ‚ˆ    B*‡" [start end nil t end-keyword keywords re-search-forward "\\([\"']\\|/\\*\\)" 42 search-forward "*/" 39 forward-char 92 3 2 beginning-of-line looking-at "^# *\\(include\\|line\\)" end-of-line 34 skip-chars-forward "^\"\\\\" 1 skip-chars-backward " 
  471.     " 40 backward-char "_A-Za-z0-9" member buffer-substring] 18))
  472.  
  473. (defun po-mark-c-string (start end keyword) "\
  474. Mark the C string, from START to END, with KEYWORD.
  475. Return the adjusted value for END." (byte-code "bˆÃcˆ    bˆ
  476. cˆÄ
  477. Å\"?…ÆcˆT‰ˆÇcˆÈÉ
  478. G#‡" [end start keyword ")" string-equal "_" " " "(" + 2] 5))
  479.  
  480. (defun po-find-emacs-lisp-string (keywords) "\
  481. Find the next Emacs LISP string, excluding those marked by any of KEYWORDS.
  482. Returns (START . END) for the found string, or (nil . nil) if none found." (byte-code "ÂÂ?…ÆÇÂÃ#…†hÈUƒÉÊ!‚‚hËUƒ3ÌgÍUƒ.΂/Ï!‚‚`S‰ˆgÐU?…PÑÒ!ˆgÍU…LÌÎ!ˆ‚8ˆÌÏ!ˆ`‰ˆbˆÓÔ!ˆ`ÓÕ!ˆhÖU…tר` \"C\"…    bˆÂ‰ˆÂ‰)ˆ‚ˆ    B*‡" [start end nil t end-keyword keywords re-search-forward "[;\"?]" 59 search-forward "
  483. " 63 forward-char 92 2 1 34 skip-chars-forward "^\"\\\\" skip-chars-backward " 
  484.     " "-_A-Za-z0-9" 40 member buffer-substring] 13))
  485.  
  486. (defun po-mark-emacs-lisp-string (start end keyword) "\
  487. Mark the Emacs LISP string, from START to END, with KEYWORD.
  488. Return the adjusted value for END." (byte-code "bˆÃcˆ    bˆÄÅ
  489. \"ˆÆ
  490. Ç\"?…ÈcˆT‰ˆÉÊ
  491. G#‡" [end start keyword ")" insert "(" string-equal "_" " " + 2] 6))
  492.  
  493. (eval-and-compile (autoload (quote visit-tags-table-buffer) "etags"))
  494.  
  495. (defun po-tags-search (restart) (interactive "P") (byte-code "ˆш… ‰ˆ ÂÂÂÂ
  496.     ?…     ?…BŠÒ ˆÓÔ !)‰ˆ    †=ÕÖ×!!ˆÂ‰    ˆØÖÙ!    @\"ˆŠÚ    @!‰ˆqˆ    †^ebˆÛ Ü\"ƒ~Ý !  @‰ˆ A‰    )‚«Û Þ\"ƒœß !  @‰ˆ A‰    )‚«ØÖà!!ˆÂ‰ˆÂ‰    )ˆ?ƒÊ    A‰ˆ    ?…ÂÕÖá!!ˆÂ‰    ‚â    #ˆŠqˆebˆãäÂÍ#ƒê͉‚ãåÂÍ#…æ ebˆãçÂÍ#…
  497. èéÍÍ#ˆ‚ùˆêëæ \"W…͉))ˆ‚ˆìÍ!ƒ,í ‚/îï!ˆð!ˆbˆñï!ˆò    !ƒJ    b‚Q    bˆñó!ˆîï!ˆØÖô!    @\"ˆ‰ˆ    ‰
  498. .‡" [restart po-next-file-list nil keywords po-keywords find-string found buffer start end po-string-end mode-name pair t po-work-buffer total po-string-start "Find an unmarked translatable string through all files in tags table.
  499. Disregard some simple strings which are most probably non-translatable.
  500. With prefix argument, restart search at first file." visit-tags-table-buffer copy-sequence tags-table-files error _ "No files to process" message "Scanning %s..." find-file-noselect string= "C" po-find-c-string "Emacs-Lisp" po-find-emacs-lisp-string "Unknown source mode for PO mode, skipping..." "All files processed" po-extract-unquoted re-search-forward "[A-Za-z][A-Za-z][A-Za-z]" "[A-Za-z][A-Za-z]" buffer-size "[A-Za-z]+" replace-match "" * 2 one-window-p split-window other-window 1 switch-to-buffer recenter pos-visible-in-window-p -1 "Scanning %s...done"] 36))
  501.  
  502. (defun po-mark-found-string (keyword) "\
  503. Mark last found string in program sources as translatable, using KEYWORD." (byte-code "Π   @! ÌÌÏ
  504. #‰ˆŠqˆÐe
  505. \"‰ˆÑÒ\"ƒ5Ó
  506.     #‚KÑÔ\"ƒFÕ
  507.     #‚KÖר!!‰)ˆ ‰ˆÌ dbˆÙÚÛÜ    @#ÝÞÌ#ß$ˆàá!ˆT‰ˆâ )-‡" [buffer po-next-file-list start po-string-start end po-string-end line string mode-name keyword t buffer-read-only nil po-untranslated-counter find-file-noselect po-extract-unquoted count-lines string= "C" po-mark-c-string "Emacs-Lisp" po-mark-emacs-lisp-string error _ "Cannot mark in unknown source mode" insert "
  508. " format "#: %s:%d
  509. " po-eval-requoted "msgid" "msgstr \"\"
  510. " previous-line 1 po-update-mode-line-string] 17))
  511.  
  512. (defun po-mark-translatable nil (interactive) (byte-code "ˆÈ…        ƒÄÅ!ˆÂ‰‚ÆÇÈ!!‡" [po-string-start po-string-end nil "Mark last found string in program sources as translatable, using `_'." po-mark-found-string "_" error _ "No such string"] 4))
  513.  
  514. (defun po-select-mark-and-mark (arg) (interactive "P") (byte-code "ƈȈƒÉÊË!!C    Ì    
  515. \"B‰)‚N …  ƒI
  516. @@ÍÎÊÏ!\"
  517. ÆÇ$Р   Ñ\"…=‰ˆÒ    !ˆÆ‰*‚NÓÊÔ!!‡" [arg keyword po-keywords po-string-start po-string-end default nil t "Mark last found string in program sources as translatable, ask for keywoard,
  518. using completion.  With prefix argument, just ask the name of a preferred
  519. keyword for subsequent commands, also added to possible completions." read-from-minibuffer _ "Keyword: " delete completing-read format "Mark with keywoard? [%s] " string-equal "" po-mark-found-string error "No such string"] 11))
  520.  
  521. (defun po-help nil "\
  522. Provide an help window for PO mode." (interactive) (byte-code "ˆàˆÄ‹ˆÅ!‡" [po-work-buffer po-help-display-string nil po-check-lock ((byte-code "Â!ˆÃ ˆ    cˆÄ ˆebˆÅÆÇ!!ˆr‡" [po-work-buffer po-help-display-string switch-to-buffer erase-buffer delete-other-windows message _ "Type any character to continue"] 6)) bury-buffer] 3))
  523.  
  524. (defun po-undo nil "\
  525. Undo the last change to the PO file." (interactive) (byte-code "ÁˆÁ )ˆÃÁ!‡" [buffer-read-only nil undo po-compute-counters] 3))
  526.  
  527. (defun po-statistics nil "\
  528. Say how many entries in each category, and the current position." (interactive) (byte-code "ÁˆÂÀ!‡" [t nil po-compute-counters] 2))
  529.  
  530. (defun po-validate nil "\
  531. Use `msgfmt' for validating the current PO file contents." (interactive) (byte-code "ÈĠ…    Å ˆ    Æ
  532. QÇ!)‡" [compile-command po-msgfmt-program buffer-file-name nil buffer-modified-p po-replace-revision-date " --statistics -c -v -o /dev/null " compile] 5))
  533.  
  534. (defun po-confirm-and-quit nil "\
  535. Confirm if quit should be attempted and then, do it.
  536. This is a failsafe.  Confirmation is asked if only the real quit would not." (interactive) (byte-code "ÈĠ†ÅV†    ÅV†
  537. ÅV†ÆÇÈ!!…#É ˆÊË!‡" [po-untranslated-counter po-fuzzy-counter po-obsolete-counter nil buffer-modified-p 0 y-or-n-p _ "Really quit editing this PO file? " po-quit message ""] 6))
  538.  
  539. (defun po-quit nil "\
  540. Save the PO file and kill buffer.  However, offer validation if
  541. appropriate and ask confirmation if untranslated strings remain." (interactive) (byte-code "ˆÁÇ …ÈÉÊ!!?…ËÌ!ˆÂ‰ˆÍ ˆ…9 ÎV†0 ÎV†0ÎV…9ÈÉÏ!!?…B‰ˆÐ ˆËÌ!ˆ…dÇ …RÑ ˆÒ ˆÓÔ!†`Õ!ˆÕp!)‡" [quit t nil po-untranslated-counter po-fuzzy-counter po-obsolete-counter po-work-buffer buffer-modified-p y-or-n-p _ "File was modified; skip validation step? " message "" po-validate 0 "Unprocessed entries remain; quit anyway? " po-auto-select-entry po-replace-revision-date save-buffer boundp kill-buffer-hook kill-buffer] 16))
  542.