1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

302 Commits

Author SHA1 Message Date
Stefan Kangas
4047072c7d Update FSF's address
* doc/emacs/emacs.texi (Distrib):
* doc/lispintro/emacs-lisp-intro.texi:
* doc/lispref/elisp.texi:
* doc/misc/org.org (Link Abbreviations):
* etc/tutorials/TUTORIAL.eo:
* lisp/elide-head.el:
* lisp/textmodes/page-ext.el: Update the FSF address to 31 Milk Street.
2024-09-02 21:02:09 +02:00
Eli Zaretskii
039e6ffd86 Write Antinews for Emacs 30 ELisp Reference
* doc/lispref/anti.texi (Antinews):
* doc/lispref/elisp.texi (Top): Rewrite "Antinews" for Emacs 30.
2024-06-27 21:54:52 +03:00
Jared Finder
a5c0d682b1 Add documentation for window-tool-bar package
Also change window-tool-mode to not pay attention to if
tool-bar-map has a buffer local value or not as that made the
documentation complicated.  Documentation added in Emacs manual,
Elisp manual, package commentary, and docstrings.  Also extend
window-tool-bar support to Emacs 27 and newer.  (bug#68765)

* doc/emacs/emacs.texi (Top):
* doc/emacs/frames.texi (Menu Bars):
* doc/emacs/glossary.texi (Glossary):
* doc/emacs/modes.texi (Minor Modes):
* doc/emacs/windows.texi (Windows, Tab Line): Mention Window
Tool Bar.
(Window Tool Bar): New documentation.
* doc/lispref/elisp.texi (Top):
* doc/lispref/modes.texi (Mode Line Format, Mode Line Basics)
(Mode Line Data): Mention Tab Lines.
(Tab Lines): New documentation.
* etc/NEWS: Mention newly added variable and package.
* lisp/window-tool-bar.el (window-tool-bar-mode): Don't display
tool bar when tool-bar-map is nil.
* lisp/window-tool-bar.el (tool-bar-always-show-default): Define
variable for older Emacs versions.
2024-06-09 15:21:34 +03: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
Eric Abrahamsen
8bee4060ea Add peg.el as a built-in library
* lisp/progmodes/peg.el: New file, taken from ELPA package.
* test/lisp/peg-tests.el: Package tests.
* doc/lispref/peg.texi: Documentation.
2024-03-30 15:19:47 -07:00
Eli Zaretskii
31a4bec609 Fix documentation of last change
* doc/lispref/objects.texi (Type Hierarchy): Fix wording and
markup.
* doc/lispref/elisp.texi (Top): Add new node to @detailmenu.
2024-03-01 10:52:50 +02:00
Juri Linkov
3b90e5052c Tree-sitter support for outline-minor-mode (bug#68824)
* doc/emacs/text.texi (Outline Format): Add 'outline-search-function'.

* doc/lispref/elisp.texi (Top): Add new menu item "Outline Minor Mode"
after "Imenu".

* doc/lispref/modes.texi (Modes): Add new menu item "Outline Minor Mode"
after "Imenu".
(Major Mode Conventions): Mention "Outline Minor Mode" with @pxref.
(Outline Minor Mode): New node.

* doc/lispref/parsing.texi (Tree-sitter Major Modes): Mention
'treesit-outline-predicate' with @pxref.

* lisp/treesit.el (treesit-outline-predicate): New buffer-local variable.
(treesit-outline-predicate--from-imenu): New internal function.
(treesit-outline-search, treesit-outline-level): New functions.
(treesit-major-mode-setup): Set up treesit-outline-predicate,
outline-search-function and outline-level.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate):
New internal function.
(c-ts-base-mode): Set 'treesit-outline-predicate' to
'c-ts-mode--outline-predicate'.

* lisp/progmodes/heex-ts-mode.el (heex-ts-mode): Kill inherited
local variables 'outline-heading-end-regexp', 'outline-regexp',
'outline-level'.

* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove 'outline-regexp'.
Suggested by john muhl <jm@pub.pink>.

* lisp/textmodes/html-ts-mode.el (html-ts-mode): Kill inherited
local variables 'outline-heading-end-regexp', 'outline-regexp',
'outline-level'.
2024-02-12 20:18:24 +02:00
Mattias Engdegård
9bcc9690a8 Eliminate lazy bytecode loading
The obsolete lazy-loaded bytecode feature, enabled by
`byte-compile-dynamic`, slows down Lisp execution even when not in use
because every call to a bytecode function has to check that function
for laziness.

This change forces up-front loading of all lazy bytecode so that we
can remove all those checks.  (Dynamically loaded doc strings are not
affected.)

There is no point in generating lazy bytecode any more so we stop
doing that; this simplifies the compiler.  `byte-compile-dynamic` now
has no effect.

This is a fully compatible change; the few remaining users of
`byte-compile-dynamic` should not notice any difference.

* src/lread.c (bytecode_from_rev_list): Force eager loading of
lazy bytecode.
* src/bytecode.c (exec_byte_code): Remove lazy bytecode checks.
* src/eval.c (fetch_and_exec_byte_code, Ffetch_bytecode): Remove.
(funcall_lambda): Call exec_byte_code directly, avoiding checks.
* lisp/subr.el (fetch-bytecode): New definition, obsolete no-op.
* lisp/emacs-lisp/disass.el (disassemble-1):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
Remove calls to fetch-bytecode.
(byte-compile-dynamic): Update doc string.
(byte-compile-close-variables, byte-compile-from-buffer)
(byte-compile-insert-header, byte-compile-output-file-form)
(byte-compile--output-docform-recurse, byte-compile-output-docform)
(byte-compile-file-form-defmumble):
Remove effects of byte-compile-dynamic.
* doc/lispref/compile.texi (Dynamic Loading): Remove node now that
the entire `byte-compile-dynamic` facility has been rendered inert.
* etc/NEWS: Announce changes.
2024-01-31 17:12:25 +01: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
Mattias Engdegård
dfee22c312 Elaborate Elisp dialect selection in manual
* doc/lispref/variables.texi (Using Lexical Binding): Rename to...
(Selecting Lisp Dialect): ...this.  All references updated.
Add concrete examples of -*- lines.
Move text about special variables from here...
(Dynamic Binding): ...to here.
2023-10-23 14:48:42 +02:00
Mattias Engdegård
7e4a4b762e Describe lexical binding before dynamic
* doc/lispref/variables.texi (Variable Scoping)
(Lexical Binding, Dynamic Binding):
Alter the presentation order from the point of view that lexical
binding is the standard discipline (if not always the default) and
dynamic binding an alternative, which corresponds better to Elisp
today.  Modernise parts of the text.
* doc/lispref/elisp.texi (Top): Update menu.
2023-10-23 14:48:42 +02:00
Po Lu
3695ae4d63 Document selections on Android more thoroughly
* doc/lispref/elisp.texi (Top):
* doc/lispref/frames.texi (Frames): Add ``Accessing Selections''
to menu.
(Accessing Selections, X Selections, Other Selections): New
nodes.
2023-04-08 09:35:19 +08:00
Eli Zaretskii
119b3a4dba Minor copyedits of documentation of OClosures
* doc/lispref/functions.texi (OClosures): Improve wording,
indexing, and markup; add details.
2023-03-03 15:23:22 +02:00
Yuan Fu
4ef12cfb1f
; Fix tree-sitter manual title case
* doc/lispref/elisp.texi:
* doc/lispref/modes.texi:
* doc/lispref/parsing.texi: Change to title case.
2023-01-02 14:25:54 -08:00
Eli Zaretskii
411647a3f6 ; Fix NEWS. 2023-01-01 19:38:24 +02:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Yuan Fu
312f82d36f
Change "language definition" to "language grammar" in manual.
"Language grammar" is apparently the more widely used term among
people talking about tree-sitter.  To avoid confusion, I think it's
good to use that rather than "language definition", which is a term
that I made up :-)

