* Fwd: version 1.84 of cperl-mode.el takes away my control over abbrevs
[not found] <87mz4okjsz.fsf@offby1.atm01.sea.blarg.net>
@ 2007-01-12 23:35 ` Glenn Morris
2007-01-14 1:56 ` Richard Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2007-01-12 23:35 UTC (permalink / raw)
Cc: Eric Hanchrow
I think this should go to the list.
Eric Hanchrow wrote (on Fri, 12 Jan 2007 at 13:38 -0800):
> I want something that might well be unusual, but I want it anyway: I
> want to have my own dynamic abbrevs when I'm in cperl-mode, but I do
> _not_ want the built in ones -- for example, "if" expanding into "if
> () {\n\t}". So I tried to get what I want by doing M-x edit-abbrevs
> RET, and deleting from the cperl-mode stuff those entries that I
> don't want, and then doing M-x write-abbrevs. But the next time I
> start emacs and enter cperl-mode, those nasty abbrevs are back.
> Version 1.83 of cperl-mode.el didn't have this problem.
I think all you can do is define the abbrevs you don't want to expand
to themselves, rather than deleting them. A bit ugly.
For the list: is there a better solution for this change in behaviour
caused by the adoption of system abbrevs?
Previously, if abbrevs for a mode were saved to the user abbrev file,
then these were _all_ the abbrevs that would be defined for that mode.
So any unwanted abbrevs could just be deleted.
Now, system abbrevs as defined by the mode get restored every time a
mode is loaded. Only if the user has already defined them to expand to
something else are they not loaded.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: version 1.84 of cperl-mode.el takes away my control over abbrevs
2007-01-12 23:35 ` Fwd: version 1.84 of cperl-mode.el takes away my control over abbrevs Glenn Morris
@ 2007-01-14 1:56 ` Richard Stallman
2007-01-14 19:56 ` Eric Hanchrow
2007-01-16 0:37 ` Glenn Morris
0 siblings, 2 replies; 4+ messages in thread
From: Richard Stallman @ 2007-01-14 1:56 UTC (permalink / raw)
Cc: offby1, emacs-devel
I think all you can do is define the abbrevs you don't want to expand
to themselves, rather than deleting them. A bit ugly.
Previously, if abbrevs for a mode were saved to the user abbrev file,
then these were _all_ the abbrevs that would be defined for that mode.
So any unwanted abbrevs could just be deleted.
Now, system abbrevs as defined by the mode get restored every time a
mode is loaded. Only if the user has already defined them to expand to
something else are they not loaded.
This solution seems natural to me, not ugly, so I think we should just
document it.
Would you like to try that?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: version 1.84 of cperl-mode.el takes away my control over abbrevs
2007-01-14 1:56 ` Richard Stallman
@ 2007-01-14 19:56 ` Eric Hanchrow
2007-01-16 0:37 ` Glenn Morris
1 sibling, 0 replies; 4+ messages in thread
From: Eric Hanchrow @ 2007-01-14 19:56 UTC (permalink / raw)
>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:
Glen> I think all you can do is define the abbrevs you
Glen> don't want to expand to themselves, rather than
Glen> deleting them. A bit ugly.
Richard> This solution seems natural to me, not ugly, so I think
Richard> we should just document it.
Richard> Would you like to try that?
--- cperl-mode.el 09 Dec 2006 22:54:46 -0800 1.84
+++ cperl-mode.el 14 Jan 2007 11:54:32 -0800
@@ -352,7 +352,15 @@
(defcustom cperl-electric-keywords nil
"*Not-nil (and non-null) means keywords are electric in CPerl.
-Can be overwritten by `cperl-hairy' if nil."
+Can be overwritten by `cperl-hairy' if nil.
+
+Uses abbrev-mode to do the expansion. If you want to use your
+own abbrevs in cperl-mode, but do not want keywords to be
+electric, you must redefine cperl-mode-abbrev-table: do
+\\[edit-abbrevs], search for cperl-mode-abbrev-table, and, in
+that paragraph, delete the words that appear at the ends of lines, and
+that begin with \"cperl-electric\".
+"
:type '(choice (const null) boolean)
:group 'cperl-affected-by-hairy)
--
A special circle of hell should be reserved for video
executives who place previews at the beginnings of DVDs.
-- Roger Ebert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: version 1.84 of cperl-mode.el takes away my control over abbrevs
2007-01-14 1:56 ` Richard Stallman
2007-01-14 19:56 ` Eric Hanchrow
@ 2007-01-16 0:37 ` Glenn Morris
1 sibling, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2007-01-16 0:37 UTC (permalink / raw)
Cc: offby1, emacs-devel
Richard Stallman wrote:
> This solution seems natural to me, not ugly, so I think we should just
> document it.
I installed this in abbrevs.texi:
*** 258,263 ****
--- 258,265 ----
Some abbrevs are marked with @samp{(sys)}. These ``system'' abbrevs
(@pxref{Abbrevs,,, elisp, The Emacs Lisp Reference Manual}) are
pre-defined by various modes, and are not saved to your abbrev file.
+ To disable a ``system'' abbrev, define an abbrev of the same name that
+ expands to itself, and save it to your abbrev file.
@findex edit-abbrevs
@kindex C-c C-c @r{(Edit Abbrevs)}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-16 0:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87mz4okjsz.fsf@offby1.atm01.sea.blarg.net>
2007-01-12 23:35 ` Fwd: version 1.84 of cperl-mode.el takes away my control over abbrevs Glenn Morris
2007-01-14 1:56 ` Richard Stallman
2007-01-14 19:56 ` Eric Hanchrow
2007-01-16 0:37 ` Glenn Morris
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.