Commit graph

85 commits

Author SHA1 Message Date
Eli Zaretskii
d58fe6619f Merge from origin/emacs-30
ba27193895 ; * etc/NEWS: Fix wording.
fdc6842a44 Remove bookmark fringe marks when deleting all bookmarks
3bccd04c5c Improve wording in symbols.texi
6441b9ea7a Fix typo in Gnus manual
87be3aa149 eglot: Allow omnisharp binary to be capitalized "OmniSharp"
5485ea6aef Do not set `trusted-content` in major modes
d11488fd6f ; * lisp/subr.el (sit-for): Doc fix.

# Conflicts:
#	etc/NEWS
2025-02-01 07:40:19 -05:00
Stefan Kangas
bf97946d7d Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
Stefan Kangas
3bccd04c5c Improve wording in symbols.texi
* doc/lispref/symbols.texi (Symbol Components): Improve wording
(Bug#75512).   Reported by Matt Trzcinski <matt@excalamus.com>.
2025-02-01 04:08:43 +01:00
Stephen Gildea
aa6d2a396a * doc/lispref: new node "Finding Definitions"
How to use variable 'find-function-regexp-alist',
properties 'definition-name' and 'find-function-type-alist',
and function 'find-function-update-type-alist' to help Emacs
locate the definition of objects defined by macros.

This material is moved from node "Standard Properties" and expanded.
2025-01-22 18:31:10 -08:00
Po Lu
37b5b3ea91 Fix the Lisp reference manual for older Texinfo
* doc/lispref/symbols.texi (Standard Properties): Don't provide
empty reference.

* doc/lispref/variables.texi (Lexical Binding): Don't abuse xref
in a standalone sentence.
2025-01-17 09:25:39 +08:00
Stephen Gildea
863fd1c276 Property definition-type becomes find-function-type-alist
lisp/emacs-lisp/find-func.el (find-function-search-for-symbol): Use
symbol property 'find-function-type-alist' instead of 'definition-type'
(find-function-update-type-alist): New convenience function.
* doc/lispref/symbols.texi (Standard Properties): Update example to use
'find-function-type-alist' and 'find-function-update-type-alist'
* doc/lispref/functions.texi (Defining Functions):
* doc/lispref/tips.texi (Coding Conventions):
* doc/misc/ert.texi (How to Write Tests):
* etc/NEWS: Change reference to 'definition-type' to name
'find-function-type-alist' instead
2025-01-16 15:35:01 -08:00
Stephen Gildea
e6591b549f New symbol property 'definition-type' used by 'find-function'.
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol):
Look for new property 'definition-type' on the symbol.
* doc/lispref/symbols.texi (Standard Properties): Add 'Definition-type'.
* doc/lispref/functions.texi (Defining Functions):
* doc/lispref/tips.texi (Coding Conventions):
* doc/misc/ert.texi (How to Write Tests):
Add cross reference to new property 'definition-type'.
* etc/NEWS: Announce new symbol property 'definition-type'.

Thanks to Eli Zaretskii for reviewing this change.
2025-01-12 20:39:02 -08:00
Stephen Gildea
c98d9e8bf5 Lisp Reference Manual: Index standard symbol properties.
* doc/lispref/symbols.texi (Standard Properties):
* doc/lispref/commands.texi:
* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/help.texi:
* doc/lispref/keymaps.texi:
* doc/lispref/minibuf.texi (Minibuffer History):
* doc/lispref/modes.texi (Setting Hooks):
* doc/lispref/sequences.texi (Char-Tables):
* doc/lispref/text.texi (Undo):
* doc/lispref/variables.texi: Each standard symbol property has exactly
one index entry, uniformly formatted as "(symbol property)".
2025-01-12 20:16:00 -08:00
Stefan Kangas
7fa975adbc Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-02 18:39:42 +01:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Pip Cet
c9ab325876 Pure storage removal: Remove documentation
As pure storage is now gone, it no longer needs to be documented.

