Commit graph

157 commits

Author SHA1 Message Date
Daniel Colascione
0972a54a5a Add static-when, static-unless like static-if
* lisp/subr.el (static-when, static-unless): define
* doc/lispref/control.texi (Conditional Compilation): document
* etc/NEWS: mention
2025-03-07 22:22:30 -08:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Eli Zaretskii
88f6b045f4 Merge from origin/emacs-30
afb34a3b23 ; Improve documentation of ':box' face attribute
b38eb6da1d Fix docstring of c-ts-mode-indent-style
9fdb764898 Support PHP 8.4 and more reliable indentation (bug#74525)
bda0bce9e4 Don't inadvertently reset frame scroll bar sizes (Bug#74435)
3f99cdaf26 Mention special variables in lexical binding documentation
0ef0f18f16 Allow to go back to using 'ruby-mode' after loading 'ruby...
fc17e8727d Delete obsolete section in admin/notes/repo
3e396b2c5b Improve documentation for 'while-let'
50b91ed458 Remove mention of treesit-defun-prefer-top-level (bug#74474)
03ae07291e Fix NS non-native fullscreen on initial frame load (bug#5...
8261d7224d Fix user options for listing and marking diary files

# Conflicts:
#	lisp/progmodes/c-ts-mode.el
2024-11-30 06:44:06 -05:00
Joost Kremers
3e396b2c5b Improve documentation for 'while-let'
* doc/lispref/control.texi (Conditionals): Reorganise describing
what's overlapping between the macros (and between the macros
and let*), and then improve the documentation for 'while-let'.
2024-11-25 12:45:00 +08:00
Eli Zaretskii
e4f490c871 Merge from origin/emacs-30
e0f964c16d ; * etc/AUTHORS: Update.
eb18f7288b ; * ChangeLog.4: Update.
8e37b53716 Skip *.dylib files in 'loaddefs-generate'
0d8d5f10ff Highlight namespace name in "use" clause.
d3e98487d0 ; * lisp/loadup.el: Improve file abstract
1a91d37a21 ; * doc/lispref/control.texi (Conditionals): Fix markup.
2024-10-27 08:23:05 -04:00
Stefan Monnier
d44b94a63d cond*: Add support for Pcase patterns
* lisp/emacs-lisp/cond-star.el (cond*): Adjust docstring.
(match*): Prefer `_VAR` syntax.
(cond*-convert-condition): Add support for `pcase*`.
* doc/lispref/control.texi (cond* Macro): Document `pcase*`.
* test/lisp/emacs-lisp/cond-star-tests.el: New file.
2024-10-25 22:26:06 -04:00
Eli Zaretskii
1a91d37a21 ; * doc/lispref/control.texi (Conditionals): Fix markup. 2024-10-24 08:42:29 +03:00
Sean Whitton
698d75a335 Merge from origin/emacs-30
eae798486a Update special conditionals documentation
2024-10-24 12:13:20 +08:00
Sean Whitton
eae798486a Update special conditionals documentation
* doc/lispref/control.texi (Conditionals): Document if-let* and
when-let*, not if-let and when-let.  Document and-let*.
2024-10-24 12:10:09 +08:00
Michael Albinus
00f9927693 ; Fix typos
* doc/lispref/control.texi (cond* Macro):
* etc/NEWS: Fix typos.
2024-08-29 15:52:16 +02:00
Eli Zaretskii
38650b630b Document 'cond*'
* doc/lispref/control.texi (cond* Macro): New subsection.
Text written by Richard Stallman <rms@gnu.org>.
* etc/NEWS: Document 'cond*'.
2024-08-29 12:02:08 +03:00
Eli Zaretskii
52cae67e1e ; Don't use non-ASCII in ELisp manual sources unless necessary
* doc/lispref/strings.texi:
* doc/lispref/parsing.texi:
* doc/lispref/nonascii.texi:
* doc/lispref/keymaps.texi:
* doc/lispref/intro.texi:
* doc/lispref/help.texi:
* doc/lispref/functions.texi:
* doc/lispref/display.texi:
* doc/lispref/control.texi: ASCIIfy.
2024-07-26 14:11:17 +03:00
Stefan Monnier
fea8d54c48 control.texi: Be a bit more explicit about the behavior of pcase-let
* doc/lispref/control.texi (Destructuring with pcase Patterns):
Clarify the kind of "unspecified" behavior that can occur when
the destructing pattern does not match the value.
2024-05-15 13:57:11 -04:00
Stefan Monnier
f2bccae22b Use a dedicated type to represent interpreted-function values
Change `function` so that when evaluating #'(lambda ...)
we return an object of type `interpreted-function` rather than
a list starting with one of `lambda` or `closure`.
The new type reuses the existing PVEC_CLOSURE (nee PVEC_COMPILED)
tag and tries to align the corresponding elements:

- the arglist, the docstring, and the interactive-form go in the
  same slots as for byte-code functions.
- the body of the function goes in the slot used for the bytecode string.
- the lexical context goes in the slot used for the constants of
  bytecoded functions.

The first point above means that `help-function-arglist`,
`documentation`, and `interactive-form`s don't need to
distinguish interpreted and bytecode functions any more.

Main benefits of the change:

- We can now reliably distinguish a list from a function value.
- `cl-defmethod` can dispatch on `interactive-function` and `closure`.
  Dispatch on `function` also works now for interpreted functions but still
  won't work for functions represented as lists or as symbols, of course.
- Function values are now self-evaluating.  That was alrready the case
  when byte-compiled, but not when interpreted since
  (eval '(closure ...)) signals a void-function error.
  That also avoids false-positive warnings about "don't quote your lambdas"
  when doing things like `(mapcar ',func ...)`.

* src/eval.c (Fmake_interpreted_closure): New function.
(Ffunction): Use it and change calling convention of
`Vinternal_make_interpreted_closure_function`.
(FUNCTIONP, Fcommandp, eval_sub, funcall_general, funcall_lambda)
(Ffunc_arity, lambda_arity): Simplify.
(funcall_lambda): Adjust to new representation.
(syms_of_eval): `defsubr` the new function.  Remove definition of `Qclosure`.

* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
Change calling convention and use `make-interpreted-closure`.

* src/data.c (Fcl_type_of): Distinguish `byte-code-function`s from
`interpreted-function`s.
(Fclosurep, finterpreted_function_p): New functions.
(Fbyte_code_function_p): Don't be confused by `interpreted-function`s.
(Finteractive_form, Fcommand_modes): Simplify.
(syms_of_data): Define new type symbols and `defsubr` the two
new functions.

* lisp/emacs-lisp/cl-print.el (cl-print-object) <interpreted-function>:
New method.

* lisp/emacs-lisp/oclosure.el (oclosure): Refine the parent
to be `closure`.
(oclosure--fix-type, oclosure-type): Simplify.
(oclosure--copy, oclosure--get, oclosure--set): Adjust to
new representation.

* src/callint.c (Fcall_interactively): Adjust to new representation.

* src/lread.c (bytecode_from_rev_list):

* lisp/simple.el (function-documentation):
* lisp/help.el (help-function-arglist): Remove the old `closure` case
and adjust the byte-code case so it handles `interpreted-function`s.

* lisp/emacs-lisp/cl-preloaded.el (closure): New type.
(byte-code-function): Add it as a parent.
(interpreted-function): Adjust parent (the type itself was already
added earlier by accident).

* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Adjust to
new representation.
(byte-compile): Use `interpreted-function-p`.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust to
new representation.
(side-effect-free-fns): Add `interpreted-function-p` and `closurep`.

* src/profiler.c (trace_hash, ffunction_equal): Simplify.
* lisp/profiler.el (profiler-function-equal): Simplify.

* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1):
Use `interpreted-function-p`; adjust to new representation; and take
advantage of the fact that function values are now self-evaluating.

* lisp/emacs-lisp/lisp-mode.el (closure):
Remove `lisp-indent-function` property.

* lisp/emacs-lisp/disass.el (disassemble-internal): Adjust to
new representation.
* lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation):
Use `interpreted-function-p`.
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
Add `closurep` and `interpreted-function-p`.

* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Adjust to
more precise type info in `describe-function`.
* test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries):
Use `interpreted-function-p`.
* test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-f4, vk-f5):
Don't hardcode function values.

