aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorMiles Bader2004-10-14 08:50:09 +0000
committerMiles Bader2004-10-14 08:50:09 +0000
commit91900dd736dc0ab57a38da1fa9daa5ddde487bfb (patch)
treef592b350cad8a3a6bd196722bb553469c5781c1a /lispref
parent2beba76dd5f6e3f1fcf9cba8b66e465ae9e20519 (diff)
parentebbeed623cb9902e520fc67d6d271e222e16867f (diff)
downloademacs-91900dd736dc0ab57a38da1fa9daa5ddde487bfb.tar.gz
emacs-91900dd736dc0ab57a38da1fa9daa5ddde487bfb.zip
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-594 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-598 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-599 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-600 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-602 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-603 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-604 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-609 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-610 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-611 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-614 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-615 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-42 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-43 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-44 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-46 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-47 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-48 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-49 Add {arch}/=commit-merge-make-log * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-50 {arch}/=commit-merge-make-log: Don't die if there are no ChangeLog changes
Diffstat (limited to 'lispref')
-rw-r--r--lispref/ChangeLog18
-rw-r--r--lispref/display.texi104
-rw-r--r--lispref/searching.texi46
-rw-r--r--lispref/text.texi4
4 files changed, 147 insertions, 25 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index b568e99fb58..c33e49ca773 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,21 @@
12004-10-09 Luc Teirlinck <teirllm@auburn.edu>
2
3 * text.texi (Filling): Add anchor for definition of
4 `sentence-end-double-space'.
5
6 * searching.texi (Regexp Example): Update description of how
7 Emacs currently recognizes the end of a sentence.
8 (Standard Regexps): Update definition of the variable
9 `sentence-end'. Add definition of the function `sentence-end'.
10
112004-10-08 Paul Pogonyshev <pogonyshev@gmx.net>
12
13 * display.texi (Progress): New node.
14
152004-10-05 Kim F. Storm <storm@cua.dk>
16
17 * display.texi (Fringe Bitmaps): Update fringe-bitmaps-at-pos.
18
12004-09-29 Kim F. Storm <storm@cua.dk> 192004-09-29 Kim F. Storm <storm@cua.dk>
2 20
3 * display.texi (Fringe Bitmaps): Use symbols rather than numbers 21 * display.texi (Fringe Bitmaps): Use symbols rather than numbers
diff --git a/lispref/display.texi b/lispref/display.texi
index 00b91fe1fd8..d7e1303abad 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -16,6 +16,7 @@ that Emacs presents to the user.
16* Truncation:: Folding or wrapping long text lines. 16* Truncation:: Folding or wrapping long text lines.
17* The Echo Area:: Where messages are displayed. 17* The Echo Area:: Where messages are displayed.
18* Warnings:: Displaying warning messages for the user. 18* Warnings:: Displaying warning messages for the user.
19* Progress:: Informing user about progress of a long operation.
19* Invisible Text:: Hiding part of the buffer text. 20* Invisible Text:: Hiding part of the buffer text.
20* Selective Display:: Hiding part of the buffer text (the old way). 21* Selective Display:: Hiding part of the buffer text (the old way).
21* Overlay Arrow:: Display of an arrow to indicate position. 22* Overlay Arrow:: Display of an arrow to indicate position.
@@ -533,6 +534,104 @@ symbols. If it matches the first few elements in a warning type, then
533that warning is not logged. 534that warning is not logged.
534@end defopt 535@end defopt
535 536
537@node Progress
538@section Reporting Operation Progress
539@cindex progress reporting
540
541When an operation can take a while to finish, you should inform the
542user about the progress it makes. This way the user can estimate
543remaining time and clearly see that Emacs is busy working, not hung.
544
545Functions listed in this section provide simple and efficient way of
546reporting operation progress. Here is a working example that does
547nothing useful:
548
549@example
550(let ((progress-reporter
551 (make-progress-reporter "Collecting some mana for Emacs..."
552 0 500)))
553 (dotimes (k 500)
554 (sit-for 0.01)
555 (progress-reporter-update progress-reporter k))
556 (progress-reporter-done progress-reporter))
557@end example
558
559@defun make-progress-reporter message min-value max-value &optional current-value min-change min-time
560This function creates a progress reporter---the object you will use as
561an argument for all other functions listed here. The idea is to
562precompute as much data as possible to make progress reporting very
563fast.
564
565The @var{message} will be displayed in the echo area, followed by
566progress percentage. @var{message} is treated as a simple string. If
567you need it to depend on a filename, for instance, use @code{format}
568before calling this function.
569
570@var{min-value} and @var{max-value} arguments stand for starting and
571final states of your operation. For instance, if you scan a buffer,
572they should be the results of @code{point-min} and @code{point-max}
573correspondingly. It is required that @var{max-value} is greater than
574@var{min-value}. If you create progress reporter when some part of
575the operation has already been completed, then specify
576@var{current-value} argument. But normally you should omit it or set
577it to @code{nil}---it will default to @var{min-value} then.
578
579Remaining arguments control the rate of echo area updates. Progress
580reporter will wait for at least @var{min-change} more percents of the
581operation to be completed before printing next message.
582@var{min-time} specifies the minimum time in seconds to pass between
583successive prints. It can be fractional. Depending on Emacs and
584system capabilities, progress reporter may or may not respect this
585last argument or do it with varying precision. Default value for
586@var{min-change} is 1 (one percent), for @var{min-time}---0.2
587(seconds.)
588
589This function calls @code{progress-reporter-update}, so the first
590message is printed immediately.
591@end defun
592
593@defun progress-reporter-update reporter value
594This function does the main work of reporting progress of your
595operation. It print the message of @var{reporter} followed by
596progress percentage determined by @var{value}. If percentage is zero,
597then it is not printed at all.
598
599@var{reporter} must be the result of a call to
600@code{make-progress-reporter}. @var{value} specifies the current
601state of your operation and must be between @var{min-value} and
602@var{max-value} (inclusive) as passed to
603@code{make-progress-reporter}. For instance, if you scan a buffer,
604then @var{value} should be the result of a call to @code{point}.
605
606This function respects @var{min-change} and @var{min-time} as passed
607to @code{make-progress-reporter} and so does not output new messages
608on every invocation. It is thus very fast and normally you should not
609try to reduce the number of calls to it: resulting overhead will most
610likely negate your effort.
611@end defun
612
613@defun progress-reporter-force-update reporter value &optional new-message
614This function is similar to @code{progress-reporter-update} except
615that it prints a message in the echo area unconditionally.
616
617The first two arguments have the same meaning as for
618@code{progress-reporter-update}. Optional @var{new-message} allows
619you to change the message of the @var{reporter}. Since this functions
620always updates the echo area, such a change will be immediately
621presented to the user.
622@end defun
623
624@defun progress-reporter-done reporter
625This function should be called when the operation is finished. It
626prints the message of @var{reporter} followed by word ``done'' in the
627echo area.
628
629You should always call this function and not hope for
630@code{progress-reporter-update} to print ``100%.'' Firstly, it may
631never print it, there are many good reasons for this not to happen.
632Secondly, ``done'' is more explicit.
633@end defun
634
536@node Invisible Text 635@node Invisible Text
537@section Invisible Text 636@section Invisible Text
538 637
@@ -2655,9 +2754,10 @@ symbols have their own name space.
2655@defun fringe-bitmaps-at-pos &optional pos window 2754@defun fringe-bitmaps-at-pos &optional pos window
2656This function returns the fringe bitmaps of the display line 2755This function returns the fringe bitmaps of the display line
2657containing position @var{pos} in window @var{window}. The return 2756containing position @var{pos} in window @var{window}. The return
2658value has the form @code{(@var{left} . @var{right})}, where @var{left} 2757value has the form @code{(@var{left} @var{right} @var{ov})}, where @var{left}
2659is the symbol for the fringe bitmap in the left fringe (or @code{nil} 2758is the symbol for the fringe bitmap in the left fringe (or @code{nil}
2660if no bitmap), and @var{right} is similar for the right fringe. 2759if no bitmap), @var{right} is similar for the right fringe, and @var{ov}
2760is non-@code{nil} if there is an overlay arrow in the left fringe.
2661 2761
2662The value is @code{nil} if @var{pos} is not visible in @var{window}. 2762The value is @code{nil} if @var{pos} is not visible in @var{window}.
2663If @var{window} is @code{nil}, that stands for the selected window. 2763If @var{window} is @code{nil}, that stands for the selected window.
diff --git a/lispref/searching.texi b/lispref/searching.texi
index 93a152fbbe1..ee6cb06b1e1 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../info/searching 6@setfilename ../info/searching
@@ -694,9 +694,9 @@ an @code{invalid-regexp} error is signaled.
694 694
695 Here is a complicated regexp which was formerly used by Emacs to 695 Here is a complicated regexp which was formerly used by Emacs to
696recognize the end of a sentence together with any whitespace that 696recognize the end of a sentence together with any whitespace that
697follows. It was used as the variable @code{sentence-end}. (Its value 697follows. (Nowadays Emacs uses a similar but more complex default
698nowadays contains alternatives for @samp{.}, @samp{?} and @samp{!} in 698regexp constructed by the function @code{sentence-end}.
699other character sets.) 699@xref{Standard Regexps}.)
700 700
701 First, we show the regexp as a string in Lisp syntax to distinguish 701 First, we show the regexp as a string in Lisp syntax to distinguish
702spaces from tab characters. The string constant begins and ends with a 702spaces from tab characters. The string constant begins and ends with a
@@ -730,9 +730,9 @@ deciphered as follows:
730The first part of the pattern is a character alternative that matches 730The first part of the pattern is a character alternative that matches
731any one of three characters: period, question mark, and exclamation 731any one of three characters: period, question mark, and exclamation
732mark. The match must begin with one of these three characters. (This 732mark. The match must begin with one of these three characters. (This
733is the one point where the new value of @code{sentence-end} differs 733is one point where the new default regexp used by Emacs differs from
734from the old. The new value also lists sentence ending 734the old. The new value also allows some non-@acronym{ASCII}
735non-@acronym{ASCII} characters.) 735characters that end a sentence without any following whitespace.)
736 736
737@item []\"')@}]* 737@item []\"')@}]*
738The second part of the pattern matches any closing braces and quotation 738The second part of the pattern matches any closing braces and quotation
@@ -1698,23 +1698,25 @@ whitespace or starting with a form feed (after its left margin).
1698@end defvar 1698@end defvar
1699 1699
1700@defvar sentence-end 1700@defvar sentence-end
1701This is the regular expression describing the end of a sentence. (All 1701If non-@code{nil}, the value should be a regular expression describing
1702paragraph boundaries also end sentences, regardless.) The (slightly 1702the end of a sentence, including the whitespace following the
1703simplified) default value is: 1703sentence. (All paragraph boundaries also end sentences, regardless.)
1704 1704
1705@example 1705If the value is @code{nil}, the default, then the function
1706"[.?!][]\"')@}]*\\($\\| $\\|\t\\|@ @ \\)[ \t\n]*" 1706@code{sentence-end} has to construct the regexp. That is why you
1707@end example 1707should always call the function @code{sentence-end} to obtain the
1708 1708regexp to be used to recognize the end of a sentence.
1709This means a period, question mark or exclamation mark (the actual
1710default value also lists their alternatives in other character sets),
1711followed optionally by closing parenthetical characters, followed by
1712tabs, spaces or new lines.
1713
1714For a detailed explanation of this regular expression, see @ref{Regexp
1715Example}.
1716@end defvar 1709@end defvar
1717 1710
1711@defun sentence-end
1712This function returns the value of the variable @code{sentence-end},
1713if non-@code{nil}. Otherwise it returns a default value based on the
1714values of the variables @code{sentence-end-double-space}
1715(@pxref{Definition of sentence-end-double-space}),
1716@code{sentence-end-without-period} and
1717@code{sentence-end-without-space}.
1718@end defun
1719
1718@ignore 1720@ignore
1719 arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f 1721 arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f
1720@end ignore 1722@end ignore
diff --git a/lispref/text.texi b/lispref/text.texi
index caa3f21b7b1..00aa235f513 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -1,6 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001 3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
4@c 2000, 2001, 2004
4@c Free Software Foundation, Inc. 5@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 6@c See the file elisp.texi for copying conditions.
6@setfilename ../info/text 7@setfilename ../info/text
@@ -1448,6 +1449,7 @@ the text around point.
1448@end defun 1449@end defun
1449 1450
1450@defopt sentence-end-double-space 1451@defopt sentence-end-double-space
1452@anchor{Definition of sentence-end-double-space}
1451If this variable is non-@code{nil}, a period followed by just one space 1453If this variable is non-@code{nil}, a period followed by just one space
1452does not count as the end of a sentence, and the filling functions 1454does not count as the end of a sentence, and the filling functions
1453avoid breaking the line at such a place. 1455avoid breaking the line at such a place.