Commit graph

176 commits

Author SHA1 Message Date
Stefan Kangas
ba0871bef1 ; Fix typos: prefer American spelling 2022-07-13 13:04:22 +02:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Eli Zaretskii
0854453ec2 Revert "Use @pxref when necessary"
This reverts commit b4f47d2ee2.
Cleanups should not be done on the release branch: that's
unnecessary risk.
2021-11-24 21:27:15 +02:00
Robert Pluim
b4f47d2ee2 Use @pxref when necessary
* doc/lispref/customize.texi (Composite Types):
* doc/lispref/edebug.texi (Specification List):
* doc/lispref/variables.texi (Local Variables):
* doc/misc/efaq.texi (Basic keys):
(Informational files for Emacs):
* doc/misc/flymake.texi (Locating a master file):
* doc/misc/gnus.texi (Don't Panic):
(Oort Gnus):
* doc/misc/htmlfontify.texi (Non-interactive):
* doc/misc/mh-e.texi (More About MH-E):
* doc/misc/pcl-cvs.texi (Entering PCL-CVS):
* doc/misc/tramp.texi (Remote processes):
* doc/misc/vhdl-mode.texi (Indentation Calculation):
(Custom Indentation Functions): Use @pxref when inside parens.
2021-11-24 17:55:27 +01:00
Stefan Monnier
e4a187ca59 * doc/lispref/variables.texi (named-let): Document TCO 2021-09-13 09:14:05 -04:00
Lars Ingebrigtsen
ba0be8df53 Document named-let and update some NEWS tags
* doc/lispref/variables.texi (Local Variables): Document `named-let'.
2021-09-13 11:53:18 +02:00
Eli Zaretskii
6430c8419c ; * doc/lispref/variables.texi (Local Variables): Fix indexing. 2021-08-23 14:50:24 +03:00
Lars Ingebrigtsen
cc2c150636 Document `dlet'
* doc/lispref/variables.texi (Local Variables): Document `dlet'.
2021-08-23 02:13:40 +02:00
Eli Zaretskii
b0c7343993 ; * doc/lispref/variables.texi (File Local Variables): Fix last change. 2021-07-18 21:57:03 +03:00
Eli Zaretskii
bbce22337c Fix documentation of a recent changeset (bug#5003)
* lisp/files.el (safe-local-variable-values)
(ignored-local-variable-values): Doc fix.
(ignored-local-variable-values): Add :version tag.

* doc/emacs/custom.texi (Safe File Variables): Mention
'ignored-local-variable-values'.
* doc/lispref/variables.texi (File Local Variables): Fix wording.

* etc/NEWS: Improve wording of the 'ignored-local-variable-values'
entry.
2021-07-18 21:53:22 +03:00
Lars Ingebrigtsen
da200ab049 Allow ignoring local variable values permanently
* doc/lispref/variables.texi (File Local Variables): Document it.

* lisp/files.el (ignored-local-variable-values): New user option
(bug#5003).
(hack-local-variables-confirm): Allow ignoring permanently.
(hack-local-variables-filter): Ignore the permanently ignored
variables.
2021-07-18 17:18:22 +02:00
Lars Ingebrigtsen
77f67d12f6 Add new convenience function `buffer-local-boundp'
* doc/lispref/variables.texi (Creating Buffer-Local): Document it.
* lisp/subr.el (buffer-local-boundp): New function.

* src/data.c (Flocal_variable_p): Mention it.
2021-05-31 07:21:09 +02:00
Lars Ingebrigtsen
5bedbe6b1d Always heed the `lexical-binding' local variable
* doc/lispref/variables.texi (File Local Variables): Document
`permanently-enabled-local-variables'.

* lisp/files.el (enable-local-variables): Mention the new variable.
(set-auto-mode): Always call `hack-local-variables'.
(hack-local-variables): Factor out the variable gathering into its
own function, and respect the new variable (bug#47843).
(hack-local-variables--find-variables): Factored out from
`hack-local-variables'.
(permanently-enabled-local-variables): New variable.
2021-05-10 12:40:11 +02:00
Andrea Corallo
f32ff81020 * Add a note related to native compilation and Dynamic Binding
* doc/lispref/variables.texi (Dynamic Binding): Add a note
	related to native compilation.
2021-04-28 22:08:29 +02:00
Stefan Kangas
a1c84b4308 Remove several references to Emacs 22 and earlier
* admin/charsets/mapfiles/README:
* doc/emacs/custom.texi (Saving Customizations):
* doc/lispintro/emacs-lisp-intro.texi (Simple Extension):
* doc/misc/efaq-w32.texi (Location of init file):
* doc/misc/gnus-faq.texi (FAQ 1-3):
* doc/misc/gnus.texi (Top, Various, Image Enhancements):
* lisp/erc/erc-menu.el (menu):
* lisp/progmodes/cfengine.el (cfengine-fill-paragraph):
Remove some references to Emacs 22 and earlier.

* doc/lispref/buffers.texi:
* doc/lispref/eval.texi:
* doc/lispref/files.texi:
* doc/lispref/keymaps.texi:
* doc/lispref/loading.texi:
* doc/lispref/minibuf.texi:
* doc/lispref/positions.texi:
* doc/lispref/variables.texi: Remove comments about "Emacs 19
specific" features.
2021-03-10 05:45:47 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Glenn Morris
7e30cb2c1c Tiny fix for lispref/variables.texi
* doc/lispref/variables.texi (Converting to Lexical Binding):
@strong{Note...} produces a spurious cross-reference in Info;
reword to avoid that.
2020-12-14 13:45:29 -08:00
Eli Zaretskii
b3d21dcd72 Update docs of 'defvar' and 'defface'
* doc/lispref/display.texi (Defining Faces):
* doc/lispref/variables.texi (Defining Variables): Update the
descriptions of 'defvar' and 'defface' per recent changes in
'eval-last-sexp'.  (Bug#45125)
2020-12-09 17:17:09 +02:00
Mattias Engdegård
7276723630 Better file name in dynvars-check example
* doc/lispref/variables.texi (Converting to Lexical Binding):
Don't suggest an aggregate file name that matches the glob used when
generating it.
2020-10-25 16:41:31 +01:00
Lars Ingebrigtsen
4ef8c4a0f4 Tweak the documentation for define-obsolete-variable-alias
* doc/lispref/variables.texi (Variable Aliases): Actually describe
the macro parameters (bug#44088).

* lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias):
Ditto (bug#44088).
2020-10-20 13:28:29 +02:00
Mattias Engdegård
3217ae6e05 Add aid for finding missing dynamic variable declarations
Find lexical use of variables that are dynamically declared in other
files by recording 'defvar' declarations in files that can be read
in by the compiler in a second compilation.  This is particularly
useful when converting code to use lexical-binding.

The facility is controlled by setting environment variables:

 EMACS_GENERATE_DYNVARS -- set to non-empty to generate a .dynvars file
                           corresponding to each .elc.
 EMACS_DYNVARS_FILE     -- set to the name of a .dynvars file to use
                           as defvar information during compilation,
                           enabling the new warnings.

* lisp/emacs-lisp/bytecomp.el (byte-compile--known-dynamic-vars)
(byte-compile--seen-defvars): New variables.
(byte-compile-warning-types): Add lexical-dynamic warning.
(byte-compile--load-dynvars, byte-compile--warn-lexical-dynamic):
New functions.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file, byte-compile--declare-var)
(byte-compile-lambda, byte-compile-bind): Add dynamic variable loads,
dumps and checks.
* doc/lispref/variables.texi (Converting to Lexical Binding): Document.
2020-10-17 16:57:38 +02:00
Stefan Monnier
4cecd67c39 * doc/lispref/variables.texi (Converting to Lexical Binding): New section
Extract it from `Using Lexical Binding` and extend it a bit.
2020-10-16 15:24:15 -04:00
Štěpán Němec
0e01d5aa72 Preserve setf semantics in 'substring', 'cons', 'logand' expanders
* doc/lispref/variables.texi (Adding Generalized Variables): Fix example.
* lisp/emacs-lisp/cl-lib.el (substring)
* lisp/emacs-lisp/gv.el (cons, logand): Return the value being
assigned, as specified for 'setf'.  (bug#35546)
2020-08-25 17:59:05 +02:00
Eli Zaretskii
10c58356e4 Document changes in lexical-binding
* doc/lispref/variables.texi (Using Lexical Binding): Document
that lexical-binding is now turned on by default in more cases.

* etc/NEWS: Fix wording of the NEWS entry about the above, and mark it
as fully documented.
2020-03-07 13:32:52 +02:00
Štěpán Němec
ff729e3f97 ; bug#39779: Fix some typos in documentation. 2020-02-28 15:21:55 +02:00
Stefan Monnier
4d8d25d641 * doc/lispref/variables.texi (special-variable-p): Clarify limits 2020-02-13 15:01:28 -05:00
Mattias Engdegård
d645628e3c Always use lexical-binding in lisp-interaction-mode (bug#38835)
* lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
Set lexical-binding.
* lisp/startup.el (command-line, startup--get-buffer-create-scratch):
Don't set lexical-binding here.
* doc/lispref/variables.texi:
* etc/NEWS:
Make it clear that lisp-interaction-mode uses lexical-binding.
2020-01-13 18:03:41 +01:00
Mattias Engdegård
fab3674b36 Revert "Raise default max-specpdl-size value"
This reverts commit bb9402e6e9.
2020-01-01 17:38:41 +01:00
Mattias Engdegård
bb9402e6e9 Raise default max-specpdl-size value
Occasionally, loading cl-generic.el from source requires
max_specpdl_size > 1600 when bootstrapping, and thus fails.
In any case we are very close to the limit.

* src/eval.c (init_eval_once): Raise max_specpdl_size to 1800.
* doc/lispref/variables.texi (Local Variables): Update docs.
2020-01-01 16:43:58 +01:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Eli Zaretskii
0114bb964a Improve documentation of 'add-variable-watcher'
* doc/lispref/variables.texi (Watching Variables): Clarify the
documentation of 'add-variable-watcher' and fix markup.

* src/data.c (Fadd_variable_watcher): Clarify the doc string.
(Bug#38205)
2019-11-15 11:16:09 +02:00
Robert Pluim
49614ec800 Correct .dir-locals-2.el description
* doc/lispref/variables.texi (Directory Local Variables): Correct
description of .dir-locals-2.el functioning.  (Bug#37640)
2019-10-11 09:19:59 +02:00
Lars Ingebrigtsen
df713b9344 Ensure that setq-local take an even number of symbol/value pairs
* doc/lispref/variables.texi (Creating Buffer-Local): Document the
new syntax for setq-local.

* lisp/subr.el (setq-local): Ensure that there's an even number of
variable/value pairs, and expand the doc string by taking some
text from `setq'.
2019-10-11 08:27:50 +02:00
Lars Ingebrigtsen
50886f0992 Add a letrec example to the manuel
* doc/lispref/variables.texi (Local Variables): Add a letrec example.
2019-10-09 19:27:17 +02:00
Lars Ingebrigtsen
fe2e29d29b Tweak letrec documentation
* doc/lispref/variables.texi (Local Variables): Compare letrec to
let* instead of let.
2019-10-09 18:42:41 +02:00
Lars Ingebrigtsen
489a106b1c Document `letrec'
* doc/lispref/variables.texi (Local Variables): Document letrec
(bug#21048).

* lisp/subr.el (letrec): Expand the doc string slightly.
2019-10-09 06:06:24 +02:00
Juanma Barranquero
24a3288278 Bump up max_specpdl_size to 1600
* src/eval.c (init_eval_once): Set max_specpdl_size to 1600.
* doc/lispref/variables.texi (Local Variables): Document it.
2019-10-01 04:33:28 +02:00
Lars Ingebrigtsen
d1d738c826 Add some examples in "Adding Generalized Variables"
* doc/lispref/variables.texi (Adding Generalized Variables): Add
examples for `gv-define-expander' and `gv-letplace' (bug#13343).
2019-08-15 23:57:57 -07:00
Juanma Barranquero
4156dd384a Bump up max_specpdl_size to 1500. (Bug#36216)
* src/eval.c (init_eval_once): Set max_specpdl_size to 1500.
* doc/lispref/variables.texi (Local Variables): Document it.
2019-06-16 23:14:51 +02:00
Glenn Morris
6028662649 Merge from origin/emacs-26
008b263 (origin/emacs-26, emacs-26) * lisp/gnus/gnus.el: Mark autoloa...
daf32f1 Speed up redisplay of HELLO
d8a6d82 Improve documentation of 'safe-local-variable' property

# Conflicts:
#	etc/HELLO
2019-06-01 12:04:43 -07:00
Eli Zaretskii
d8a6d82c4d Improve documentation of 'safe-local-variable' property
* doc/lispref/variables.texi (File Local Variables): Document
how to define 'safe-local-variable' properties for built-in
variables.
2019-06-01 10:28:30 +03:00
Glenn Morris
5c21832ae8 Merge from origin/emacs-26
b0da915 (origin/emacs-26, emacs-26) Fix a typo in ELisp manual
400907b Add option to disable help completion autoloading (Bug#28607)
122ba16 Don't segfault on force-window-update of deleted window
015b12e Fix typo in ELisp manual
eadf044 Remove repeated function call in picture.el
1228a90 ; Fix mm-destroy-parts docstring typo
6cfd68d Fix Hideshow key binding typo in Emacs manual
2019-05-22 10:18:51 -07:00
Mauro Aranda
015b12ebb8 Fix typo in ELisp manual
* doc/lispref/variables.texi (Directory Local Variables): Fix typo in
dir-locals-set-class-variables description.  (Bug#35799)
2019-05-20 14:22:58 -04:00
Michael Albinus
21f54feee8 Do not hardcode "/bin/sh" in compile. Bug#24338, Bug#29723
* doc/emacs/custom.texi (Connection Variables): New node.

* doc/emacs/emacs.texi (Top): Add entry for Connection Variables.

* doc/emacs/misc.texi (Single Shell): Mention default value for
remote buffers.

* doc/lispref/variables.texi (Connection Local Variables):
Describe `with-connection-local-variables' instead of
`with-connection-local-profiles'.

* doc/misc/tramp.texi (Remote processes): Refer to Emacs manual.
Mention default connection-local settings for `shell-file-name'
and `shell-command-switch'.

* etc/NEWS: Mention connection-local variables changes.

* lisp/files-x.el (hack-connection-local-variables):
Push connection-local variables to `file-local-variables-alist'.
(connection-local-criteria-for-default-directory): New defsubst.
(with-connection-local-variables): Rename from
`with-connection-local-profiles'.  Adapt implementation.

* lisp/files.el (hack-local-variables):
Call `hack-connection-local-variables'.

* lisp/shell.el (shell): Use `with-connection-local-variables'.

* lisp/subr.el (start-file-process-shell-command):
* lisp/progmodes/compile.el (compilation-start):
Use `with-connection-local-variables'.  Do not set "/bin/sh" for
remote buffers, trust settings of `shell-file-name'.  (Bug#24338),
(Bug#29723)

* lisp/net/ange-ftp.el (ange-ftp-compress, ange-ftp-uncompress):
Use `shell-command-switch'.

* lisp/net/tramp-adb.el (tramp-adb-connection-local-default-profile):
New defvar.  Add it to connection-local profiles after loading "shell".

* lisp/net/tramp-integration.el (tramp-compat): Require tramp-compat.
(tramp-compat-exec-path): Do not declare anymore.
(tramp-connection-local-safe-shell-file-names): New defvar.
(tramp-connection-local-default-profile): New defconst.  Activate
it after loading "shell".
(shell-file-name, shell-command-switch): Add safe-local-variable
property.

* lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp):
Add tramp-autoload cookie.

* test/lisp/files-x-tests.el (remote-shell-file-name):
Add safe-local-variable property to remote-* variables.
(tramp-connection-local-default-profile): Declare.
(files-x-test-with-connection-local-variables):
Rename from `files-x-test-with-connection-local-profiles'.  Adapt
implementation.

* test/lisp/net/tramp-tests.el
(tramp-test34-connection-local-variables): New test.
(tramp-test34-explicit-shell-file-name): Run it also for tramp-adb.
Bind connection-local-{profile,criteria}-alist.  Use tramp-adb
specific `shell-file-name'.  Add safe-local-variable property to
`explicit-shell-file-name' and `explicit-sh-args'.
2019-03-09 16:44:24 +01:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Eli Zaretskii
fdd7e7d8a8 Improve indexing of 'eval-defun' in ELisp manual
* doc/lispref/display.texi (Defining Faces):
* doc/lispref/debugging.texi (Explicit Debug):
* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/variables.texi (Defining Variables): Add index
entries for 'eval-defun'.  (Bug#32066)
2018-07-07 11:37:43 +03:00
Eli Zaretskii
6bdcaec885 Fix typos and minor wording issues in ELisp manual
* doc/lispref/internals.texi (Writing Emacs Primitives):
* doc/lispref/display.texi (Temporary Displays): Fix typos.
* doc/lispref/text.texi (Filling, Changing Properties)
(Transposition): Clarify and fix typos.
* doc/lispref/positions.texi (Screen Lines): Improve wording.
* doc/lispref/modes.texi (Minor Mode Conventions)
(Font Lock Multiline): Fix typos.
* doc/lispref/variables.texi (Dynamic Binding Tips): Fix a
cross-reference.  Fix a typo.
* doc/lispref/sequences.texi (Sequence Functions): Fix typos.
(Bug#31143)
2018-04-13 16:44:05 +03:00
Noam Postavsky
10b1f2fdd5 Explain more about (defvar foo) form (Bug#18059)
* doc/lispref/variables.texi (Defining Variables)
(Using Lexical Binding):
* doc/lispref/compile.texi (Compiler Errors): Emphasize that omitting
VALUE for `defvar' marks the variable special only locally.
* doc/lispref/variables.texi (Using Lexical Binding): Add example of
using `defvar' without VALUE.
2018-03-23 08:19:09 -04:00
Alan Mackenzie
4ab4551470 Firm up documentation of generalized variables
* doc/lispref/variables.texi (Generalized Variables)
(Setting Generalized Variables): Define a generalized variable as something
setf can write to.  Remove the insinuation that hackers have poor memories.
State explicitly that the list of GVs given is complete.  Remove the
suggestion that `setf' has superseded, or is in the process of superseding,
`setq'.  Make minor corrections to the English.
2018-03-21 17:36:34 +00:00
Eli Zaretskii
317da2ace5 Minor improvements in manuals
* doc/lispref/variables.texi (Local Variables): Make more clear
that local bindings of 'let' are in effect only within the body.
Suggested by Marcin Borkowski <mbork@mbork.pl>, see
http://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00217.html
for the details.

* doc/emacs/programs.texi (Matching): Fix a typo.  Reported by
Alex Branham <alex.branham@gmail.com> in emacs-manual-bugs@gnu.org.
Improve indexing.
2018-03-07 21:51:59 +02:00