[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c194a31fc45 2/8: Merge from origin/emacs-29
From: |
Stefan Kangas |
Subject: |
master c194a31fc45 2/8: Merge from origin/emacs-29 |
Date: |
Mon, 20 Mar 2023 01:46:24 -0400 (EDT) |
branch: master
commit c194a31fc4581125afa202e1641e3f2f54cd98bd
Merge: 32bfeaf0070 028f1102738
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Merge from origin/emacs-29
028f1102738 Fix quoting of font-family in 'hfy-family'
4cb8a850b08 ; Tweak doc/misc/eglot.texi
d5d4959ed7d Document how to construct JSONRPC arrays in Eglot manual
078cf512eef * test/infra/Dockerfile.emba: Use debian:bullseye.
61adb44318a * configure.ac: Fix native comp compatibility check (bug#...
d814c249f44 * test/infra/Dockerfile.emba: Install clangd.
27edd7f88cb Remove 'package-vc--query-spec'
39fea115515 Do not store :lisp-dir in package descriptors
168165178f3 Use 'package-vc-selected-packages' to store package specs
---
configure.ac | 4 +--
doc/emacs/package.texi | 23 ---------------
doc/misc/eglot.texi | 30 +++++++++++--------
lisp/emacs-lisp/package-vc.el | 68 ++++++++++++++++++-------------------------
lisp/htmlfontify.el | 4 ++-
test/infra/Dockerfile.emba | 5 ++--
6 files changed, 55 insertions(+), 79 deletions(-)
diff --git a/configure.ac b/configure.ac
index 25afe3a6981..c5300beb2ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4289,8 +4289,8 @@ If you really want to try it anyway, use the configure
option
fi
if test "${with_native_compilation}" != "no"; then
- if test "${HAVE_PDUMPER}" = no; then
- AC_MSG_ERROR(['--with-native-compilation' requires
'--with-dumping=pdumper'])
+ if test "$with_unexec" = yes; then
+ AC_MSG_ERROR(['--with-native-compilation' is not compatible with
unexec])
fi
if test "${HAVE_ZLIB}" = no; then
AC_MSG_ERROR(['--with-native-compilation' requires zlib])
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index d993b7b071f..7a2bc11d03c 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -558,29 +558,6 @@ regular package listing. If you just wish to clone the
source of a
package, without adding it to the package list, use
@code{package-vc-checkout}.
-@vindex package-vc-selected-packages
-@findex package-vc-install-selected-packages
- An alternative way to use @code{package-vc-install} is via the
-@code{package-vc-selected-packages} user option. This is an alist of
-packages to install, where each key is a package name and the value is
-@code{nil}, indicating that any revision is to install, a string,
-indicating a specific revision or a package specification plist. The
-side effect of setting the user option is to install the package, but
-the process can also be manually triggered using the function
-@code{package-vc-install-selected-packages}. Here is an example of
-how the user option:
-
-@example
-@group
-(setopt package-vc-selected-packages
- '((modus-themes . "0f39eb3fd9") ;specific revision
- (auctex . nil) ;any revision
- (foo ;a package specification
- :url "https://git.sv.gnu.org/r/foo-mode.git"
- :branch "trunk")))
-@end group
-@end example
-
@findex package-report-bug
@findex package-vc-prepare-patch
With the source checkout, you might want to reproduce a bug against
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi
index 735da5f0163..85f83ee4b26 100644
--- a/doc/misc/eglot.texi
+++ b/doc/misc/eglot.texi
@@ -977,9 +977,9 @@ facilities.
Though many language servers work well out-of-the-box, most allow
fine-grained control of their operation via specific configuration
-options that vary from server to server. A small number of servers
-require such special configuration to work acceptably, or even to work
-at all.
+options that are transmitted over the LSP protocol and vary from
+server to server. A small number of servers require such special
+configuration to work acceptably, or even to work at all.
After having setup a server executable program in
@code{eglot-server-programs} (@pxref{Setting Up LSP Servers}) and
@@ -1016,8 +1016,9 @@ server reads the file @file{~/.config/pycodestyle} for
user
configuration. The @command{clangd} C/C++ server reads both
@file{~/.config/clangd/config.yaml} for user configuration and
@file{.clangd} for project configuration. It may be advantageous to
-use these mechanisms instead of Eglot's, as the latter have the
-advantage of working with other LSP clients.
+use these mechanisms instead of Eglot's, as this will probably work
+with other LSP clients and may be easier to debug than options riding
+on the LSP wire.
@node Project-specific configuration
@section Project-specific configuration
@@ -1201,7 +1202,7 @@ the LSP handshake. This is done using the
The argument @code{(:compilationDatabasePath "/tmp")} is Emacs's
representation in plist format of a simple JSON object
@code{@{"compilationDatabasePath": "/tmp"@}}. To learn how to
-represent more deeply nested options in this format, @xref{JSONRPC
+represent more deeply nested options in this format, @pxref{JSONRPC
objects in Elisp}.
In this case, the two examples achieve exactly the same, but notice
@@ -1214,7 +1215,7 @@ supported. It consists of @emph{globally} setting
@code{eglot-workspace-configuration}, a variable originally intended
for project-specific configuration. This has the same effect as
giving all your projects a certain default configuration, as described
-in @xref{Project-specific configuration}. Here is an example.
+in @ref{Project-specific configuration}. Here is an example:
@lisp
(setq-default eglot-workspace-configuration
@@ -1241,17 +1242,21 @@ keyword-value property sub-plists corresponding to JSON
sub-objects.
For representing the JSON leaf values @code{true}, @code{false},
@code{null} and @code{@{@}}, you can use the Lisp values @code{t},
@code{:json-false}, @code{nil}, and @code{eglot-@{@}}, respectively.
+JSON arrays are represented as Elisp vectors surrounded by square brackets
+(@pxref{Vectors,,,elisp,GNU Emacs Lisp Reference Manual}).
-For example, this plist:
+For example, the plist
@lisp
(:pylsp (:plugins (:jedi_completion (:include_params t
- :fuzzy t)
- :pylint (:enabled :json-false)))
+ :fuzzy t
+ :cache_for ["pandas" "numpy"]
+ :pylint (:enabled :json-false))))
:gopls (:usePlaceholders t))
@end lisp
-Is serialized by Eglot to the following JSON text:
+@noindent
+is serialized by Eglot to the following JSON text:
@example
@{
@@ -1259,7 +1264,8 @@ Is serialized by Eglot to the following JSON text:
"plugins": @{
"jedi_completion": @{
"include_params": true,
- "fuzzy": true
+ "fuzzy": true,
+ "cache_for": [ "pandas", "numpy" ],
@},
"pylint": @{
"enabled": false
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index ea2766b8dc4..253b35f1f1a 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -48,7 +48,6 @@
;;; Code:
(eval-when-compile (require 'rx))
-(eval-when-compile (require 'inline))
(eval-when-compile (require 'map))
(eval-when-compile (require 'cl-lib))
(require 'package)
@@ -139,7 +138,6 @@ the `clone' function."
(package-desc-create :name name :kind 'vc))
spec)))))))
-;;;###autoload
(defcustom package-vc-selected-packages '()
"List of packages that must be installed.
Each member of the list is of the form (NAME . SPEC), where NAME
@@ -174,13 +172,9 @@ is a symbol designating the package and SPEC is one of:
All other keys are ignored.
-This user option differs from `package-selected-packages' in that
-it is meant to be specified manually. If you want to install all
-the packages in the list, you cal also use
-`package-vc-install-selected-packages'.
-
-Note that this option will not override an existing source
-package installation or revert the checked out revision."
+This user option will be automatically updated to store package
+specifications for packages that are not specified in any
+archive."
:type '(alist :tag "List of packages you want to be installed"
:key-type (symbol :tag "Package")
:value-type
@@ -191,10 +185,6 @@ package installation or revert the checked out revision."
(:lisp-dir string)
(:main-file string)
(:vc-backend symbol)))))
- :initialize #'custom-initialize-default
- :set (lambda (sym val)
- (custom-set-default sym val)
- (package-vc-install-selected-packages))
:version "29.1")
(defvar package-vc--archive-spec-alist nil
@@ -224,19 +214,17 @@ All other values are ignored.")
The optional argument NAME can be used to override the default
name for PKG-DESC."
(alist-get
- (or name (package-desc-name pkg-desc))
- (if (package-desc-archive pkg-desc)
+ (setq name (or name (package-desc-name pkg-desc)))
+ (if (and (package-desc-archive pkg-desc)
+ (not (alist-get name package-vc-selected-packages
+ nil nil #'string=)))
(alist-get (intern (package-desc-archive pkg-desc))
package-vc--archive-spec-alist)
- (apply #'append (mapcar #'cdr package-vc--archive-spec-alist)))
- nil nil #'string=))
-
-(define-inline package-vc--query-spec (pkg-desc prop)
- "Query the property PROP for the package specification of PKG-DESC.
-If no package specification can be determined, the function will
-return nil."
- (inline-letevals (pkg-desc prop)
- (inline-quote (plist-get (package-vc--desc->spec ,pkg-desc) ,prop))))
+ ;; Consult both our local list of package specifications, as well
+ ;; as the lists provided by the archives.
+ (apply #'append (cons package-vc-selected-packages
+ (mapcar #'cdr package-vc--archive-spec-alist))))
+ '() nil #'string=))
(defun package-vc--read-archive-data (archive)
"Update `package-vc--archive-spec-alist' for ARCHIVE.
@@ -309,12 +297,11 @@ asynchronously."
(directory (file-name-concat
(or (package-desc-dir pkg-desc)
(expand-file-name name package-user-dir))
- (and-let* ((extras (package-desc-extras pkg-desc)))
- (alist-get :lisp-dir extras))))
- (file (or (plist-get pkg-spec :main-file)
- (expand-file-name
- (concat name ".el")
- directory))))
+ (plist-get pkg-spec :lisp-dir)))
+ (file (expand-file-name
+ (or (plist-get pkg-spec :main-file)
+ (concat name ".el"))
+ directory)))
(if (file-exists-p file) file
;; The following heuristic is only necessary when fetching a
;; repository with URL that would break the above assumptions.
@@ -495,12 +482,12 @@ documentation and marking the package as installed."
missing)))
(let ((default-directory (file-name-as-directory pkg-dir))
- (pkg-file (expand-file-name (package--description-file pkg-dir)
pkg-dir)))
+ (pkg-file (expand-file-name (package--description-file pkg-dir)
pkg-dir))
+ (pkg-spec (package-vc--desc->spec pkg-desc)))
;; Generate autoloads
(let* ((name (package-desc-name pkg-desc))
(auto-name (format "%s-autoloads.el" name))
- (extras (package-desc-extras pkg-desc))
- (lisp-dir (alist-get :lisp-dir extras)))
+ (lisp-dir (plist-get pkg-spec :lisp-dir)))
(package-generate-autoloads
name (file-name-concat pkg-dir lisp-dir))
(when lisp-dir
@@ -520,8 +507,7 @@ documentation and marking the package as installed."
(package-vc--generate-description-file pkg-desc pkg-file)
;; Detect a manual
- (when-let ((pkg-spec (package-vc--desc->spec pkg-desc))
- ((executable-find "install-info")))
+ (when (executable-find "install-info")
(dolist (doc-file (ensure-list (plist-get pkg-spec :doc)))
(package-vc--build-documentation pkg-desc doc-file))))
@@ -584,7 +570,6 @@ attribute in PKG-SPEC."
(unless (file-exists-p dir)
(make-directory (file-name-directory dir) t)
(let ((backend (or (plist-get pkg-spec :vc-backend)
- (package-vc--query-spec pkg-desc :vc-backend)
(package-vc--guess-backend url)
(plist-get (alist-get (package-desc-archive pkg-desc)
package-vc--archive-data-alist
@@ -659,9 +644,14 @@ abort installation?" name))
;; file system or between installations.
(throw 'done (setq lisp-dir name)))))
- (when lisp-dir
- (push (cons :lisp-dir lisp-dir)
- (package-desc-extras pkg-desc)))
+ ;; Ensure we have a copy of the package specification
+ (unless (equal (alist-get name (mapcar #'cdr
package-vc--archive-spec-alist)) pkg-spec)
+ (customize-save-variable
+ 'package-vc-selected-packages
+ (cons (cons name pkg-spec)
+ (seq-remove (lambda (spec) (string= name (car spec)))
+ package-vc-selected-packages))))
+
(package-vc--unpack-1 pkg-desc pkg-dir)))
(defun package-vc--read-package-name (prompt &optional allow-url installed)
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 1ab33cc6411..f0e38242e48 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -757,7 +757,9 @@ may happen."
255))
'(0 1 2))))))
-(defun hfy-family (family) (list (cons "font-family" family)))
+(defun hfy-family (family)
+ (list (cons "font-family"
+ (format "\"%s\"" (string-replace "\"" "\\\\\"" family)))))
(defun hfy-bgcol (color) (list (cons "background" (hfy-triplet color))))
(defun hfy-color (color) (list (cons "color" (hfy-triplet color))))
(define-obsolete-function-alias 'hfy-colour #'hfy-color "27.1")
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba
index c005d872cb8..872591333e6 100644
--- a/test/infra/Dockerfile.emba
+++ b/test/infra/Dockerfile.emba
@@ -24,7 +24,7 @@
# Maintainer: Ted Zlatanov <tzz@lifelogs.com>
# URL: https://emba.gnu.org/emacs/emacs
-FROM debian:stretch as emacs-base
+FROM debian:bullseye as emacs-base
RUN apt-get update && \
apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
@@ -34,9 +34,10 @@ RUN apt-get update && \
FROM emacs-base as emacs-inotify
+# We install clangd for Eglot tests.
RUN apt-get update && \
apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
- inotify-tools \
+ inotify-tools clangd \
&& rm -rf /var/lib/apt/lists/*
COPY . /checkout
- master updated (3748c8a62e8 -> 42fba8f36b1), Stefan Kangas, 2023/03/20
- master 20d8a1cf4bd 4/8: Merge from origin/emacs-29, Stefan Kangas, 2023/03/20
- master f615968fe1b 3/8: ; Merge from origin/emacs-29, Stefan Kangas, 2023/03/20
- master bcbfb88c2f4 6/8: Merge from origin/emacs-29, Stefan Kangas, 2023/03/20
- master 32bfeaf0070 1/8: ; Merge from origin/emacs-29, Stefan Kangas, 2023/03/20
- master f8873577563 5/8: ; Merge from origin/emacs-29, Stefan Kangas, 2023/03/20
- master 3a11371d544 7/8: ; Merge from origin/emacs-29, Stefan Kangas, 2023/03/20
- master c194a31fc45 2/8: Merge from origin/emacs-29,
Stefan Kangas <=
- master 42fba8f36b1 8/8: Merge from origin/emacs-29, Stefan Kangas, 2023/03/20