aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorKaroly Lorentey2004-10-31 02:05:24 +0000
committerKaroly Lorentey2004-10-31 02:05:24 +0000
commite0bc17abe6979d607e8de4684dddb96e53c60065 (patch)
treeb7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /lispref
parentf158167a84475d5fc41931531406821e6413afd7 (diff)
parent707994d2626cf0f01c3ece4028d73835068d64dc (diff)
downloademacs-e0bc17abe6979d607e8de4684dddb96e53c60065.tar.gz
emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
Diffstat (limited to 'lispref')
-rw-r--r--lispref/ChangeLog29
-rw-r--r--lispref/advice.texi18
-rw-r--r--lispref/commands.texi78
-rw-r--r--lispref/frames.texi12
4 files changed, 90 insertions, 47 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 322a2e90eff..c47ad2f889d 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,32 @@
12004-10-29 Simon Josefsson <jas@extundo.com>
2
3 * minibuf.texi (Reading a Password): Revert.
4
52004-10-28 Richard M. Stallman <rms@gnu.org>
6
7 * frames.texi (Display Feature Testing): Explain about "vendor".
8
92004-10-27 Richard M. Stallman <rms@gnu.org>
10
11 * commands.texi (Interactive Codes): `N' uses numeric prefix,
12 not raw. Clarify `n'.
13 (Interactive Call): Rewrite interactive-p, focusing on when
14 and how to use it.
15 (Misc Events): Clarify previous change.
16
17 * advice.texi (Simple Advice): Clarify what job the example does.
18 (Around-Advice): Clarify ad-do-it.
19 (Activation of Advice): An option of ad-default-compilation-action
20 is `never', not `nil'.
21
222004-10-26 Kim F. Storm <storm@cua.dk>
23
24 * commands.texi (Interactive Codes): Add U code letter.
25
262004-10-25 Simon Josefsson <jas@extundo.com>
27
28 * minibuf.texi (Reading a Password): Add.
29
12004-10-24 Jason Rumney <jasonr@gnu.org> 302004-10-24 Jason Rumney <jasonr@gnu.org>
2 31
3 * commands.texi (Misc Events): Remove mouse-wheel. Add wheel-up 32 * commands.texi (Misc Events): Remove mouse-wheel. Add wheel-up
diff --git a/lispref/advice.texi b/lispref/advice.texi
index 46d4f96a35b..ae22fecc1fb 100644
--- a/lispref/advice.texi
+++ b/lispref/advice.texi
@@ -51,7 +51,8 @@ is @code{nil}.)
51 51
52 Suppose you wanted to add a similar feature to @code{previous-line}, 52 Suppose you wanted to add a similar feature to @code{previous-line},
53which would insert a new line at the beginning of the buffer for the 53which would insert a new line at the beginning of the buffer for the
54command to move to. How could you do this? 54command to move to (when @code{next-line-add-newlines} is
55non-@code{nil}). How could you do this?
55 56
56 You could do it by redefining the whole function, but that is not 57 You could do it by redefining the whole function, but that is not
57modular. The advice feature provides a cleaner alternative: you can 58modular. The advice feature provides a cleaner alternative: you can
@@ -273,9 +274,9 @@ Its effect is to make sure that case is ignored in
273searches when the original definition of @code{foo} is run. 274searches when the original definition of @code{foo} is run.
274 275
275@defvar ad-do-it 276@defvar ad-do-it
276This is not really a variable, but it is somewhat used like one 277This is not really a variable, rather a place-holder that looks like a
277in around-advice. It specifies the place to run the function's 278variable. You use it in around-advice to specify the place to run the
278original definition and other ``earlier'' around-advice. 279function's original definition and other ``earlier'' around-advice.
279@end defvar 280@end defvar
280 281
281If the around-advice does not use @code{ad-do-it}, then it does not run 282If the around-advice does not use @code{ad-do-it}, then it does not run
@@ -360,10 +361,9 @@ advice.
360This command activates all the advice defined for @var{function}. 361This command activates all the advice defined for @var{function}.
361@end deffn 362@end deffn
362 363
363To activate advice for a function whose advice is already active is not 364 Activating advice does nothing if @var{function}'s advice is already
364a no-op. It is a useful operation which puts into effect any changes in 365active. But if there is new advice, added since the previous time you
365that function's advice since the previous activation of advice for that 366activated advice for @var{function}, it activates the new advice.
366function.
367 367
368@deffn Command ad-deactivate function 368@deffn Command ad-deactivate function
369This command deactivates the advice for @var{function}. 369This command deactivates the advice for @var{function}.
@@ -430,7 +430,7 @@ This variable controls whether to compile the combined definition
430that results from activating advice for a function. 430that results from activating advice for a function.
431 431
432A value of @code{always} specifies to compile unconditionally. 432A value of @code{always} specifies to compile unconditionally.
433A value of @code{nil} specifies never compile the advice. 433A value of @code{never} specifies never compile the advice.
434 434
435A value of @code{maybe} specifies to compile if the byte-compiler is 435A value of @code{maybe} specifies to compile if the byte-compiler is
436already loaded. A value of @code{like-original} specifies to compile 436already loaded. A value of @code{like-original} specifies to compile
diff --git a/lispref/commands.texi b/lispref/commands.texi
index 299c7bb61af..f1f94e11838 100644
--- a/lispref/commands.texi
+++ b/lispref/commands.texi
@@ -360,6 +360,9 @@ until a command (or undefined command) is found in the current key
360maps. The key sequence argument is represented as a string or vector. 360maps. The key sequence argument is represented as a string or vector.
361The cursor does not move into the echo area. Prompt. 361The cursor does not move into the echo area. Prompt.
362 362
363If the key sequence is a down-event, the following up-event is discarded,
364but can be read via the @code{U} code character.
365
363This kind of input is used by commands such as @code{describe-key} and 366This kind of input is used by commands such as @code{describe-key} and
364@code{global-set-key}. 367@code{global-set-key}.
365 368
@@ -379,15 +382,14 @@ method, and returned as a string (@pxref{Input Methods,,, emacs, The GNU
379Emacs Manual}). Prompt. 382Emacs Manual}). Prompt.
380 383
381@item n 384@item n
382A number read with the minibuffer. If the input is not a number, the 385A number, read with the minibuffer. If the input is not a number, the
383user is asked to try again. The prefix argument, if any, is not used. 386user has to try again. @samp{n} never uses the prefix argument.
384Prompt. 387Prompt.
385 388
386@item N 389@item N
387@cindex raw prefix argument usage 390The numeric prefix argument; but if there is no prefix argument, read
388The numeric prefix argument; but if there is no prefix argument, read a 391a number as with @kbd{n}. The value is always a number. @xref{Prefix
389number as with @kbd{n}. Requires a number. @xref{Prefix Command 392Command Arguments}. Prompt.
390Arguments}. Prompt.
391 393
392@item p 394@item p
393@cindex numeric prefix argument usage 395@cindex numeric prefix argument usage
@@ -395,6 +397,7 @@ The numeric prefix argument. (Note that this @samp{p} is lower case.)
395No I/O. 397No I/O.
396 398
397@item P 399@item P
400@cindex raw prefix argument usage
398The raw prefix argument. (Note that this @samp{P} is upper case.) No 401The raw prefix argument. (Note that this @samp{P} is upper case.) No
399I/O. 402I/O.
400 403
@@ -416,6 +419,11 @@ character terminates the input. (Use @kbd{C-q} to include whitespace in
416the string.) Other characters that normally terminate a symbol (e.g., 419the string.) Other characters that normally terminate a symbol (e.g.,
417parentheses and brackets) do not do so here. Prompt. 420parentheses and brackets) do not do so here. Prompt.
418 421
422@item U
423A key sequence or nil. May be used after a @code{k} or @code{K}
424argument to get the up-event that was discarded in case the key
425sequence read for that argument was a down-event. No I/O.
426
419@item v 427@item v
420A variable declared to be a user option (i.e., satisfying the 428A variable declared to be a user option (i.e., satisfying the
421predicate @code{user-variable-p}). This reads the variable using 429predicate @code{user-variable-p}). This reads the variable using
@@ -605,25 +613,23 @@ part of the prompt.
605@end deffn 613@end deffn
606 614
607@defun interactive-p 615@defun interactive-p
608This function returns @code{t} if the containing function (the one whose 616This function returns @code{t} if the containing function (the one
609code includes the call to @code{interactive-p}) was called 617whose code includes the call to @code{interactive-p}) was called in
610interactively, with the function @code{call-interactively}. (It makes 618direct response to user input. This means that it was called with the
611no difference whether @code{call-interactively} was called from Lisp or 619function @code{call-interactively}, and that a keyboard macro is
612directly from the editor command loop.) If the containing function was 620not running.
613called by Lisp evaluation (or with @code{apply} or @code{funcall}), then 621
614it was not called interactively. 622If the containing function was called by Lisp evaluation (or with
623@code{apply} or @code{funcall}), then it was not called interactively.
615@end defun 624@end defun
616 625
617 The most common use of @code{interactive-p} is for deciding whether to 626 The most common use of @code{interactive-p} is for deciding whether
618print an informative message. As a special exception, 627to give the user additional visual feedback (such as by printing an
619@code{interactive-p} returns @code{nil} whenever a keyboard macro is 628informative message). For example:
620being run. This is to suppress the informative messages and speed
621execution of the macro.
622
623 For example:
624 629
625@example 630@example
626@group 631@group
632;; @r{Here's the usual way to use @code{interactive-p}.}
627(defun foo () 633(defun foo ()
628 (interactive) 634 (interactive)
629 (when (interactive-p) 635 (when (interactive-p)
@@ -632,6 +638,7 @@ execution of the macro.
632@end group 638@end group
633 639
634@group 640@group
641;; @r{This function is just to illustrate the behavior.}
635(defun bar () 642(defun bar ()
636 (interactive) 643 (interactive)
637 (setq foobar (list (foo) (interactive-p)))) 644 (setq foobar (list (foo) (interactive-p))))
@@ -645,7 +652,7 @@ execution of the macro.
645 652
646@group 653@group
647;; @r{Type @kbd{M-x bar}.} 654;; @r{Type @kbd{M-x bar}.}
648;; @r{This does not print anything.} 655;; @r{This does not display a message.}
649@end group 656@end group
650 657
651@group 658@group
@@ -654,10 +661,11 @@ foobar
654@end group 661@end group
655@end example 662@end example
656 663
657 The other way to do this sort of job is to make the command take an 664 If you want to test @emph{only} whether the function was called
658argument @code{print-message} which should be non-@code{nil} in an 665using @code{call-interactively}, add an optional argument
659interactive call, and use the @code{interactive} spec to make sure it is 666@code{print-message} which should be non-@code{nil} in an interactive
660non-@code{nil}. Here's how: 667call, and use the @code{interactive} spec to make sure it is
668non-@code{nil}. Here's an example:
661 669
662@example 670@example
663(defun foo (&optional print-message) 671(defun foo (&optional print-message)
@@ -667,10 +675,9 @@ non-@code{nil}. Here's how:
667@end example 675@end example
668 676
669@noindent 677@noindent
670Defined in this way, the function does display the message when 678Defined in this way, the function does display the message when called
671called from a keyboard macro. 679from a keyboard macro. We use @code{"p"} because the numeric prefix
672 680argument is never @code{nil}.
673 The numeric prefix argument, provided by @samp{p}, is never @code{nil}.
674 681
675@node Command Loop Info 682@node Command Loop Info
676@comment node-name, next, previous, up 683@comment node-name, next, previous, up
@@ -1505,16 +1512,17 @@ frame has already been made visible, Emacs has no work to do.
1505@cindex @code{wheel-down} event 1512@cindex @code{wheel-down} event
1506@item (wheel-up @var{position}) 1513@item (wheel-up @var{position})
1507@item (wheel-down @var{position}) 1514@item (wheel-down @var{position})
1508This kind of event is generated by moving a wheel on a mouse. Its 1515These kinds of event are generated by moving a mouse wheel. Their
1509effect is typically a kind of scroll or zoom. 1516usual meaning is a kind of scroll or zoom.
1510 1517
1511The element @var{position} is a list describing the position of the 1518The element @var{position} is a list describing the position of the
1512event, in the same format as used in a mouse-click event. 1519event, in the same format as used in a mouse-click event.
1513 1520
1514This kind of event is generated only on some kinds of systems. On 1521This kind of event is generated only on some kinds of systems. On some
1515other systems, mouse-4 and mouse-5 may be used instead. For portable 1522systems, @code{mouse-4} and @code{mouse-5} are used instead. For
1516code, the variables @code{mouse-wheel-up-event} and 1523portable code, use the variables @code{mouse-wheel-up-event} and
1517@code{mouse-wheel-down-event} defined in @file{mwheel.el} can be used. 1524@code{mouse-wheel-down-event} defined in @file{mwheel.el} to determine
1525what event types to expect for the mouse wheel.
1518 1526
1519@cindex @code{drag-n-drop} event 1527@cindex @code{drag-n-drop} event
1520@item (drag-n-drop @var{position} @var{files}) 1528@item (drag-n-drop @var{position} @var{files})
diff --git a/lispref/frames.texi b/lispref/frames.texi
index c2c488873a4..736115ef11e 100644
--- a/lispref/frames.texi
+++ b/lispref/frames.texi
@@ -1980,12 +1980,18 @@ about X displays.
1980@defun x-server-version &optional display 1980@defun x-server-version &optional display
1981This function returns the list of version numbers of the X server 1981This function returns the list of version numbers of the X server
1982running the display. The value is a list of three integers: the major 1982running the display. The value is a list of three integers: the major
1983and minor version numbers, and the vendor-specific release number. 1983and minor version numbers of the X protocol, and the
1984distributor-specific release number of the X server software itself.
1984@end defun 1985@end defun
1985 1986
1986@defun x-server-vendor &optional display 1987@defun x-server-vendor &optional display
1987This function returns the ``vendor'' that provided the X server software 1988This function returns the ``vendor'' that provided the X server
1988(as a string). 1989software (as a string). Really this means whoever distributes the X
1990server.
1991
1992When the developers of X labelled software distributors as
1993``vendors'', they showed their false assumption that no system could
1994ever be developed and distributed noncommercially.
1989@end defun 1995@end defun
1990 1996
1991@ignore 1997@ignore