emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs-CVS and abbrevs


From: Stefan Monnier
Subject: Re: Emacs-CVS and abbrevs
Date: Sat, 14 Jun 2003 14:08:53 -0400

>     > That would lead to incorrect results from other commands that
>     > call define-abbrev to define a user abbrev.
>     Like which ones ?
> There are several such commands in Emacs; there might be others
> in users' programs.

Could you give some example of what you're thinking of ?
Even examples from Emacs's own packes would help understand what kind
of things you have in mind.

But other than your objection to my proposal of how to fix the problem,
what do you propose to fix the problem: getting apparently random
"save .emacs_abbrevs" prompts if you use an external package that hasn't
been updated to Emacs-CVS yet.
Or do you propose that we don't fix it ?

I understand my suggestion has some problems, but I don't have any
vested interest in using that particular solution.  On other hand,
I feel like the problem should be addressed somehow.

I'd be happy to propose other solutions, but I can't think of anything
much cleaner than what I suggested.  For examle, we could preserve
abbrevs-changed during load (i.e. instead of

    (unless (or system-flag
                (and (boundp sym) (fboundp sym)
                     (equal (symbol-value sym) expansion)
                     (equal (symbol-function sym) hook)))
      (setq abbrevs-changed t))

we could do

    (unless (or system-flag
                ;; If an abbrev is defined while loading, it's probably not
                ;; being defined interactively and doesn't need to be saved
                ;; in the .emacs_abbrevs file.
                load-file-name
                (and (boundp sym) (fboundp sym)
                     (equal (symbol-value sym) expansion)
                     (equal (symbol-function sym) hook)))
      (setq abbrevs-changed t))

Or maybe we could keep the current behavior, but make it look lees like
an Emacs bug.  Like instead of asking "save .emacs_abbrevs", we could say
".emacs_abbrevs was changed while loading sml-mode.el, do you want to
save it" ?  This way people will have a much easier time figuring out
which package is at fault and needs to be updated.

I just feel like the current behavior where Emacs asks me
"save .emacs_abbrevs" when I'm TeX-compiling my thesis, because I looked
at an unrelated SML file the day before is very confusing and will
get people feeling like Emacs is buggy (rather than go complain to me that
sml-mode needs to be updated).


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]