Groups | Search | Server Info | Login | Register
| Path | csiph.com!news.swapon.de!news.mb-net.net!open-news-network.org!.POSTED!not-for-mail |
|---|---|
| From | Mekeor Melire <mekeor@posteo.de> |
| Newsgroups | comp.emacs |
| Subject | Re: derive from an Emacs package without modifying it |
| Date | Thu, 11 Sep 2025 23:25:51 +0200 |
| Organization | MB-NET.NET for Open-News-Network e.V. |
| Message-ID | <87cy7wy940.fsf@posteo.de> (permalink) |
| References | <87cy7w6hw5.fsf@gmx.de> |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | gwaiyur.mb-net.net; logging-data="1152579"; mail-complaints-to="abuse@open-news-network.org" |
| Cancel-Lock | sha1:O0P2hrmjvI0hV/nRHhOFF4kxye8= sha1:DW/UFrqjG9PmYfMGAh/uWaIBYUg= sha256:pJBAgkOt5qWqxa62KMLLeJOVXOjs+M9PpLooznGCBiU= sha1:q0HkvobizVoENzV05UuJSFqiHQk= sha256:Rxpn/c/MGlQisTRNPzbj4y3QPF/4Jq8WY+IiuQX1ya4= |
| Xref | csiph.com comp.emacs:2480 |
Show key headers only | View raw
2025-09-11 19:03 walthervondervogelweide@gmx.de:
> My question is, how do I mitigiate these requirements? The
> changes are e. g. in a core defstruct of ejira. I would have to
> change these back to default in order to make ejira3 useful to
> others.
Maybe you can just redefine the struct in your personal
code. Redefining seems to work as expected. For example, here I
define a struct with slot "sex", then redefine it with "slot"
"replaced" with "gender":
;; -*- lexical-binding: t; -*-
(require 'cl-lib)
(cl-defstruct person first-name age sex)
;; => person
(mapcar #'cl--slot-descriptor-name
(cl--struct-class-slots
(plist-get (symbol-plist 'person) 'cl--class)))
;; => (first-name age sex)
(cl-defstruct person first-name age gender)
;; => person
(mapcar #'cl--slot-descriptor-name
(cl--struct-class-slots
(plist-get (symbol-plist 'person) 'cl--class)))
;; => (first-name age gender)
Back to comp.emacs | Previous | Next — Previous in thread | Next in thread | Find similar
derive from an Emacs package without modifying it Wolfgang Mederle <walthervondervogelweide@gmx.de> - 2025-09-11 19:03 +0200
Re: derive from an Emacs package without modifying it Mekeor Melire <mekeor@posteo.de> - 2025-09-11 23:24 +0200
Re: derive from an Emacs package without modifying it Wolfgang Mederle <walthervondervogelweide@gmx.de> - 2025-09-13 01:15 +0200
Re: derive from an Emacs package without modifying it Mekeor Melire <mekeor@posteo.de> - 2025-09-11 23:24 +0200
Re: derive from an Emacs package without modifying it Mekeor Melire <mekeor@posteo.de> - 2025-09-11 23:25 +0200
Re: derive from an Emacs package without modifying it Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-11 22:21 +0000
csiph-web