1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00
Commit graph

222 commits

Author SHA1 Message Date
Stefan Monnier
211ee13fb5 * doc/lispref/functions.texi (Advising Named Functions): Clarify " no advice" 2023-09-05 08:57:27 -04:00
Stefan Kangas
cb3731361f Adjust documentation for defadvice obsoletion
* doc/lispref/functions.texi (Porting Old Advice): Unequivocally say
that 'defadvice' is obsolete.
* doc/emacs/trouble.texi (Coding Standards): Refer to 'advice-add'
instead of the now-obsolete 'defadvice'.  (Bug#64757)
* doc/misc/ses.texi (Uses of advice-add in SES): Rename node from
"Uses of defadvice in SES".  Remove 'undo-more' entry, since that
advice was deleted in 2007.
2023-08-24 01:02:08 +02:00
Eli Zaretskii
d1ddd1d5d9 Merge from origin/emacs-29
84d2da003e ; Fix example in the Flymake manual
0a1459f1d9 * doc/misc/calc.texi (Advanced Math Functions): Correct c...
92faf1f564 Consider 'dired-kill-when-opening-new-dired-buffer' in mo...
bafe71a69f ; Fix use-package.texi markup
018e4ca6c5 ; * doc/misc/calc.texi (Advanced Math Functions): Fix las...
1952dbd4c5 Fix Gamma function definition in calc.texi
f73f82d7e8 Fix subscripts in the Calc manual
70fc7c41ef Improve documentation of 'declare' forms
c835758238 ; * src/lread.c (bytecode_from_rev_list): Avoid C++ comment.
2847857496 Improve tree-sitter docs
0e9307eb2b Fix some Texinfo markup in manuals
8dc08333ee Fix bol/bos anchors in tree-sitter :match regexps
8225ade615 ; * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: F...
1f0527a312 ; Fix last change in tex-mode.el
4da479920e * lisp/subr.el (with-restriction): Tweak indent rule
36aa9bd818 ; Fix previous change
aaeaf608d8 Fix setting region in the minibuffer
1383efe01d Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has sta...
bdb0bc2b4e Fix tex-mode display-buffer issues
90047c38ce Add test for when 'completion-auto-help' is 'visible'
2c623e4feb Avoid errors in 'apropos-documentation' after 'eval-buffer'
dd3b98121c ; * doc/emacs/indent.texi (Indentation Commands): Fix las...
904edf1f07 Mention indent-rigidly in the Emacs manual
2023-06-17 05:02:55 -04:00
Eli Zaretskii
70fc7c41ef Improve documentation of 'declare' forms
* lisp/simple.el (read-extended-command-predicate): Mention the
'(declare completion ...' form in the doc string.

* doc/lispref/functions.texi (Declare Form): Clarify
'completion-predicate' and 'modes'; add cross-references.
(Bug#64045)
2023-06-15 09:28:26 +03:00
Eli Zaretskii
d4295285d7 Merge from origin/emacs-29
229af8e4b3 ; * lisp/progmodes/csharp-mode.el (csharp-ts-mode--defun-...
ce7d18cbc0 ; Minor fixes in ELisp manual
5c8864fab4 ; * lisp/simple.el (async-shell-command): Doc fix.  (Bug#...
b96dc472bc Ignore current-prefix-arg in async-shell-command
1e6a759436 Fix building of VC package manuals with relative includes
61659f36c8 Another fix for VHDL mode highlighting
2023-05-18 07:49:49 -04:00
Eli Zaretskii
ce7d18cbc0 ; Minor fixes in ELisp manual
* doc/lispref/functions.texi (Declare Form): Improve indexing.
(Obsolete Functions): Add cross-reference.
`
2023-05-14 10:26:03 +03:00
Stefan Monnier
e4c8ba6c05 Merge branch 'emacs-29' 2023-05-10 11:18:43 -04:00
Shynur
a081b6625b ; Updated Elispref-Manual: `nil' cannot be defun'ed
* doc/lispref/functions.texi (Function Cells): Fix inaccuracy.
(Bug#62746)
2023-05-06 12:46:23 +03:00
Eli Zaretskii
f8c86654c7 ; * doc/lispref/functions.texi (Declare Form): Fix whitespace. 2023-05-02 15:55:44 +03: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
Eli Zaretskii
2d1a96e878 Merge from origin/emacs-29
305246d972 Add emoji-zoom-reset
470d269ec1 Make emoji-zoom-{increase,decrease} set text properties c...
63d4a86f8d Fix transforming sliced images
5e1953a8f8 ; * etc/NEWS: Minor copyedits of entry for 'keymap-*' fun...
6b9f9df945 ; Improve documentation of 'declare-function'
81d1f46d0f ; Avoid compiler warning in eglot.el.
38cdfcb212 ; Fix description of new 'keymap-*' functions
257090b872 Adapt EMBA scripts.
90c07d3fdd Another terminology fix in ELisp reference manual
a832bc7090 Correct terminology in Elisp Reference Manual
db308233cb Comment out GNUSTEP jobs on EMBA (again)
8c1b102243 ; * lisp/image.el (put-image): Doc fix.
eda88c63ad ; * doc/emacs/trouble.texi (Checklist): Minor grammar fix.
728bc09cf3 Fix regexp string escaping mistake in vhdl-mode.el (bug#6...
479626dbac Update to Org 9.6.3-2-gf2949d
5a1c9aace7 ; Add a bit more docstring to tsx-ts-mode (bug#62429)
86cf9fd932 Eglot: don't watch directories that don't exist
82d0b6c64e ; * lisp/subr.el (use-dialog-box-p): Fix last change.
3619663f98 Preserve peer information for web page in eww-readable
cb8d6ab648 * lisp/subr.el (use-dialog-box-p): Fix conditions for GUI...
fb2c440920 ; * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Add some n...

# Conflicts:
#	etc/NEWS
2023-04-06 14:38:20 -04:00
Eli Zaretskii
6b9f9df945 ; Improve documentation of 'declare-function'
* doc/lispref/functions.texi (Declaring Functions):
* lisp/subr.el (declare-function): Document explicitly that
ARGLIST argument, if provided, should include the parentheses.
2023-04-05 12:31:01 +03:00
Shynur
a832bc7090 Correct terminology in Elisp Reference Manual
* doc/lispref/functions.texi (Function Names): 'defun' is a macro, not
a special form.  (Bug#62661)

Copyright-paperwork-exempt: yes
2023-04-04 14:16:23 +03:00
Stefan Kangas
49e021e5be Merge from origin/emacs-29
bd5115e134 Remove Eglot activation check from find-file-hook
adc04ad524 * src/intervals.c (set_intervals_multibyte_1): Fix bug#61887
b3e930d328 Revert inadvertent change to lisp/icomplete.el in previou...
da8e4b6fe4 Revert previous change in go-ts-mode.el
7548446194 Release ERC 5.5
585faf4c17 ; More doc improvements for OClosures
2840895c1a Don't create GUI frames in batch sessions
452b5ed103 ; Fix wrong error name in erc-server-908 doc string.
1e9484f2fd ; * etc/ERC-NEWS: Mention more deprecations.
119b3a4dba Minor copyedits of documentation of OClosures
3a651773d2 Eglot: pay better attention to hints' paddingLeft/Right (...

# Conflicts:
#	etc/NEWS
2023-03-04 06:30:12 +01:00
Eli Zaretskii
585faf4c17 ; More doc improvements for OClosures
* doc/lispref/functions.texi (OClosures):
* doc/lispref/commands.texi (Using Interactive):
* etc/NEWS: Some more docs improvements for OClosures.
2023-03-03 21:44:54 +02: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
Mattias Engdegård
db3fea2e5c Detect and prevent function alias loops in fset and defalias
Make `fset` and `defalias` signal an error on attempts to create
circular alias chains.  This is more effective, efficient and
convenient than permitting alias loops to be created and trying to
detect them at run time each time a function is called, which is what
we have been doing until now, badly.

* lisp/help-fns.el (help-fns--analyze-function):
Don't pass obsolete argument.
* lisp/subr.el (function-alias-p):
* src/data.c (indirect_function, Findirect_function): Simplify.
Now error-free, second argument obsolete.
(Ffset): Detect loops.
* test/lisp/help-fns-tests.el (help-fns--analyze-function-recursive):
* test/lisp/subr-tests.el (test-alias-p):
Adapt tests.
* test/src/data-tests.el (data-tests-fset, data-tests-defalias): New.
* doc/lispref/eval.texi (Function Indirection):
* doc/lispref/functions.texi (Defining Functions, Function Cells):
Update manual.
* etc/NEWS: Announce.
2023-02-21 10:42:00 +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
Eli Zaretskii
9871ee8b14 ; More fixes for documentation of 'defalias'
* doc/lispref/functions.texi (Defining Functions): Document
other possible values of DEFINITION in a defalias.
(Bug#60432)
2022-12-31 17:01:22 +02:00
Eli Zaretskii
2a7e072e53 ; Fix documentation of 'defalias'
* doc/lispref/functions.texi (Defining Functions): Document that a
defalias's DEFINITION can be a macro.  (Bug#60432)
2022-12-31 10:44:53 +02:00
Stefan Kangas
f7ee6609ae ; Fix typos (prefer US spelling) 2022-11-18 13:06:55 +01:00
Lars Ingebrigtsen
2cca6408fd Fix functions.texi syntax error
* doc/lispref/functions.texi (Function Documentation): Fix syntax
error.
2022-10-18 22:17:12 +02:00
Stefan Monnier
254f4766e6 functions.texi: Fix bug#58602
* doc/lispref/functions.texi (Function Documentation): Document
`:documentation` and `function-documentation`.
2022-10-18 16:06:42 -04:00
Stefan Monnier
b6a163ba7c * doc/lispref/functions.texi (Declare Form) <compiler-macro>: Re-rephrase 2022-09-28 14:14:32 -04:00
Stefan Monnier
1254d9a3ae * doc/lispref/functions.texi (Declare Form) <compiler-macro>: Rephrase
See bug#57397.
2022-09-28 12:28:57 -04:00
Stefan Monnier
6e628ff99c * doc/lispref/functions.texi (What Is a Function): Improve further 2022-08-15 18:45:58 -04:00
Paul Eggert
664c42df46 * doc/lispref/functions.texi: Fix capitalization. 2022-08-14 11:17:30 -07:00
Eli Zaretskii
48ac40e60e ; Fix last change. 2022-08-14 20:50:56 +03:00
Eli Zaretskii
9239be8e76 ; Fix documentation of 'compiled-function-p' (bug#56648)
* etc/NEWS: Fix a typo and expand the description of
'compiled-function-p'.

* doc/lispref/functions.texi (What Is a Function): Fix wording of
the documentation of 'compiled-function-p'.
2022-08-14 19:45:32 +03:00
Stefan Monnier
1faeef7924 (compiled-function-p): New function (bug#56648)
* lisp/subr.el (compiled-function-p): New function.

* test/lisp/international/ucs-normalize-tests.el (ucs-normalize-part1):
* lisp/gnus/gnus.el (gnus):
* lisp/mh-e/mh-e.el (mh-version):
* lisp/emacs-lisp/macroexp.el (emacs-startup-hook):
* lisp/emacs-lisp/cl-macs.el (compiled-function):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition)
(byte-compile, display-call-tree):
* lisp/emacs-lisp/byte-opt.el (<toplevel-end>):
* lisp/emacs-lisp/advice.el (ad-compiled-p):
* lisp/cedet/semantic/bovine.el (semantic-bovinate-stream):
* lisp/loadup.el (macroexpand-all):
* admin/unidata/unidata-gen.el (unidata--ensure-compiled): Use it.

* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add entries for it.
(pcase--split-pred): Use it.

* lisp/help-fns.el (help-fns-function-description-header): Use `functionp`.
(help-fns--var-safe-local): Use `compiled-function-p`.
2022-08-14 12:30:05 -04:00
Lars Ingebrigtsen
ffc81ebc4b Allow specifying how args are to be stored in `command-history'
* doc/lispref/functions.texi (Declare Form): Document
`interactive-args'
* lisp/replace.el (replace-string): Store the correct interactive
arguments (bug#45607).

* lisp/emacs-lisp/byte-run.el (byte-run--set-interactive-args):
New function.
(defun-declarations-alist): Use it.

* src/callint.c (fix_command): Remove the old hack (which now
longer works since interactive specs are byte-compiled) and
instead rely on `interactive-args'.
2022-08-08 15:53:41 +02:00
Stefan Kangas
a463dccdd0 Merge from origin/emacs-28
b4067394dc Set `default-directory' of Tramp archive connection buffer
2529e82002 ; * doc/lispref/functions.texi (Declare Form): Fix typo.
54c4ceb009 Update the documentation of 'declare' forms
7263631dca Fix bookmark support for Help functions in native-compilat...

# Conflicts:
#	lisp/help.el
2022-07-24 09:55:01 +02:00
Eli Zaretskii
2529e82002 ; * doc/lispref/functions.texi (Declare Form): Fix typo. 2022-07-23 12:56:00 +03:00
Eli Zaretskii
54c4ceb009 Update the documentation of 'declare' forms
* doc/lispref/compile.texi (Native-Compilation Variables): Mention
the 'declare' alternative for 'native-comp-speed'.
* doc/lispref/functions.texi (Declare Form): Document 'declare'
forms that were previously undocumented.
2022-07-23 12:54:07 +03:00
Eli Zaretskii
e2e081a476 ; Fix the documentation of compiler-macros and advice
* doc/lispref/functions.texi (Advice and Byte Code): Fix typos
and improve wording and indexing.  (Bug#23264)
2022-05-14 10:34:50 +03: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
Paul Eggert
4f27e4ff02 functionp doc improvement
* doc/lispref/eval.texi, doc/lispref/functions.texi, src/eval.c:
Document functionp a bit more carefully.  It can return t
on non-functions.
2022-05-11 10:18:12 -07:00
Paul Eggert
734f0f68a4 Use "@code{nil}" in documentation 2022-04-18 13:19:14 -07:00
Stefan Monnier
52d5771e0a Add OClosures, a cross between functions and structs
We here just add the new type.  It is not fully self-contained.
It requires cooperation from `cconv.el` on the one hand, and it
hijacks the docstring info to hold the type of OClosure objects.
This does imply that OClosures can't have docstrings, tho this
limitation will be lifted in subsequent patches.

* lisp/emacs-lisp/oclosure.el: New file.
* test/lisp/emacs-lisp/oclosure-tests.el: New file.
* doc/lispref/functions.texi (OClosures): New section.

* src/eval.c (Ffunction): Accept symbols instead of strings for docstrings.
* src/doc.c (store_function_docstring): Avoid overwriting an OClosure type.
* lisp/emacs-lisp/cconv.el (cconv--convert-function): Tweak ordering of
captured variables.
(cconv-convert): Add case for `oclosure--fix-type`.
2022-03-28 10:53:14 -04:00
Lars Ingebrigtsen
6fbf37a575 Add some indexing for "compiler macro"
* doc/lispref/functions.texi (Inline Functions): Add a link to
where compiler macros are defined.
(Declare Form): Add a concept index.
2022-02-02 19:55:19 +01:00
Robert Pluim
9cc1344c9f Improve function-alias-p documentation
* doc/lispref/functions.texi (Defining Functions): Improve the text.
2022-01-14 08:25:41 +01:00
Michael Albinus
2dc4b1008d * doc/lispref/functions.texi (Defining Functions): Fix thinko. 2022-01-13 14:09:44 +01:00
Lars Ingebrigtsen
c8a2af3037 Add new function function-alias-p
* doc/lispref/functions.texi (Defining Functions): Document it.
* lisp/subr.el (function-alias-p): New function (bug#53178).
2022-01-13 09:49:19 +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
Stefan Kangas
5640b055d6 Merge from origin/emacs-28
9bd3f78645 Make `M-x run-python' select the window again
62139aeb42 * lisp/tab-bar.el (tab-bar-switch-to-last-tab): Add 'abs' ...
ea8422204f * make-dist (manifest): Filter out msdos/autogen/* files.
b5354e989d Rewrite the "Quitting Windows" section of Emacs Lisp Refer...
64ea1a178c Fix eshell for systems that do not have subprocesses
2021-12-13 06:30:58 +01:00
Richard Stallman
b5354e989d Rewrite the "Quitting Windows" section of Emacs Lisp Reference
* doc/lispref/windows.texi (Quitting Windows): Rewrite for
clarity.  (Bug#52328)
2021-12-12 15:04:43 +02:00
Stefan Kangas
acf408934d Merge from origin/emacs-28
8d81ab374d time-stamp: %F is "file name" not "pathname" + other doc
beaa7e14f3 ; Fix typos in CONTRIBUTE, ELisp manual, ediff
747a1ae4ac * doc/misc/eww.texi (Advanced): Fix missed variable name e...
52fe2340b8 * doc/emacs/windows.texi (Window Convenience): Use @code f...
7d3a654e2a * doc/emacs/maintaining.texi (Basic VC Editing): Mention D...
aeb19af4b5 ; * doc/emacs/building.texi (Lisp Libraries): Fix a typo. ...

# Conflicts:
#	etc/NEWS
2021-11-10 12:12:30 +01:00
Tom Levy
beaa7e14f3 ; Fix typos in CONTRIBUTE, ELisp manual, ediff
* CONTRIBUTE: Remove stray '. after git command.
* doc/lispref/functions.texi (Function Cells): Fix typo.
* lisp/vc/ediff.el (ediff-regions-wordwise): Fix typo in prompts
("Region's A buffer" => "Region A's buffer") (bug#51718).

Copyright-paperwork-exempt: yes
2021-11-10 01:17:42 +01:00