1
0
Fork 0

Replace no_name predicate by buffer_has_name

This commit is contained in:
Joris van der Hoeven 2012-03-21 14:40:12 +00:00
parent 53b975df66
commit 0fe31d6618
1 changed files with 7 additions and 7 deletions

View File

@ -76,7 +76,7 @@
automatically select a certain style when starting a new document:
<\scm-code>
(if (no-name?)
(if (not (buffer-has-name? (current-buffer)))
\ \ \ \ (begin
@ -85,11 +85,11 @@
\ \ \ \ \ \ (buffer-pretend-saved (current-buffer))))
</scm-code>
Notice that the check <verbatim|(no-name?)> is important: when omitted, the
styles of existing documents would also be changed to <tmstyle|article>.
The function <scm|buffer-pretend-saved> is used in order to avoid <TeXmacs>
to complain about unsaved documents when leaving <TeXmacs> without changing
the document.
Notice that the ``no name'' check is important: when omitted, the styles of
existing documents would also be changed to <tmstyle|article>. The function
<scm|buffer-pretend-saved> is used in order to avoid <TeXmacs> to complain
about unsaved documents when leaving <TeXmacs> without changing the
document.
Another typical use of <verbatim|my-init-buffer.scm> is when you mainly
want to use <TeXmacs> as a front-end to another system. For instance, the
@ -97,7 +97,7 @@
session for every newly opened document:
<\scm-code>
(if (no-name?)
(if (not (buffer-has-name? (current-buffer)))
\ \ \ \ (make-session "maxima" (url-\<gtr\>string (current-buffer))))
</scm-code>