From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62376: 30.0.50; global-display-fill-column-indicator-modes broken? Date: Thu, 23 Mar 2023 09:16:51 -0400 Message-ID: References: <83r0tg6ax2.fsf@gnu.org> <831qlf6dov.fsf@gnu.org> <83y1nn4xjc.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35516"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62376@debbugs.gnu.org, salutis@me.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 23 14:18:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pfKpb-0008wo-BB for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Mar 2023 14:18:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfKpQ-0003gc-7o; Thu, 23 Mar 2023 09:18:04 -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 1pfKpP-0003gR-09 for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2023 09:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfKpO-0003R5-O8 for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2023 09:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pfKpO-00070f-3K for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2023 09:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Mar 2023 13:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62376 X-GNU-PR-Package: emacs Original-Received: via spool by 62376-submit@debbugs.gnu.org id=B62376.167957742826880 (code B ref 62376); Thu, 23 Mar 2023 13:18:02 +0000 Original-Received: (at 62376) by debbugs.gnu.org; 23 Mar 2023 13:17:08 +0000 Original-Received: from localhost ([127.0.0.1]:37503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfKoV-0006zU-R8 for submit@debbugs.gnu.org; Thu, 23 Mar 2023 09:17:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pfKoT-0006yx-ST for 62376@debbugs.gnu.org; Thu, 23 Mar 2023 09:17:06 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DC1B4100117; Thu, 23 Mar 2023 09:16:59 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1C6B010009E; Thu, 23 Mar 2023 09:16:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1679577414; bh=qu3z5sQN09VMoTHdmCo/Hmv2qpn4JyKof3CgZMptMz8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kJT5Ohn9iCByoHMaRU2sCXx35j3l0/o3t+tg9+Pq3iScRSywkCIcSzEm7Gse/hE4S 4BZA5cP8MjpkIK6b0RITtlgPz6qvMfA8+1UfCUw8QI7nIJFG7IINJdAYfn/PhkuvWP qkeJxT1NC1OMSPLQP8WTsAMjnbe9If2rB0ttH9wFY8X/ALWzzL0EPP1uaP44ZUvcke yNPMxcjXAMuKsaR5KaSLcWPbazHkaJmw8MEcMVaXDp3f++OXkvxeBEFRH14uGRJcQZ Ilc57RPOltahKJj0Ri9ddWc2kIbwMLO9kD/mU0BcIY2+dFtOSdx1LNzLQ+ARSbByWg AcYQv7NwfNeFQ== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B7ABE1232B8; Thu, 23 Mar 2023 09:16:53 -0400 (EDT) In-Reply-To: <83y1nn4xjc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 23 Mar 2023 11:39:03 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258458 Archived-At: >> Thanks, I verified that this fixes the bug, and installed it on the >> emacs-29 branch. > Hmm... but "C-h v" still tells me the variable is defined in > loaddefs.el, until display-fill-column-indicator.el is loaded. I think it's an unrelated problem. > Can we do anything to prevent this? Probably. The code that "fixes/adjusts" this is an ugly hack I came up with many years ago and it's quite brittle. My guess is that it doesn't work any more because of some change to the way we build/handle `loaddefs.el` (the code works by using `load-history` to see the "origin" of the variable, (in the present case it should say `loaddefs.el(c)`) then look for the actual place in that file where the variable is found, and then checks to see if that place looks like those produced by `autoload.el` (which here should be the case) and then uses the comments added by `autoload.el` to find the *real* origin). We should really replace it with something more explicit/reliable so we don't have to "parse" the `loaddefs.el` file, but it's definitely out of the scope of `emacs-29`. In the mean time, the patch below seems to make the ugly hack work again it for me. Stefan diff --git a/lisp/help-fns.el b/lisp/help-fns.el index f9edf14a1da..b040ec49214 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -438,7 +438,7 @@ find-lisp-object-file-name (setq file-name (locate-file file-name load-path '(".el" ".elc") 'readable))) ((and (stringp file-name) - (string-match "[.]*loaddefs.el\\'" file-name)) + (string-match "[.]*loaddefs.elc?\\'" file-name)) ;; An autoloaded variable or face. Visit loaddefs.el in a buffer ;; and try to extract the defining file. The following form is ;; from `describe-function-1' and `describe-variable'.