Feel free to revert this if it is too much change.

* doc/lispref/elisp.texi:
* doc/lispref/modes.texi:
* doc/lispref/parsing.texi:
* lisp/treesit.el: Change "language definition" to "language grammar".
2022-12-30 00:47:22 -08:00
Eli Zaretskii
faf44e2c61 Fix recent changes in documentation
* lisp/treesit.el (treesit-node-at): Doc fix.

* doc/lispref/parsing.texi (Language Definitions): Add
cross-reference.
(Retrieving Nodes): Renamed from "Retrieving Node"; all references
changed.
(Retrieving Nodes): Fix wording and markup.
2022-11-12 10:57:56 +02:00
Eli Zaretskii
6f28810f6b Clean up tree-sitter sections of the ELisp manual
* doc/lispref/parsing.texi (Parsing Program Source):
* doc/lispref/modes.texi (Font Lock Mode)
(Parser-based Font Lock): Fix wording, punctuation, and markup.
Add index entries.

* lisp/treesit.el (treesit-node-at, treesit-language-at): Rename
argument POINT to POS.
2022-10-22 18:48:42 +03:00
Yuan Fu
98bfb24081
Merge remote-tracking branch 'savannah/master' into feature/tree-sitter 2022-06-14 15:59:46 -07:00
Lars Ingebrigtsen
aa95b2a47d Add OVERRIDES argument to prin1/prin1-to-string
* doc/lispref/streams.texi (Output Functions): Document it.
(Output Overrides): New node.

