unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33901: 26.1; cl-letf is unexpectedly not autoloaded
@ 2018-12-29 10:12 Markus Triska
  2018-12-29 11:00 ` Andreas Schwab
  2018-12-31  0:45 ` Glenn Morris
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Triska @ 2018-12-29 10:12 UTC (permalink / raw)
  To: 33901


When I invoke Emacs via:

    $ emacs -Q --eval '(cl-letf ((x t)) x)'

then it displays:

    eval: Symbol’s function definition is void: cl-letf

However, the documentation of cl-letf states:

    "cl-letf is an autoloaded Lisp macro ... "

Hence, I expect cl-letf to be autoloaded in that case. Could this be
changed to work? Thank you!

In GNU Emacs 26.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
 of 2018-09-22 built on mt-mbpro
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33901: 26.1; cl-letf is unexpectedly not autoloaded
  2018-12-29 10:12 bug#33901: 26.1; cl-letf is unexpectedly not autoloaded Markus Triska
@ 2018-12-29 11:00 ` Andreas Schwab
  2018-12-29 11:38   ` Markus Triska
  2018-12-31  0:45 ` Glenn Morris
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2018-12-29 11:00 UTC (permalink / raw)
  To: Markus Triska; +Cc: 33901

On Dez 29 2018, Markus Triska <triska@metalevel.at> wrote:

> When I invoke Emacs via:
>
>     $ emacs -Q --eval '(cl-letf ((x t)) x)'
>
> then it displays:
>
>     eval: Symbol’s function definition is void: cl-letf
>
> However, the documentation of cl-letf states:
>
>     "cl-letf is an autoloaded Lisp macro ... "

Those autoloads are only defined in the cl-macs package.  You need to
load it first.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33901: 26.1; cl-letf is unexpectedly not autoloaded
  2018-12-29 11:00 ` Andreas Schwab
@ 2018-12-29 11:38   ` Markus Triska
  2018-12-29 13:09     ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Triska @ 2018-12-29 11:38 UTC (permalink / raw)
  To: 33901

Andreas Schwab <schwab@linux-m68k.org> writes:

> Those autoloads are only defined in the cl-macs package.  You need to
> load it first.

Is this really the intended way? I mean, why is this described as an
"autoloaded" macro then? From the manual, I gather:

    The “autoload” feature allows you to call a function or macro whose
    function definition has not yet been loaded into Emacs.  It specifies
    which file contains the definition.  When an autoload object appears as
    a symbol’s function definition, calling that symbol as a function
    automatically loads the specified file; then it calls the real ...

If I have to load cl-macs before using cl-letf, it seems to be as good
as not having an autoload for it at all. Is there any advantage to this?






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33901: 26.1; cl-letf is unexpectedly not autoloaded
  2018-12-29 11:38   ` Markus Triska
@ 2018-12-29 13:09     ` Andreas Schwab
  2018-12-30 10:22       ` Markus Triska
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2018-12-29 13:09 UTC (permalink / raw)
  To: Markus Triska; +Cc: 33901

On Dez 29 2018, Markus Triska <triska@metalevel.at> wrote:

> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> Those autoloads are only defined in the cl-macs package.  You need to
>> load it first.

Replace "cl-macs" by "cl" above, which is what defines the autoloads.

> Is this really the intended way? I mean, why is this described as an
> "autoloaded" macro then?

Because you have loaded the cl package.

> If I have to load cl-macs before using cl-letf, it seems to be as good
> as not having an autoload for it at all. Is there any advantage to this?

The cl package exists of several files.  The autoloads arrange for
loading only the subset that is actually used.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33901: 26.1; cl-letf is unexpectedly not autoloaded
  2018-12-29 13:09     ` Andreas Schwab
@ 2018-12-30 10:22       ` Markus Triska
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Triska @ 2018-12-30 10:22 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 33901

Andreas Schwab <schwab@linux-m68k.org> writes:

>> Is this really the intended way? I mean, why is this described as an
>> "autoloaded" macro then?
>
> Because you have loaded the cl package.

To be absolutely honest, for a macro that is documented as autoloaded, I
expect Emacs to automatically load all required files. So, in this
concrete case, I would expect Emacs to automatically load cl, cl-lib, or
cl-macs, or whatever is necessary to use cl-letf. If it does not do
this, my impression is that the macro shall not be called autoloaded, on
the grounds that the required definitions are not automatically loaded.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33901: 26.1; cl-letf is unexpectedly not autoloaded
  2018-12-29 10:12 bug#33901: 26.1; cl-letf is unexpectedly not autoloaded Markus Triska
  2018-12-29 11:00 ` Andreas Schwab
@ 2018-12-31  0:45 ` Glenn Morris
  1 sibling, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2018-12-31  0:45 UTC (permalink / raw)
  To: Markus Triska; +Cc: 33901


This is a specific instance of the general problem described in
https://debbugs.gnu.org/26782

As such, I would suggest closing this report, since I don't think it
adds anything new.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-31  0:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-29 10:12 bug#33901: 26.1; cl-letf is unexpectedly not autoloaded Markus Triska
2018-12-29 11:00 ` Andreas Schwab
2018-12-29 11:38   ` Markus Triska
2018-12-29 13:09     ` Andreas Schwab
2018-12-30 10:22       ` Markus Triska
2018-12-31  0:45 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).