Commit graph

157 commits

Author SHA1 Message Date
Michael Shields
ebcde0f90f Fix use-package :custom-face to set face-defface-spec (bug#77928)
By default, `face-set-spec' sets the override face spec, so face
attributes are combined with defaults rather than replacing them.
This was a behavior change that was an apparently unintended
consequence of commit 6b344a9.

Also set the `face-modified' property, which causes Customize to
flag the face as changed outside Customize.

* doc/misc/use-package.texi (Faces): Document the behavior.
* lisp/use-package/use-package-core.el (use-package-handler/:custom-face):
(use-package): Improve docstring to reflect implementation.
* test/lisp/use-package/use-package-tests.el
(use-package-test/:custom-face-1): (use-package-test/:custom-face-2):
(use-package-test/:custom-face-3): (use-package-test/:custom-face-4):
Add tests.
2025-04-27 10:48:55 +03:00
Michael Albinus
faa3fbe010 Merge from origin/emacs-30
e6b4c0bceb lisp/emacs-lisp/cl-macs.el (cl-labels): Fix docstring (bu...
7a976d1aaf Fix minor issues in documentation of `use-package'
99ff59bd66 PHP should be in the PATH, either locally or remotely. (b...
26873d5028 Avoid warning when loading 'go-ts-mode'
a702f29a00 ; Fix package-version values
a1fbc51dc7 ; * lisp/which-key.el (which-key-idle-delay): Fix package...

# Conflicts:
#	lisp/progmodes/php-ts-mode.el
#	lisp/which-key.el
2025-03-30 16:17:00 +02:00
Dominik Schrempf
7a976d1aaf Fix minor issues in documentation of `use-package'
(Bug#77311)

Copyright-paperwork-exempt: yes
2025-03-29 17:15:55 +03:00
Stefan Kangas
38782e684b Improve use-package error message on wrong type
* lisp/use-package/use-package-core.el (use-package): Improve error
message when passed the wrong type.  (Bug#72160)
2025-03-02 04:07:48 +01: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
Eli Zaretskii
6dcd3d2404 Merge from origin/emacs-30
b420e149b1 Fix a typo in ediff-init.el
e1304e9b1b Fix 'chart-space-usage' on MS-Windows
04c44405bf Fix alignment and documentation of vtable.el
4d6fadb8d2 ; * lisp/which-key.el: Fix ':package-version' (bug#73072).
54071b9cef ; Improve doc strings of 'tab-bar-mode' and 'tab-line-mode'
87a8b12a0c Fix test failure in erc-networks-tests
dad0935cfc ; * doc/emacs/building.texi (Lisp Libraries): Update (bug...
e4dc6711b0 Fix :hook in 'use-package'
c1cd036d27 ; * doc/lispref/modes.texi (Mode Line Data): Fox wording.
ae2463796f ; Caveats about using :eval in 'mode-line-format'
4047072c7d Update FSF's address
24f12bdd77 Support the new option in ruby-ts-mode too
6c15b7710d Add new option ruby-bracketed-args-indent
7799ef4335 Fix Rmail base64 and qp decoding of MIME payloads
0def396fa8 Update to Org 9.7.11
8c044bd972 ; Fix recent changes in documentation
e0d8879bcd * test/lisp/emacs-lisp/tabulated-list-tests.el: Add missi...
4ff4b78f92 ; Small doc fixes
da980ad838 ; Reword some "allows Xing"
2ca7d5649c ; More accurate text about how `equal` compares various o...

# Conflicts:
#	etc/NEWS
2024-09-07 06:25:15 -04:00
Eli Zaretskii
e4dc6711b0 Fix :hook in 'use-package'
* lisp/use-package/use-package-core.el
(use-package-handler/:hook): Support mode variables in :hook
declarations.  (Bug#72993)
2024-09-04 20:43:25 +03:00
Stefan Kangas
bca315aa4c Fix broken use-package tests
* lisp/use-package/use-package-core.el (use-package-keywords): Change
keyword order to match the one before adding :pin, :ensure, :delight,
and :diminish directly to this list.  This fixes some broken unit tests.
2024-09-01 11:30:48 +02:00
Eli Zaretskii
fa76ec7b5f Merge from origin/emacs-30
5fd75133cf Make 'python-shell--with-environment' respect buffer-loca...
e27849ecf6 Avoid ANSI escape characters in Python output (bug#45938)
4f521fa14c Fix handling of hook variables in 'use-package'
bb5576fc90 Work around Gnuplot bug in displaying plots
2024-08-31 08:14:14 -04:00
John Wiegley
4f521fa14c Fix handling of hook variables in 'use-package'
* lisp/use-package/use-package-core.el
(use-package-handler/:hook): Append "-hook" to the symbol's name
only if the named hook variable has no 'symbol-value'.
(Bug#72818)
2024-08-31 13:06:16 +03:00
Eli Zaretskii
fe5548f48c Merge from origin/emacs-30
a0b65be8eb * admin/authors.el (authors-aliases, authors-ignored-file...
58088b36e8 * admin/authors.el: Pick-up version from emacs-29.
9d7151c0ff Add missing :version tags in use-package
3f019167b8 Suppress shallow cloning on emba

# Conflicts:
#	lisp/use-package/use-package-core.el
#	lisp/use-package/use-package-ensure.el
2024-08-24 06:04:47 -04:00
Stefan Kangas
9d7151c0ff Add missing :version tags in use-package
* lisp/use-package/use-package-core.el (use-package-keywords)
(use-package-deferring-keywords, use-package-ignore-unknown-keywords)
(use-package-use-theme, use-package-verbose)
(use-package-check-before-init, use-package-always-defer)
(use-package-always-demand, use-package-defaults)
(use-package-merge-key-alist, use-package-hook-name-suffix)
(use-package-minimum-reported-time, use-package-inject-hooks)
(use-package-expand-minimally, use-package-form-regexp-eval)
(use-package-enable-imenu-support, use-package-compute-statistics):
* lisp/use-package/use-package-ensure.el (use-package-always-ensure)
(use-package-always-pin, use-package-ensure-function): Add missing
:version tags.
2024-08-20 20:12:43 +02:00
Stefan Kangas
5e940a353e ; Fix :version tags 2024-08-20 01:59:55 +02:00
Stefan Kangas
8f4ad4d726 Delete defgroup use-package-ensure
* lisp/use-package/use-package-core.el (use-package-ensure):
Delete defgroup.
(use-package-always-ensure, use-package-always-pin)
(use-package-ensure-function): Move defcustoms from above deleted
defgroup to the 'use-package' defgroup.
2024-08-20 01:57:12 +02:00
Stefan Kangas
644d2a8331 Fix early use of use-package-always-ensure
* lisp/use-package/use-package-core.el:
* lisp/use-package/use-package-delight.el:
* lisp/use-package/use-package-diminish.el:
* lisp/use-package/use-package-ensure.el: Move add-to-list for
'use-package-keywords' and 'use-package-defaults' from here...
* lisp/use-package/use-package-core.el (use-package-ensure)
(use-package-keywords): ...to the default definition here.

* lisp/use-package/use-package-ensure.el
(use-package-ensure): Move this defgroup...
(use-package-always-ensure)
(use-package-always-pin, use-package-ensure-function): ...and
these defcustoms from here...
* lisp/use-package/use-package-core.el (use-package-ensure)
(use-package-always-ensure, use-package-always-pin)
(use-package-ensure-function): ...to here.  (Bug#72453)
2024-08-20 01:56:40 +02:00
Eli Zaretskii
bfb1aee998 Fix ':defer nil' in 'use-package'
* lisp/use-package/use-package-core.el
(use-package-normalize-keywords): Use 'plist-get' instead of
'plist-member'.  (Bug#72414)
2024-08-04 11:52:12 +03:00
Stefan Kangas
4c6e9f5b00 Improve use-package-vc-valid-keywords docstring format
* lisp/use-package/use-package-core.el
(use-package-vc-valid-keywords): Improve docstring format.
2024-07-08 14:03:17 +02:00
Tony Zorman
a019d2bd56 use-package: Add ':ignored-files' support to ':vc' keyword
* lisp/use-package/use-package-core.el (use-package-split-when):
New utility function to split a list whenever a specified
predicate returns t.
(use-package-vc-valid-keywords): A new defconst to gather all
allowed keywords.
(use-package-normalize--vc-arg): Properly normalize the
':ignored-files' keyword, in that the following are all valid
ways of entering files:
  :ignored-files "a"
  :ignored-files ("a")
  :ignored-files "a" "b" "c"
  :ignored-files ("a" "b" "c")
(use-package-normalize/:vc): Adjust normalization, now that we
do not necessarily receive a valid plist as an input.  (Bug#66567)

* test/lisp/use-package/use-package-tests.el
(use-package-test-normalize/:vc): Add tests for ':ignored-files'
keyword.
2024-05-18 13:30:45 +03:00
Tony Zorman
426176c75e use-package: Update list of valid :vc keywords
* lisp/use-package/use-package-core.el: Add ':shell-command'
and ':make' to valid keywords.  (Bug#66567)
2024-05-18 13:27:47 +03:00
Tony Zorman
77115be256 Add use-package-vc-prefer-newest user option
* lisp/use-package/use-package-core.el (use-package-vc-prefer-newest):
User option to prefer the latest commit (as opposed to the latest
release) of a package.
(use-package-normalize--vc-arg): Check for
use-package-vc-prefer-newest.

* doc/misc/use-package.texi (Install package): Document
use-package-vc-prefer-newest.

* etc/NEWS: Document use-package-vc-prefer-newest.
2024-03-30 13:49:21 +01: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
Stefan Kangas
06a12b0ccc ; Fix typos 2023-12-10 13:22:04 +01:00
Stefan Kangas
de50e2ad4c Ensure bind-key is its own package
* lisp/finder.el (finder--builtins-alist): Remove "use-package"
directory.
* lisp/use-package/bind-key.el: Declare library as part of the
'bind-key' package.
* lisp/use-package/use-package-bind-key.el:
* lisp/use-package/use-package-core.el:
* lisp/use-package/use-package-delight.el:
* lisp/use-package/use-package-diminish.el:
* lisp/use-package/use-package-ensure-system-package.el:
* lisp/use-package/use-package-ensure.el:
* lisp/use-package/use-package-jump.el:
* lisp/use-package/use-package-lint.el: Declare library as part of the
'use-package' package.  (Bug#62751)

Do not merge to master.
2023-09-22 12:32:13 +02:00
Stefan Kangas
a4171e9466 Stop use-package-report from displaying an empty buffer
* lisp/use-package/use-package-core.el (use-package-report): Signal
user-error if there are no statistics to display, instead of showing
an empty buffer.
2023-08-12 12:43:19 +02:00
Stefan Kangas
0bcea805e6 Make use-package-statistics-mode non-interactive
* lisp/use-package/use-package-core.el
(use-package-statistics-mode): Make non-interactive; it only works in
buffers prepared by use-package-report.
2023-08-02 21:50:47 +02:00
Stefan Kangas
0724569c2e use-package: Mark Emacs 25 support code obsolete
* lisp/use-package/use-package-core.el
(use-package-font-lock-keywords): Make obsolete.
(font-lock-add-keywords): Only call for Emacs 25 or older.
2023-08-02 21:42:54 +02:00
Steven Allen
8d6dd1682e Fix use-package :vc keyword when byte-compiled
* lisp/use-package/use-package-core.el (use-package-handler/:vc):
Return the new 'body'. Otherwise, the entire package declaration gets
dropped when byte-compiling.
* test/lisp/use-package/use-package-tests.el
(use-package-test-handler/:vc-6): test it.
2023-06-03 10:27:46 +03:00
Tony Zorman
2ce279680b Add :vc keyword to use-package for VC package support
* lisp/use-package/use-package-core.el (use-package-keywords): Add :vc.
(use-package-handler/:load-path): Insert 'load-path' into 'state'.
(use-package-vc-install): Install the package with package-vc.el.
(use-package-handler/:vc): Handler for the :vc keyword.
(use-package-normalize--vc-arg): Normalization for more complex
arguments to 'use-package-normalize/:vc', in order to make them
compatible with the specification of 'package-vc-selected-packages'.
(use-package-normalize/:vc): Normalizer for the :vc keyword.
(use-package): Document :vc.
* lisp/use-package/use-package-ensure.el (use-package-handler/:ensure):
Do not ensure a package when :vc is used in the declaration.
* test/lisp/use-package/use-package-tests.el (use-package-test/:vc-1):
(use-package-test/:vc-2):
(use-package-test/:vc-3):
(use-package-test/:vc-4):
(use-package-test/:vc-5):
(use-package-test-normalize/:vc):
Add tests for :vc.
* etc/NEWS: Mention change.  (Bug#60418)
2023-05-16 21:22:05 +02:00
Stefan Kangas
c8d5480972 Bump use-package version for Emacs 29.1
* lisp/use-package/use-package.el: Bump version to 2.4.5.
2023-01-15 14:33:05 +01:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Mattias Engdegård
4893a15631 Fix use-package-defaults defcustom type (bug#59941)
* lisp/use-package/use-package-core.el (use-package-defaults):
Enlarge type to allow for keywords such as :ensure and :pin to be
added later, remedying a failure in test-custom-opts.
2022-12-11 16:48:41 +01:00
Stefan Kangas
c417fe4df3 ; Refer to the manual in use-package docstring
* lisp/use-package/use-package-core.el (use-package): Refer to manual.
2022-12-09 05:13:29 +01:00
Stefan Kangas
0b3116971a Clarify :after keyword in use-package docstring
* lisp/use-package/use-package-core.el (use-package): Clarify the
effect of :after in docstring.

Resolves https://github.com/jwiegley/use-package/issues/825
2022-12-09 05:12:33 +01:00
Stefan Kangas
9089577329 ; Improve use-package Commentary sections
* lisp/use-package/bind-key.el:
* lisp/use-package/use-package-bind-key.el:
* lisp/use-package/use-package-core.el:
* lisp/use-package/use-package-ensure-system-package.el:
* lisp/use-package/use-package-ensure.el:
* lisp/use-package/use-package.el: Improve Commentary sections.
2022-12-09 00:32:30 +01:00
Stefan Kangas
2626704054 ; Normalize GPLv3 license statements in new files 2022-12-09 00:13:00 +01:00
Stefan Kangas
15fb115551 Update use-package defgroups
* lisp/use-package/bind-key.el (bind-key):
* lisp/use-package/use-package-core.el (use-package):
* lisp/use-package/use-package-ensure.el (use-package-ensure): Add
:link, :version and :group to defgroups.
2022-12-08 17:11:21 +01:00
Stefan Kangas
5899cac111 Change use-package custom :group to initialization
* lisp/use-package/use-package-core.el (use-package): Move
defgroup to custom :group 'initialization'.
2022-12-08 08:48:24 +01:00
Stefan Kangas
ebbd98edb3 Revert "Add: 'local' keyword"
This reverts commit 620fe443c2.
2022-11-27 10:14:35 +01:00
John Wiegley
e42c8479ec Merge pull request from skangas/dir-locals
GitHub-reference: https://github.com/jwiegley/use-package/issues/1023
2022-11-16 11:29:27 -08:00
Stefan Kangas
30fa366737 Add .dir-locals.el 2022-11-16 18:02:20 +01:00
Stefan Kangas
79c2c3a3ad Delete redundant headers 2022-11-16 08:43:55 +01:00
Stefan Kangas
2399d0d5ce Normalize GPLv3 license statements 2022-11-16 08:43:55 +01:00
John Wiegley
ae301ad36d Merge pull request from skangas/checkdoc
GitHub-reference: https://github.com/jwiegley/use-package/issues/1015
2022-11-14 12:07:34 -08:00
John Wiegley
5dad5ff0fe Merge pull request from skangas/ci
GitHub-reference: https://github.com/jwiegley/use-package/issues/1013
2022-11-14 12:07:06 -08:00
Stefan Kangas
ff30d22909 Various checkdoc fixes 2022-11-14 02:18:43 +01:00
Stefan Kangas
43254ae62f Fix building on Emacs 24.3
This fixes the following error:
use-package-core.el:60:32:Error: Cannot open load file: subr-x
2022-11-13 23:26:44 +01:00
Payas Relekar
7122ac5397 Bump version to 2.4.4 2022-11-05 13:28:24 +05:30
John Wiegley
6b25a41bc6 Merge pull request from andreyorst/face-spec-set-third-argument
GitHub-reference: https://github.com/jwiegley/use-package/issues/1009
2022-10-29 14:57:19 -04:00