* src/process.c (Faccept_process_output):
* src/print.c (debug_print, print_error_message):
* src/pdumper.c (print_paths_to_root_1, decode_emacs_reloc):
* src/lread.c (readevalloop):
* src/eval.c (internal_lisp_condition_case):
* src/editfns.c (styled_format): Adjust prin1/prin1-to-string
callers.

* src/print.c (Fprin1): Take an OVERRIDES parameter.
(print_bind_overrides, print_bind_all_defaults): New functions.
(Fprin1_to_string): Take an OVERRIDES parameter.
2022-05-15 15:29:38 +02:00
Lars Ingebrigtsen
5f7dd959c2 Improve the *Help* output for compiler macros and the like
* doc/lispref/functions.texi (Advice and Byte Code): New node.

* lisp/help-fns.el (help-fns--compiler-macro): Also output data on
other byte compilation things, and link to the manual (bug#23264).
2022-05-14 04:13:56 +02:00
Yuan Fu
84847cad82
Add tree-sitter intergration
* configure.ac (HAVE_TREE_SITTER, TREE_SITTER_OBJ): New variables.
(DYNAMIC_LIB_SUFFIX): new variable, I copied code from MODULES_SUFFIX
so the diff looks this way.
* doc/lispref/elisp.texi (Top): Add tree-sitter manual.
* doc/lispref/modes.texi (Font Lock Mode): mention tree-sitter.
(Parser-based Font Lock): New section.
(Auto-Indentation): Mention tree-sitter.
(Parser-based Indentation): New section.
* doc/lispref/parsing.texi (Parsing Program Source): New chapter.
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add
treesit-parser and treesit-node type.
* lisp/treesit.el: New file.
* src/Makefile.in (TREE_SITTER_LIBS, TREE_SITTER_FLAGS,
TREE_SITTER_OBJ): New variables.
* src/alloc.c:
(cleanup_vector): Add cleanup code for treesit-parser and
treesit-node.
* src/casefiddle.c (casify_region): Notify tree-sitter parser of
buffer change.
* src/data.c (Ftype_of): Add treesit-parser and treesit-node type
(Qtreesit_parser, Qtreesit_node): New symbol.
* src/emacs.c (main): Add symbols in treesit.c.
* src/eval.c (define_error): Move the function to here.
* src/insdel.c (insert_1_both, insert_from_string_1, insert_from_gap,
insert_from_buffer_1, replace_range, del_range_2): Notify tree-sitter
parser of buffer change.
* src/json.c (define_error): Move this function out.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add treesit-parser and
treesit-node.
* src/lread.c (Vdynamic_library_suffixes): New variable.
* src/print.c (print_vectorlike): Add code for printing
treesit-parser and treesit-node.
* src/treesit.c: New file.
* src/treesit.h: New file.
* test/src/treesit-tests.el: New file.
2022-05-07 01:11:39 -07:00
Alan Mackenzie
14d64a8adc Merge branch 'master' into scratch/correct-warning-pos 2022-01-22 11:02:50 +00:00
Alan Mackenzie
bdd9b5b8a0 Miscellaneous amendments to the scratch/correct-warning-pos branch
* lisp/cedet/semantic/fw.el (semantic-alias-obsolete)
(semantic-varalias-obsolete): Replace calls to byte-compile-warn with calls to
byte-compile-warn-x (when it exists).

* lisp/emacs-lisp/bytecomp.el (byte-compile-log-warning-function)
(byte-compile--log-warning-for-byte-compile): Make the POSITION parameter no
longer &optional (for the benefit of flymake on *.el).
(byte-compile-log-warning): Replace a nil POSITION argument with an actual
position.
(byte-compile-file-form-require): Push the required symbol onto
byte-compile-form-stack, for the benefit of `do-after-load-evaluation'.

* lisp/keymap.el (define-keymap--compile): Replace four calls to
byte-compile-warn with byte-compile-warn-x.

* doc/lispref/elisp.texi (master menu): Add entries for Shorthands and Symbols
with position.

* doc/lispref/streams.texi (Input Functions): Document
read-positioning-symbols.

* doc/lispref/symbols.texi (Symbols): Add new menu entry.
(Symbols with Position): New @section.
2022-01-22 09:59:05 +00:00
Lars Ingebrigtsen
2a3edd1e0a Document textsec
* doc/lispref/elisp.texi (Top): Add menu.
* doc/lispref/text.texi (Text): Add menu.
(Suspicious Text): New node.

* lisp/international/textsec-check.el (textsec-check): Adjust doc
string.
2022-01-20 08:38:16 +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
bfc38ff058 Add support for multisession variables
* doc/lispref/elisp.texi (Top): Add to menu.
(Top):
* doc/lispref/variables.texi (Variables): Ditto.
(Multisession Variables): Document multisession variables.

* lisp/emacs-lisp/multisession.el: New file.
2021-12-16 07:20:04 +01:00
Lars Ingebrigtsen
3d38d1d134 Add sqlite3 support to Emacs
* configure.ac: Add check for the sqlite library.
* doc/lispref/text.texi (Database): Document it.

* lisp/sqlite.el: New file.

* lisp/term/w32-win.el (dynamic-library-alist): Add a mapping.

* src/Makefile.in (SQLITE3_LIBS): Add the libraries.

* src/alloc.c (union emacs_align_type): Add a Lisp_Sqlite struct.

* src/data.c (Ftype_of): Add sqlite.

* src/emacs.c (main): Load the syms.

* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add PVEC_SQLITE.
(GCALIGNED_STRUCT): New struct to keep data for sqlite database
objects and statement objects.
(SQLITEP, SQLITE, CHECK_SQLITE, XSQLITE): New macros for accessing
the objects.

* src/pdumper.c (dump_vectorlike): Update hash.
(dump_vectorlike): Don't dump it.

* src/print.c (print_vectorlike): Add a printer for the sqlite
object.

* src/sqlite.c: New file.

* test/src/sqlite-tests.el: Add tests.
2021-12-11 04:55:57 +01:00
Lars Ingebrigtsen
331366395e Start adjusting the manuals to talk about the keymap-* functions
* lisp/dired.el (dired--make-directory-clickable):
* doc/lispref/keymaps.texi (Keymaps):
(Key Sequences):
(Prefix Keys):
(Active Keymaps):
(Key Lookup):
(Functions for Key Lookup):
(Changing Key Bindings):
(Key Binding Commands):
(Tool Bar):
* doc/lispref/commands.texi (Interactive Codes):
(Event Examples):
(Event Mod):
* doc/emacs/kmacro.texi (Save Keyboard Macro):
* doc/emacs/custom.texi (Keymaps):
(Keymaps):
(Minibuffer Maps):
(Rebinding):
(Init Rebinding):
(Modifier Keys):
(Mouse Buttons):
(Init Examples):
(Init Non-ASCII): Adjust the documentation to remove description
of the old syntaxes, and use the new keymap-* functions.

* doc/lispref/keymaps.texi (Low-Level Key Binding): New node that
describes `define-key' and the old key syntaxes.
2021-11-16 08:26:24 +01:00
Po Lu
a05f6bb671 Document the xwidget type
* doc/lispref/elisp.texi: Add Xwidget Type to the menu.
* doc/lispref/objects.texi (Editing Types): Add Xwidget Type to the
menu.
(Xwidget Type): New node.
2021-11-07 14:51:16 +02:00
Lars Ingebrigtsen
48ca3c99c8 Add a framework for yanking media into Emacs
* doc/emacs/killing.texi (Clipboard): Refer to it.
* doc/lispref/frames.texi (Yanking Media): Document the mechanism.

* lisp/yank-media.el: New file.

* lisp/gnus/message.el (message-mode): Register a yank handler for
images.
(message-insert-screenshot): Factor out image code from here...
(message--yank-media-image-handler): ... to here.
2021-11-06 21:59:27 +01:00
Mattias Engdegård
81915a95af Add manual section about how to avoid regexp problems
Help users affected by our NFA engine's stack overflows and occasional
poor performance, replacing old text that was more limited in scope.

* doc/lispref/elisp.texi (Top):
* doc/lispref/searching.texi (Regular Expressions): Add menu entries.
(Regexp Problems): New node.
(Regexp Special):
* etc/PROBLEMS: Remove superseded text.
2021-11-03 13:50:12 +01:00
Martin Rudalics
e74e17c1f0 Rewrites of Elisp manual including tab-bar and tab-line changes
* doc/lispref/buffers.texi (Current Buffer, Buffer List): Update
references to 'selected-window'.
* doc/lispref/elisp.texi (Top): Move up Selecting Windows section
in front of Window Sizes section.
* doc/lispref/frames.texi (Creating Frames): Say window system
instead of windowing system.
(Frame Layout): Add Tab Bar to layout.
(Layout Parameters): Add 'tab-bar-lines'.
(Input Focus): Say window system window instead of window
manager window.  Fix reference to 'selected-window'.
* doc/lispref/objects.texi (Window Type): Minor rewrite.
* doc/lispref/windows.texi (Basic Windows): Rewrite.  Settle on
term 'window system window' for disambiguation with our windows.
Move 'selected-window' description to Selecting Windows section.
Move schematic of window structure here.  Use 'decorations' for
objects outside the window body.  Say that the areas reserved
for continuation and truncation glyphs, vertical dividers and
line numbers are part of the window body.
(Windows and Frames): Minor rewrite, adding and fixing some
cross references.  Move live window schematic to 'Basic Windows'
section.
(Selecting Windows): Move section in front of Window Sizes
section.  Move description of 'selected-window' here.  Move up
description of 'frame-selected-window' and
'set-frame-selected-window'.  Update and move description of
'window-bump-use-time' here.
(Window Sizes): Throughout use the term 'decorations' instead of
enumerating them individually.  Add 'window-tab-line-height'
description.
(Resizing Windows): Again use the term 'decorations' instead of
enumerating them individually.
(Splitting Windows): Minor fix.
(Cyclic Window Ordering): Improve descriptions of 'get-lru-window'
and 'get-mru-window'.  Move 'window-bump-use-time' to Selecting
Windows section.
(Coordinates and Windows, Window Configurations): Once more use
the term 'decorations' instead of enumerating them individually.
* src/window.c (Fwindow_bump_use_time): Move after
'window-use-time'.  Make it work for live windows only.  Make
WINDOW argument optional.  Update doc-string.
2021-10-18 09:58:48 +02:00
Eli Zaretskii
20eb3644ba Rewrite Antinews for Emacs 28
* doc/lispref/anti.texi (Antinews):
* doc/emacs/anti.texi (Antinews): Rewrite for Emacs 28.
* doc/lispref/elisp.texi (Top):
* doc/emacs/emacs.texi (Top): Update menu accordingly.
2021-10-09 14:32:28 +03:00
Stefan Kangas
bcf59b99f4 Prefer "website" to "homepage"
These days, a "home page" is understood to be only "the main web page
of a website" or "landing page", whereas a "website" is "a collection
of web pages and related content" (Wikipedia).

* doc/emacs/emacs.texi (Top):
* doc/emacs/package.texi (Package Menu):
* doc/lispintro/emacs-lisp-intro.texi (Top):
* doc/lispref/elisp.texi (Top):
* doc/lispref/tips.texi (Documentation Tips):
* doc/misc/ede.texi (ede-project):
* doc/misc/efaq-w32.texi (More information):
* doc/misc/gnus-faq.texi (FAQ 5-7):
* doc/misc/gnus.texi (About mairix):
* doc/misc/mairix-el.texi (About):
* doc/misc/reftex.texi (AUCTeX, Imprint):
* lisp/cedet/ede/base.el (ede-project):
* lisp/cedet/ede/system.el (ede-web-browse-home):
* lisp/emacs-lisp/package.el (package-menu-mode-menu)
(package-browse-url):
* lisp/erc/erc-button.el (erc-emacswiki-url):
* lisp/filesets.el (filesets-goto-homepage):
* lisp/net/mairix.el:
* lisp/net/webjump.el (webjump-sample-sites):
* lisp/obsolete/vc-arch.el:
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode):
* lisp/progmodes/idlwave.el (idlwave, idlwave-mode):
* lisp/textmodes/reftex-vars.el (reftex):
Prefer "website" to "home page".

