diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispintro/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/lispintro/emacs-lisp-intro.texi | 62 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 8 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 34 | ||||
| -rw-r--r-- | doc/lispref/searching.texi | 6 | ||||
| -rw-r--r-- | doc/man/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/man/emacs.1 | 13 |
7 files changed, 97 insertions, 42 deletions
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 93084e76203..be9f9f963c0 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2013-04-23 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * emacs-lisp-intro.texi (Complications, defvar): Refine the doc | ||
| 4 | about Lisp macros. (http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00618.html) | ||
| 5 | |||
| 6 | 2013-04-21 Xue Fuqiao <xfq.free@gmail.com> | ||
| 7 | |||
| 8 | * emacs-lisp-intro.texi (defcustom, defun) | ||
| 9 | (simplified-beginning-of-buffer, defvar, Building Robots, Review) | ||
| 10 | (save-excursion): `defun' and `defcustom' are now macros rather | ||
| 11 | than special forms. (Bug#13853) | ||
| 12 | |||
| 1 | 2013-03-16 Glenn Morris <rgm@gnu.org> | 13 | 2013-03-16 Glenn Morris <rgm@gnu.org> |
| 2 | 14 | ||
| 3 | * emacs-lisp-intro.texi: Add some stuff specific to www.gnu.org. | 15 | * emacs-lisp-intro.texi: Add some stuff specific to www.gnu.org. |
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index c42ed210cbc..7831603124e 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | @set edition-number 3.10 | 38 | @set edition-number 3.10 |
| 39 | @set update-date 28 October 2009 | 39 | @set update-date 28 October 2009 |
| 40 | @c FIXME can this be updated? -- xfq | ||
| 40 | 41 | ||
| 41 | @ignore | 42 | @ignore |
| 42 | ## Summary of shell commands to create various output formats: | 43 | ## Summary of shell commands to create various output formats: |
| @@ -456,7 +457,7 @@ Practicing Evaluation | |||
| 456 | How To Write Function Definitions | 457 | How To Write Function Definitions |
| 457 | 458 | ||
| 458 | * Primitive Functions:: | 459 | * Primitive Functions:: |
| 459 | * defun:: The @code{defun} special form. | 460 | * defun:: The @code{defun} macro. |
| 460 | * Install:: Install a function definition. | 461 | * Install:: Install a function definition. |
| 461 | * Interactive:: Making a function interactive. | 462 | * Interactive:: Making a function interactive. |
| 462 | * Interactive Options:: Different options for @code{interactive}. | 463 | * Interactive Options:: Different options for @code{interactive}. |
| @@ -1617,11 +1618,16 @@ the symbol's value as a @dfn{variable}. This situation is described | |||
| 1617 | in the section on variables. (@xref{Variables}.) | 1618 | in the section on variables. (@xref{Variables}.) |
| 1618 | 1619 | ||
| 1619 | @cindex Special form | 1620 | @cindex Special form |
| 1620 | The second complication occurs because some functions are unusual and do | 1621 | The second complication occurs because some functions are unusual and |
| 1621 | not work in the usual manner. Those that don't are called @dfn{special | 1622 | do not work in the usual manner. Those that don't are called |
| 1622 | forms}. They are used for special jobs, like defining a function, and | 1623 | @dfn{special forms}. They are used for special jobs, like defining a |
| 1623 | there are not many of them. In the next few chapters, you will be | 1624 | function, and there are not many of them. In the next few chapters, |
| 1624 | introduced to several of the more important special forms. | 1625 | you will be introduced to several of the more important special forms. |
| 1626 | And there are also @dfn{macros}. Macro is a construct defined in | ||
| 1627 | Lisp, which differs from a function in that it translates a Lisp | ||
| 1628 | expression into another expression which is to be evaluated instead of | ||
| 1629 | the original expression. (@xref{Lisp macro}.) | ||
| 1630 | |||
| 1625 | 1631 | ||
| 1626 | The third and final complication is this: if the function that the | 1632 | The third and final complication is this: if the function that the |
| 1627 | Lisp interpreter is looking at is not a special form, and if it is part | 1633 | Lisp interpreter is looking at is not a special form, and if it is part |
| @@ -3094,18 +3100,15 @@ unless you investigate, you won't know whether an already-written | |||
| 3094 | function is written in Emacs Lisp or C. | 3100 | function is written in Emacs Lisp or C. |
| 3095 | 3101 | ||
| 3096 | @node defun | 3102 | @node defun |
| 3097 | @section The @code{defun} Special Form | 3103 | @section The @code{defun} Macro |
| 3098 | @findex defun | 3104 | @findex defun |
| 3099 | @cindex Special form of @code{defun} | ||
| 3100 | 3105 | ||
| 3101 | @cindex @samp{function definition} defined | 3106 | @cindex @samp{function definition} defined |
| 3102 | In Lisp, a symbol such as @code{mark-whole-buffer} has code attached to | 3107 | In Lisp, a symbol such as @code{mark-whole-buffer} has code attached to |
| 3103 | it that tells the computer what to do when the function is called. | 3108 | it that tells the computer what to do when the function is called. |
| 3104 | This code is called the @dfn{function definition} and is created by | 3109 | This code is called the @dfn{function definition} and is created by |
| 3105 | evaluating a Lisp expression that starts with the symbol @code{defun} | 3110 | evaluating a Lisp expression that starts with the symbol @code{defun} |
| 3106 | (which is an abbreviation for @emph{define function}). Because | 3111 | (which is an abbreviation for @emph{define function}). |
| 3107 | @code{defun} does not evaluate its arguments in the usual way, it is | ||
| 3108 | called a @dfn{special form}. | ||
| 3109 | 3112 | ||
| 3110 | In subsequent sections, we will look at function definitions from the | 3113 | In subsequent sections, we will look at function definitions from the |
| 3111 | Emacs source code, such as @code{mark-whole-buffer}. In this section, | 3114 | Emacs source code, such as @code{mark-whole-buffer}. In this section, |
| @@ -4254,7 +4257,7 @@ On the other hand, this function returns @code{nil} if the test is false. | |||
| 4254 | @findex point | 4257 | @findex point |
| 4255 | @findex mark | 4258 | @findex mark |
| 4256 | 4259 | ||
| 4257 | The @code{save-excursion} function is the fourth and final special form | 4260 | The @code{save-excursion} function is the third and final special form |
| 4258 | that we will discuss in this chapter. | 4261 | that we will discuss in this chapter. |
| 4259 | 4262 | ||
| 4260 | In Emacs Lisp programs used for editing, the @code{save-excursion} | 4263 | In Emacs Lisp programs used for editing, the @code{save-excursion} |
| @@ -4381,9 +4384,9 @@ within the body of a @code{let} expression. It looks like this: | |||
| 4381 | @node Review | 4384 | @node Review |
| 4382 | @section Review | 4385 | @section Review |
| 4383 | 4386 | ||
| 4384 | In the last few chapters we have introduced a fair number of functions | 4387 | In the last few chapters we have introduced a macro and a fair number |
| 4385 | and special forms. Here they are described in brief, along with a few | 4388 | of functions and special forms. Here they are described in brief, |
| 4386 | similar functions that have not been mentioned yet. | 4389 | along with a few similar functions that have not been mentioned yet. |
| 4387 | 4390 | ||
| 4388 | @table @code | 4391 | @table @code |
| 4389 | @item eval-last-sexp | 4392 | @item eval-last-sexp |
| @@ -4393,10 +4396,10 @@ invoked with an argument; in that case, the output is printed in the | |||
| 4393 | current buffer. This command is normally bound to @kbd{C-x C-e}. | 4396 | current buffer. This command is normally bound to @kbd{C-x C-e}. |
| 4394 | 4397 | ||
| 4395 | @item defun | 4398 | @item defun |
| 4396 | Define function. This special form has up to five parts: the name, | 4399 | Define function. This macro has up to five parts: the name, a |
| 4397 | a template for the arguments that will be passed to the function, | 4400 | template for the arguments that will be passed to the function, |
| 4398 | documentation, an optional interactive declaration, and the body of the | 4401 | documentation, an optional interactive declaration, and the body of |
| 4399 | definition. | 4402 | the definition. |
| 4400 | 4403 | ||
| 4401 | @need 1250 | 4404 | @need 1250 |
| 4402 | For example, in an early version of Emacs, the function definition was | 4405 | For example, in an early version of Emacs, the function definition was |
| @@ -4803,7 +4806,7 @@ leave mark at previous position." | |||
| 4803 | @end smallexample | 4806 | @end smallexample |
| 4804 | 4807 | ||
| 4805 | Like all function definitions, this definition has five parts following | 4808 | Like all function definitions, this definition has five parts following |
| 4806 | the special form @code{defun}: | 4809 | the macro @code{defun}: |
| 4807 | 4810 | ||
| 4808 | @enumerate | 4811 | @enumerate |
| 4809 | @item | 4812 | @item |
| @@ -9293,7 +9296,7 @@ have a value. If the variable already has a value, @code{defvar} does | |||
| 9293 | not override the existing value. Second, @code{defvar} has a | 9296 | not override the existing value. Second, @code{defvar} has a |
| 9294 | documentation string. | 9297 | documentation string. |
| 9295 | 9298 | ||
| 9296 | (Another special form, @code{defcustom}, is designed for variables | 9299 | (There is a related macro, @code{defcustom}, designed for variables |
| 9297 | that people customize. It has more features than @code{defvar}. | 9300 | that people customize. It has more features than @code{defvar}. |
| 9298 | (@xref{defcustom, , Setting Variables with @code{defcustom}}.) | 9301 | (@xref{defcustom, , Setting Variables with @code{defcustom}}.) |
| 9299 | 9302 | ||
| @@ -11300,11 +11303,11 @@ Let's expand on the metaphor in which a computer program is a robot. | |||
| 11300 | 11303 | ||
| 11301 | A function definition provides the blueprints for a robot. When you | 11304 | A function definition provides the blueprints for a robot. When you |
| 11302 | install a function definition, that is, when you evaluate a | 11305 | install a function definition, that is, when you evaluate a |
| 11303 | @code{defun} special form, you install the necessary equipment to | 11306 | @code{defun} macro, you install the necessary equipment to build |
| 11304 | build robots. It is as if you were in a factory, setting up an | 11307 | robots. It is as if you were in a factory, setting up an assembly |
| 11305 | assembly line. Robots with the same name are built according to the | 11308 | line. Robots with the same name are built according to the same |
| 11306 | same blueprints. So they have, as it were, the same `model number', | 11309 | blueprints. So they have, as it were, the same `model number', but a |
| 11307 | but a different `serial number'. | 11310 | different `serial number'. |
| 11308 | 11311 | ||
| 11309 | We often say that a recursive function `calls itself'. What we mean | 11312 | We often say that a recursive function `calls itself'. What we mean |
| 11310 | is that the instructions in a recursive function cause the Lisp | 11313 | is that the instructions in a recursive function cause the Lisp |
| @@ -16971,10 +16974,9 @@ definitions; but you can write @code{defuns} in your @file{.emacs} | |||
| 16971 | file. Indeed, you can write any Lisp expression in your @file{.emacs} | 16974 | file. Indeed, you can write any Lisp expression in your @file{.emacs} |
| 16972 | file.) | 16975 | file.) |
| 16973 | 16976 | ||
| 16974 | The @code{customize} feature depends on the @code{defcustom} special | 16977 | The @code{customize} feature depends on the @code{defcustom} macro. |
| 16975 | form. Although you can use @code{defvar} or @code{setq} for variables | 16978 | Although you can use @code{defvar} or @code{setq} for variables that |
| 16976 | that users set, the @code{defcustom} special form is designed for the | 16979 | users set, the @code{defcustom} macro is designed for the job. |
| 16977 | job. | ||
| 16978 | 16980 | ||
| 16979 | You can use your knowledge of @code{defvar} for writing the | 16981 | You can use your knowledge of @code{defvar} for writing the |
| 16980 | first three arguments for @code{defcustom}. The first argument to | 16982 | first three arguments for @code{defcustom}. The first argument to |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 31e4f791350..f770fb3cada 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-04-21 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * internals.texi (Writing Emacs Primitives): Remove unnecessary | ||
| 4 | references to the sources. (Bug#13800) | ||
| 5 | |||
| 6 | * searching.texi (Regexp Backslash): Doc fix for backslash | ||
| 7 | constructs in regular expressions. | ||
| 8 | |||
| 1 | 2013-04-15 Christopher Schmidt <christopher@ch.ristopher.com> | 9 | 2013-04-15 Christopher Schmidt <christopher@ch.ristopher.com> |
| 2 | 10 | ||
| 3 | * tips.texi (Coding Conventions): Mention separation of package | 11 | * tips.texi (Coding Conventions): Mention separation of package |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 3269776b626..24440858b7e 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -661,15 +661,33 @@ equivalent of @code{&rest}). Both @code{UNEVALLED} and @code{MANY} are | |||
| 661 | macros. If @var{max} is a number, it must be more than @var{min} but | 661 | macros. If @var{max} is a number, it must be more than @var{min} but |
| 662 | less than 8. | 662 | less than 8. |
| 663 | 663 | ||
| 664 | @cindex interactive specification in primitives | ||
| 664 | @item interactive | 665 | @item interactive |
| 665 | This is an interactive specification, a string such as might be used as | 666 | This is an interactive specification, a string such as might be used |
| 666 | the argument of @code{interactive} in a Lisp function. In the case of | 667 | as the argument of @code{interactive} in a Lisp function. In the case |
| 667 | @code{or}, it is 0 (a null pointer), indicating that @code{or} cannot be | 668 | of @code{or}, it is 0 (a null pointer), indicating that @code{or} |
| 668 | called interactively. A value of @code{""} indicates a function that | 669 | cannot be called interactively. A value of @code{""} indicates a function that should receive no |
| 669 | should receive no arguments when called interactively. If the value | 670 | arguments when called interactively. For example: |
| 670 | begins with a @samp{(}, the string is evaluated as a Lisp form. | 671 | |
| 671 | For examples of the last two forms, see @code{widen} and | 672 | @smallexample |
| 672 | @code{narrow-to-region} in @file{editfns.c}. | 673 | @group |
| 674 | DEFUN ("baz", Fbaz, Sbaz, 0, 0, "", | ||
| 675 | doc: /* @dots{} */) | ||
| 676 | @end group | ||
| 677 | @end smallexample | ||
| 678 | |||
| 679 | If the value begins with a @samp{"(}, the string is evaluated as a | ||
| 680 | Lisp form. For example: | ||
| 681 | |||
| 682 | @smallexample | ||
| 683 | @group | ||
| 684 | DEFUN ("foo", Ffoo, Sfoo, 0, UNEVALLED, "(list | ||
| 685 | (read-char-by-name \"Insert character (Unicode name or hex): \")\ | ||
| 686 | (prefix-numeric-value current-prefix-arg)\ | ||
| 687 | t))", | ||
| 688 | doc: /* @dots{} /*) | ||
| 689 | @end group | ||
| 690 | @end smallexample | ||
| 673 | 691 | ||
| 674 | @item doc | 692 | @item doc |
| 675 | This is the documentation string. It uses C comment syntax rather | 693 | This is the documentation string. It uses C comment syntax rather |
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 87d4051d6f0..386d5bdde4c 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi | |||
| @@ -589,10 +589,8 @@ through @samp{f} and @samp{A} through @samp{F}. | |||
| 589 | 589 | ||
| 590 | For the most part, @samp{\} followed by any character matches only | 590 | For the most part, @samp{\} followed by any character matches only |
| 591 | that character. However, there are several exceptions: certain | 591 | that character. However, there are several exceptions: certain |
| 592 | two-character sequences starting with @samp{\} that have special | 592 | sequences starting with @samp{\} that have special meanings. Here is |
| 593 | meanings. (The character after the @samp{\} in such a sequence is | 593 | a table of the special @samp{\} constructs. |
| 594 | always ordinary when used on its own.) Here is a table of the special | ||
| 595 | @samp{\} constructs. | ||
| 596 | 594 | ||
| 597 | @table @samp | 595 | @table @samp |
| 598 | @item \| | 596 | @item \| |
diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index 8a2a90f7895..8b550dc4417 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-04-20 Petr Hracek <phracek@redhat.com> (tiny change) | ||
| 2 | |||
| 3 | * emacs.1: Add some more command-line options. (Bug#14165) | ||
| 4 | |||
| 1 | 2012-12-02 Kevin Ryde <user42@zip.com.au> | 5 | 2012-12-02 Kevin Ryde <user42@zip.com.au> |
| 2 | 6 | ||
| 3 | * etags.1: Mention effect of --declarations in Lisp. | 7 | * etags.1: Mention effect of --declarations in Lisp. |
diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index 3d0c5107adc..9149be2c523 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 | |||
| @@ -79,12 +79,22 @@ Go to the specified | |||
| 79 | and | 79 | and |
| 80 | .IR column . | 80 | .IR column . |
| 81 | .TP | 81 | .TP |
| 82 | .BI \-\-chdir " directory" | ||
| 83 | Change to | ||
| 84 | .IR directory . | ||
| 85 | .TP | ||
| 82 | .BR \-q ", " \-\-no\-init\-file | 86 | .BR \-q ", " \-\-no\-init\-file |
| 83 | Do not load an init file. | 87 | Do not load an init file. |
| 84 | .TP | 88 | .TP |
| 89 | .BR \-nl ", " \-\-no\-shared\-memory | ||
| 90 | Do not use shared memory. | ||
| 91 | .TP | ||
| 85 | .B \-\-no\-site\-file | 92 | .B \-\-no\-site\-file |
| 86 | Do not load the site-wide startup file. | 93 | Do not load the site-wide startup file. |
| 87 | .TP | 94 | .TP |
| 95 | .BR \-nsl ", " \-\-no\-site\-lisp | ||
| 96 | Do not add site-lisp directories to load-path. | ||
| 97 | .TP | ||
| 88 | .B \-\-no\-desktop | 98 | .B \-\-no\-desktop |
| 89 | Do not load a saved desktop. | 99 | Do not load a saved desktop. |
| 90 | .TP | 100 | .TP |
| @@ -325,6 +335,9 @@ in iconified state. | |||
| 325 | .BR \-nbc ", " \-\-no\-blinking\-cursor | 335 | .BR \-nbc ", " \-\-no\-blinking\-cursor |
| 326 | Disable blinking cursor. | 336 | Disable blinking cursor. |
| 327 | .TP | 337 | .TP |
| 338 | .BI \-\-parent-id " xid" | ||
| 339 | Set parent window. | ||
| 340 | .TP | ||
| 328 | .BR \-nw ", " \-\-no\-window\-system | 341 | .BR \-nw ", " \-\-no\-window\-system |
| 329 | Tell | 342 | Tell |
| 330 | .I Emacs | 343 | .I Emacs |