From: Ivan Zakharyaschev <imz@altlinux.org>
Subject: patch: broken docstrings for functions from .elc.gz's
Date: Sun, 30 Mar 2003 18:24:35 +0400 (MSD) [thread overview]
Message-ID: <Pine.LNX.4.53L.0303301747540.11010@arrakis.zephyrous> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1137 bytes --]
Hello!
A bug in Emacs 21.2 (and 21.3) has been reported by Sergey
Vlasov (a patch that aims to fix it is attached):
having life.elc compressed:
/usr/share/emacs/21.3/lisp/play/life.elc.gz
sometimes results in a broken docstring for `life'. More
precisely:
After Emacs startup:
C-h f life RET (the doc for the autoloaded function is fine)
M-: (load "/usr/share/emacs/21.3/lisp/play/life.elc.gz") RET
C-h f life RET (the full doc is fine)
M-: (load "/usr/share/emacs/21.3/lisp/play/life") RET
C-h f life RET (the doc is broken)
Debugging shows that `jka-compr-load' is called in the first
case, but it isn't called in the second one. Modifying a test in
src/lread.c fixes this bad behaviour.
Usually libraries are loaded in a way similar to the second case,
so usually the docstrings get broken.
As I can see from the CVS, the issue is still there in the main
Emacs development branch. The patch is for 21.3. (There is a
description of it inside.)
Regards,
--
Ivan Zakharyaschev
ALT Linux Team member
I'm a Sisyphus developer: it's core is GNU/Linux
http://www.altlinux.ru, http://www.altlinux.com
JID: imz at altlinux.org
[-- Attachment #2: for 21.3; should be done for MAIN, too --]
[-- Type: TEXT/PLAIN, Size: 1343 bytes --]
At this place, We can find a real file with suffixed filename (`fn')
that needs to be handled in a special way (e.g. a compressed
one: "/a.elc.gz") while `filename' holds the requested
filename without the suffix ("/a").
In this case, the file shouldn't be opened and the function (openp())
should not return the fd. It should return -2, and the calling
function (load()) should call the corresponding handler in order
to load it.
It used to check whether there is a special handler by passing `filename'.
Such a test used not to give the expected result, since the handler
is applicable to the real (suffixed) found filename `fn'.
Loading libraries stored as compressed .elc-files used to be broken
because of this: the corresponding load-handler (`jka-compr-load')
used not be called, and the docstrings for the loaded functions
got corrupted when displayed.
Ivan Zakharyaschev <imz@altlinux.org>
--- emacs-21.3/src/lread.c.handleLoad 2003-03-30 13:22:31 +0400
+++ emacs-21.3/src/lread.c 2003-03-30 13:24:02 +0400
@@ -1012,7 +1012,7 @@
if (absolute)
handler = Qnil;
else
- handler = Ffind_file_name_handler (filename, Qfile_exists_p);
+ handler = Ffind_file_name_handler (build_string (fn), Qfile_exists_p);
if (! NILP (handler) && ! exec_only)
{
int exists;
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
reply other threads:[~2003-03-30 14:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Pine.LNX.4.53L.0303301747540.11010@arrakis.zephyrous \
--to=imz@altlinux.org \
/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.