* doc/lispref/tips.texi (Documentation Tips):
Sort the "URL" header comment before "Homepage".

* lisp/emacs-lisp/lisp-mnt.el
(lm-website): Rename from 'lm-homepage'.
(lm-homepage): Make into alias for 'lm-website'.
2021-09-16 15:42:44 +02:00
Stephen Berman
ae751f2a09 ; Fix menu entry alignment of last change
* doc/lispref/elisp.texi (Top): Fix alignment.
2021-08-16 22:55:50 +02:00
Stephen Berman
b21c9b0816 Add Command Modes to Elisp manual menu and add index entries
* doc/lispref/commands.texi (Command Modes): Add index entries.

* doc/lispref/elisp.texi (Top): Add entry for the Command Modes
node to the detailed node listing.
2021-08-16 19:13:53 +02:00
Eli Zaretskii
79e2d0486c Document native-compilation
* doc/lispref/loading.texi (How Programs Do Loading)
(Library Search): Update for native-compilation features.
* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions, Native-Compilation Variables): New
chapter and sections.
* doc/lispref/elisp.texi (Top): Update the top-level menus.

* etc/NEWS: Add a reference to the ELisp manual.
2021-05-08 16:26:41 +03:00
Stefan Kangas
dac5af2ba1 * doc/lispref/elisp.texi (Top): Add missing entry. 2021-04-11 14:24:04 +02:00
Stefan Monnier
533c659b6c Bindat: new macro-expansion based data layout language
Thorough redesign of the Bindat system, which makes it possible
to define new Bindat type forms, define recursive types, control
the values returned when unpacking, freely mix arbitrary computations
with type definitions, as well as support for arbitrary sized
integers.