* doc/lispref/functions.texi (Anonymous Functions): Don't suggest that
function values are lists.  Reword "self-quoting" to reflect the
fact that #' doesn't return the exact same object.  Update examples
with the new shape of the return value.

* doc/lispref/variables.texi (Lexical Binding):
* doc/lispref/lists.texi (Rearrangement):
* doc/lispref/control.texi (Handling Errors): Update examples to reflect
new representation of function values.
2024-04-28 11:58:12 -04:00
Eli Zaretskii
9ea415cde3 Merge from origin/emacs-29
ecb80e0e8a ; Improve wording in documentation of 'not and 'null'
5971aa1fd3 * lisp/dnd.el (dnd-handle-movement): Avoid errors (bug#70...
bbc5204a0f * doc/misc/calc.texi: Improve indexing.
2024-04-20 07:36:02 -04:00
Eli Zaretskii
ecb80e0e8a ; Improve wording in documentation of 'not and 'null'
* doc/lispref/control.texi (Combining Conditions):
* doc/lispref/lists.texi (List-related Predicates): Clarify
wording of 'not' vs 'null'.  (Bug#70392)
2024-04-15 14:52:03 +03:00
Eli Zaretskii
cc8a2c57b5 Merge from origin/emacs-29
3b791ebbe1 ; Fix 'usage:' keyword in Ffile_name_concat doc.
ed48b0d657 ; * CONTRIBUTE: Ask not to use non-ASCII unless necessary.
b708e639d6 ; * src/lread.c (maybe_swap_for_eln): Clarify warning mes...
db027a0697 ; Fix bibtex-biblatex-field-alist docstring typo.
a9be5c7ea9 ; * doc/lispref/control.texi (Conditionals): Add missing ...
db5915f30b Fix 'with-sqlite-transaction'
fe491173e8 ; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).
2024-03-16 05:47:41 -04:00
Arash Esbati
a9be5c7ea9 ; * doc/lispref/control.texi (Conditionals): Add missing paren (bug#69742). 2024-03-12 17:05:14 +02:00
Stefan Monnier
806759dc0a (pcase): New _ syntax in pred/app functions
The current syntax for functions in `app` and `pred` patterns
allows a shorthand (F ARGS) where the object being matched is
added as an extra last argument.  This is nice for things like
(pred (< 5)) but sometimes the object needs to be at
another position.
Until now you had to use (pred (lambda (x) (memq x my-list)))
or (pred (pcase--flip memq my-list)) in those cases.
So, introduce a new shorthand where `_` can be used to indicate
where the object should be passed: (pred (memq _ my-list))

* lisp/emacs-lisp/pcase.el (pcase--split-pred): Document new syntax
for pred/app functions.
(pcase--funcall): Support new syntax.
(pcase--flip): Declare obsolete.
(pcase--u1, \`): Use `_` instead.
(pcase--split-pred): Adjust accordingly.

* doc/lispref/control.texi (pcase Macro): Document new syntax
for pred/app functions.

* lisp/progmodes/opascal.el (pcase-defmacro):
* lisp/emacs-lisp/seq.el (seq--make-pcase-bindings):
* lisp/emacs-lisp/eieio.el (eieio):
* lisp/emacs-lisp/cl-macs.el (cl-struct, cl-type):
Use _ instead of `pcase--flip`.
(cl--pcase-mutually-exclusive-p): Adjust accordingly.

* lisp/emacs-lisp/map.el (map--pcase-map-elt): Declare obsolete.
(map--make-pcase-bindings): Use `_` instead.
2024-02-11 22:00:44 -05:00
Eli Zaretskii
d9dabcacef ; Minor copyedits of doc of 'handler-bind'
* doc/lispref/control.texi (Handling Errors): Fix wording and
punctuation.
2024-01-06 12:44:26 +02:00
Stefan Monnier
ae75333ca7 Improve handler-bind doc
* doc/lispref/control.texi (Handling Errors) <handler-bind>: Expand.
* doc/lispref/variables.texi (Variable Scoping): Mention static scoping.
2024-01-04 16:39:48 -05:00
Stefan Monnier
5ba75e183c New special form handler-bind
AFAIK, this provides the same semantics as Common Lisp's `handler-bind`,
modulo the differences about how error objects and conditions are
represented.

* lisp/subr.el (handler-bind): New macro.

* src/eval.c (pop_handler): New function.
(Fhandler_Bind_1): New function.
(signal_or_quit): Handle new handlertypes `HANDLER` and `SKIP_CONDITIONS`.
(find_handler_clause): Simplify.
(syms_of_eval): Defsubr `Fhandler_bind_1`.

* doc/lispref/control.texi (Handling Errors): Add `handler-bind`.

* test/src/eval-tests.el (eval-tests--handler-bind): New test.

* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-keywords):
Move 'handler-bind' from CL-only to generic Lisp.
(handler-bind): Remove indentation setting, it now lives in the macro
definition.
2024-01-04 16:32:53 -05:00
Po Lu
ecf08f0621 Merge from savannah/emacs-29
dc4e6b1329 ; Update copyright years in more files
64b3777631 ; Run set-copyright from admin.el
8e1c56ae46 ; Add 2024 to copyright years

# Conflicts:
#	doc/misc/modus-themes.org
#	doc/misc/texinfo.tex
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	etc/themes/modus-operandi-theme.el
#	etc/themes/modus-themes.el
#	etc/themes/modus-vivendi-theme.el
#	lib/alloca.in.h
#	lib/binary-io.h
#	lib/c-ctype.h
#	lib/c-strcasecmp.c
#	lib/c-strncasecmp.c
#	lib/careadlinkat.c
#	lib/cloexec.c
#	lib/close-stream.c
#	lib/diffseq.h
#	lib/dup2.c
#	lib/filemode.h
#	lib/fpending.c
#	lib/fpending.h
#	lib/fsusage.c
#	lib/getgroups.c
#	lib/getloadavg.c
#	lib/gettext.h
#	lib/gettime.c
#	lib/gettimeofday.c
#	lib/group-member.c
#	lib/malloc.c
#	lib/md5-stream.c
#	lib/md5.c
#	lib/md5.h
#	lib/memmem.c
#	lib/memrchr.c
#	lib/nanosleep.c
#	lib/save-cwd.h
#	lib/sha1.c
#	lib/sig2str.c
#	lib/stdlib.in.h
#	lib/strtoimax.c
#	lib/strtol.c
#	lib/strtoll.c
#	lib/time_r.c
#	lib/xalloc-oversized.h
#	lisp/auth-source-pass.el
#	lisp/emacs-lisp/lisp-mnt.el
#	lisp/emacs-lisp/timer.el
#	lisp/info-look.el
#	lisp/jit-lock.el
#	lisp/loadhist.el
#	lisp/mail/rmail.el
#	lisp/net/ntlm.el
#	lisp/net/webjump.el
#	lisp/progmodes/asm-mode.el
#	lisp/progmodes/project.el
#	lisp/progmodes/sh-script.el
#	lisp/textmodes/flyspell.el
#	lisp/textmodes/reftex-toc.el
#	lisp/textmodes/reftex.el
#	lisp/textmodes/tex-mode.el
#	lisp/url/url-gw.el
#	m4/alloca.m4
#	m4/clock_time.m4
#	m4/d-type.m4
#	m4/dirent_h.m4
#	m4/dup2.m4
#	m4/euidaccess.m4
#	m4/fchmodat.m4
#	m4/filemode.m4
#	m4/fsusage.m4
#	m4/getgroups.m4
#	m4/getloadavg.m4
#	m4/getrandom.m4
#	m4/gettime.m4
#	m4/gettimeofday.m4
#	m4/gnulib-common.m4
#	m4/group-member.m4
#	m4/inttypes.m4
#	m4/malloc.m4
#	m4/manywarnings.m4
#	m4/mempcpy.m4
#	m4/memrchr.m4
#	m4/mkostemp.m4
#	m4/mktime.m4
#	m4/nproc.m4
#	m4/nstrftime.m4
#	m4/pathmax.m4
#	m4/pipe2.m4
#	m4/pselect.m4
#	m4/pthread_sigmask.m4
#	m4/readlink.m4
#	m4/realloc.m4
#	m4/sig2str.m4
#	m4/ssize_t.m4
#	m4/stat-time.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/stdio_h.m4
#	m4/stdlib_h.m4
#	m4/stpcpy.m4
#	m4/strnlen.m4
#	m4/strtoimax.m4
#	m4/strtoll.m4
#	m4/time_h.m4
#	m4/timegm.m4
#	m4/timer_time.m4
#	m4/timespec.m4
#	m4/unistd_h.m4
#	m4/warnings.m4
#	nt/configure.bat
#	nt/preprep.c
#	test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00
Po Lu
8e1c56ae46 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
Eli Zaretskii
3b7198dc47 Merge from origin/emacs-29
5303152872 Revert "Fix treesit-node-field-name and friends (bug#66674)"
fa0bb88302 ; * src/buffer.c (syms_of_buffer) <default-directory>: Do...
44517037ae ; Fix typo
ccf46acefd ; Fix last change.
c86b039dff ; * etc/DEBUG: Improve advice for debugging native-compil...
9afba605bb Explain status "r" in `epa-list-keys`
6271422196 ; * lisp/dired.el (dired--make-directory-clickable): Refo...
fcbb004489 Fix mouse clicks on directory line in Dired
be8a7155b4 Fix 'split-root-window-right' and 'split-root-window-below'
eb19984c4d Mark icalendar.el as maintained by emacs-devel
03dc914fd3 ; Fix footnotes in ELisp Intro manual
ceacf75395 Fix usage of `setq-default' and offer more suggestions
2701da0eee Fix python-ts-mode triple quote syntax (bug#67262)
683c7c9687 Increment parser timestamp when narrowing changes (bug#67...
8ae42c825e ruby-ts-mode: Fix indentation for string_array closer
9cfa498e0a treesit-major-mode-setup: Use 'treesit--syntax-propertize...
da2e440462 ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
6ea507296a Correctly refontify changed region in tree-sitter modes (...
2023-12-30 04:51:17 -05:00
Stefan Kangas
44517037ae ; Fix typo 2023-12-26 22:09:57 +01:00
Eli Zaretskii
6c367f0ad4 Merge from origin/emacs-29
232a57a3e3 ; * doc/lispref/debugging.texi (Debugging): Add cross-ref...
c65ddf26a3 ; doc/lispref/debugging.texi: Add reference to Profiler d...
6f884d3aed Add 5 docstrings to abbrev.el (bug#67153)
b4d990bd63 ; Clarify wording about arguments in doc strings
c20ae7a30f ; Improve cross-references in description of 'pcase'
42181b65df ; * src/editfns.c (Fline_beginning_position): Doc fix.
5f3309f6b0 ; Improve indexing in ELisp manual
4e406bb420 Fix CBZ file detection in doc-view-mode
2023-11-18 06:07:47 -05:00
Eli Zaretskii
c20ae7a30f ; Improve cross-references in description of 'pcase'
* doc/lispref/control.texi (pcase Macro, Backquote Patterns):
Improve cross-references.
2023-11-16 21:55:10 +02:00
Eli Zaretskii
c9d7740574 Merge from origin/emacs-29
ce0ebb91f2 Improve documentation of read syntax and printed represen...
81f84b00a5 ; * doc/lispref/modes.texi (Other Font Lock Variables): A...
434592b074 ; * lisp/dired.el (dired-use-ls-dired): Doc fix (bug#67053).
fe000236cf Improve documentation of signaling errors in batch mode
103ca678ac Fix treesit-simple-indent-presets docstring (bug#67007)
b7871cefe7 Prevent an infinite loop in todo-mode (bug#66994)
fa8cc4c9ee Fix cmake-ts-mode indentation (Bug#66845)
5bdc61bc0e Update to Org 9.6.11
18e2de1bec ; * lisp/bindings.el (right-word, left-word): Doc fix.
4f0fc3bfda ; Document core input events problems with XInput2
2023-11-11 05:31:52 -05:00
Eli Zaretskii
fe000236cf Improve documentation of signaling errors in batch mode
* doc/lispref/control.texi (Signaling Errors)
(Processing of Errors):
* doc/lispref/os.texi (Batch Mode):
* doc/lispref/debugging.texi (Invoking the Debugger):
* lisp/emacs-lisp/debug.el (debug):
* src/eval.c (Fsignal):
* lisp/subr.el (error): Document more prominently that signaling
an unhandled error in batch mode kills Emacs.  Better
documentation of backtrace in batch mode.
2023-11-09 10:33:28 +02:00
Po Lu
c0400151f8 Correct many instances of ``allows to''
Refer to:
lists.gnu.org/archive/html/emacs-devel/2016-01/msg01598.html

* doc/emacs/frames.texi (Tab Bars):

* doc/emacs/maintaining.texi (Tag Syntax):

* doc/lispref/compile.texi (Native Compilation):

* doc/lispref/control.texi (Destructuring with pcase Patterns):

* doc/lispref/display.texi (Overlay Properties, Glyphless Chars):

* doc/lispref/frames.texi (Size Parameters, Layout Parameters)
(Child Frames):

* doc/lispref/minibuf.texi (Minibuffer Windows):

* doc/lispref/processes.texi (Asynchronous Processes):

* doc/lispref/windows.texi (Precedence of Action Functions)
(Mouse Window Auto-selection):

* doc/misc/autotype.texi (Autoinserting):

* doc/misc/efaq.texi (New in Emacs 28):

* doc/misc/idlwave.texi (Examining Variables):

* doc/misc/ses.texi (Quick Tutorial, Standard formula functions):

* doc/misc/tramp.texi (External methods, FUSE-based methods):

* lisp/comint.el (comint-insert-previous-argument-from-end):

* lisp/emacs-lisp/rmc.el (read-multiple-choice):

* lisp/gnus/gnus-util.el:

* lisp/mail/rmailsum.el (rmail-summary-progressively-narrow):

* lisp/mouse.el (mouse-drag-track):

* lisp/net/tramp-sudoedit.el:

* lisp/obsolete/landmark.el:

* lisp/org/org.el (org-startup-truncated, org-file-apps):

* lisp/pixel-scroll.el (pixel-scroll-precision-mode):

* lisp/progmodes/cperl-mode.el (cperl-praise):

* lisp/simple.el (yank-from-kill-ring, kill-visual-line):

* lisp/window.el (delete-window-choose-selected):

* src/ChangeLog.11:

* src/xdisp.c (syms_of_xdisp):

* src/xterm.c (handle_one_xevent): The construct ``allows to
<infinitive>'' is not English inasmuch as no direct object to
``allows'' is provided.  Correct and rephrase each instance of such a
construct within our documentation and commentary.
2023-09-10 09:33:50 +08:00
Alan Mackenzie
328f96ea9e New documentation for static-if.
* doc/lispref/control.texi (Conditional Compilation): New
section documenting static-if.
2023-09-03 13:08:36 +00:00
Basil L. Contovounesios
0e9307eb2b Fix some Texinfo markup in manuals
* doc/emacs/macos.texi (Mac / GNUstep Customization):
* doc/lispintro/emacs-lisp-intro.texi (condition-case):
* doc/lispref/control.texi (pcase Macro):
* doc/lispref/debugging.texi (Internals of Debugger):
* doc/lispref/internals.texi (Building Emacs):
* doc/lispref/modes.texi (Imenu):
(Parser-based Font Lock, Parser-based Indentation):
* doc/lispref/parsing.texi (Retrieving Nodes, Tree-sitter C API):
* doc/lispref/processes.texi (Network, Bindat Types):
* doc/lispref/searching.texi (Rx Functions):
* doc/lispref/text.texi (Replacing):
* doc/lispref/windows.texi (Textual Scrolling):
* doc/misc/calc.texi (Killing From Stack, Customizing Calc):
* doc/misc/cc-mode.texi (Misc Font Locking, List Line-Up):
* doc/misc/ede.texi (ede-cpp-root-project)
(ede-proj-target-makefile, ede-sourcecode):
* doc/misc/ert.texi (Running Tests in Batch Mode):
* doc/misc/eudc.texi (Emacs-only Configuration, The Server Hotlist):
* doc/misc/eww.texi (Advanced):
* doc/misc/flymake.texi (Starting Flymake)
(Proc customization variables):
* doc/misc/tramp.texi (File name completion):
* doc/misc/gnus.texi (Summary Buffer Lines, Gnus Registry Setup)
(Fancy splitting to parent, Customizing the IMAP Connection)
(Mail Source Specifiers, Agent as Cache): Consistently mark up nil
and t as @code.  Also fix the markup and wording of some surrounding
text (bug#64016).

* doc/lispref/display.texi (SVG Images, Icons):
* doc/lispref/modes.texi (Customizing Keywords): Prefer ASCII
apostrophe over Unicode right single quotation mark.
2023-06-13 15:29:06 +01:00
Eli Zaretskii
7f94558b77 Improve documentation of warnings
* doc/lispref/control.texi (Errors):
* doc/lispref/os.texi (Startup Summary):
* doc/lispref/display.texi (Warning Basics, Warning Variables)
(Warning Options, Delayed Warnings): Improve documentation of
warnings.  Document the automatic delaying of warnings during
startup.  (Bug#63181)
2023-04-30 11:07:36 +03:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Juanma Barranquero
b074c55a97 ; * doc/lispref/control.texi (Generators): Fix typo. 2022-11-03 03:49:08 +01:00
Eli Zaretskii
56f871b0e2 ; * doc/lispref/control.texi (Conditionals): Fix typo. 2022-09-28 16:59:51 +03:00
Eli Zaretskii
5d2985a035 ; * doc/lispref/control.texi (Conditionals): Fix wording. 2022-09-28 15:49:32 +03:00
Lars Ingebrigtsen
12f63c18f6 Add new macro 'while-let'
* doc/lispref/control.texi (Conditionals): Document
when-let/if-let/while-let.
* lisp/subr.el (while-let): New macro.
2022-09-28 13:19:08 +02:00
Mattias Engdegård
60102016e4 Abolish max-specpdl-size (bug#57911)
The max-lisp-eval-depth limit is sufficient to prevent unbounded stack
growth including the specbind stack; simplify matters for the user by
not having them to worry about two different limits.  This change
turns max-specpdl-size into a harmless variable with no effects,
to keep existing code happy.

* lisp/subr.el (max-specpdl-size):
Define as an ordinary (but obsolete) dynamic variable.
* admin/grammars/Makefile.in:
* doc/lispintro/emacs-lisp-intro.texi (Loops & Recursion):
* doc/lispref/control.texi (Cleanups):
* doc/lispref/edebug.texi (Checking Whether to Stop):
* doc/lispref/eval.texi (Eval):
* doc/lispref/variables.texi (Local Variables):
* doc/misc/calc.texi (Recursion Depth):
Update documentation.
* etc/NEWS: Announce.
* src/eval.c
(FletX): Use safe iteration to guard against circular bindings list.
(syms_of_eval): Remove old max-specpdl-size definition.
(init_eval_once, restore_stack_limits, call_debugger)
(signal_or_quit, grow_specpdl_allocation):
* leim/Makefile.in:
* lisp/Makefile.in:
* lisp/calc/calc-stuff.el (calc-more-recursion-depth)
(calc-less-recursion-depth):
* lisp/calc/calc.el (calc-do):
* lisp/cedet/semantic/ede-grammar.el (ede-proj-makefile-insert-rules):
* lisp/cedet/semantic/grammar.el (semantic-grammar-batch-build-one-package):
* lisp/cus-start.el (standard):
* lisp/emacs-lisp/comp.el (comp--native-compile):
* lisp/emacs-lisp/edebug.el (edebug-max-depth):
(edebug-read-and-maybe-wrap-form, edebug-default-enter):
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
* lisp/eshell/esh-mode.el (eshell-mode):
* lisp/loadup.el (max-specpdl-size):
* lisp/mh-e/mh-e.el (mh-invisible-headers):
* lisp/net/shr.el (shr-insert-document, shr-descend):
* lisp/play/hanoi.el (hanoi-internal):
* lisp/progmodes/cperl-mode.el:
* src/fileio.c (Fdo_auto_save):
Remove references to and modifications of max-specpdl-size.
2022-09-19 19:30:03 +02:00
Stefan Kangas
d46e94f23f Merge from origin/emacs-28
1b8719835a Update to Org 9.5.4
92c5faafd7 Clarify documentation of 'string-to-unibyte'
2848512654 ; * lisp/files.el (find-file): Avoid too short lines in do...
672f9f787f Improve keystrokes in doc strings in some find-file functions
ef5651cc77 Fix segfaults when starting on 80x26 TTY frames
bfa647972f ; Fix doc string of 'delete-selection-repeat-replace-region'
a95d46e00f Make it explicit that a couple of _s in lispref are unders...
5c74c25123 Remove from FAQ the MS-Windows info about BDF fonts
edb48646f2 Fix Display Property manual example
2022-06-05 06:30:25 +02:00
Lars Ingebrigtsen
a95d46e00f Make it explicit that a couple of _s in lispref are underscores
* doc/lispref/strings.texi (Custom Format Strings):
* doc/lispref/control.texi (pcase Macro): Make it explicit that
it's an underscore (bug#55742).
2022-06-01 17:56:45 +02:00
Stefan Kangas
6303cb7e9f Merge from origin/emacs-28
f9ee83bfb9 do_switch_frame: before leaving mini-window, check other (...
908e2e09d0 Fix commands used to produce on-line HTML docs
fff770fb97 Fix a bad cross-reference in elisp.pdf
ebea3415b0 Fix documentation of 'string-pad'
2022-05-29 06:30:21 +02:00
Eli Zaretskii
fff770fb97 Fix a bad cross-reference in elisp.pdf
* doc/lispref/control.texi (pcase Macro): Fix a conditional
cross-reference (bug#55689).
2022-05-28 11:51:15 +03:00
Lars Ingebrigtsen
a512940daa Document pcase-lambda
* doc/lispref/control.texi (Destructuring with pcase Patterns):
Document pcase-lambda (bug#20268).
2022-02-08 08:51:30 +01:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	lib/cdefs.h
#	lisp/erc/erc-dcc.el
#	lisp/erc/erc-imenu.el
#	lisp/erc/erc-replace.el
#	lisp/image-dired.el
#	lisp/progmodes/xref.el
#	m4/alloca.m4
#	m4/byteswap.m4
#	m4/errno_h.m4
#	m4/getopt.m4
#	m4/gnulib-common.m4
#	m4/inttypes.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Lars Ingebrigtsen
a43ec2e7a3 Add a pcase-let example to the manual
* doc/lispref/control.texi (Destructuring with pcase Patterns):
Add a pcase-let example.
2021-11-06 21:59:27 +01:00
Glenn Morris
626696c3c8 * doc/lispref/control.texi (pcase Macro): Fix cross-reference. 2021-10-01 09:27:09 -07:00
Earl Hyatt
2f90fa19b8 Add a `pcase-setq' macro
* doc/lispref/control.texi (Destructuring with pcase Patterns):
Document this macro.

* lisp/emacs-lisp/pcase.el (pcase-setq): New macro.  This macro is
the 'setq' equivalent of 'pcase-let'.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-setq): Test this new
macro. (bug#49809).
2021-08-11 23:54:31 +02:00