all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* eval-after-load changes
@ 2006-05-25 10:46 Romain Francoise
  2006-05-26 16:20 ` Reiner Steib
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Francoise @ 2006-05-25 10:46 UTC (permalink / raw)
  Cc: emacs-devel

There's a bug in the changes you installed yesterday: `eval-after-load'
forms get evaluated immediately if the last word of the name of the file
they're contained in matches the FILE arg of the e-a-l form.

To reproduce this bug, create a file named `this-is-not-ibuffer.el' that
contains the following:

(eval-after-load "ibuffer"
  '(progn
     (add-to-list 'ibuffer-maybe-show-predicates "\\.newsrc")))

Then start Emacs with emacs -q and try to load the file.  Emacs signals
the following error:

| progn: Symbol's value as variable is void: ibuffer-maybe-show-predicates

I.e. it tried to evaluate the eval-after-load form, even though ibuffer
isn't loaded.  This is because the new `do-after-load-evaluation'
function contains this code:

    (string-match (car a-l-element) abs-file)

which runs as:

    (string-match "\\<ibuffer\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'"
                  "/tmp/this-is-not-ibuffer.el")

which returns 17, and not nil.  I think the regexp should begin with
\\`, not \\<, but since there's apparently special provisions to make it
use \\<, I'm not sure what a good fix could be.

(This bug makes my Emacs configuration completely broken.)

Thanks,

-- 
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
                                        | ever free! --Bryan W. Procter

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

* Re: eval-after-load changes
  2006-05-25 10:46 eval-after-load changes Romain Francoise
@ 2006-05-26 16:20 ` Reiner Steib
  2006-05-26 16:31   ` Romain Francoise
  0 siblings, 1 reply; 3+ messages in thread
From: Reiner Steib @ 2006-05-26 16:20 UTC (permalink / raw)
  Cc: Alan Mackenzie, emacs-devel

On Thu, May 25 2006, Romain Francoise wrote:

> There's a bug in the changes you installed yesterday: `eval-after-load'
> forms get evaluated immediately if the last word of the name of the file
> they're contained in matches the FILE arg of the e-a-l form.
>
> To reproduce this bug, create a file named `this-is-not-ibuffer.el' that
> contains the following:
>
> (eval-after-load "ibuffer"
>   '(progn
>      (add-to-list 'ibuffer-maybe-show-predicates "\\.newsrc")))
>
> Then start Emacs with emacs -q and try to load the file.  Emacs signals
> the following error:
>
> | progn: Symbol's value as variable is void: ibuffer-maybe-show-predicates

I see the same problem using the following file `rs-tex.el':

--8<---------------cut here---------------start------------->8---
(eval-after-load "tex"
  '(progn
     (message "featurep tex? -> %s" (featurep 'tex))
     (message "featurep rs-tex? -> %s" (featurep 'rs-tex))
     (add-to-list
      'TeX-command-list (list "Make" "make dvi" 'TeX-run-compile t t) t)))
(provide 'rs-tex)
--8<---------------cut here---------------end--------------->8---

After loading this file, the form is immediately evaled, but `tex' and
the variable `TeX-command-list' isn't available yet:

,----[ *Messages* ]
| featurep tex? -> nil
| featurep rs-tex? -> t
| progn: Symbol's value as variable is void: TeX-command-list
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: eval-after-load changes
  2006-05-26 16:20 ` Reiner Steib
@ 2006-05-26 16:31   ` Romain Francoise
  0 siblings, 0 replies; 3+ messages in thread
From: Romain Francoise @ 2006-05-26 16:31 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

> I see the same problem using the following file `rs-tex.el': [...]

Katsumi Yamaoka also reported this bug, with `w3m' vs `mime-w3m':

http://lists.gnu.org/archive/html/emacs-pretest-bug/2006-05/msg00304.html

-- 
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
                                        | ever free! --Bryan W. Procter

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

end of thread, other threads:[~2006-05-26 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25 10:46 eval-after-load changes Romain Francoise
2006-05-26 16:20 ` Reiner Steib
2006-05-26 16:31   ` Romain Francoise

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.