This also reverts the recent addition of the `bindat-spec` macro and
the support for 64bit integers in the old Bindat language since that
is now considered obsolete anyway.

* doc/lispref/processes.texi (Bindat Types): Rename from `Bindat Spec`
and rewrite for the new sublanguage.
(Bindat Functions): Adjust to the new terminology.
(Bindat Computed Types): New node.

* lisp/emacs-lisp/bindat.el (bindat--type): New type.
(bindat--unpack-u64, bindat--unpack-u64r): Delete functions.
(bindat--unpack-item, bindat--pack-item, bindat--fixed-length-alist):
Revert addition of support for 64bit integers.
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Handle the new `bindat--type` values.
(bindat-spec): Revert addition of this macro.
(bindat--unpack-uint, bindat--unpack-uintr, bindat--pack-uint)
(bindat--pack-uintr): New functions.
(bindat-type, bindat-defmacro, bindat--pcase): New macros.
(bindat-type): New Edebug elem.
(bindat--type): New generic function.
(bindat--primitives): New constant.
(bindat--macroenv, bindat--op): New vars.
(bindat--make-docstring, bindat--fun, bindat--makefun, bindat--toplevel):
New functions.

* test/lisp/emacs-lisp/bindat-tests.el: Use `bindat-type`.
(ip): New Bindat type.
(header-bindat-spec, data-bindat-spec, packet-bindat-spec): Adjust to
new `bindat-type` macro.
(bindat-test-unpack): Simplify now that the order of fields is preserved.
(bindat-test--int-websocket-type, bindat-test--LEB128): New consts.
(bindat-test--pack-val, bindat-test--sint, bindat-test--recursive):
New tests.
2021-03-05 19:56:31 -05:00
Lars Ingebrigtsen
ca024b0575 Add a new variable `inhibit-interaction'
* doc/lispref/elisp.texi (Top): Add a link.
* doc/lispref/errors.texi (Standard Errors): Mention the new error.

* doc/lispref/minibuf.texi (Minibuffers): Add a link.
(Inhibiting Interaction): New node.

* src/data.c (syms_of_data): Define the `inhibited-interaction' error.

