From: Richard Stallman <[EMAIL PROTECTED]> Date: Fri, 25 Mar 2005 01:43:07 -0500
We could make that a general rule: every tutorial translation must start with a sentence that translates "Emacs tutorial". sorry, i misunderstood this simple sentence and implemented the wrong thing (gotta slow down sometimes and be more careful). please find below a revised patch that uses the first sentence of the file as the text for the splash screen. unfortunately, i prematurely committed changes to the actual TUTORIAL files due to concerns that translators might not see the proposed changes. i think it's best that i stick w/ the code and let Marcelo and others handle updates to those files. :-( thi _____________________________________________ cvs -f diff -c startup.el diff -c -r1.340 startup.el *** startup.el 6 Mar 2005 00:48:45 -0000 1.340 --- startup.el 30 Mar 2005 22:33:59 -0000 *************** *** 1004,1012 **** using the mouse.\n\n" :face (variable-pitch :weight bold) "Important Help menu items:\n" ! :face variable-pitch "\ ! Emacs Tutorial\tLearn-by-doing tutorial for using Emacs efficiently ! Emacs FAQ\tFrequently asked questions and answers Read the Emacs Manual\tView the Emacs manual using Info \(Non)Warranty\tGNU Emacs comes with " :face (variable-pitch :slant oblique) --- 1004,1046 ---- using the mouse.\n\n" :face (variable-pitch :weight bold) "Important Help menu items:\n" ! :face variable-pitch ! (lambda () ! (concat ! (let ((tut (expand-file-name ! (or (get-language-info current-language-environment ! 'tutorial) ! "TUTORIAL") ! data-directory))) ! (with-temp-buffer ! (insert-file-contents tut nil 0 80) ! (search-forward ".") ! (buffer-substring (point-min) (point)))) ! "\t")) ! :face (variable-pitch :weight bold) ! (lambda () ! (if (not data-directory) ! "Learn-by-doing tutorial for using Emacs efficiently." ! (let* ((tut (get-language-info current-language-environment ! 'tutorial)) ! (en-prefix (if (or (not tut) (string= "TUTORIAL" tut)) ! "" ! "(Emacs Tutorial) ")) ! (break (- (length en-prefix))) ! langs s len) ! (dolist (filename (directory-files data-directory)) ! (when (string-match "TUTORIAL.\\([a-z][a-z]\\(_[A-Z]+\\)*$\\)" ! filename) ! (push (match-string 1 filename) langs))) ! (setq s (mapconcat 'identity (sort (cons "en" langs) 'string<) ! ", ") ! len (length s)) ! (while (and (< (setq break (+ 50 break)) len) ! (setq break (string-match ", " s break))) ! (aset s break ?\n) ! (aset s (1+ break) ?\t)) ! (concat en-prefix s "\n")))) ! :face variable-pitch "\ Read the Emacs Manual\tView the Emacs manual using Info \(Non)Warranty\tGNU Emacs comes with " :face (variable-pitch :slant oblique) *************** *** 1069,1082 **** (defun fancy-splash-insert (&rest args) "Insert text into the current buffer, with faces. ! Arguments from ARGS should be either strings or pairs `:face FACE', where FACE is a valid face specification, as it can be used with `put-text-properties'." (let ((current-face nil)) (while args (if (eq (car args) :face) (setq args (cdr args) current-face (car args)) ! (insert (propertize (car args) 'face current-face 'help-echo fancy-splash-help-echo))) (setq args (cdr args))))) --- 1103,1120 ---- (defun fancy-splash-insert (&rest args) "Insert text into the current buffer, with faces. ! Arguments from ARGS should be either strings, functions called ! with no args that return a string, or pairs `:face FACE', where FACE is a valid face specification, as it can be used with `put-text-properties'." (let ((current-face nil)) (while args (if (eq (car args) :face) (setq args (cdr args) current-face (car args)) ! (insert (propertize (let ((it (car args))) ! (if (functionp it) ! (funcall it) ! it)) 'face current-face 'help-echo fancy-splash-help-echo))) (setq args (cdr args))))) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel