[Xfce-i18n] Emacs po-mode patch

Adriano Winter Bess awbess at gmail.com
Sun Nov 6 01:02:44 CET 2005


Hello,

I was wondering how I could customise the options which are passed to msgfmt
using po-validate from within Emacs po-mode so I could check for accelerators
too. Well, what I actually found out is that the options are hardcoded into
po-mode.el.

Attached to this message is a small patch against po-mode.el which allows you to
customise the options passed to msgfmt putting something such as (from my
.emacs):

(setq po-msgfmt-opts "--statistics -c --check-accelerators=_ -v -o /dev/null")

in your .emacs. I hope it can be useful for others in this list.

PS: I'm no lisp guru, enhancements to this patch are really welcome ;)

Regards,
Adriano
-- 
Adriano Winter Bess
ICQ: 21569917
Irc: nyquide

-------------- next part --------------
--- /usr/share/emacs/site-lisp/gettext/po-mode.el.bak	2005-07-06 12:40:01.000000000 -0300
+++ /usr/share/emacs/site-lisp/gettext/po-mode.el	2005-11-05 01:26:04.344529080 -0200
@@ -907,6 +907,9 @@
 (defvar po-msgfmt-program "msgfmt"
   "Path to msgfmt program from GNU gettext package.")
 
+(defvar po-msgfmt-opts "msgfmtopts"
+  "Options to pass to the msgfmt program.")
+
 ;; Font lock based highlighting code.
 (defconst po-font-lock-keywords
   '(
@@ -3104,7 +3107,7 @@
 	  (function (lambda (mode-name)
 		      (concat "*" mode-name " validation*"))))
 	 (compile-command (concat po-msgfmt-program
-                                 " --statistics -c -v -o " dev-null " "
+                                 " " po-msgfmt-opts " "
                                  buffer-file-name)))
     (po-msgfmt-version-check)
     (compile compile-command)))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.xfce.org/pipermail/xfce-i18n/attachments/20051105/8b31aec5/attachment.pgp>


More information about the Xfce-i18n mailing list