On 16 April 2010 20:12, Ilya Zakharevich wrote: > On Fri, Apr 16, 2010 at 12:27:05PM +0100, Leo wrote: >> Hello Ilya, >> >> Is it intended for the abbrevs defined in cperl-mode to be saved to the >> abbrev file i.e. these: >> >> ...... >> (let ((prev-a-c abbrevs-changed)) >>     (define-abbrev-table 'cperl-mode-abbrev-table '( >>               ("if" "if" cperl-electric-keyword 0) >>               ("elsif" "elsif" cperl-electric-keyword 0) >>               ("while" "while" cperl-electric-keyword 0) >>               ("until" "until" cperl-electric-keyword 0) >>               ("unless" "unless" cperl-electric-keyword 0) >>               ("else" "else" cperl-electric-else 0) >>               ("continue" "continue" cperl-electric-else 0) >>               ("for" "for" cperl-electric-keyword 0) >>               ("foreach" "foreach" cperl-electric-keyword 0) >>               ("formy" "formy" cperl-electric-keyword 0) >>               ("foreachmy" "foreachmy" cperl-electric-keyword 0) >>               ("do" "do" cperl-electric-keyword 0) >>               ("=pod" "=pod" cperl-electric-pod 0) >>               ("=over" "=over" cperl-electric-pod 0) >>               ("=head1" "=head1" cperl-electric-pod 0) >>               ("=head2" "=head2" cperl-electric-pod 0) >>               ("pod" "pod" cperl-electric-pod 0) >>               ("over" "over" cperl-electric-pod 0) >>               ("head1" "head1" cperl-electric-pod 0) >>               ("head2" "head2" cperl-electric-pod 0))) >>       (setq abbrevs-changed prev-a-c)) >> ...... >> >> It seems a bit better to define them as system abbrevs. > > I trust your word for this.  ;-)  What you see is the "I implemented > it the way I could - given my very limited understanding of > abbreviation tables" approach. Generally I think program should define system abbrevs to differentiate from abbrevs defined by the user. And each time define-abbrev-* runs, the abbrev definitions are overwritten anyway. The attached patch does this. BTW, defining system abbrevs doesn't change abbrev-changed so I leave the (let ...) out. > Try to educate me more, > Ilya Leo