* src/lisp.h: Export the barfing function.

* src/lread.c (Fread_char, Fread_event, Fread_char_exclusive):
Barf if inhibited.

* src/minibuf.c (barf_if_interaction_inhibited): New function.
(Fread_from_minibuffer, Fread_no_blanks_input): Barf if inhibited.
(syms_of_minibuf): Define the `inhibit-interaction' variable.
2021-01-12 15:12:38 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
6ac2326e5b Don’t use “constant” for values you shouldn’t change
Inspired by patch proposed by Dmitry Gutov (Bug#40671#393)
and by further comments by him and by Michael Heerdegen
in the same bug report.
* doc/lispintro/emacs-lisp-intro.texi (setcar):
Don’t push mutability here.
* doc/lispref/eval.texi (Self-Evaluating Forms, Quoting)
(Backquote):
* doc/lispref/lists.texi (Modifying Lists):
* doc/lispref/objects.texi (Lisp Data Types, Mutability):
* doc/lispref/sequences.texi (Array Functions, Vectors):
* doc/lispref/strings.texi (String Basics, Modifying Strings):
Don’t use the word “constant” to describe all values that
a program should not change.
* doc/lispref/objects.texi (Mutability):
Rename from “Constants and Mutability”.  All uses changed.
In a footnote, contrast the Emacs behavior with that of Common
Lisp, Python, etc. for clarity, and say the goal is to be nicer.
2020-05-16 18:24:07 -07:00
Paul Eggert
dca35b31d0 Improve mutability documentation
This change was inspired by comments from Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-04/msg01063.html
* doc/lispref/objects.texi (Lisp Data Types): Mention mutability.
(Constants and mutability): New section.
* doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed)
(Indent Tabs Mode): Improve wording.
* doc/lispref/eval.texi (Self-Evaluating Forms):
Say that they return constants.
* doc/lispref/lists.texi (Sets And Lists):
Fix memql mistake/confusion that I recently introduced.
2020-04-19 13:29:57 -07:00
Eli Zaretskii
e1262d45f9 Update Antinews in ELisp manual
* doc/lispref/anti.texi (Antinews): Rewrite for Emacs 27.
* doc/lispref/elisp.texi (Top): Update the top-level menu item for
Antinews.
2020-01-11 13:36:07 +02: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
Paul Eggert
4cccf7659a Conditionally omit edition numbers, dates in doc
This redoes the 2019-11-02T00:24:02!eggert@cs.ucla.edu patch,
updated after consultation with John Sullivan.
Omit printed edition numbers in online manuals while keeping
them in printed manuals.  In online manuals the edition
numbers seem to cause more confusion than they cure; e.g.,
https://shop.fsf.org/books/gnu-emacs-manual-18th-edition-v-261
currently advertises "18th edition" even as it points to
https://www.gnu.org/software/emacs/manual/pdf/emacs.pdf which
says "Seventeenth Edition".  It is simpler and less confusing
to stick to one version number like "27.0" in online manuals.
For printed manuals people can run, e.g., "texi2any -D
'EDITION Nineteenth'" when generating the 19th printed edition
of the Emacs manual.
* doc/emacs/emacs.texi (EDITION):
* doc/lispintro/emacs-lisp-intro.texi (edition-number, update-date):
* doc/lispref/elisp.texi (VERSION, DATE):
Remove definitions.  Instead, let the person printing the book
specify these values, with the default being the online version
which does not have printed edition numbers.
* doc/lispintro/emacs-lisp-intro.texi (titlepage-edition-number):
New flag, for the edition number as it appears on the title page.
2019-11-12 11:30:02 -08:00