* doc/lispref/elisp.texi (Top):
* doc/lispref/internals.texi (GNU Emacs Internals): Remove "Pure
Storage" section.
(Building Emacs, Garbage Collection, Writing Emacs Primitives):
* doc/lispref/symbols.texi (Standard Properties): Remove references to
pure storage.
* src/alloc.c (Fgarbage_collect): Remove docstring text referring to
pure storage.
2024-12-12 22:48:12 +01:00
Eli Zaretskii
55a8cec013 Another 'void' update
* doc/lispref/symbols.texi (Symbol Components): Another update due
to the change in 'void' function implementation.  (Bug#73886)
2024-10-27 16:07:08 +02:00
Paul Eggert
2d61ebb505 Change bare-symbol back to match intent
Also, attempt to document the intent better.
Problem reported by Alan Mackenzie (Bug#69684).
* src/data.c (Fbare_symbol): Do not signal if the SYM is a symbol
with position and symbols-with-pos-enabled is nil.  Instead,
ignore symbols-with-pos-enabled, as that was the intent.
* test/src/data-tests.el (data-tests-bare-symbol):
New test, to help prevent this bug from reoccurring.
2024-03-11 00:34:27 -07:00
Basil L. Contovounesios
093c2e1ab9 ; Fix some wording in recent obarray changes. 2024-02-29 16:25:26 +01:00
Mattias Engdegård
6803b70c19 Update NEWS and manual after obarray changes
* doc/lispref/abbrevs.texi (Abbrev Tables):
* doc/lispref/symbols.texi (Creating Symbols):
* doc/lispref/objects.texi (Type Predicates): Update text for obarray
now being an opaque type.
* etc/NEWS: Announce.
2024-02-23 13:02:27 +01:00
João Távora
c2aaa8f15a Process read-symbol-shorthands from longest to shortest (bug#67390)
This ensures that overlapping shorthands are handled correctly and
consistently even if specified out-of-order by the user.

* doc/lispref/symbols.texi (Shorthands): Describe shorthand sort
order.

* lisp/files.el (hack-local-variables--find-variables): Specially
handle read-symbol-shorthands.
2024-02-03 08:40:03 -06:00
Eli Zaretskii
f1736571fa Merge from origin/emacs-29
99efe5c80f Fix count of no-op functions (bug#68375)
0c01f97b73 Wrap @pxref of Abbrevs in parentheses (bug#68375)
70a09325d6 ; Fix last change in widget.texi
63411709a8 ; Fix typos
824cf54951 ; * etc/TODO: Add item to make play-sound non-blocking.
4fadbfe300 Add examples to the Widget manual
1bbb610821 Implement missing functions for custom-icon widget
29af214a75 Fix fontification of cgroup2 in fstab (bug#68367)
2024-01-13 05:36:16 -05:00
Xiyue Deng
0c01f97b73 Wrap @pxref of Abbrevs in parentheses (bug#68375)
* doc/lispref/symbols.texi (Shorthands): Wrap `@pxref{Abbrevs}' in
parentheses.

Copyright-paperwork-exempt: yes
2024-01-11 12:36:31 +02: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
Alan Mackenzie
afcb6d0bc7 Correct the handling of symbols with position in equal
* src/fns.c (internal_equal): Only regard symbols with position
as their symbols when symbols-with-pos-enabled is non-nil.

* doc/lispref/symbols.texi (Symbols with Position): Expand the
description of symbols with position, in particular the way
they work with eq and equal.

* doc/lispref/objects.texi (Equality Predicates): Describe how
eq and equal handle symbols with position.

* test/src/fns-tests.el (fns-tests-equal-symbols-with-position):
New tests for symbols with position.
2023-09-04 12:51:24 +00:00
Mattias Engdegård
7acb3f1c06 Add the function declaration and property important-return-value
Now the declaration

 (declare (important-return-value t))

can be used to have the byte-compiler warn when the return value from
a call is discarded (bug#61730).

* lisp/emacs-lisp/bytecomp.el (byte-compile-form)
(important-return-value-fns): Use the function property
`important-return-value` instead of looking through a static list.
* lisp/emacs-lisp/byte-run.el (byte-run--set-important-return-value)
(defun-declarations-alist): New function declaration, setting the
property of the same name.
* lisp/emacs-lisp/cl-macs.el:
* lisp/subr.el (assoc-default): Set the property.
* doc/lispref/functions.texi (Declare Form):
* doc/lispref/symbols.texi (Standard Properties): Document.
* etc/NEWS: Announce.
2023-05-01 17:11:50 +02:00
Gregory Heytings
b7f0333355 Improve warning about changing the string returned by symbol-name
* src/data.c (Fsymbol_name): Add warning.  See bug#62009.

* doc/lispref/symbols.texi (Creating Symbols): Improve warning.
2023-03-19 22:17:40 +01:00
Eli Zaretskii
0cb686ffb6 Document the 'definition-name' property.
* doc/lispref/symbols.texi (Standard Properties): Document
'definition-name'.
* doc/lispref/functions.texi (Defining Functions): Describe how to
use 'definition-name' when generating function definitions at run
time.  (Bug#60568)
2023-01-07 19:57:30 +02:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Stefan Kangas
8deb797897 ; Fix quoting of non-nil in texinfo sources 2022-10-27 13:11:47 +02:00
Eli Zaretskii
8ce2b89aa1 Improve and extend documentation of ElDoc
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-strategy)
(eldoc-documentation-enthusiast)
(eldoc-documentation-compose-eagerly)
(eldoc-documentation-compose, eldoc-documentation-default)
(eldoc-minibuffer-message, eldoc-idle-delay)
(eldoc-print-after-edit)
(eldoc-echo-area-display-truncation-message)
(eldoc-echo-area-use-multiline-p)
(eldoc-echo-area-prefer-doc-buffer): Doc string fixes.

* doc/emacs/emacs.texi (Top):
* doc/emacs/programs.texi (Documentation, Programming Language Doc):
Rename "Lisp Doc" to "Programming Language Doc", including in
parent menus.  All references changed.
(Programming Language Doc): Formerly "Lisp Doc".  Rewrite to not
be specific to Emacs Lisp.  Improve markup and wording.  Document
more commands and variables.
* doc/emacs/maintaining.texi (Maintaining): Improve indexing.
2022-10-21 16:10:08 +03:00
Lars Ingebrigtsen
7be7ad279e Don't use autoloaded functions for safe-local-variable
* doc/lispref/symbols.texi (Standard Properties): Clarify how
safe-local-variable should look.

* lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-lisp-words)
(checkdoc-symbol-words): Use list-of-strings-p.
(checkdoc-list-of-strings-p): Obsolete.

* lisp/vc/vc-git.el (vc-git-annotate-switches): Remove.
(vc-git-annotate-switches): Open-code the check.
2022-09-16 12:36:15 +02:00
Paul Eggert
734f0f68a4 Use "@code{nil}" in documentation 2022-04-18 13:19:14 -07:00
Eli Zaretskii
7922131bb2 Minor copyedits in "Symbols with Position"
* doc/lispref/symbols.texi (Symbols with Position): Fix wording
and improve indexing.
2022-01-22 20:47:10 +02: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
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
João Távora
3fbe6fd367 ; Fix mistakes in last doc rewording about shorthands
bug#51089

1. The 'punctuation' syntax class is actually empty in Emacs Lisp.
   The class used in the implementation is 'symbol constituents';

2) The prefix to escape shorthands is '#_' together, not '#' or '_'.

* doc/lispref/symbols.texi (Shorthands): Fix exception.
2021-10-12 16:58:01 +01:00
Eli Zaretskii
66b8dfd060 ; Fix last change related to shorthands
* src/lread.c (read1): Minor stylistic fixes of the last change,
including the wording of the comment.

* doc/lispref/symbols.texi (Shorthands): Fix wording and typos.
2021-10-12 16:20:47 +03:00
João Távora
cf1409db71 Don't apply shorthands to punctuation-only symbols (bug#51089)
This includes symbols used for arithmetic functions such as -, /=,
etc.  Using "-" or "/=" is still possible but doing so won't shadow
those functions.

* doc/lispref/symbols.texi (Shorthand, Exceptions): New
subsubsection.

* src/lread.c (read1): Exempt punctionation-only symbols from
oblookup_considering_shorthand.

* test/lisp/progmodes/elisp-mode-tests.el
(elisp-dont-shadow-punctuation-only-symbols): Tweak test.
2021-10-11 22:29:16 +01:00
João Távora
137fa2d716 Rename elisp-shorthands to read-symbol-shorthands
The new name fits better in the family of variables that affect
the Lisp reader.

Suggested-by: Po Lu <luangruo@yahoo.com>

* doc/lispref/symbols.texi (Shorthands): Mention read-symbol-shorthands

* lisp/shorthands.el (hack-read-symbol-shorthands)
(hack-read-symbol-shorthands)
(shorthands-font-lock-shorthands): Use read-symbol-shorthands

* lisp/progmodes/elisp-mode.el (elisp--completion-local-symbols)
(elisp--completion-local-symbols)
(elisp-shorthands): Use read-symbol-shorthands

* src/lread.c:
(syms_of_lread): Define Vread_symbol_shorthands
(oblookup_considering_shorthand): Use Vread_symbol_shorthands.

* test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer):
(elisp-shorthand-read-from-string): Use read-symbol-shorthands

* test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
Use new symbol name read-symbol-shorthands.
2021-10-03 16:18:40 +01:00
Basil L. Contovounesios
129efd9c0b ; Fix compilation of doc/lispref/symbols.texi. 2021-09-27 10:25:02 +01:00
Eli Zaretskii
106a95c8ab Minor fixes in documentation of shorthands
* etc/NEWS:
* doc/lispref/symbols.texi (Symbol Components, Creating Symbols)
(Shorthands): Improve wording, fix indexing and typos.
2021-09-27 09:37:33 +03:00
João Távora
58055b5fc3 Document shorthands in the Elisp manual section on Symbols
* doc/lispref/symbols.texi (Symbol Components): Mentione "Shorthands".
(Creating Symbols): Mention shorthands.  Correct references to Common
Lisp.
(Shorthands): New section.

* etc/NEWS (Shorthands): New entry.
2021-09-27 01:07:11 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Stefan Kangas
d024fc141b * doc/lispref/symbols.texi (Definitions): Fix typo. 2020-07-29 12:35:19 +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
Mattias Engdegård
d75794fd5c Inhibit undo-in-region for mouse-drag-region (bug#37700)
'mouse-drag-region' leaves the region active around the dragged text,
so a straight undo did not revert the entire operation.  To remedy
this, inhibit undo-in-region when the last command was
mouse-drag-region.  (Method suggested by Stefan Monnier.)

* lisp/mouse.el (undo-drag-region): Set the undo-inhibit-region property.
* lisp/simple.el (undo): Inhibit undo-in-region if the last command
had the undo-inhibit-region property set.
* doc/lispref/symbols.texi (Standard Properties):
* doc/lispref/text.texi (Undo): Document undo-inhibit-region.
* etc/NEWS: Announce the property.
2019-10-31 17:41:29 +01:00
Basil L. Contovounesios
4430a9b54f Improve pure and side-effect-free docs
For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00316.html
* doc/lispref/customize.texi (Composite Types): Do not overspecify
:match-alternatives predicates.
* doc/lispref/eval.texi (Intro Eval): Anchor definition of "side
effect" for cross-referencing...
* doc/lispref/functions.texi (What Is a Function): ...from here.
Define what a pure function is.
* doc/lispref/internals.texi (Writing Emacs Primitives): Describe
currently preferred approach to marking primitives as pure and
side-effect-free.
* doc/lispref/symbols.texi (Standard Properties): Expand description
of pure and side-effect-free properties.
2019-04-22 13:48:20 +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
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Mark Oteiza
912826a829 Remove "baroque" use of prefix argument from gensym
'cl-gensym' was simply moved here, but let us take an opportunity to
shed some historical baggage.
* lisp/subr.el (gensym): Remove special treatment of PREFIX as a
number.  Use "g" as prefix to differentiate from cl-gensym defaults.
* doc/lispref/symbols.texi (Creating Symbols): Update accordingly.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter, cl-gensym): Restore.
2017-09-13 10:38:05 -04:00
Mark Oteiza
35c893ddaf Move gensym to core Elisp
* doc/lispref/symbols.texi (Creating Symbols): Mention gensym right
after make-symbol.
* etc/NEWS: Mention.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Alias to
gensym-counter.
(cl-gensym): Alias to gensym.
* lisp/emacs-lisp/cl.el: Remove gensym from list of aliases.
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper):
* lisp/emacs-lisp/ert-x.el (ert-with-message-capture):
(ert--expand-should-1, ert--expand-should):
(ert--should-error-handle-error):
* lisp/emacs-lisp/generator.el (cps--gensym):
* lisp/emacs-lisp/gv.el (setf):
* lisp/emacs-lisp/inline.el (inline--do-letlisteval):
* lisp/emacs-lisp/pcase.el (pcase--make-docstring, pcase-dolist):
(pcase--funcall, pcase--u1): Use gensym.
* lisp/subr.el (gensym-counter): New variable.
(gensym): New function, assimilated from cl-lib.
2017-09-12 11:08:00 -04:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Bogdan Creanga
2086f4c0c6 Typo fixes in elisp manual
* doc/lispref/sequences.texi: Add missing '4' in result (Bug#25047).
* doc/lispref/strings.texi (Text Comparison): Avoid duplicate
definitions of 'string-prefix-p' and 'string-suffix-p'.
* doc/lispref/symbols.texi (Definitions): Pluralize 'definitions'.

Copyright-paperwork-exempt: yes
2016-11-29 19:07:15 +09:00