diff options
| author | Andrea Corallo | 2024-05-14 10:37:31 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2024-05-14 11:17:25 +0200 |
| commit | e0cbed16b4573e0d6f848a4e239d559eeff08d95 (patch) | |
| tree | 641f0ff461b075d6e759842fb285be6599fedf0a | |
| parent | b87670b56460185bec902806daa52b05faa5d26d (diff) | |
| download | emacs-e0cbed16b4573e0d6f848a4e239d559eeff08d95.tar.gz emacs-e0cbed16b4573e0d6f848a4e239d559eeff08d95.zip | |
* etc/NEWS: Rename 'type' -> 'ftype' and tweak it.
| -rw-r--r-- | etc/NEWS | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -2488,16 +2488,17 @@ and see if you get only warnings that matter. | |||
| 2488 | ** Function 'declare' forms | 2488 | ** Function 'declare' forms |
| 2489 | 2489 | ||
| 2490 | +++ | 2490 | +++ |
| 2491 | *** New 'type' function declaration. | 2491 | *** New 'ftype' function declaration. |
| 2492 | The declaration '(type TYPE)' specifies the type of a function. | 2492 | The declaration '(ftype TYPE)' specifies the type of a function. |
| 2493 | Example: | 2493 | Example: |
| 2494 | 2494 | ||
| 2495 | (defun hello (x y) | 2495 | (defun hello (x y) |
| 2496 | (declare (type (function (integer boolean) string))) | 2496 | (declare (ftype (function (integer boolean) string))) |
| 2497 | ...) | 2497 | ...) |
| 2498 | 2498 | ||
| 2499 | specifies that the function takes two arguments, an integer and a | 2499 | specifies that the function takes two arguments, an integer and a |
| 2500 | boolean, and returns a string. This information can be used by the | 2500 | boolean, and returns a string. If the compilation happens with |
| 2501 | 'compilation-safety' set to zero, this information can be used by the | ||
| 2501 | native compiler to produce better code, but specifying an incorrect type | 2502 | native compiler to produce better code, but specifying an incorrect type |
| 2502 | may lead to Emacs crashing. See the Info node "(elisp) Declare Form" | 2503 | may lead to Emacs crashing. See the Info node "(elisp) Declare Form" |
| 2503 | for further information. | 2504 | for further information. |