aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGlenn Morris2017-11-29 17:12:05 -0800
committerGlenn Morris2017-11-29 17:12:05 -0800
commit7aedb6116ffaa6590c86e70380f533385c1ced58 (patch)
tree186436d57261f5bd0e5f1bff8844615c17b46128 /doc
parent728d259243206136387b6b59c2efb7de8cd9f6ed (diff)
parent02d114d6b85e02132d5f99ead517b69dbdd77e35 (diff)
downloademacs-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.texi7
-rw-r--r--doc/lispref/tips.texi14
-rw-r--r--doc/lispref/variables.texi13
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
174The message is @samp{Attempt to set a constant symbol}. This happens 174The message is @samp{Attempt to set a constant symbol}. This happens
175when attempting to assign values to @code{nil}, @code{t}, and keyword 175when attempting to assign values to @code{nil}, @code{t},
176symbols. @xref{Constant Variables}. 176@code{most-positive-fixnum}, @code{most-negative-fixnum}, and keyword
177symbols. It also happens when attempting to assign values to
178@code{enable-multibyte-characters} and some other symbols whose direct
179assignment 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}
534statement (@pxref{Declaring Functions}). 534statement (@pxref{Declaring Functions}).
535 535
536@item 536@item
537If you use many functions and variables from a certain file, you can 537If you use many functions, macros, and variables from a certain file,
538add a @code{require} for that package to avoid compilation warnings 538you can add a @code{require} (@pxref{Named Features, require}) for
539for them. For instance, 539that package to avoid compilation warnings for them, like this:
540
541@example
542(require 'foo)
543@end example
544
545@noindent
546If you need only macros from some file, you can require it only at
547compile 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
139that you do not intend to change the value of a variable, but Emacs 139that you do not intend to change the value of a variable, but Emacs
140does not raise an error if you actually change it. 140does not raise an error if you actually change it.
141 141
142@cindex read-only variables
143A small number of additional symbols are made read-only for various
144practical reasons. These include @code{enable-multibyte-characters},
145@code{most-positive-fixnum}, @code{most-negative-fixnum}, and a few
146others. 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
1355because @code{let} does not distinguish between different kinds of 1362because @code{let} does not distinguish between different kinds of
1356bindings; it knows only which variable the binding was made for. 1363bindings; it knows only which variable the binding was made for.
1357 1364
1365It is an error to make a constant or a read-only variable
1366buffer-local. @xref{Constant Variables}.
1367
1358If the variable is terminal-local (@pxref{Multiple Terminals}), this 1368If the variable is terminal-local (@pxref{Multiple Terminals}), this
1359function signals an error. Such variables cannot have buffer-local 1369function signals an error. Such variables cannot have buffer-local
1360bindings as well. 1370bindings as well.
@@ -1394,6 +1404,9 @@ in a void buffer-local value and leave the default value unaffected.
1394 1404
1395The value returned is @var{variable}. 1405The value returned is @var{variable}.
1396 1406
1407It is an error to make a constant or a read-only variable
1408buffer-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
1399because users @emph{might} want to customize them differently in 1412because users @emph{might} want to customize them differently in