From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: Forwording symbols Date: Mon, 24 Jun 2024 05:45:06 +0200 Message-ID: References: <878qyy1f55.fsf@gmail.com> <87o77szwif.fsf@gmail.com> <877cegzu5j.fsf@gmail.com> <87tthjxwet.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37901"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel , Eli Zaretskii To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 24 05:45:56 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sLaeR-0009ml-Ue for ged-emacs-devel@m.gmane-mx.org; Mon, 24 Jun 2024 05:45:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLado-0001qU-5R; Sun, 23 Jun 2024 23:45:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLadk-0001pl-Vr for emacs-devel@gnu.org; Sun, 23 Jun 2024 23:45:14 -0400 Original-Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLadi-0003Xk-NA; Sun, 23 Jun 2024 23:45:11 -0400 Original-Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-57cb9a370ddso4255614a12.1; Sun, 23 Jun 2024 20:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719200708; x=1719805508; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PONpnRbb7A5bMAQd/wQPSaKNawyCl7BGptSntY0O4Lg=; b=CQKMqs64i9a2OP+XJyyaxQ2DOA51n2G3GRn5fumgvX50pdYclp/WzJD+fU8vj0WBaa 6ymxHBHx/Gd3YZCSuax3f3yDUv9W6NFaQjsQsX8AZS0NM/9ScoqvIKsPS4YtI1hZy12S ziXjo/bYP7ZzQ3Qv0NN2nl7l+7xepuEZB/UWXnNpK440dzognzB6HE3Vlv8U5bu4dLD7 Bt2nEaVNSLCQF7ruIZx1+DbHcF194fw4fV1XKC88k+XZqnuhZ9oOebmvzzJCs/Mnjm5K iHY0PgxG873f+PSihQCGdu05zRJLgTwiyAHiVtrgq+fBU3ogMaLN8U0YpdTUseCnhhPP 6RCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719200708; x=1719805508; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=PONpnRbb7A5bMAQd/wQPSaKNawyCl7BGptSntY0O4Lg=; b=oF+rOQrflBAcnXFBrD9HVFd0NQdxiybUjkp8Veb+Ywz4VEEV48T3q0cJpJ9YmVjkle H8/edo+zhOGp9XX2NVCEIOWmtOd4JCyQ9GVTyHnCUfniCxhD9FzFAbsM5kzeR2C5Kkp2 F35WENJpdxhcHglvo06diBv3n7WWGhSL3FhFlBYVROd+UhI0YfDqrwVIH+0c4UpVjkvJ gj9kmSTVWZ8gVq3v9VXRemIr3OQJio4MFoIlqlC4/NOGrHnkmx9oe4S458fetCqEN6FK vAfCaLjR4MYaBi61QOlV4URdtpRd431NAGxLNqDaVGy/DnM7gdnb/ff0F4bhaDpayJnQ 3YHA== X-Forwarded-Encrypted: i=1; AJvYcCUbXwFhBrcZ08PRhC7Baz6gNBMGqfEMdHALsFCiQqScGfQyBCtthc0/4NjXUSRsutZs2Qo+GGcZO/kgMjM= X-Gm-Message-State: AOJu0YwOITjTq5zUmGG5AsBAW1UXjhG+7fPWdw+7JNEr8EyVNUuoMpiV yuf7uBMq00s3ww0tJwfyjZeAimM142JlkaHqMIDRTgFf8Z8j4cDd92+xyw== X-Google-Smtp-Source: AGHT+IGPU5q0evpVlGl/UeZgU3j8vj11CK5BAQjuc8EKZw11JVtP7IxhqW/8j4BKzA1N8jwNt+7YnQ== X-Received: by 2002:a50:a458:0:b0:57c:7f0d:304c with SMTP id 4fb4d7f45d1cf-57d4bd56b9cmr2314434a12.1.1719200707771; Sun, 23 Jun 2024 20:45:07 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a079.dip0.t-ipconnect.de. [79.227.160.121]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d3042e407sm4216115a12.46.2024.06.23.20.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 20:45:07 -0700 (PDT) In-Reply-To: <87tthjxwet.fsf@gmail.com> (Helmut Eller's message of "Sun, 23 Jun 2024 21:59:38 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320587 Archived-At: Helmut Eller writes: > On Sat, Jun 22 2024, Gerd M=C3=B6llmann wrote: > >>> The symbol is needed in store_symval_forwarding. It looks in the plist >>> for 'choice and 'range. In addition to the five symbols mentioned in >>> the definition of Lisp_Buffer_Objfwd, predicate can also be >>> 'overwrite-mode, 'vertical-scroll-bar and 'fraction. I think those have >>> those properties; weird. >> >> I guess then it's better to leave the enum part out. That seems to >> become too much work. What an ugly corner. > > Here is an attempt to use an enum. I'm not sure that it's easier to > read and the enum constants have odd names. Pushed! I find that so much better, easier to understand and maintain. There is no question anymore what that predicate can possibly be (and the comment was wrong, I'm tempted to say of course), we have compile-time support with an exhaustive switch. We got rid of that void * before that. And so on. We even spared a word in the struct :-). Thanks for doing that!