GNU bug report logs -
#12592
24.2; optional arguments NOSUFFIX MUSTSUFFIX to the load function
Previous Next
Reported by: Achim Gratz <Stromeko <at> nexgo.de>
Date: Sun, 7 Oct 2012 12:20:02 UTC
Severity: minor
Found in version 24.2
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12592 in the body.
You can then email your comments to 12592 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12592
; Package
emacs
.
(Sun, 07 Oct 2012 12:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Achim Gratz <Stromeko <at> nexgo.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 07 Oct 2012 12:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In GNU Emacs 24.2.1 (i686-suse-linux-gnu, GTK+ Version 3.4.4)
of 2012-09-30 on Rainer
Windowing system distributor `The X.Org Foundation', version 11.0.11203000
There appears to be a mismatch between documentation and implementation
of the optional arguments NOSUFFIX and MUSTSUFFIX to the load function.
The behaviour is as described when both NOSUFFIX and MUSTSUFFIX are nil,
or when NOSUFFIX is nil and MUSTSUFFIX is non-nil. However, with
NOSUFFIX non-nil, MUSTSUFFIX is not at all evaluated and no extensions
are tried, contrary to what the documentation says:
If this function fails to find a file, it may look for different
representations of that file before trying another file.
It does so by adding the non-empty suffixes in `load-file-rep-suffixes'
to the file name. Emacs uses this feature mainly to find compressed
versions of files when Auto Compression mode is enabled.
The exact suffixes that this function tries out, in the exact order,
are given by the value of the variable `load-file-rep-suffixes' if
NOSUFFIX is non-nil and by the return value of the function
`get-load-suffixes' if MUST-SUFFIX is non-nil. If both NOSUFFIX and
MUST-SUFFIX are nil, this function first tries out the latter suffixes
and then the former.
Both the documented and the implemented behaviour might be intended, but
they should be made consistent. If following the documentation, then it
seems that
fd = openp (Vload_path, file,
- (!NILP (nosuffix) ? Qnil
+ (!NILP (nosuffix) ? Vload_file_rep_suffixes
: !NILP (must_suffix) ? Fget_load_suffixes ()
: Fappend (2, (tmp[0] = Fget_load_suffixes (),
tmp[1] = Vload_file_rep_suffixes,
tmp))),
&found, Qnil);
should correct the implementation. However, the behaviour has been
implemented from the very beginning to not affix anything to the
filename when NOSUFFIX is non-nil, so maybe the documentation should be
corrected instead.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12592
; Package
emacs
.
(Sat, 20 Oct 2012 12:54:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12592 <at> debbugs.gnu.org (full text, mbox):
Achim Gratz <Stromeko <at> nexgo.de> writes:
> There appears to be a mismatch between documentation and
> implementation of the optional arguments NOSUFFIX and MUSTSUFFIX to
> the load function.
The docstring was in error. Fix committed to trunk, thanks.
bug closed, send any further explanations to
12592 <at> debbugs.gnu.org and Achim Gratz <Stromeko <at> nexgo.de>
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 20 Oct 2012 12:54:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 18 Nov 2012 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.