Commit graph

6926 commits

Author SHA1 Message Date
Andrea Corallo
0b58be4941 Rename comp-subr-safe-advice -> comp-subr-trampoline-install 2020-10-05 21:32:38 +02:00
Andrea Corallo
ad5a2bbde0 Revert "Add `advice-flet' macro"
This reverts commit d07d7ab1a0.
2020-10-05 20:46:15 +02:00
Andrea Corallo
44ef24342f Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-04 19:45:05 +02:00
Lars Ingebrigtsen
d8665e6d34 Make update-file-autoloads respect generated-autoload-file
* lisp/emacs-lisp/autoload.el (update-file-autoloads): Make
update-file-autoloads respect `generated-autoload-file', as
documented.
2020-10-04 16:32:16 +02:00
Andrea Corallo
d07d7ab1a0 Add `advice-flet' macro
The testsuite does large use of primitive redefinition, to avoid that
we define `advice-flet' to use instead as an easy `cl-letf'
replacement.

	* lisp/emacs-lisp/nadvice.el (advice-flet): New macro.
2020-10-02 21:20:50 +02:00
Glenn Morris
726eb835dd Merge from origin/emacs-27
78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
#	lisp/allout.el
#	lisp/progmodes/ebrowse.el
2020-10-02 09:38:24 -07:00
Glenn Morris
223de5f2f5 Merge from origin/emacs-27
41dcbeccf3 Make aliases introduced in previous patch obsolete
4997032c05 Restore some public debugging functions removed in Emacs 27
2020-10-02 09:33:53 -07:00
Andrea Corallo
36e0c3fb07 * When advising search in `comp-eln-load-path' the first writable dir
* lisp/emacs-lisp/comp.el (comp-tampoline-compile): Do not crash
	if we can't write in the first entry in `comp-eln-load-path' but
	search for another one.
