[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible change to startup.el
From: |
Thien-Thi Nguyen |
Subject: |
Re: Possible change to startup.el |
Date: |
Sun, 03 Apr 2005 12:31:15 +0200 |
From: Richard Stallman <address@hidden>
Date: Thu, 31 Mar 2005 23:11:17 -0500
That needs to be done in order for this patch to be installed.
please find below a revised patch, including two files (lisp/startup.el
and etc/TUTORIAL.jp). here is a suitable ChangeLog entry for the code:
* startup.el (fancy-splash-text): Shorten default text of
"Emacs Tutorial" line. Also, if the current language env
indicates an available tutorial file other than TUTORIAL,
extract its title and append it to the line in parentheses.
(fancy-splash-insert): If an arg is a thunk, funcall it.
i have completely dropped LIST-OF-AVAILABLE-TUTORIALS, and furthermore,
in consideration that all these are menu items, used the English text
"Emacs Tutorial" unconditionally since that is what is on the menu. in
other words, the design has changed from substitutive to additive.
thi
___________________________________________________________
cvs -f diff -c lisp/startup.el etc/TUTORIAL*
Index: lisp/startup.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/startup.el,v
retrieving revision 1.340
diff -c -r1.340 startup.el
*** lisp/startup.el 6 Mar 2005 00:48:45 -0000 1.340
--- lisp/startup.el 3 Apr 2005 10:15:25 -0000
***************
*** 1004,1011 ****
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 "
--- 1004,1030 ----
using the mouse.\n\n"
:face (variable-pitch :weight bold)
"Important Help menu items:\n"
! :face variable-pitch
! (lambda ()
! (let* ((en "TUTORIAL")
! (tut (or (get-language-info current-language-environment
! 'tutorial)
! en))
! (title (with-temp-buffer
! (insert-file-contents
! (expand-file-name tut data-directory)
! nil 0 256)
! (search-forward ".")
! (buffer-substring (point-min) (1- (point))))))
! ;; If there is a specific tutorial for the current language
! ;; environment and it is not English, append its title.
! (concat
! "Emacs Tutorial\tLearn how to use Emacs efficiently"
! (if (string= en tut)
! ""
! (concat " (" title ")"))
! "\n")))
! :face variable-pitch "\
Emacs FAQ\tFrequently asked questions and answers
Read the Emacs Manual\tView the Emacs manual using Info
\(Non)Warranty\tGNU Emacs comes with "
***************
*** 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)))))
--- 1088,1105 ----
(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)))))
Index: etc/TUTORIAL.ja
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/TUTORIAL.ja,v
retrieving revision 1.11
diff -c -r1.11 TUTORIAL.ja
*** etc/TUTORIAL.ja 2 Apr 2005 18:29:00 -0000 1.11
--- etc/TUTORIAL.ja 3 Apr 2005 10:15:26 -0000
***************
*** 1,4 ****
! Emacs $BF~Lg%,%$%I$G$9(B.
Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
Emacs $B$N%3%^%s%I$rF~NO$9$k$K$O!"0lHL$K%3%s%H%m!<%k%-!<!J%-!<%H%C%W$K(B
--- 1,4 ----
! Emacs $BF~Lg%,%$%I(B.
Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
Emacs $B$N%3%^%s%I$rF~NO$9$k$K$O!"0lHL$K%3%s%H%m!<%k%-!<!J%-!<%H%C%W$K(B
Compilation exited abnormally with code 1 at Sun Apr 3 12:21:30
- Re: Possible change to startup.el, Richard Stallman, 2005/04/03
- Re: Possible change to startup.el,
Thien-Thi Nguyen <=
- Re: Possible change to startup.el, Juri Linkov, 2005/04/07
- Re: Possible change to startup.el, Richard Stallman, 2005/04/07
- Re: Possible change to startup.el, Marcelo Toledo, 2005/04/08
- Re: Possible change to startup.el, Kenichi Handa, 2005/04/08
- Re: Possible change to startup.el, Juri Linkov, 2005/04/08
- Re: Possible change to startup.el, Marcelo Toledo, 2005/04/08
- Re: Possible change to startup.el, Richard Stallman, 2005/04/09
- Re: Possible change to startup.el, Eli Zaretskii, 2005/04/08
- Re: Possible change to startup.el, Juri Linkov, 2005/04/08
- Re: Possible change to startup.el, Eli Zaretskii, 2005/04/09