Commit graph

7070 commits

Author SHA1 Message Date
Stefan Kangas
8c96c720fa Add command package-menu-filter-upgradable
* lisp/emacs-lisp/package.el (package-menu-filter-upgradable):
New command.  (Bug#41436)
(package-menu-mode-map): Bind the new command.
* doc/emacs/package.texi (Package Menu): Document the new command.
2020-10-19 20:30:52 +02:00
Stefan Kangas
58a9cec525 Add "Old-" prefix to "Version" header in more cases
These version numbers are historical accidents and not relevant today.
Ref: https://lists.gnu.org/r/emacs-devel/2020-03/msg00080.html
2020-10-18 20:35:26 +02:00
Glenn Morris
3ac3a6503e Merge from origin/emacs-27
65078e0a76 * lisp/info.el (Info-hide-note-references): Doc fix.  (Bug...
30305b543d Make lisp/progmodes/js.el dependent on CC Mode in the Make...
c37b2a9b42 Yet another fix for 'set-minibuffer-message'
72dd911981 Fix posn-at-x-y in builds --without-x
ace25f2066 Clarify the seq-reduce documentation
7d598e281d Make tramp-completion-reread-directory-timeout obsolete (B...
2c31ce18ea Fix 'message' when there's active minibuffer on another frame

# Conflicts:
#	doc/misc/tramp.texi
#	etc/NEWS
2020-10-17 09:48:54 -07:00
Mattias Engdegård
3217ae6e05 Add aid for finding missing dynamic variable declarations
Find lexical use of variables that are dynamically declared in other
files by recording 'defvar' declarations in files that can be read
in by the compiler in a second compilation.  This is particularly
useful when converting code to use lexical-binding.

The facility is controlled by setting environment variables:

 EMACS_GENERATE_DYNVARS -- set to non-empty to generate a .dynvars file
                           corresponding to each .elc.
 EMACS_DYNVARS_FILE     -- set to the name of a .dynvars file to use
                           as defvar information during compilation,
                           enabling the new warnings.

* lisp/emacs-lisp/bytecomp.el (byte-compile--known-dynamic-vars)
(byte-compile--seen-defvars): New variables.
(byte-compile-warning-types): Add lexical-dynamic warning.
(byte-compile--load-dynvars, byte-compile--warn-lexical-dynamic):
New functions.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file, byte-compile--declare-var)
(byte-compile-lambda, byte-compile-bind): Add dynamic variable loads,
dumps and checks.
* doc/lispref/variables.texi (Converting to Lexical Binding): Document.
2020-10-17 16:57:38 +02:00
Andrea Corallo
d5791ba5fe Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-17 08:00:34 +02:00
Stefan Kangas
fd5c08892e Remove some references to Emacs 18 and 19
* doc/misc/forms.texi (Modifying Forms Contents, Error Messages):
* lisp/arc-mode.el:
* lisp/emacs-lisp/edebug.el (edebug-temp-display-freq-count):
* lisp/type-break.el: Remove some references to Emacs 18 and 19.
2020-10-16 15:27:25 +02:00
Mattias Engdegård
559c89f49c * lisp/emacs-lisp/backquote.el: Use lexical binding. 2020-10-16 14:03:57 +02:00
Stefan Kangas
f52a775ae2 Add ert macros to get resource file names (Bug#43792)
* lisp/emacs-lisp/ert-x.el (subr-x): Require.
(ert-resource-dir, ert-resource-file): New macros to get the file name
of the resource directory belonging to a test.
(ert-resource-dir-format, ert-resource-dir-trim-left-regexp)
(ert-resource-dir-trim-right-regexp): New variables.
2020-10-16 11:18:38 +02:00
Lars Ingebrigtsen
1e89dfc6c8 Make package-install-from-buffer maybe refresh the quickstart file
* lisp/emacs-lisp/package.el (package-install-from-buffer):
Refresh the quickstart file (bug#43237).  This makes this command
more consistent with package-install.
2020-10-16 09:10:05 +02:00
Stefan Monnier
f5c9d3f54e * lisp/emacs-lisp/warnings.el (display-warning): Don't be so negative 2020-10-15 14:34:12 -04:00
Lars Ingebrigtsen
ce09f19c28 Don't display the warning buttons in bytecomp buffers
* lisp/emacs-lisp/warnings.el (display-warning): Don't do the
buttons in bytecomp buffers.
2020-10-15 18:36:26 +02:00
Lars Ingebrigtsen
c6ecf6428e Make C-x C-e' work more like C-M-x' on defvar etc
* doc/emacs/building.texi (Lisp Eval): Document it.

* lisp/emacs-lisp/pp.el (pp-eval-last-sexp): Ditto.

* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Work more
like `eval-defun': Re-evaluate defvar/defcustom/defface forms.
2020-10-15 16:26:45 +02:00
Lars Ingebrigtsen
ace25f2066 Clarify the seq-reduce documentation
* doc/lispref/sequences.texi (Sequence Functions): Ditto.

* lisp/emacs-lisp/seq.el (seq-reduce): Clarify the order of the
arguments (bug#43995).
2020-10-15 09:37:44 +02:00
Andrea Corallo
f8505fd3d4 Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-14 11:04:55 +02:00
Andrea Corallo
03e98f93f7 Use form native compilation in `comp-trampoline-compile'
* lisp/emacs-lisp/comp.el (comp-trampoline-sym): Remove function.
	(comp-trampoline-filename): As we are introducing an ABI change in
	the eln trampoline format change the trampoline filename to
	disambiguate.
	(comp-trampoline-search): Rename from `comp-search-trampoline'
	and return directly the trampoline.
	(comp-trampoline-compile): Rework to use native form compilation
	in place of un-evaluating a function and return directly the
	trampoline.
	(comp-subr-trampoline-install): Update for
	`comp-trampoline-search' and `comp-trampoline-compile' new
	interfaces.
	* src/comp.c (Fcomp__install_trampoline): Store the trampoline
	itself as value in `comp-installed-trampolines-h'.
	(syms_of_comp): Doc update `comp-installed-trampolines-h'.
2020-10-14 11:04:36 +02:00
Andrea Corallo
4f0e879030 Rework `native-compile' interface so it can return compiled functions
* lisp/emacs-lisp/comp.el (native-compile): Return the compiled
	function when the input is a symbol or a form.
	* test/src/comp-tests.el (free-fun, tco, fw-prop): Update tests
	for new `native-compile' interface.
2020-10-14 11:04:36 +02:00
Andrea Corallo
8861ee8b08 Have `native-elisp-load' return the last registerd function
* lisp/emacs-lisp/comp.el (comp-emit-for-top-level): Synthesize
	'top_level_run' so it returns the last value returned by
	`comp--register-subr'.
	* src/comp.c (load_comp_unit): Return what 'top_level_run'
	returns.
	(Fnative_elisp_load): Return what 'load_comp_unit' returns.
	* src/comp.h (load_comp_unit): Update signature.
2020-10-14 11:04:36 +02:00
Andrea Corallo
4bea0c0b1d * Allow for lambda forms as native compilation input
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Add new
	specialized method for compiling a lambda form.
2020-10-14 11:04:36 +02:00
Andrea Corallo
fda798808f * Move context output computation in `comp-spill-lap-function'
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Move
	output filename computation here.
	(native-compile): From here.
2020-10-14 11:04:36 +02:00
Masahiro Nakamura
f256687bd4 Improve package install/delete button action
* lisp/emacs-lisp/package.el (package-install-button-action)
(package-delete-button-action): Run describe-package instead of
revert-buffer in order to use newer package-desc (bug#43983).
2020-10-14 06:14:33 +02:00
Brian Leung
237fd33aef Fix some compilation warnings in non nativecomp build (bug#43892)
* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/emacs-lisp/find-func.el (comp-eln-to-el-h): Declare
	variable.
	* lisp/emacs-lisp/nadvice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/files.el (comp-eln-to-el-h): Declare variable.
	* lisp/help.el (subr-native-lambda-list): Declare function.
2020-10-12 21:25:50 +02:00
Andrea Corallo
a3304feb9b Revert "Fix some compilation warnings in non nativecomp build (bug#43892)"
This reverts commit 6606ec8e31.
2020-10-12 21:25:00 +02:00
Andrea Corallo
6606ec8e31 Fix some compilation warnings in non nativecomp build (bug#43892)
* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/emacs-lisp/find-func.el (comp-eln-to-el-h): Declare
	variable.
	* lisp/emacs-lisp/nadvice.el (comp-subr-trampoline-install):
	Declare function.
	* lisp/files.el (comp-eln-to-el-h): Declare variable.
	* lisp/help.el (subr-native-lambda-list): Declare function.
2020-10-12 21:19:09 +02:00
Lars Ingebrigtsen
d5c811279b Fix error in file shortdoc group
* lisp/emacs-lisp/shortdoc.el (number): Add some more numeric
stuff (and clean up some arglists).
2020-10-11 23:51:26 +02:00
Eli Zaretskii
4b84095d23 Improve documentation of shortdoc features
* lisp/help-fns.el (help-fns-describe-function-functions): Doc
fix.
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group)
(shortdoc-display-group, shortdoc-add-function): Doc fixes.

* doc/lispref/help.texi (Documentation Groups): Improve the
recently-added documentation and the indexing.
2020-10-11 17:28:40 +03:00
Lars Ingebrigtsen
5f01f86e6b Add more numeric shortdocs
* lisp/emacs-lisp/shortdoc.el (shortdoc-section)
(shortdoc-example): Lighten up colours on light backgrounds.
2020-10-11 12:30:38 +02:00
Lars Ingebrigtsen
c66165b5c0 Tweak shortdoc colours on light backgrounds
* lisp/emacs-lisp/shortdoc.el (shortdoc-section)
(shortdoc-example): Lighten up colours on light backgrounds.
2020-10-11 12:12:47 +02:00
Lars Ingebrigtsen
e441a25daa Autoload shortdoc command and adjust NEWS
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Autoload.
2020-10-11 12:05:55 +02:00
Lars Ingebrigtsen
ed378c95b6 Use Unicode arrows in shortdoc results
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Use
Unicode arrows if possible.
2020-10-11 11:21:48 +02:00
Lars Ingebrigtsen
2a7488d42d Add support for displaying short documentation for function groups
* doc/lispref/help.texi (Documentation Groups): Document it.

* lisp/help-fns.el (help-fns--mention-shortdoc-groups): Output
references to the shortdocs.

* lisp/emacs-lisp/shortdoc.el: New file.
2020-10-11 05:51:16 +02:00
Andrea Corallo
4b924ef87d * As edges are indexed store them in an hash table
* lisp/emacs-lisp/comp.el (comp-edge): Update doc for 'number'
	slot.
	(comp-func): Rename 'edges' slot into 'edges-h'.
	(comp-log-edges): Update logic for edges in an hash table.
	(comp-clean-ssa, comp-compute-edges): Likewise.
2020-10-10 20:25:57 +02:00
Andrea Corallo
96f59a9faf * Add into phi l-value args basic block names
* lisp/emacs-lisp/comp.el (comp-ssa-rename-insn): Clean-up a
	leftover space.
	(comp-finalize-phis): Cons the blasic block name providing the
	mvar together with the mvar itself while forming the phi.
	(comp-fwprop-insn): Destructure correctly the phi.
2020-10-10 20:25:42 +02:00
Stefan Monnier
f539ee9042 * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc tweak
Try and clarify the meaning of `init-value`.

(cherry picked from commit 46c0f28c0e)
2020-10-10 19:48:00 +03:00
Andrea Corallo
8b135af5bb Provide feature nativecomp and make use of it
* lisp/emacs-lisp/comp.el (comp-ensure-native-compiler): Use
	`featurep' to identify if the native compiler is available.
	* lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise.
	* lisp/emacs-lisp/package.el (package--delete-directory): Likewise.
	* lisp/loadup.el: Likewise.
	* src/comp.c (syms_of_comp): Provide feature nativecomp.
2020-10-10 18:47:45 +02:00
Andrea Corallo
77fa6befb4 * lisp/emacs-lisp/comp.el (comp-func): Fix doc for blocks slot. 2020-10-10 18:08:23 +02:00
Stefan Monnier
46c0f28c0e * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc tweak
Try and clarify the meaning of `init-value`.
2020-10-10 11:07:28 -04:00
Andrea Corallo
b8772e8b08 * Fix LIMPLE latch block name coloring in "*Native-compile-Log*"
* lisp/emacs-lisp/comp.el (comp-limple-lock-keywords): Fix
	latch block name coloring.
2020-10-10 15:15:49 +02:00
Brian Leung
51f5e487b2 Various typo fixes in native compiler related files
* lisp/emacs-lisp/comp.el (native-compiler-error-dyn-func)
	(comp-func, comp-func-l)
	(comp-func-d, comp-ensure-native-compiler, comp-type-hint-p)
	(comp-func-unique-in-cu-p, comp-alloc-class-to-container)
	(comp-limple-mode, comp-loop-insn-in-block)
	(comp-lex-byte-func-p, comp-c-func-name, comp-decrypt-arg-list)
	(comp-spill-lap-function, comp-intern-func-in-ctxt)
	(comp-spill-lap-function, comp-spill-lap, comp-emit-handler)
	(comp-prepare-args-for-top-level): Various typo fixes.
	* src/comp.c (Fcomp_el_to_eln_filename): Fix typo in error
	message.
2020-10-10 12:19:30 +02:00
Andrea Corallo
f7e7ff4fb1 Merge remote-tracking branch 'savannah/master' into HEAD 2020-10-10 11:00:35 +02:00
Andrea Corallo
138990bbda * Fix failure when compiling a trampoline with no eln-cache dir (bug#43875)
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Try to create
	the eln-cache dir if this is not existing, if fails to do that
	move on to the next one.
2020-10-10 10:29:17 +02:00
Andrew Whatson
85450f03be * Fix typo name plus make error homogeneous in `comp-trampoline-compile'
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix typo
	renaming `comp-tampoline-compile' -> `comp-trampoline-compile'.
	Change error to be consistent.
	(comp-subr-trampoline-install): Use `comp-trampoline-compile'.
2020-10-10 10:29:14 +02:00
Stefan Kangas
b19bf08447 ; shorten https://lists.gnu.org/archive/html/... links 2020-10-09 12:23:02 +02:00
Andrea Corallo
7041c32ec2 * Fix some nits in comp.el
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Use
	`cl-defmethod' where correct in place of `cl-defgeneric'.
	(comp-tampoline-compile): Add missing #.
2020-10-07 20:43:00 +02:00
Andrea Corallo
58d85f4dbb * Do use echo area for async compilation started/finished messages
* lisp/emacs-lisp/comp.el (comp-run-async-workers)
	(native-compile-async): Do not write into the echo area.
2020-10-07 07:41:00 +02:00
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