2020-10-02 14:48:48 +02:00
Stefan Kangas
78eacf31e8 ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
Lars Ingebrigtsen
6f36b67e41 Stop using a dynamically bound 'generated-autoload-file' variable
* doc/lispref/loading.texi (Autoload): Document change of name
(bug#39823).

* lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Pass
the file name in.
(autoload-generated-file): Ditto.
(autoload-file-load-name): Ditto.
(generate-file-autoloads): Ditto.
(autoload--setup-output): Ditto.
(autoload-generate-file-autoloads): Ditto, and alter doc string to
reflect when `generated-autoload-file' is heeded.
(update-file-autoloads): Pass outfile in to functions.
(autoload-find-destination): Ditto.
(update-directory-autoloads): Make into an obsolete shim around
`make-directory-autoloads'.
(make-directory-autoloads): Renamed from
`update-directory-autoloads' with new semantics.
(batch-update-autoloads): Adjust caller.

* lisp/emacs-lisp/package.el (package-generate-autoloads): Adjust
caller.
2020-10-02 04:34:31 +02:00
Lars Ingebrigtsen
41dcbeccf3 Make aliases introduced in previous patch obsolete
* lisp/emacs-lisp/debug.el (debugger-toggle-locals):
(debug-help-follow): Make reinstated aliases obsolete.
2020-10-01 20:03:58 +02:00
Gemini Lasswell
4997032c05 Restore some public debugging functions removed in Emacs 27
* lisp/emacs-lisp/backtrace.el (backtrace--to-string): New function.
(backtrace-to-string): Use it.  Fix whitespace (bug#40728).
* lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function.
Mark it as obsolete.
(debugger-toggle-locals, debug-help-follow): New aliases.
2020-10-01 20:00:19 +02:00
Stefan Kangas
b03f74e0f2 Don't quote lambdas in several places
* admin/find-gc.el (find-gc-unsafe):
* lisp/align.el (align-rules-list):
* lisp/comint.el (comint-arguments):
* lisp/double.el (isearch-mode-map):
* lisp/ehelp.el (electric-help-command-loop):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct):
* lisp/emulation/cua-rect.el (cua--copy-rectangle-as-kill)
(cua-copy-rectangle-as-text):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/hexl.el (hexl-insert-multibyte-char):
* lisp/international/titdic-cnv.el (tsang-quick-converter)
(ziranma-converter):
* lisp/language/tibet-util.el (tibetan-decompose-precomposition-alist):
* lisp/mail/mailalias.el (mail-get-names):
* lisp/mh-e/mh-e.el (mh-auto-fields-list, mh-identity-default):
* lisp/mouse.el (mouse-buffer-menu-map, mouse-buffer-menu-alist):
* lisp/play/gametree.el (gametree-make-heading-function):
* lisp/shell.el (shell--command-completion-data):
* lisp/talk.el (talk-update-buffers):
* lisp/tempo.el (tempo-insert-template, tempo-is-user-element)
(tempo-build-collection):
* lisp/term.el (term-input-filter, term-pager-help):
* lisp/textmodes/table.el (table-delete-column):
* lisp/url/url-cache.el (url-cache-create-filename-human-readable):
* lisp/textmodes/tex-mode.el (latex-imenu-create-index): Don't quote
lambdas.
2020-10-01 15:28:14 +02:00
Andrea Corallo
2cc82563d2 * lisp/emacs-lisp/comp.el (comp-c-func-name): Add autoload cookie. 2020-10-01 07:55:00 +02:00
Lars Ingebrigtsen
56d6e29d80 Clarify the "Forgot to expand macro" message
* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Make the
define-after-use warning for macros clearer (bug#43678).
2020-09-30 16:12:32 +02:00
Eli Zaretskii
ed99a1eb89 Minor fixes of recent changes
* lisp/emacs-lisp/generic.el (define-generic-mode): Fix typos.

* etc/NEWS: Adjust an entry due to recent changes.
2020-09-30 16:56:08 +03:00
Andrea Corallo
6eb5a8c492 Merge remote-tracking branch 'savannah/master' into clean-up 2020-09-30 09:09:39 +02:00
Stefan Monnier
52afb2b104 * lisp/emacs-lisp/cl-macs.el (hash-table): Define the type's typep test 2020-09-29 22:28:23 -04:00
Lars Ingebrigtsen
fda8c53309 define-generic-mode doc string fix
* lisp/emacs-lisp/generic.el (define-generic-mode): Say what a
generic mode is (bug#43713).
2020-09-30 03:52:18 +02:00
Lars Ingebrigtsen
e608477da2 Give better error feedback on wrong password in .gpg files
* lisp/epa-file.el (epa-file--find-file-not-found-function): Do a
user-error when there's a wrong password (bug#43704).
(epa--wrong-password-p): New function.
(epa-file-insert-file-contents): Use it, and stash the error away
for later signalling.

* lisp/emacs-lisp/subr-x.el (if-let): Autoload.
2020-09-30 03:47:47 +02:00
Andrea Corallo
89f064104c * Some clean-up in comp.el
* lisp/emacs-lisp/comp.el (comp-emit-cond-jump, comp-emit-switch)
	(comp-limplify-block, comp-compute-edges)
	(comp-ssa-rename, comp-fwprop*, comp-effective-async-max-jobs)
	(comp-run-async-workers): Respect max 80 columns.
	(batch-byte-native-compile-for-bootstrap): Improve doc + remove
	some now unnecessary error handling.
2020-09-29 17:14:22 +02:00
Andrea Corallo
3129b3ffcb Rename in docstrings "non nil" into "non-nil"
* lisp/emacs-lisp/comp.el: Rename non nil -> non-nil in doc.

	* src/comp.c: Likewise.
2020-09-28 21:09:00 +02:00
Andrea Corallo
a06fe08e8e Clean-up some now unnecessary diff against master
* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
	.eln files have been moved so remove the '.eln' match.

	* lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded):
	Likewise.

	* lisp/emacs-lisp/find-func.el (find-library-suffixes): Clean-up
	as '.eln' is no more in `load-suffixes'.

	* lisp/help-fns.el (find-lisp-object-file-name): Clean-up as
	`symbol-file' will return the '.elc' file.

	* src/lread.c (Fget_load_suffixes): Remove logic as '.eln' is not
	anymore in load-suffixes.
	(openp): Two spaces.
2020-09-29 10:05:39 +02:00
Pip Cet
433b6fc53d Handle single-argument `apply' consistently (bug#40968)
* src/eval.c (Fapply): Handle (apply nil) without crashing.
Document single-argument form.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-apply): Don't attempt
to optimize single-argument apply.
* doc/lispref/functions.texi (Calling Functions): Document
single-argument apply.  Provide example (bug#40968).
2020-09-27 16:59:00 +02:00
Andrea Corallo
29a8d9303b * lisp/emacs-lisp/cl-macs.el (cl--optimize): Add a FIXME. 2020-09-26 15:32:21 +02:00
Andrea Corallo
06acf681d6 Merge remote-tracking branch 'savannah/master' into HEAD 2020-09-26 15:31:50 +02:00
Mattias Engdegård
497a1ed8bb string-search robustness and documentation improvement (bug#43598)
* src/fns.c (Fstring_search): Check START-POS argument range.
Simplify logic.  Improve doc string.
* test/src/fns-tests.el (string-search): Add test cases.
* doc/lispref/strings.texi (Text Comparison): Elaborate.
* lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.
2020-09-25 17:08:00 +02:00
Lars Ingebrigtsen
79762ffa61 Mark string-search as being side effect free
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add
string-search.
2020-09-25 14:30:13 +02:00
Andrea Corallo
e5b052d60d Rename comp--subr-safe-advice -> comp-subr-safe-advice
* lisp/emacs-lisp/comp.el (comp-subr-safe-advice): Rename
	comp--subr-safe-advice -> comp-subr-safe-advice.
	* lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise.
	* lisp/emacs-lisp/advice.el (ad-add-advice): Likewise.
2020-09-24 09:57:17 +02:00
Andrea Corallo
6d83902ffd * lisp/emacs-lisp/comp.el (comp-body-eff): Improve style. 2020-09-24 09:57:17 +02:00
Andrea Corallo
94736c413f Do not install a subr trampoline twice
* src/comp.c (syms_of_comp): Define and initialize
	'Vcomp_installed_trampolines_h'.
	(Fcomp__install_trampoline): Fill 'Vcomp_installed_trampolines_h'
	* lisp/emacs-lisp/comp.el (comp--subr-safe-advice): Make use of
	`comp-installed-trampolines-h' to guard against installing a
	trampoline twice.
2020-09-24 09:57:17 +02:00
Andrea Corallo
b94a0a931e * lisp/emacs-lisp/comp.el (comp-never-optimize-functions): Clean-up. 2020-09-24 09:57:17 +02:00
Andrea Corallo
db354ffd57 Call `comp--subr-safe-advice' from the advice machinery
* lisp/emacs-lisp/nadvice.el (advice--add-function): Call
	`comp--subr-safe-advice' when necessary.

	* lisp/emacs-lisp/advice.el (ad-add-advice): Likewhise.
2020-09-24 09:57:17 +02:00
Andrea Corallo
3ec1b932c9 * Add `comp--subr-safe-advice' entry point
Add a Lisp side entry-point to be called to make primitive adivicing
effective.

	* lisp/emacs-lisp/comp.el (comp-trampoline-sym)
	(comp-trampoline-filename): New substs.
	(comp-make-lambda-list-from-subr, comp-search-trampoline)
	(comp-tampoline-compile): New functions
2020-09-24 09:57:17 +02:00
Andrea Corallo
9d4fd669cf * lisp/emacs-lisp/comp.el (comp-final): Log when interactively invoked. 2020-09-23 20:48:23 +02:00
Andrea Corallo
63c65b4fe0 * lisp/emacs-lisp/comp.el (native-compile): Add OUTPUT parameter. 2020-09-23 20:47:34 +02:00
Mattias Engdegård
3bfddaec3a ; * lisp/emacs-lisp/lisp.el: rename parameter in last change 2020-09-23 18:08:32 +02:00
Mattias Engdegård
df0f32f048 Don't signal scan-error when moving by sexp interactively
* lisp/emacs-lisp/lisp.el (forward-sexp, backward-sexp, forward-list)
(backward-list, down-list, up-list, mark-sexp, kill-sexp)
(backward-kill-sexp): Remove unsightly scan-error when running
interactively and no further movement by sexp can be made (bug#43489).
2020-09-23 16:31:18 +02:00
martin rudalics
10696d0ac5 Make delete-pair only delete pairs that are part of insert-pair-alist
* lisp/emacs-lisp/lisp.el (delete-pair): Only delete pairs that
are part of `insert-pair-alist' (bug#4136).
2020-09-22 16:44:15 +02:00
Lars Ingebrigtsen
73f77558cc Fix off-by-one error in eldoc--handle-docs
* lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): We have one extra
line to use if we don't show the truncation message (bug#43543).
2020-09-22 16:20:05 +02:00
Andrea Corallo
89a2e79b7d * Make use of use of subr-primitive-p' in find-function-library'
* lisp/emacs-lisp/find-func.el (find-function-library): Use
	`subr-primitive-p'.
2020-09-21 21:46:18 +02:00
Andrea Corallo
69c32e0187 * Sandbox syncronous libgccjit invocation on interactive sessions
Avoid unnecessary memory fragmentation/leakeage

	* lisp/emacs-lisp/comp.el (comp-final1): New function.
	(comp-final): Invoke `comp-final1' in a child process if in an
	interactive session or directly otherwhise.
2020-09-21 21:46:07 +02:00
Andrea Corallo
5a8be1719a Merge remote-tracking branch 'savannah/master' into HEAD 2020-09-21 21:45:02 +02:00
Stefan Kangas
462dbc1cb2 ; Fix typos 2020-09-21 14:26:42 +02:00
Lars Ingebrigtsen
e72d3793bc Allow disabling the verbose eldoc truncation message
* doc/emacs/programs.texi (Lisp Doc): Document it.

* lisp/emacs-lisp/eldoc.el (eldoc-display-truncation-message): New
variable (bug#43543).
(eldoc--handle-docs): Use it.
2020-09-21 14:15:39 +02:00
Glenn Morris
81aed7becf ; * lisp/emacs-lisp/syntax.el (syntax-propertize-function): Doc fix. 2020-09-20 17:20:08 -07:00
Glenn Morris
3675993d76 Merge from origin/emacs-27
df04f3e755 Fix a rare segfault in syntax.c
fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a ...
fcd599bbea Minor copyedits of doc of 'with-silent-modifications'
759399cdb1 Improve documentation of 'max-mini-window-height'
3223302aa2 Use modern constant names for the NS pasteboard
985703d380 Fix doc string of 'toggle-menu-bar-mode-from-frame'
184a4977c7 Make vc-bzr tests work with brz 3.1 (bug#43314)

# Conflicts:
#	lisp/emacs-lisp/syntax.el
#	src/syntax.c
2020-09-20 17:18:16 -07:00
Alan Mackenzie
fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a 100% job
and cannot be combined with other ways of applying syntax-table text
properties.

* lisp/emacs-lisp/syntax.el (syntax-propertize-function): Amend doc string.

* doc/lispref/syntax.texi (Syntax Properties): Amend the description of the
variable.
2020-09-19 16:50:27 +00:00
Drew Adams
28ba879362 Document and extend menu-bar-make-toggle some
2020-09-19  Lars Ingebrigtsen  <larsi@gnus.org>

	* lisp/menu-bar.el (menu-bar-showhide-fringe-menu): Adjust caller.
	(menu-bar-search-options-menu): Ditto.
	(menu-bar-options-menu): Ditto.
	(menu-bar-options-menu): Ditto.

	* lisp/progmodes/gdb-mi.el (menu): Ditto.

	* lisp/emacs-lisp/find-func.el (find-function-regexp): Add
	menu-bar-make-toggle-command.

	* lisp/menu-bar.el (menu-bar-make-toggle): Compatibility wrapper.

2020-09-19  Drew Adams  <drew.adams@oracle.com>

	* lisp/menu-bar.el (menu-bar-make-toggle-command): Add doc string
	and allow setting all keywords (bug#17954).
2020-09-19 18:23:27 +02:00
Lars Ingebrigtsen
144bbfc662 Allow customizing hooks defined via define-minor-mode
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Allow using
Customize on the hooks (bug#10773).
2020-09-19 17:21:02 +02:00