diff options
| author | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
| commit | e0bc17abe6979d607e8de4684dddb96e53c60065 (patch) | |
| tree | b7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /lispref | |
| parent | f158167a84475d5fc41931531406821e6413afd7 (diff) | |
| parent | 707994d2626cf0f01c3ece4028d73835068d64dc (diff) | |
| download | emacs-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/ChangeLog | 29 | ||||
| -rw-r--r-- | lispref/advice.texi | 18 | ||||
| -rw-r--r-- | lispref/commands.texi | 78 | ||||
| -rw-r--r-- | lispref/frames.texi | 12 |
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 @@ | |||
| 1 | 2004-10-29 Simon Josefsson <jas@extundo.com> | ||
| 2 | |||
| 3 | * minibuf.texi (Reading a Password): Revert. | ||
| 4 | |||
| 5 | 2004-10-28 Richard M. Stallman <rms@gnu.org> | ||
| 6 | |||
| 7 | * frames.texi (Display Feature Testing): Explain about "vendor". | ||
| 8 | |||
| 9 | 2004-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 | |||
| 22 | 2004-10-26 Kim F. Storm <storm@cua.dk> | ||
| 23 | |||
| 24 | * commands.texi (Interactive Codes): Add U code letter. | ||
| 25 | |||
| 26 | 2004-10-25 Simon Josefsson <jas@extundo.com> | ||
| 27 | |||
| 28 | * minibuf.texi (Reading a Password): Add. | ||
| 29 | |||
| 1 | 2004-10-24 Jason Rumney <jasonr@gnu.org> | 30 | 2004-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}, |
| 53 | which would insert a new line at the beginning of the buffer for the | 53 | which would insert a new line at the beginning of the buffer for the |
| 54 | command to move to. How could you do this? | 54 | command to move to (when @code{next-line-add-newlines} is |
| 55 | non-@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 |
| 57 | modular. The advice feature provides a cleaner alternative: you can | 58 | modular. The advice feature provides a cleaner alternative: you can |
| @@ -273,9 +274,9 @@ Its effect is to make sure that case is ignored in | |||
| 273 | searches when the original definition of @code{foo} is run. | 274 | searches when the original definition of @code{foo} is run. |
| 274 | 275 | ||
| 275 | @defvar ad-do-it | 276 | @defvar ad-do-it |
| 276 | This is not really a variable, but it is somewhat used like one | 277 | This is not really a variable, rather a place-holder that looks like a |
| 277 | in around-advice. It specifies the place to run the function's | 278 | variable. You use it in around-advice to specify the place to run the |
| 278 | original definition and other ``earlier'' around-advice. | 279 | function's original definition and other ``earlier'' around-advice. |
| 279 | @end defvar | 280 | @end defvar |
| 280 | 281 | ||
| 281 | If the around-advice does not use @code{ad-do-it}, then it does not run | 282 | If the around-advice does not use @code{ad-do-it}, then it does not run |
| @@ -360,10 +361,9 @@ advice. | |||
| 360 | This command activates all the advice defined for @var{function}. | 361 | This command activates all the advice defined for @var{function}. |
| 361 | @end deffn | 362 | @end deffn |
| 362 | 363 | ||
| 363 | To activate advice for a function whose advice is already active is not | 364 | Activating advice does nothing if @var{function}'s advice is already |
| 364 | a no-op. It is a useful operation which puts into effect any changes in | 365 | active. But if there is new advice, added since the previous time you |
| 365 | that function's advice since the previous activation of advice for that | 366 | activated advice for @var{function}, it activates the new advice. |
| 366 | function. | ||
| 367 | 367 | ||
| 368 | @deffn Command ad-deactivate function | 368 | @deffn Command ad-deactivate function |
| 369 | This command deactivates the advice for @var{function}. | 369 | This command deactivates the advice for @var{function}. |
| @@ -430,7 +430,7 @@ This variable controls whether to compile the combined definition | |||
| 430 | that results from activating advice for a function. | 430 | that results from activating advice for a function. |
| 431 | 431 | ||
| 432 | A value of @code{always} specifies to compile unconditionally. | 432 | A value of @code{always} specifies to compile unconditionally. |
| 433 | A value of @code{nil} specifies never compile the advice. | 433 | A value of @code{never} specifies never compile the advice. |
| 434 | 434 | ||
| 435 | A value of @code{maybe} specifies to compile if the byte-compiler is | 435 | A value of @code{maybe} specifies to compile if the byte-compiler is |
| 436 | already loaded. A value of @code{like-original} specifies to compile | 436 | already 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 | |||
| 360 | maps. The key sequence argument is represented as a string or vector. | 360 | maps. The key sequence argument is represented as a string or vector. |
| 361 | The cursor does not move into the echo area. Prompt. | 361 | The cursor does not move into the echo area. Prompt. |
| 362 | 362 | ||
| 363 | If the key sequence is a down-event, the following up-event is discarded, | ||
| 364 | but can be read via the @code{U} code character. | ||
| 365 | |||
| 363 | This kind of input is used by commands such as @code{describe-key} and | 366 | This 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 | |||
| 379 | Emacs Manual}). Prompt. | 382 | Emacs Manual}). Prompt. |
| 380 | 383 | ||
| 381 | @item n | 384 | @item n |
| 382 | A number read with the minibuffer. If the input is not a number, the | 385 | A number, read with the minibuffer. If the input is not a number, the |
| 383 | user is asked to try again. The prefix argument, if any, is not used. | 386 | user has to try again. @samp{n} never uses the prefix argument. |
| 384 | Prompt. | 387 | Prompt. |
| 385 | 388 | ||
| 386 | @item N | 389 | @item N |
| 387 | @cindex raw prefix argument usage | 390 | The numeric prefix argument; but if there is no prefix argument, read |
| 388 | The numeric prefix argument; but if there is no prefix argument, read a | 391 | a number as with @kbd{n}. The value is always a number. @xref{Prefix |
| 389 | number as with @kbd{n}. Requires a number. @xref{Prefix Command | 392 | Command Arguments}. Prompt. |
| 390 | Arguments}. 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.) | |||
| 395 | No I/O. | 397 | No I/O. |
| 396 | 398 | ||
| 397 | @item P | 399 | @item P |
| 400 | @cindex raw prefix argument usage | ||
| 398 | The raw prefix argument. (Note that this @samp{P} is upper case.) No | 401 | The raw prefix argument. (Note that this @samp{P} is upper case.) No |
| 399 | I/O. | 402 | I/O. |
| 400 | 403 | ||
| @@ -416,6 +419,11 @@ character terminates the input. (Use @kbd{C-q} to include whitespace in | |||
| 416 | the string.) Other characters that normally terminate a symbol (e.g., | 419 | the string.) Other characters that normally terminate a symbol (e.g., |
| 417 | parentheses and brackets) do not do so here. Prompt. | 420 | parentheses and brackets) do not do so here. Prompt. |
| 418 | 421 | ||
| 422 | @item U | ||
| 423 | A key sequence or nil. May be used after a @code{k} or @code{K} | ||
| 424 | argument to get the up-event that was discarded in case the key | ||
| 425 | sequence read for that argument was a down-event. No I/O. | ||
| 426 | |||
| 419 | @item v | 427 | @item v |
| 420 | A variable declared to be a user option (i.e., satisfying the | 428 | A variable declared to be a user option (i.e., satisfying the |
| 421 | predicate @code{user-variable-p}). This reads the variable using | 429 | predicate @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 |
| 608 | This function returns @code{t} if the containing function (the one whose | 616 | This function returns @code{t} if the containing function (the one |
| 609 | code includes the call to @code{interactive-p}) was called | 617 | whose code includes the call to @code{interactive-p}) was called in |
| 610 | interactively, with the function @code{call-interactively}. (It makes | 618 | direct response to user input. This means that it was called with the |
| 611 | no difference whether @code{call-interactively} was called from Lisp or | 619 | function @code{call-interactively}, and that a keyboard macro is |
| 612 | directly from the editor command loop.) If the containing function was | 620 | not running. |
| 613 | called by Lisp evaluation (or with @code{apply} or @code{funcall}), then | 621 | |
| 614 | it was not called interactively. | 622 | If 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 |
| 618 | print an informative message. As a special exception, | 627 | to give the user additional visual feedback (such as by printing an |
| 619 | @code{interactive-p} returns @code{nil} whenever a keyboard macro is | 628 | informative message). For example: |
| 620 | being run. This is to suppress the informative messages and speed | ||
| 621 | execution 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 |
| 658 | argument @code{print-message} which should be non-@code{nil} in an | 665 | using @code{call-interactively}, add an optional argument |
| 659 | interactive 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 |
| 660 | non-@code{nil}. Here's how: | 667 | call, and use the @code{interactive} spec to make sure it is |
| 668 | non-@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 |
| 670 | Defined in this way, the function does display the message when | 678 | Defined in this way, the function does display the message when called |
| 671 | called from a keyboard macro. | 679 | from a keyboard macro. We use @code{"p"} because the numeric prefix |
| 672 | 680 | argument 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}) |
| 1508 | This kind of event is generated by moving a wheel on a mouse. Its | 1515 | These kinds of event are generated by moving a mouse wheel. Their |
| 1509 | effect is typically a kind of scroll or zoom. | 1516 | usual meaning is a kind of scroll or zoom. |
| 1510 | 1517 | ||
| 1511 | The element @var{position} is a list describing the position of the | 1518 | The element @var{position} is a list describing the position of the |
| 1512 | event, in the same format as used in a mouse-click event. | 1519 | event, in the same format as used in a mouse-click event. |
| 1513 | 1520 | ||
| 1514 | This kind of event is generated only on some kinds of systems. On | 1521 | This kind of event is generated only on some kinds of systems. On some |
| 1515 | other systems, mouse-4 and mouse-5 may be used instead. For portable | 1522 | systems, @code{mouse-4} and @code{mouse-5} are used instead. For |
| 1516 | code, the variables @code{mouse-wheel-up-event} and | 1523 | portable 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 |
| 1525 | what 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 |
| 1981 | This function returns the list of version numbers of the X server | 1981 | This function returns the list of version numbers of the X server |
| 1982 | running the display. The value is a list of three integers: the major | 1982 | running the display. The value is a list of three integers: the major |
| 1983 | and minor version numbers, and the vendor-specific release number. | 1983 | and minor version numbers of the X protocol, and the |
| 1984 | distributor-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 |
| 1987 | This function returns the ``vendor'' that provided the X server software | 1988 | This function returns the ``vendor'' that provided the X server |
| 1988 | (as a string). | 1989 | software (as a string). Really this means whoever distributes the X |
| 1990 | server. | ||
| 1991 | |||
| 1992 | When the developers of X labelled software distributors as | ||
| 1993 | ``vendors'', they showed their false assumption that no system could | ||
| 1994 | ever be developed and distributed noncommercially. | ||
| 1989 | @end defun | 1995 | @end defun |
| 1990 | 1996 | ||
| 1991 | @ignore | 1997 | @ignore |