[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkg 4d4690f8cf 75/76: Handle keywords in image specs
From: |
Gerd Moellmann |
Subject: |
pkg 4d4690f8cf 75/76: Handle keywords in image specs |
Date: |
Fri, 21 Oct 2022 00:16:20 -0400 (EDT) |
branch: pkg
commit 4d4690f8cfff826af19c881578c435f7d19f6a28
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Handle keywords in image specs
* src/image.c (parse_image_spec): Don't assume that keywords have
a ':' in their symbol name.
---
src/image.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/image.c b/src/image.c
index f620914931..4f548da76c 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1226,7 +1226,7 @@ parse_image_spec (Lisp_Object spec, struct image_keyword
*keywords,
/* First element of a pair must be a symbol. */
key = XCAR (plist);
plist = XCDR (plist);
- if (!SYMBOLP (key))
+ if (!SYMBOLP (key) || !SYMBOL_KEYWORD_P (key))
return false;
/* There must follow a value. */
@@ -1234,9 +1234,11 @@ parse_image_spec (Lisp_Object spec, struct image_keyword
*keywords,
return false;
value = XCAR (plist);
- /* Find key in KEYWORDS. Error if not found. */
+ /* Find key in KEYWORDS. Error if not found. The keywords in
+ keywords have a ':' in their name, which we ignore, because
+ the keyword names have no ':'. */
for (i = 0; i < nkeywords; ++i)
- if (strcmp (keywords[i].name, SSDATA (SYMBOL_NAME (key))) == 0)
+ if (strcmp (keywords[i].name + 1, SSDATA (SYMBOL_NAME (key))) == 0)
break;
if (i == nkeywords)
- pkg 74da61ff09 74/76: Remove a call to pkg_break, (continued)
- pkg 74da61ff09 74/76: Remove a call to pkg_break, Gerd Moellmann, 2022/10/21
- pkg cc6095482b 73/76: Add pkg_set_status and Lisp defun for it, Gerd Moellmann, 2022/10/21
- pkg 7acb6c5ca1 68/76: Intrdduce pkg_find_symbol, Gerd Moellmann, 2022/10/21
- pkg 55cef2c78c 69/76: Some cleanup in pkg.c and lisp.h, Gerd Moellmann, 2022/10/21
- pkg df1e4c1e51 34/76: Allow intern with ":xyz" again, Gerd Moellmann, 2022/10/21
- pkg 513f5a0b90 21/76: Remove obarrays, Gerd Moellmann, 2022/10/21
- pkg 051a17f540 63/76: Fix some warnings, Gerd Moellmann, 2022/10/21
- pkg 0f4b419fa3 65/76: Remove unused function prototype from lisp.h, Gerd Moellmann, 2022/10/21
- pkg adf7b760f2 12/76: More symbol reading, Gerd Moellmann, 2022/10/21
- pkg e2b79c2c5a 14/76: Revert the escaping of symbol names in lisp files, Gerd Moellmann, 2022/10/21
- pkg 4d4690f8cf 75/76: Handle keywords in image specs,
Gerd Moellmann <=
- pkg f45b266d0e 03/76: Don't use symbols that look package-qualified, Gerd Moellmann, 2022/10/21
- pkg 06cfa629a5 05/76: Print symbols differently, Gerd Moellmann, 2022/10/21
- pkg 54a08db92b 01/76: Basic functionality for packages, Gerd Moellmann, 2022/10/21
- pkg 3e29407122 10/76: And more fixes, Gerd Moellmann, 2022/10/21
- pkg 8615f5b048 15/76: Can now pdumg withput warnings from cl-defstruct, Gerd Moellmann, 2022/10/21
- pkg 0e5323c908 16/76: Remove Lisp_Symbol::interned, Gerd Moellmann, 2022/10/21
- pkg aa00af4e17 26/76: Consider shorthands out of scope, Gerd Moellmann, 2022/10/21
- pkg 4c1bbd4fd7 31/76: intern-soft with ':' trick, Gerd Moellmann, 2022/10/21
- pkg ea65e35cf3 28/76: src/alloc.c: Remove all uses of `pure_alloc`, Gerd Moellmann, 2022/10/21
- pkg a5f6912c6d 30/76: Mapatoms differently, Gerd Moellmann, 2022/10/21