mirror of https://github.com/texmacs/doc.git
Replace no_name predicate by buffer_has_name
This commit is contained in:
parent
53b975df66
commit
0fe31d6618
|
@ -76,7 +76,7 @@
|
||||||
automatically select a certain style when starting a new document:
|
automatically select a certain style when starting a new document:
|
||||||
|
|
||||||
<\scm-code>
|
<\scm-code>
|
||||||
(if (no-name?)
|
(if (not (buffer-has-name? (current-buffer)))
|
||||||
|
|
||||||
\ \ \ \ (begin
|
\ \ \ \ (begin
|
||||||
|
|
||||||
|
@ -85,11 +85,11 @@
|
||||||
\ \ \ \ \ \ (buffer-pretend-saved (current-buffer))))
|
\ \ \ \ \ \ (buffer-pretend-saved (current-buffer))))
|
||||||
</scm-code>
|
</scm-code>
|
||||||
|
|
||||||
Notice that the check <verbatim|(no-name?)> is important: when omitted, the
|
Notice that the ``no name'' check is important: when omitted, the styles of
|
||||||
styles of existing documents would also be changed to <tmstyle|article>.
|
existing documents would also be changed to <tmstyle|article>. The function
|
||||||
The function <scm|buffer-pretend-saved> is used in order to avoid <TeXmacs>
|
<scm|buffer-pretend-saved> is used in order to avoid <TeXmacs> to complain
|
||||||
to complain about unsaved documents when leaving <TeXmacs> without changing
|
about unsaved documents when leaving <TeXmacs> without changing the
|
||||||
the document.
|
document.
|
||||||
|
|
||||||
Another typical use of <verbatim|my-init-buffer.scm> is when you mainly
|
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
|
want to use <TeXmacs> as a front-end to another system. For instance, the
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
session for every newly opened document:
|
session for every newly opened document:
|
||||||
|
|
||||||
<\scm-code>
|
<\scm-code>
|
||||||
(if (no-name?)
|
(if (not (buffer-has-name? (current-buffer)))
|
||||||
|
|
||||||
\ \ \ \ (make-session "maxima" (url-\<gtr\>string (current-buffer))))
|
\ \ \ \ (make-session "maxima" (url-\<gtr\>string (current-buffer))))
|
||||||
</scm-code>
|
</scm-code>
|
||||||
|
|
Loading…
Reference in New Issue