diff options
| author | Glenn Morris | 2017-11-29 17:12:05 -0800 |
|---|---|---|
| committer | Glenn Morris | 2017-11-29 17:12:05 -0800 |
| commit | 7aedb6116ffaa6590c86e70380f533385c1ced58 (patch) | |
| tree | 186436d57261f5bd0e5f1bff8844615c17b46128 /doc | |
| parent | 728d259243206136387b6b59c2efb7de8cd9f6ed (diff) | |
| parent | 02d114d6b85e02132d5f99ead517b69dbdd77e35 (diff) | |
| download | emacs-7aedb6116ffaa6590c86e70380f533385c1ced58.tar.gz emacs-7aedb6116ffaa6590c86e70380f533385c1ced58.zip | |
Merge from origin/emacs-26
02d114d6b8 * lisp/tree-widget.el (tree-widget-end-guide): Escape it. ...
0a85d12474 Fix ELisp "Warning Tips"
06d05fec84 Fix Bug#29163
ac64fdb248 Harden exec_byte_code against redefining 'error'
700f74e4c8 Fix Edebug specs for if-let* and and-let* (Bug#29236)
0ded1b41a9 Fix Edebug's handling of dotted specs (bug#6415)
16358d4fcb Improve documentation of "constant" symbols
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/errors.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/tips.texi | 14 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 13 |
3 files changed, 29 insertions, 5 deletions
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index 1f67819c34e..cd22b70800d 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi | |||
| @@ -172,8 +172,11 @@ The message is @samp{Search failed}. @xref{Searching and Matching}. | |||
| 172 | 172 | ||
| 173 | @item setting-constant | 173 | @item setting-constant |
| 174 | The message is @samp{Attempt to set a constant symbol}. This happens | 174 | The message is @samp{Attempt to set a constant symbol}. This happens |
| 175 | when attempting to assign values to @code{nil}, @code{t}, and keyword | 175 | when attempting to assign values to @code{nil}, @code{t}, |
| 176 | symbols. @xref{Constant Variables}. | 176 | @code{most-positive-fixnum}, @code{most-negative-fixnum}, and keyword |
| 177 | symbols. It also happens when attempting to assign values to | ||
| 178 | @code{enable-multibyte-characters} and some other symbols whose direct | ||
| 179 | assignment is not allowed for some reason. @xref{Constant Variables}. | ||
| 177 | 180 | ||
| 178 | @c simple.el | 181 | @c simple.el |
| 179 | @item text-read-only | 182 | @item text-read-only |
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 17fd4a1027e..42a68677f58 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -534,9 +534,17 @@ that you know @emph{will} be defined, use a @code{declare-function} | |||
| 534 | statement (@pxref{Declaring Functions}). | 534 | statement (@pxref{Declaring Functions}). |
| 535 | 535 | ||
| 536 | @item | 536 | @item |
| 537 | If you use many functions and variables from a certain file, you can | 537 | If you use many functions, macros, and variables from a certain file, |
| 538 | add a @code{require} for that package to avoid compilation warnings | 538 | you can add a @code{require} (@pxref{Named Features, require}) for |
| 539 | for them. For instance, | 539 | that package to avoid compilation warnings for them, like this: |
| 540 | |||
| 541 | @example | ||
| 542 | (require 'foo) | ||
| 543 | @end example | ||
| 544 | |||
| 545 | @noindent | ||
| 546 | If you need only macros from some file, you can require it only at | ||
| 547 | compile time (@pxref{Eval During Compile}). For instance, | ||
| 540 | 548 | ||
| 541 | @example | 549 | @example |
| 542 | (eval-when-compile | 550 | (eval-when-compile |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 99bbfc91243..a871352b004 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -139,6 +139,13 @@ Variables}). A @code{defconst} form serves to inform human readers | |||
| 139 | that you do not intend to change the value of a variable, but Emacs | 139 | that you do not intend to change the value of a variable, but Emacs |
| 140 | does not raise an error if you actually change it. | 140 | does not raise an error if you actually change it. |
| 141 | 141 | ||
| 142 | @cindex read-only variables | ||
| 143 | A small number of additional symbols are made read-only for various | ||
| 144 | practical reasons. These include @code{enable-multibyte-characters}, | ||
| 145 | @code{most-positive-fixnum}, @code{most-negative-fixnum}, and a few | ||
| 146 | others. Any attempt to set or bind these also signals a | ||
| 147 | @code{setting-constant} error. | ||
| 148 | |||
| 142 | @node Local Variables | 149 | @node Local Variables |
| 143 | @section Local Variables | 150 | @section Local Variables |
| 144 | @cindex binding local variables | 151 | @cindex binding local variables |
| @@ -1355,6 +1362,9 @@ is not current either on entry to or exit from the @code{let}. This is | |||
| 1355 | because @code{let} does not distinguish between different kinds of | 1362 | because @code{let} does not distinguish between different kinds of |
| 1356 | bindings; it knows only which variable the binding was made for. | 1363 | bindings; it knows only which variable the binding was made for. |
| 1357 | 1364 | ||
| 1365 | It is an error to make a constant or a read-only variable | ||
| 1366 | buffer-local. @xref{Constant Variables}. | ||
| 1367 | |||
| 1358 | If the variable is terminal-local (@pxref{Multiple Terminals}), this | 1368 | If the variable is terminal-local (@pxref{Multiple Terminals}), this |
| 1359 | function signals an error. Such variables cannot have buffer-local | 1369 | function signals an error. Such variables cannot have buffer-local |
| 1360 | bindings as well. | 1370 | bindings as well. |
| @@ -1394,6 +1404,9 @@ in a void buffer-local value and leave the default value unaffected. | |||
| 1394 | 1404 | ||
| 1395 | The value returned is @var{variable}. | 1405 | The value returned is @var{variable}. |
| 1396 | 1406 | ||
| 1407 | It is an error to make a constant or a read-only variable | ||
| 1408 | buffer-local. @xref{Constant Variables}. | ||
| 1409 | |||
| 1397 | @strong{Warning:} Don't assume that you should use | 1410 | @strong{Warning:} Don't assume that you should use |
| 1398 | @code{make-variable-buffer-local} for user-option variables, simply | 1411 | @code{make-variable-buffer-local} for user-option variables, simply |
| 1399 | because users @emph{might} want to customize them differently in | 1412 | because users @emph{might} want to customize them differently in |