[Freeciv-Dev] Re: po-files are too big (PR#561)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Gaute B Strokkenes wrote:
> Erik Sigra <freeciv@xxxxxxx> writes:
> > have GNU xgettext
>
> GNU gettext, you mean?
I guees you're right. xgettext is just a part of the package.
> > installed to do this. Then you need to add the following to your
> > '~/.gnu-emacs' file
>
> .gnu-emacs ? The conventional name is .emacs . What kind of system
> are you using?
I use SuSE 6.4. (See my attached .*emacs* files for more information.)
> > (setq auto-mode-alist
> > (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
> > (autoload 'po-mode "po-mode")
> > (autoload 'po-find-file-coding-system "po-mode")
> > (modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
> > 'po-find-file-coding-system)
> >
> > Save it and restart emacs with a po-file. Now the buffer should
> > become highlighted with beautiful colors.
>
> I don't think that it's a good idea to include detailed instructions
> on how to install things by hand. If gettext has already been
> installed by your sysmonster or if you're using some sort of package
> system, this can screw thing up quite severly.
These configuration lines is what I get if I type 'info gettext', select
'Basics' and select 'Installation'. Whatever a "sysmonster" might be, it has to
be me at my place, because I added those lines.
> > If you get the error message "Fontifying XX.po...buffer too big"
> > and don't get the colors, you have to increase the value of the
> > variable font-lock-maximum-size. To do this, open the 'Help' menu
> > and select 'Describe', then 'Descrive variable... (C-h v)'. Type
> > 'font-lock-maximum-size'. Read the helptext in the buffer that
> > opens and middleclick on the underlined word 'customize'. Change
> > the value to something high like 1048576 (2^20). (Your
> > customizations are saved in the file '~/.gnu-emacs-custom'.)
>
> First of all, not emacsen have menus. Mine doesn't. I can
> middle-click etc. either, since I'm using the console. I think it's
> better to point people in the direction of the emacs manual and
> M-x customize. Also, the value 2^20 seems a bit arbitrary. It's
> better to have a look at the actual .po files and add 10% or something
> like that. (My apologies if you've done that already.)
I don't think the value 2^20 is arbitrary. It is exactly 1MB and if I select
describe variable, the help actually includes exactly this value (1048576) in
an example:
"If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
where MAJOR-MODE is a symbol or t (meaning the default). For example:
((c-mode . 256000) (c++-mode . 256000) (rmail-mode . 1048576))
means that the maximum size is 250K for buffers in C or C++ modes, one megabyte
for buffers in Rmail mode, and size is irrelevant otherwise."
> Don't tell people where their customisations etc. are going to end up,
> because you will inevitably be wrong about the exact setup and version of
> the person at the other end.
OK.
> Lastly, it might be nice to know why they need to set this variable.
I added a sentence to explain this.
Here is the new text:
* How do I edit po-files?
Although po-files can be edited directly, the safest and most
convenient way to edit them is to use the emacs po-mode. You need to
have GNU gettext installed to do this. Type 'info gettext', select
'Basics' and select 'Installation' for more information about
installing the emacs po-mode.
If you get the error message "Fontifying XX.po...buffer too big"
when opening a po-file and don't get the colors, you have to
increase the value of the variable font-lock-maximum-size. This is
because emacs refuses to fontify buffers larger than this value. To
change the value, press 'C-h v' and type 'font-lock-maximum-size'.
Read the helptext in the buffer that opens and select the underlined
word 'customize'. Change the value to something high like 1048576
(2^20). Now the files should become fontified when you open them
(unless they are larger than 1MB).
> --
> Big Gaute (not to be confused with LG)
> Civilization is fun! Anyway, it keeps me busy!!
Keeps me busy too!! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File name: ` ~/.emacs '
;;; ---------------------
;;;
;;; Note: This file switches between two Emacs versions:
;;; GNU-Emacs (19.34/20.X) and X-Emacs (19.14/20.X).
;;; Please to not mix both versions: GNU-Emacs and X-Emacs
;;; are incompatible. They use differnet binary code for
;;; compiled lisp files and they have different builtin
;;; lisp functions ... not only names of such functions
;;; are different!!!
;;;
;;; If you need your own personal ~/.emacs
;;; please make a copy of this file
;;; an placein your changes and/or extension.
;;;
;;; Copyright (c) 1997 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved.
;;;
;;; Author: Werner Fink, <werner@xxxxxxx> 1997,98,99
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Test of Emacs derivates
;;; -----------------------
(if (string-match "XEmacs\\|Lucid" emacs-version)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; XEmacs
;;; ------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(progn
;;
;; If not exists create the XEmacs options file
;; --------------------------------------------
(if (and (not (file-readable-p "~/.xemacs-options"))
(fboundp 'save-options-menu-settings))
(save-options-menu-settings))
;;
;; Remember font and more settings
;; -------------------------------
(setq options-save-faces t)
;;
;; AUC-TeX
;; -------
(if (or (file-accessible-directory-p
"/usr/X11R6/lib/xemacs/site-lisp/auctex/")
(or (and (= emacs-major-version 19)
(>= emacs-minor-version 15))
(= emacs-major-version 20)))
(progn
(require 'tex-site)
(setq-default TeX-master nil)
; Users private libaries
; (setq TeX-macro-private '("~/lib/tex-lib/"))
; AUC-TeX-Macros
; (setq TeX-style-private "~/lib/xemacs/site-lisp/auctex/style/")
; Autom. Auc-TeX-Macros
; (setq TeX-auto-private "~/lib/xemacs/site-lisp/auctex/auto/")
))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; GNU-Emacs
;;; ---------
;;; load ~/.gnu-emacs or, if not exists /etc/skel/.gnu-emacs
;;; For a description and the settings see /etc/skel/.gnu-emacs
;;; ... for your private ~/.gnu-emacs your are on your one.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(if (file-readable-p "~/.gnu-emacs")
(load "~/.gnu-emacs" nil t)
(if (file-readable-p "/etc/skel/.gnu-emacs")
(load "/etc/skel/.gnu-emacs" nil t)))
;; Custum Settings
;; ===============
;; To avoid any trouble with the customization system of GNU emacs
;; we set the default file ~/.gnu-emacs-custom
(setq custom-file "~/.gnu-emacs-custom")
(load "~/.gnu-emacs-custom" t t)
;;;
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; XEmacs load options
;;; -------------------
;;; If missing the next few lines they will be append automatically
;;; by xemacs. This will be done by `save-options-menu-settings'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Custum Settings
;; ===============
;; Set custom-file to ~/.xemacs-custom for XEmacs to avoid overlap with the
;; custom interface of GNU-Emacs. Nevertheless, in most cases GNU-Emacs can
;; not handle unknown functions in ~/.emacs .. therefore ~/.xemacs-custom.
(cond
((string-match "XEmacs" emacs-version)
(setq custom-file "~/.xemacs-custom")
(load "~/.xemacs-custom" t t)))
;; ======================
;; End of Custum Settings
;; Options Menu Settings
;; =====================
(cond
((and (string-match "XEmacs" emacs-version)
(boundp 'emacs-major-version)
(or (and
(= emacs-major-version 19)
(>= emacs-minor-version 14))
(= emacs-major-version 20))
(fboundp 'load-options-file))
(load-options-file "~/.xemacs-options")))
;; ============================
;; End of Options Menu Settings
(setq scroll-step 1)
(global-font-lock-mode t)
(column-number-mode t)
(setq font-lock-maximum-decoration t)
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(setq default-frame-alist
`((font . "-adobe-courier-medium-r-normal-*-*-240-*-*-m-*-iso8859-1")
,@default-frame-alist))
(setq auto-mode-alist
(cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
(autoload 'po-mode "po-mode")
(autoload 'po-find-file-coding-system "po-mode")
(modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
'po-find-file-coding-system)
(custom-set-variables
'(font-lock-maximum-size 1048576))
(custom-set-faces)
[Freeciv-Dev] Re: po-files are too big (PR#561), Erik Sigra, 2000/09/17
[Freeciv-Dev] Re: po-files are too big (PR#561), Erik Sigra, 2000/09/21
|
|