Commit graph

580 commits

Author SHA1 Message Date
Corwin Brust
64d211179d Autoload package-installed-p
* lisp/emacs-lisp/package.el (package-installed-p): Add autoload
cookie. (Bug#53885)

Copyright-paperwork-exempt: yes
2022-02-10 19:27:57 +02:00
Stefan Monnier
35cd9197fc package.el: Fix bug#53529
* lisp/emacs-lisp/package.el (package-autoload-ensure-default-file):
Enforce Unix EOLs.
2022-01-29 17:51:06 -05:00
Stefan Monnier
73b15f45f9 Merge remote-tracking branch 'origin/emacs-28' into trunk 2022-01-10 22:34:55 -05:00
Eli Zaretskii
4c724af1e3 ; * lisp/emacs-lisp/package.el (package-native-compile): Fix doc wording. 2022-01-09 10:25:36 +02:00
Stefan Kangas
3984ea8553 Merge from origin/emacs-28
30f1bdb41f Clarify docstring of package-native-compile
c54fda643d Fix Subject "simplification" in Rmail
2022-01-09 06:30:18 +01:00
Stefan Kangas
30f1bdb41f Clarify docstring of package-native-compile
* lisp/emacs-lisp/package.el (package-native-compile): Clarify
docstring.
2022-01-09 03:18:38 +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 Monnier
87f7412418 * lisp/emacs-lisp/package.el (package-get-version): Add fallback 2021-12-31 00:03:35 -05:00
Stefan Kangas
9ccd3d3231 Use defvar-keymap for package-menu-mode-map
* lisp/emacs-lisp/package.el (package-menu-mode-map): Use
defvar-keymap.
2021-12-10 15:33:54 +01:00
Lars Ingebrigtsen
f14a4c377d Make package-dir-info more resilient
* lisp/emacs-lisp/package.el (package-dir-info): Check that the
file exists before using it (bug#41489).
2021-12-05 02:13:00 +01:00
Stefan Kangas
fc00fe53e1 Merge from origin/emacs-28
a6905e90cc Fix problem with temp buffer killing in package-install-file
144ad77fda Fix Lisp Intro markup error
24b86cb4f7 Fix ACL errors with WebDAV volumes on MS-Windows
2021-11-12 07:17:11 +01:00
Lars Ingebrigtsen
a6905e90cc Fix problem with temp buffer killing in package-install-file
* lisp/emacs-lisp/package.el (package-install-file): Allow killing
the temporary buffer without querying (bug#51769).
2021-11-12 04:44:09 +01:00
Stefan Kangas
810fa21d26 Avoid another byte-compiler warning in package-quickstart.el
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Avoid
byte-compiler warning "assignment to free variable" in
package-quickstart.el.
2021-11-10 15:24:29 +01:00
Stefan Kangas
1e7720d39a Avoid spurious byte-compiler warnings in package-quickstart.el
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Disable the
"`make-variable-buffer-local' not called at toplevel" byte-compiler
warnings.  Given that we wrap it all in a let-form, these are mostly
false positives and not helpful.
2021-11-10 14:52:38 +01:00
dickmao
9dfd945a2c Fix byte compilation of package built-ins
* lisp/emacs-lisp/package.el
(package--activate-autoloads-and-load-path):
(package--load-files-for-activation): Remove.
(package--library-stem): New function, because
file-name-sans-extension is insufficient.
(package--reload-previously-loaded): New function.
(package-activate-1): Reload directly.
(package--files-load-history):
(package--list-of-conflicts):
(package--list-loaded-files): Remove
(package-unpack): Adjust call.

* test/lisp/emacs-lisp/package-tests.el (macro-builtin-func): Test.
(macro-builtin-10-and-90): Test.
(package-test-macro-compilation): Test.
(package-test-macro-compilation-gz): Test (bug#49708).
2021-11-07 01:28:47 +01:00
Stefan Kangas
241574375d Add links to commentary reached with finder-list-keywords
* lisp/finder.el (finder-goto-xref): Move from here...
* lisp/emacs-lisp/package.el (package--finder-goto-xref): ...to
here.  Make the old name into an obsolete function alias.
(package--finder-xref): New button type.
(package--describe-add-library-links): Factor out new function...
* lisp/finder.el (finder-commentary): ...from here.
(describe-package-1): Call above new function.  This fixes an
issue where commentaries reached via 'finder-list-keywords' did
not have links.  (Bug#10814)
2021-10-23 05:28:32 +02:00
Lars Ingebrigtsen
43f59b91aa Mark all def* functions that should indent as `defun'
* lisp/abbrev.el (define-abbrev):
(define-abbrev-table): Mark all functions that have names that
start with "def" that should indent according to the current
heuristics (bug#43329).
* lisp/autoinsert.el (define-auto-insert):

* lisp/button.el (define-button-type):

* lisp/subr.el (define-key-after):
(define-mail-user-agent):
(define-keymap):

* lisp/widget.el (define-widget):

* lisp/emacs-lisp/package.el (define-package):

* lisp/international/mule-cmds.el (define-char-code-property):

* lisp/international/mule.el (define-charset):
(define-coding-system):
(define-translation-table):
(define-translation-hash-table):
2021-10-13 21:52:57 +02:00
Stephen Gildea
d86b2e59c7 native-comp-available-p is the definitive test
* doc/lispref/compile.texi (Native Compilation): Document
native-comp-available-p as the way to test for native compilation.
* lisp/emacs-lisp/package.el (package--native-compile-async):
* test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines):
Test for native compilation with native-comp-available-p.

Thank you to Andrea Corallo for reviewing this patch.
2021-10-05 09:24:11 -07:00
Stefan Kangas
3bab1476f6 Rename "Homepage" field to "Website" in package description
* lisp/emacs-lisp/package.el (describe-package-1): Rename
"Homepage" field to "Website".

* test/lisp/emacs-lisp/package-tests.el
(package-test-describe-package)
(package-test-describe-installed-multi-file-package)
(package-test-describe-non-installed-package)
(package-test-describe-non-installed-multi-file-package): Update tests.
2021-09-26 14:55:19 +02:00
Stefan Kangas
8ea1765fea Prefer https for other domains than gnu.org in package URL
* lisp/emacs-lisp/package.el (describe-package-1): Prefer https for
some other common domains in the package URL.
2021-09-26 14:55:19 +02:00
Stefan Kangas
0da8118dcb Use command substitution instead of raw keys in more places
* admin/authors.el (authors):
* lisp/abbrev.el (abbrev-suggest-show-report):
* lisp/calc/calc.el (calc-display-trail, calc):
* lisp/completion.el (completion-locate-db-error):
* lisp/dired-x.el (dired-extra-startup):
* lisp/emacs-lisp/package.el (package-install-selected-packages):
* lisp/emulation/viper.el (viper-mode):
* lisp/facemenu.el (list-colors-display):
* lisp/mail/emacsbug.el (report-emacs-bug-hook):
* lisp/mail/sendmail.el (mail):
* lisp/menu-bar.el (menu-bar-mode):
* lisp/org/org.el (org-revert-all-org-buffers):
* lisp/progmodes/antlr-mode.el (antlr-help-rules-intro)
(antlr-insert-makefile-rules):
* lisp/progmodes/gdb-mi.el (gdb--check-interpreter):
* lisp/progmodes/xscheme.el (xscheme-process-sentinel):
* lisp/ps-print.el (ps-font-info-database):
* lisp/recentf.el (recentf-edit-list, recentf-open-files):
* lisp/vc/ediff-util.el (ediff-suspend):
* lisp/vc/pcvs.el (cvs-mode):
* lisp/vc/vc-bzr.el (vc-bzr-dir-extra-headers): Use command
substitution.
2021-09-24 21:26:08 +02:00
Lars Ingebrigtsen
85e9e5f616 Don't quote nil and t in doc strings and comments
* test/src/minibuf-tests.el (test-try-completion-ignore-case):
* test/lisp/url/url-auth-tests.el
(url-auth-test-digest-auth-retrieve-cache):
* test/lisp/subr-tests.el (subr-tests-add-hook-depth):
* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-invisible-buffer-function):
* test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-sort):
* src/xfaces.c:
* src/process.c (Finterrupt_process):
(syms_of_process):
* src/minibuf.c (Fread_from_minibuffer):
(Fcompleting_read):
(syms_of_minibuf):
* src/dispnew.c (syms_of_display):
* src/data.c:
* lisp/so-long.el (so-long--hack-local-variables):
* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
(elisp--xref-find-definitions):
* lisp/org/ox-html.el (org-html-htmlize-output-type):
* lisp/org/org-agenda.el (org-agenda-do-in-region):
* lisp/net/tramp.el:
* lisp/minibuffer.el (set-minibuffer-message):
* lisp/isearch.el (isearch-wrap-pause):
(isearch-repeat-on-direction-change):
* lisp/emacs-lisp/timer.el (timer):
* lisp/emacs-lisp/package.el (package-read-archive-contents):
* lisp/emacs-lisp/faceup.el (faceup-next-property-change):
* lisp/emacs-lisp/comp.el (comp-func):
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p):
* lisp/emacs-lisp/cl-macs.el (cl-do):
(cl-do*):
(cl--self-tco):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unresolved-functions):
(byte-compile-cond-jump-table): Don't quote t and nil.
2021-09-21 22:11:43 +02:00
王滋涵 Zephyr Wang
bbb9e97537 ; Fix typo in package.el doc string
* lisp/emacs-lisp/package.el (package-archive-column-width): Fix
copy-paste in doc string (bug#50678).

Copyright-paperwork-exempt: yes
2021-09-19 17:40:00 +02: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
Lars Ingebrigtsen
08540a29e3 package-menu-execute doc string clarification
* lisp/emacs-lisp/package.el (package-menu-execute): Say what
happens to upgrade-marked packages (bug#50551).
2021-09-13 10:35:22 +02:00
Stefan Monnier
0509f3921b * lisp/emacs-lisp/package.el (package-buffer-info): Fix typo 2021-08-09 18:55:25 -04:00
Stefan Monnier
4e6f98cd50 * lisp/emacs-lisp/package.el (package-buffer-info): Use lm-maintainers
Avoid the now obsolete `lm-maintainer`.
2021-08-09 12:05:22 -04:00
Lars Ingebrigtsen
fbd3207bb2 Further fixes for package-quickstart-refresh printing
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Really
ensure that the structures aren't shortened (bug#49924).
2021-08-09 14:47:05 +02:00
Lars Ingebrigtsen
e1ce9904aa Fix prin1 problem in package-quickstart-refresh
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Bind
print-length/print-level before using prin1-to-string (bug#49924).
2021-08-07 13:02:01 +02:00
dickmao
1910800f93 Package archive location needs to be absolute filename
* lisp/emacs-lisp/package.el (package--with-response-buffer-1):
Actually check that URL is absolute (bug#49788).
2021-08-04 10:50:38 +02:00
Ioannis Kappas
606b783acb Allow installing packages with DOS line endings
* lisp/emacs-lisp/package.el (package-install-from-buffer): Allow
installing files with different line ending conventions (Unix, DOS
and Macos) (bug#48137).
2021-07-20 15:53:34 +02:00
Lars Ingebrigtsen
da7dbfdf68 Make package-menu-filter-by-status work as documented
* lisp/emacs-lisp/package.el (package-menu-filter-by-status): Work
as documented (bug#49474).
2021-07-10 18:53:28 +02:00
Lars Ingebrigtsen
f85ee6d5c7 Clarify the help in the package buffers
* lisp/emacs-lisp/package.el (package--quick-help-keys): Clarify
marking help (bug#40457).
2021-06-24 16:59:42 +02:00
Philipp Stephani
42950e9e46 Fix a few Edebug specifications where code is wrapped in lambdas.
As the Info node `(elisp) Specification List' explains, it is not
correct to use `body' or t for a piece of code that the macro wraps in
a `lambda' form.  These should use `def-body' instead.

* lisp/info-xref.el (info-xref-with-file):
* lisp/subr.el (subr--with-wrapper-hook-no-warnings, track-mouse)
(combine-change-calls, with-eval-after-load):
* lisp/emacs-lisp/bytecomp.el (displaying-byte-compile-warnings):
* lisp/emacs-lisp/cl-macs.el (cl-do-symbols, cl-progv):
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer):
* lisp/emacs-lisp/gv.el (gv-letplace):
* lisp/emacs-lisp/nadvice.el (define-advice):
* lisp/emacs-lisp/thunk.el (thunk-delay):
* lisp/vc/vc-dispatcher.el (vc-run-delayed): Use 'def-body' instead of
t or 'body' where applicable.

* lisp/emacs-lisp/package.el (package--with-response-buffer): Remove
evaluation of the body altogether.  I have no idea how to write it
correctly in this case.
2021-05-17 10:09:43 +02:00
Mattias Engdegård
12bab20920 Tidy file-matching regexps and remove some ineffective backslashes
* lisp/emacs-lisp/package.el (package--delete-directory):
* lisp/net/tramp-cmds.el (tramp-recompile-elpa):
Escape dot; replace $ with \'.
* lisp/help.el (help-for-help):
* lisp/transient.el (transient-font-lock-keywords):
Remove useless backslashes.
2021-05-06 15:53:48 +02:00
Andrea Corallo
40736357b8 Rename feature nativecomp' into native-compile'
* test/src/comp-tests.el : Rename feature `nativecomp' into
	`native-compile'.
	* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Likewise.
	* src/comp.c (syms_of_comp): Likewise.
	* lisp/startup.el (normal-top-level): Likewise.
	* lisp/loadup.el: Likewise.
	* lisp/help.el (help-function-arglist): Likewise.
	* lisp/emacs-lisp/package.el (package--native-compile-async)
	(package--delete-directory): Likewise.
	* lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise.
	* lisp/emacs-lisp/comp.el (comp-ensure-native-compiler): Likewise.
	* lisp/emacs-lisp/advice.el (ad-add-advice): Likewise.
2021-05-05 22:27:29 +02:00
Stefan Monnier
7f03ee8de1 * lisp/emacs-lisp/package.el: Fix use of find-library-name
That function caused a warning for a good reason.
Don't just declare it and hope it will be available.

(package--list-of-conflicts): Require `find-func` explicitly before
declaring the function.  Also don't ignore all errors but only
the `file-error`s which will be emitted by `find-library-name`
in normal circumstances.

* lisp/emacs-lisp/find-func.el (find-library-name): Signal a `file-error`
Instead of a generic `error`.
2021-04-26 18:40:09 -04:00
Andrea Corallo
289000eee7 Merge branch 'feature/native-comp' into into trunk 2021-04-25 20:06:22 +02:00
Stefan Kangas
34367cc8af Don't hard-code face of "Install" button
* lisp/emacs-lisp/package.el (package-make-button): Use the
'custom-button' face for the "Install" button.  (Bug#47944)
2021-04-25 13:00:29 +02:00
Stefan Kangas
3a526b6f7e * lisp/emacs-lisp/package.el (package-archives): Bump :version. 2021-04-21 23:27:13 +02:00
Stefan Kangas
85ef248ec4 * lisp/emacs-lisp/package.el: Doc fix. 2021-04-21 23:26:00 +02:00
Andrea Corallo
6ca6c71cd0 Merge remote-tracking branch 'savannah/master' into native-comp 2021-03-19 15:28:00 +01:00
Gabriel do Nascimento Ribeiro
2d12df3926 Init archive and add noconfirm to 'package-install-selected-packages'
* lisp/emacs-lisp/package.el (package-install-selected-packages):
Add call to 'package--archives-initialize' and add optional argument
NOCONFIRM to skip user confirmation when installing packages.  (Bug#47124)
2021-03-15 03:09:02 +01:00
Andrea Corallo
43b0df62cd Merge commit '9cbdf20316' into native-comp 2021-03-09 10:03:47 +01:00
Lars Ingebrigtsen
0981712e57 Add a command in package mode for opening home pages directly
* doc/emacs/package.texi (Package Menu): Document it.
* lisp/emacs-lisp/package.el (package-browse-url): New command and
keystroke (bug#46927).
2021-03-04 21:39:49 +01:00
Andrea Corallo
5c922cc3a4 Merge remote-tracking branch 'savannah/master' into native-comp 2021-02-26 19:54:59 +01:00
Stefan Monnier
2766f9fdb9 * lisp/emacs-lisp/macroexp.el (macroexp-file-name): New function.
Yes, finally: a function that tells you the name of the file where
the code is located.  Finding this name is non-trivial in practice,
as evidenced by the "4 shift/reduce conflicts" warning when compiling
CEDET's python.el, because its `wisent-source` got it wrong in that
case, thinking the grammar came from `python.el` instead of
`python-wy.el`.

While at it, also made `macroexp-compiling-p` public, since it's
useful at various places.

(macroexp-compiling-p): Rename from `macroexp--compiling-p`.

* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables):
Bind `load-file-name` to nil so we can distinguish a load that calls
the byte compiler from a byte compilation which causes a load.

* lisp/cedet/semantic/wisent/python.el (wisent-python--expected-conflicts):
Remove; it was just a workaround.
* lisp/subr.el (do-after-load-evaluation): Avoid `byte-compile--` vars.
* lisp/cedet/semantic/fw.el (semantic-alias-obsolete):
Use `macroexp-compiling-p` and `macroexp-file-name`.
* lisp/cedet/semantic/wisent/comp.el (wisent-source): Use `macroexp-file-name`
(wisent-total-conflicts): Tighten regexp.
* lisp/emacs-lisp/cl-lib.el (cl--compiling-file): Delete function
and variable.  Use `macroexp-compiling-p` instead.
* lisp/progmodes/flymake.el (flymake-log):
* lisp/emacs-lisp/package.el (package-get-version):
* lisp/emacs-lisp/ert-x.el (ert-resource-directory):
Use `macroexp-file-name`.
2021-02-24 13:52:45 -05:00
Andrea Corallo
cf1e8e792f Merge remote-tracking branch 'savannah/master' into HEAD 2021-02-21 22:08:01 +01:00
Stefan Kangas
7467dc4f18 Do interactive mode tagging for package.el 2021-02-19 06:15:34 +01:00