all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 62376@debbugs.gnu.org, salutis@me.com
Subject: bug#62376: 30.0.50; global-display-fill-column-indicator-modes broken?
Date: Thu, 23 Mar 2023 09:16:51 -0400	[thread overview]
Message-ID: <jwvmt43d3ec.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83y1nn4xjc.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 23 Mar 2023 11:39:03 +0200")

>> 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'.






  reply	other threads:[~2023-03-23 13:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 12:03 bug#62376: 30.0.50; global-display-fill-column-indicator-modes broken? Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-22 15:52 ` Eli Zaretskii
2023-03-22 16:39   ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-22 17:52   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-23  9:04     ` Eli Zaretskii
2023-03-23  9:39       ` Eli Zaretskii
2023-03-23 13:16         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-03-23 15:11           ` Eli Zaretskii
2023-03-23 17:44             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-27  9:34               ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-27 19:41                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-27 21:18                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvmt43d3ec.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62376@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=salutis@me.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.